From b22301675027d546ee4638f9c08c101c0ff71e22 Mon Sep 17 00:00:00 2001 From: Simon Esposito Date: Thu, 28 Sep 2023 18:06:39 +0100 Subject: [PATCH] Add console local config --- console/ui/angular.json | 15 +++++++++++++-- console/ui/dist/prod-nt/index.html | 6 +++--- .../dist/prod-nt/static/main.90406e943321b759.js | 1 - .../dist/prod-nt/static/main.f133ecab0a8782e2.js | 1 + console/ui/dist/prod/index.html | 6 +++--- .../ui/dist/prod/static/main.1201486d215da8ad.js | 1 + .../ui/dist/prod/static/main.9fe54d698b3be879.js | 1 - console/ui/src/app/app.module.ts | 4 ++-- 8 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 console/ui/dist/prod-nt/static/main.90406e943321b759.js create mode 100644 console/ui/dist/prod-nt/static/main.f133ecab0a8782e2.js create mode 100644 console/ui/dist/prod/static/main.1201486d215da8ad.js delete mode 100644 console/ui/dist/prod/static/main.9fe54d698b3be879.js diff --git a/console/ui/angular.json b/console/ui/angular.json index a4f9675ace..50a5abf283 100644 --- a/console/ui/angular.json +++ b/console/ui/angular.json @@ -47,9 +47,17 @@ "namedChunks": true }, "configurations": { + "local": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + }, "production": { "outputPath": "dist/prod", - "deployUrl": "static/", + "baseHref": "/", "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -78,7 +86,7 @@ }, "production-nt": { "outputPath": "dist/prod-nt", - "deployUrl": "static/", + "baseHref": "/", "fileReplacements": [ { "replace": "src/environments/environment.ts", @@ -114,6 +122,9 @@ "browserTarget": "ui:build" }, "configurations": { + "local": { + "browserTarget": "ui:build:local" + }, "production": { "browserTarget": "ui:build:production" } diff --git a/console/ui/dist/prod-nt/index.html b/console/ui/dist/prod-nt/index.html index 2e6b640b56..77e7e33667 100644 --- a/console/ui/dist/prod-nt/index.html +++ b/console/ui/dist/prod-nt/index.html @@ -2,12 +2,12 @@ Nakama Console - + - + - + \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/main.90406e943321b759.js b/console/ui/dist/prod-nt/static/main.90406e943321b759.js deleted file mode 100644 index b3a9d2d519..0000000000 --- a/console/ui/dist/prod-nt/static/main.90406e943321b759.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{440:(Yt,Tn,De)=>{"use strict";function rt(t){return"function"==typeof t}let Oe=!1;const dt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Oe&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Oe=t},get useDeprecatedSynchronousErrorHandling(){return Oe}};function Ge(t){setTimeout(()=>{throw t},0)}const _e={closed:!0,next(t){},error(t){if(dt.useDeprecatedSynchronousErrorHandling)throw t;Ge(t)},complete(){}},et=Array.isArray||(t=>t&&"number"==typeof t.length);function Ve(t){return null!==t&&"object"==typeof t}const se=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ue{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ue)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof se?e.errors:e),[])}ue.EMPTY=((t=new ue).closed=!0,t);const D="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class O extends ue{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_e;break;case 1:if(!n){this.destination=_e;break}if("object"==typeof n){n instanceof O?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new te(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new te(this,n,e,i)}}[D](){return this}static create(n,e,i){const r=new O(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class te extends O{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;rt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==_e&&(s=Object.create(e),rt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;dt.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=dt;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Ge(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Ge(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);dt.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),dt.useDeprecatedSynchronousErrorHandling)throw i;Ge(i)}}__tryOrSetError(n,e,i){if(!dt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return dt.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Ge(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const kt="function"==typeof Symbol&&Symbol.observable||"@@observable";function jt(t){return t}function wn(t){return 0===t.length?jt:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let rn=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof O)return t;if(t[D])return t[D]()}return t||n||e?new O(t,n,e):new O(_e)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||dt.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),dt.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){dt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Me(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof O?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Mi(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[kt](){return this}pipe(...e){return 0===e.length?this:wn(e)(this)}toPromise(e){return new(e=Mi(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Mi(t){if(t||(t=dt.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Xr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class hs extends ue{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends O{constructor(n){super(n),this.destination=n}}let tr=(()=>{class t extends rn{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[D](){return new Ya(this)}lift(e){const i=new mu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Xr;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mu(n,e),t})();class mu extends tr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ue.EMPTY}}function Sa(t){return t&&"function"==typeof t.schedule}function yn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new kd(n,this.project,this.thisArg))}}class kd extends O{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function pl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const nc=t=>{if(t&&"function"==typeof t[kt])return(t=>n=>{const e=t[kt]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Zr(t))return Kn(t);if(pl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ge),n))(t);if(t&&"function"==typeof t[Ro])return(t=>n=>{const e=t[Ro]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Ve(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Oc(t,n){return new rn(e=>{const i=new ue;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function co(t,n){return n?function da(t,n){if(null!=t){if(function vu(t){return t&&"function"==typeof t[kt]}(t))return function Sd(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>{const r=t[kt]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(pl(t))return function Fc(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Zr(t))return Oc(t,n);if(function Ja(t){return t&&"function"==typeof t[Ro]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new rn(e=>{const i=new ue;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Ro](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof rn?t:new rn(nc(t))}class ml extends O{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class W extends O{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Fe(t,n){if(!n.closed)return t instanceof rn?t.subscribe(n):nc(t)(n)}function nt(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(nt((r,o)=>co(t(r,o)).pipe(yn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new zt(t,e)))}class zt{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Qt(n,this.project,this.concurrent))}}class Qt extends W{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function A(t=Number.POSITIVE_INFINITY){return nt(jt,t)}function st(t,n){return n?Oc(t,n):new rn(Kn(t))}function Tt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Sa(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof rn?t[0]:A(n)(st(t,e))}function Ut(){return function(n){return n.lift(new Vt(n))}}class Vt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new mn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class mn extends O{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class pe extends rn{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ue,n.add(this.source.subscribe(new Nt(this.getSubject(),this))),n.closed&&(this._connection=null,n=ue.EMPTY)),n}refCount(){return Ut()(this)}}const yt=(()=>{const t=pe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Nt extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class dn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function qt(){return new tr}function We(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new dn(r,n));const o=Object.create(i,yt);return o.source=i,o.subjectFactory=r,o}}(qt)(t))}function Xe(t){for(let n in t)if(t[n]===Xe)return n;throw Error("Could not find renamed property on target object.")}function bt(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Cn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Cn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function jr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const Y0=Xe({__forward_ref__:Xe});function Gi(t){return t.__forward_ref__=Gi,t.toString=function(){return Cn(this())},t}function wi(t){return tT(t)?t():t}function tT(t){return"function"==typeof t&&t.hasOwnProperty(Y0)&&t.__forward_ref__===Gi}function nT(t){return t&&!!t.\u0275providers}const U_="https://g.co/ng/security#xss";class Ot extends Error{constructor(n,e){super(G_(n,e)),this.code=n}}function G_(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Ri(t){return"string"==typeof t?t:null==t?"":String(t)}function W_(t,n){throw new Ot(-201,!1)}function jc(t,n){null==t&&function to(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ci(t){return{providers:t.providers||[],imports:t.imports||[]}}function q_(t){return _L(t,X_)||_L(t,wL)}function _L(t,n){return t.hasOwnProperty(n)?t[n]:null}function xL(t){return t&&(t.hasOwnProperty(iT)||t.hasOwnProperty(hge))?t[iT]:null}const X_=Xe({\u0275prov:Xe}),iT=Xe({\u0275inj:Xe}),wL=Xe({ngInjectableDef:Xe}),hge=Xe({ngInjectorDef:Xe});var ki=(()=>((ki=ki||{})[ki.Default=0]="Default",ki[ki.Host=1]="Host",ki[ki.Self=2]="Self",ki[ki.SkipSelf=4]="SkipSelf",ki[ki.Optional=8]="Optional",ki))();let rT;function Pc(t){const n=rT;return rT=t,n}function CL(t,n,e){const i=q_(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ki.Optional?null:void 0!==n?n:void W_(Cn(t))}const $o=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),J0={},oT="__NG_DI_FLAG__",Y_="ngTempTokenPath",pge="ngTokenPath",mge=/\n/gm,gge="\u0275",kL="__source";let K0;function sg(t){const n=K0;return K0=t,n}function vge(t,n=ki.Default){if(void 0===K0)throw new Ot(-203,!1);return null===K0?CL(t,void 0,n):K0.get(t,n&ki.Optional?null:void 0,n)}function ct(t,n=ki.Default){return(function fge(){return rT}()||vge)(wi(t),n)}function ar(t,n=ki.Default){return ct(t,J_(n))}function J_(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function sT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),yu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(yu||(yu={})),yu))();const kh={},Yr=[],K_=Xe({\u0275cmp:Xe}),aT=Xe({\u0275dir:Xe}),lT=Xe({\u0275pipe:Xe}),DL=Xe({\u0275mod:Xe}),Sh=Xe({\u0275fac:Xe}),Z0=Xe({__NG_ELEMENT_ID__:Xe});let xge=0;function Rt(t){return vf(()=>{const e=!0===t.standalone,i={},r={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&t.dependencies||null,getStandaloneInjector:null,selectors:t.selectors||Yr,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||yu.Emulated,id:"c"+xge++,styles:t.styles||Yr,_:null,setInput:null,schemas:t.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=t.dependencies,s=t.features;return r.inputs=AL(t.inputs,i),r.outputs=AL(t.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(TL).filter(EL):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(vl).filter(EL):null,r})}function TL(t){return no(t)||Ka(t)}function EL(t){return null!==t}function Di(t){return vf(()=>({type:t.type,bootstrap:t.bootstrap||Yr,declarations:t.declarations||Yr,imports:t.imports||Yr,exports:t.exports||Yr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AL(t,n){if(null==t)return kh;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const Zt=Rt;function gl(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function no(t){return t[K_]||null}function Ka(t){return t[aT]||null}function vl(t){return t[lT]||null}function rc(t,n){const e=t[DL]||null;if(!e&&!0===n)throw new Error(`Type ${Cn(t)} does not have '\u0275mod' property.`);return e}const Dh=0,Rn=1,Ji=2,fs=3,bu=4,Ep=5,Qa=6,lg=7,ks=8,Q_=9,Z_=10,ir=11,cT=12,e1=13,ML=14,cg=15,Za=16,t1=17,ug=18,Ed=19,n1=20,IL=21,Bo=22,uT=1,NL=2,ex=7,tx=8,dg=9,yl=10;function oc(t){return Array.isArray(t)&&"object"==typeof t[uT]}function _u(t){return Array.isArray(t)&&!0===t[uT]}function dT(t){return 0!=(4&t.flags)}function i1(t){return t.componentOffset>-1}function nx(t){return 1==(1&t.flags)}function xu(t){return null!==t.template}function kge(t){return 0!=(256&t[Ji])}function Ap(t,n){return t.hasOwnProperty(Sh)?t[Sh]:null}class Tge{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Hn(){return jL}function jL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Age),Ege}function Ege(){const t=LL(this),n=t?.current;if(n){const e=t.previous;if(e===kh)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Age(t,n,e,i){const r=this.declaredInputs[e],o=LL(t)||function Mge(t,n){return t[PL]=n}(t,{previous:kh,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Tge(l&&l.currentValue,n,a===kh),t[i]=n}Hn.ngInherit=!0;const PL="__ngSimpleChanges__";function LL(t){return t[PL]||null}const Lc=function(t,n,e){},RL="svg";function Ta(t){for(;Array.isArray(t);)t=t[Dh];return t}function ix(t,n){return Ta(n[t])}function sc(t,n){return Ta(n[t.index])}function BL(t,n){return t.data[n]}function hg(t,n){return t[n]}function ac(t,n){const e=n[t];return oc(e)?e:e[Dh]}function rx(t){return 64==(64&t[Ji])}function yf(t,n){return null==n?null:t[n]}function VL(t){t[ug]=0}function fT(t,n){t[Ep]+=n;let e=t,i=t[fs];for(;null!==i&&(1===n&&1===e[Ep]||-1===n&&0===e[Ep]);)i[Ep]+=n,e=i,i=i[fs]}const $i={lFrame:KL(null),bindingsEnabled:!0};function zL(){return $i.bindingsEnabled}function Gt(){return $i.lFrame.lView}function Pr(){return $i.lFrame.tView}function $e(t){return $i.lFrame.contextLView=t,t[ks]}function Be(t){return $i.lFrame.contextLView=null,t}function Ea(){let t=UL();for(;null!==t&&64===t.type;)t=t.parent;return t}function UL(){return $i.lFrame.currentTNode}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function pT(){return $i.lFrame.isParent}function mT(){$i.lFrame.isParent=!1}function bl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function fg(){return $i.lFrame.bindingIndex++}function Eh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function zge(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,gT(n)}function gT(t){$i.lFrame.currentDirectiveIndex=t}function XL(){return $i.lFrame.currentQueryIndex}function yT(t){$i.lFrame.currentQueryIndex=t}function Gge(t){const n=t[Rn];return 2===n.type?n.declTNode:1===n.type?t[Qa]:null}function YL(t,n,e){if(e&ki.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ki.Host||(r=Gge(o),null===r||(o=o[cg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=JL();return i.currentTNode=n,i.lView=t,!0}function bT(t){const n=JL(),e=t[Rn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function JL(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?KL(t):n}function KL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function QL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const ZL=QL;function _T(){const t=QL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function _l(){return $i.lFrame.selectedIndex}function Mp(t){$i.lFrame.selectedIndex=t}function es(){const t=$i.lFrame;return BL(t.tView,t.selectedIndex)}function at(){$i.lFrame.currentNamespace=RL}function Ip(){!function Yge(){$i.lFrame.currentNamespace=null}()}function ox(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[ug]+=65536),(a>11>16&&(3&t[Ji])===n){t[Ji]+=2048,Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}else{Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}const pg=-1;class o1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function CT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[cg],e--;return i}let kT=!0;function ux(t){const n=kT;return kT=t,n}const oR=255,sR=5;let ive=0;const Md={};function dx(t,n){const e=aR(t,n);if(-1!==e)return e;const i=n[Rn];i.firstCreatePass&&(t.injectorIndex=n.length,ST(i.data,t),ST(n,null),ST(i.blueprint,null));const r=DT(t,n),o=t.injectorIndex;if(rR(r)){const s=lx(r),a=cx(r,n),l=a[Rn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function ST(t,n){t.push(0,0,0,0,0,0,0,0,n)}function aR(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function DT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=pR(r),null===i)return pg;if(e++,r=r[cg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return pg}function TT(t,n,e){!function rve(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Z0)&&(i=e[Z0]),null==i&&(i=e[Z0]=ive++);const r=i&oR;n.data[t+(r>>sR)]|=1<=0?n&oR:lve:n}(e);if("function"==typeof o){if(!YL(n,t,i))return i&ki.Host?lR(r,0,i):cR(n,e,i,r);try{const s=o(i);if(null!=s||i&ki.Optional)return s;W_()}finally{ZL()}}else if("number"==typeof o){let s=null,a=aR(t,n),l=pg,c=i&ki.Host?n[Za][Qa]:null;for((-1===a||i&ki.SkipSelf)&&(l=-1===a?DT(t,n):n[a+8],l!==pg&&fR(i,!1)?(s=n[Rn],a=lx(l),n=cx(l,n)):a=-1);-1!==a;){const u=n[Rn];if(hR(o,a,u.data)){const d=sve(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==pg&&fR(i,n[Rn].data[a+8]===c)&&hR(o,a,n)?(s=u,a=lx(l),n=cx(l,n)):a=-1}}return r}function sve(t,n,e,i,r,o){const s=n[Rn],a=s.data[t+8],u=hx(a,s,e,null==i?i1(a)&&kT:i!=s&&0!=(3&a.type),r&ki.Host&&o===a);return null!==u?Np(n,s,u,a):Md}function hx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xu(f)&&f.type===e)return l}return null}function Np(t,n,e,i){let r=t[e];const o=n.data;if(function Zge(t){return t instanceof o1}(r)){const s=r;s.resolving&&function rge(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Ot(-200,`Circular dependency in DI detected for ${t}${e}`)}(function eo(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ri(t)}(o[e]));const a=ux(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Pc(s.injectImpl):null;YL(t,i,ki.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function Kge(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=jL(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Pc(l),ux(a),s.resolving=!1,ZL()}}return r}function hR(t,n,e){return!!(e[n+(t>>sR)]&1<{const n=t.prototype.constructor,e=n[Sh]||ET(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Sh]||ET(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ET(t){return tT(t)?()=>{const n=ET(wi(t));return n&&n()}:Ap(t)}function pR(t){const n=t[Rn],e=n.type;return 2===e?n.declTNode:1===e?t[Qa]:null}function Ah(t){return function ove(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function AT(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(vg)?l[vg]:Object.defineProperty(l,vg,{value:[]})[vg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class zn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Fp(t,n){t.forEach(e=>Array.isArray(e)?Fp(e,n):n(e))}function gR(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function fx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function c1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function fve(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function IT(t,n){const e=_g(t,n);if(e>=0)return t[1|e]}function _g(t,n){return function vR(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Bl=Bl||{})[Bl.Important=1]="Important",Bl[Bl.DashCase=2]="DashCase",Bl))();const LT=new Map;let jve=0;const $T="__ngContext__";function el(t,n){oc(n)?(t[$T]=n[n1],function Lve(t){LT.set(t[n1],t)}(n)):t[$T]=n}let BT;function VT(t,n){return BT(t,n)}function m1(t){const n=t[fs];return _u(n)?n[fs]:n}function HT(t){return LR(t[e1])}function zT(t){return LR(t[bu])}function LR(t){for(;null!==t&&!_u(t);)t=t[bu];return t}function wg(t,n,e,i,r){if(null!=i){let o,s=!1;_u(i)?o=i:oc(i)&&(s=!0,i=i[Dh]);const a=Ta(i);0===t&&null!==e?null==r?zR(n,e,a):Op(n,e,a,r||null,!0):1===t&&null!==e?Op(n,e,a,r||null,!0):2===t?function JT(t,n,e){const i=vx(t,n);i&&function i0e(t,n,e,i){t.removeChild(n,e,i)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function s0e(t,n,e,i,r){const o=e[ex];o!==Ta(e)&&wg(n,t,i,o,r);for(let a=yl;a0&&(t[e-1][bu]=i[bu]);const o=fx(t,yl+n);!function Yve(t,n){g1(t,n,n[ir],2,null,null),n[Dh]=null,n[Qa]=null}(i[Rn],i);const s=o[Ed];null!==s&&s.detachView(o[Rn]),i[fs]=null,i[bu]=null,i[Ji]&=-65}return i}function BR(t,n){if(!(128&n[Ji])){const e=n[ir];e.destroyNode&&g1(t,n,e,3,null,null),function Qve(t){let n=t[e1];if(!n)return qT(t[Rn],t);for(;n;){let e=null;if(oc(n))e=n[e1];else{const i=n[yl];i&&(e=i)}if(!e){for(;n&&!n[bu]&&n!==t;)oc(n)&&qT(n[Rn],n),n=n[fs];null===n&&(n=t),oc(n)&&qT(n[Rn],n),e=n&&n[bu]}n=e}}(n)}}function qT(t,n){if(!(128&n[Ji])){n[Ji]&=-65,n[Ji]|=128,function n0e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===yu.None||o===yu.Emulated)return null}return sc(i,e)}}(t,n.parent,e)}function Op(t,n,e,i,r){t.insertBefore(n,e,i,r)}function zR(t,n,e){t.appendChild(n,e)}function UR(t,n,e,i,r){null!==i?Op(t,n,e,i,r):zR(t,n,e)}function vx(t,n){return t.parentNode(n)}function GR(t,n,e){return qR(t,n,e)}let XT,_x,ZT,xx,qR=function WR(t,n,e){return 40&t.type?sc(t,e):null};function yx(t,n,e,i){const r=VR(t,i,n),o=n[ir],a=GR(i.parent||n[Qa],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return _x}()?.createHTML(t)||t}function eE(){if(void 0===xx&&(xx=null,$o.trustedTypes))try{xx=$o.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xx}function e5(t){return eE()?.createHTML(t)||t}function n5(t){return eE()?.createScriptURL(t)||t}class jp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${U_})`}}class f0e extends jp{getTypeName(){return"HTML"}}class p0e extends jp{getTypeName(){return"Style"}}class m0e extends jp{getTypeName(){return"Script"}}class g0e extends jp{getTypeName(){return"URL"}}class v0e extends jp{getTypeName(){return"ResourceURL"}}function cc(t){return t instanceof jp?t.changingThisBreaksApplicationSecurity:t}function Id(t,n){const e=function y0e(t){return t instanceof jp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${U_})`)}return e===n}class k0e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Cg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S0e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Cg(n),e}}const T0e=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;function wx(t){return(t=String(t)).match(T0e)?t:"unsafe:"+t}function Mh(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function v1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const r5=Mh("area,br,col,hr,img,wbr"),o5=Mh("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),s5=Mh("rp,rt"),tE=v1(r5,v1(o5,Mh("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),v1(s5,Mh("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),v1(s5,o5)),nE=Mh("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),a5=v1(nE,Mh("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Mh("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),E0e=Mh("script,style,template");class A0e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!tE.hasOwnProperty(e))return this.sanitizedSomething=!0,!E0e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();tE.hasOwnProperty(e)&&!r5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(l5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const M0e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,I0e=/([^\#-~ |!])/g;function l5(t){return t.replace(/&/g,"&").replace(M0e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(I0e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Cx;function c5(t,n){let e=null;try{Cx=Cx||function i5(t){const n=new S0e(t);return function D0e(){try{return!!(new window.DOMParser).parseFromString(Cg(""),"text/html")}catch{return!1}}()?new k0e(n):n}(t);let i=n?String(n):"";e=Cx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Cx.getInertBodyElement(i)}while(i!==o);return Cg((new A0e).sanitizeChildren(iE(e)||e))}finally{if(e){const i=iE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function iE(t){return"content"in t&&function N0e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ko=(()=>((ko=ko||{})[ko.NONE=0]="NONE",ko[ko.HTML=1]="HTML",ko[ko.STYLE=2]="STYLE",ko[ko.SCRIPT=3]="SCRIPT",ko[ko.URL=4]="URL",ko[ko.RESOURCE_URL=5]="RESOURCE_URL",ko))();function kx(t){const n=b1();return n?e5(n.sanitize(ko.HTML,t)||""):Id(t,"HTML")?e5(cc(t)):c5(function ZR(){return void 0!==ZT?ZT:typeof document<"u"?document:void 0}(),Ri(t))}function y1(t){const n=b1();return n?n.sanitize(ko.URL,t)||"":Id(t,"URL")?cc(t):wx(Ri(t))}function u5(t){const n=b1();if(n)return n5(n.sanitize(ko.RESOURCE_URL,t)||"");if(Id(t,"ResourceURL"))return n5(cc(t));throw new Ot(904,!1)}function b1(){const t=Gt();return t&&t[cT]}const Sx=new zn("ENVIRONMENT_INITIALIZER"),Dx=new zn("INJECTOR",-1),h5=new zn("INJECTOR_DEF_TYPES");class f5{get(n,e=J0){if(e===J0){const i=new Error(`NullInjectorError: No provider for ${Cn(n)}!`);throw i.name="NullInjectorError",i}return e}}function $0e(...t){return{\u0275providers:p5(0,t),\u0275fromNgModule:!0}}function p5(t,...n){const e=[],i=new Set;let r;return Fp(n,o=>{const s=o;rE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&m5(r,e),e}function m5(t,n){for(let e=0;e{n.push(o)})}}function rE(t,n,e,i){if(!(t=wi(t)))return!1;let r=null,o=xL(t);const s=!o&&no(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)rE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Fp(o.imports,u=>{rE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&m5(c,n)}if(!a){const c=Ap(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Yr},{provide:h5,useValue:r,multi:!0},{provide:Sx,useValue:()=>ct(r),multi:!0})}const l=o.providers;null==l||a||oE(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function oE(t,n){for(let e of t)nT(e)&&(e=e.\u0275providers),Array.isArray(e)?oE(e,n):n(e)}const B0e=Xe({provide:String,useValue:Xe});function sE(t){return null!==t&&"object"==typeof t&&B0e in t}function Pp(t){return"function"==typeof t}const aE=new zn("Set Injector scope."),Tx={},H0e={};let lE;function Ex(){return void 0===lE&&(lE=new f5),lE}class Nd{}class y5 extends Nd{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,uE(n,s=>this.processProvider(s)),this.records.set(Dx,kg(void 0,this)),r.has("environment")&&this.records.set(Nd,kg(void 0,this));const o=this.records.get(aE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(h5.multi,Yr,ki.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=sg(this),i=Pc(void 0);try{return n()}finally{sg(e),Pc(i)}}get(n,e=J0,i=ki.Default){this.assertNotDestroyed(),i=J_(i);const r=sg(this),o=Pc(void 0);try{if(!(i&ki.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function q0e(t){return"function"==typeof t||"object"==typeof t&&t instanceof zn}(n)&&q_(n);a=l&&this.injectableDefInScope(l)?kg(cE(n),Tx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ki.Self?Ex():this.parent).get(n,e=i&ki.Optional&&e===J0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Y_]=s[Y_]||[]).unshift(Cn(n)),r)throw s;return function bge(t,n,e,i){const r=t[Y_];throw n[kL]&&r.unshift(n[kL]),t.message=function _ge(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==gge?t.slice(2):t;let r=Cn(n);if(Array.isArray(n))r=n.map(Cn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Cn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(mge,"\n ")}`}("\n"+t.message,r,e,i),t[pge]=r,t[Y_]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Pc(o),sg(r)}}resolveInjectorInitializers(){const n=sg(this),e=Pc(void 0);try{const i=this.get(Sx.multi,Yr,ki.Self);for(const r of i)r()}finally{sg(n),Pc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(Cn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ot(205,!1)}processProvider(n){let e=Pp(n=wi(n))?n:wi(n&&n.provide);const i=function U0e(t){return sE(t)?kg(void 0,t.useValue):kg(b5(t),Tx)}(n);if(Pp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=kg(void 0,Tx,!0),r.factory=()=>sT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Tx&&(e.value=H0e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function W0e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=wi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function cE(t){const n=q_(t),e=null!==n?n.factory:Ap(t);if(null!==e)return e;if(t instanceof zn)throw new Ot(204,!1);if(t instanceof Function)return function z0e(t){const n=t.length;if(n>0)throw c1(n,"?"),new Ot(204,!1);const e=function uge(t){const n=t&&(t[X_]||t[wL]);return n?(function dge(t){if(t.hasOwnProperty("name"))return t.name;(""+t).match(/^function\s*([^\s(]+)/)}(t),n):null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Ot(204,!1)}function b5(t,n,e){let i;if(Pp(t)){const r=wi(t);return Ap(r)||cE(r)}if(sE(t))i=()=>wi(t.useValue);else if(function v5(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...sT(t.deps||[]));else if(function g5(t){return!(!t||!t.useExisting)}(t))i=()=>ct(wi(t.useExisting));else{const r=wi(t&&(t.useClass||t.provide));if(!function G0e(t){return!!t.deps}(t))return Ap(r)||cE(r);i=()=>new r(...sT(t.deps))}return i}function kg(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function uE(t,n){for(const e of t)Array.isArray(e)?uE(e,n):e&&nT(e)?uE(e.\u0275providers,n):n(e)}class X0e{}class _5{}class J0e{resolveComponentFactory(n){throw function Y0e(t){const n=Error(`No component factory found for ${Cn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let $c=(()=>{class t{}return t.NULL=new J0e,t})();function K0e(){return Sg(Ea(),Gt())}function Sg(t,n){return new ti(sc(t,n))}let ti=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K0e,t})();function Q0e(t){return t instanceof ti?t.nativeElement:t}class Lp{}let Ss=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Z0e(){const t=Gt(),e=ac(Ea().index,t);return(oc(e)?e:t)[ir]}(),t})(),e1e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class _1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const t1e=new _1("15.2.2"),dE={},hE="ngOriginalError";function fE(t){return t[hE]}class Dg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&fE(n);for(;e&&fE(e);)e=fE(e);return e||null}}function w5(t){return t.ownerDocument.defaultView}function Ih(t){return t instanceof Function?t():t}function k5(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const S5="ng-template";function d1e(t,n,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==k5(f,c,0)||2&i&&c!==h){if(wu(i))return!1;s=!0}}}}else{if(!s&&!wu(i)&&!wu(l))return!1;if(s&&wu(l))continue;s=!1,i=l|1&i}}return wu(i)||s}function wu(t){return 0==(1&t)}function p1e(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!wu(s)&&(n+=E5(o,r),r=""),i=s,o=o||!wu(i);e++}return""!==r&&(n+=E5(o,r)),n}const Bi={};function w(t){A5(Pr(),Gt(),_l()+t,!1)}function A5(t,n,e,i){if(!i)if(3==(3&n[Ji])){const o=t.preOrderCheckHooks;null!==o&&sx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&ax(n,o,0,e)}Mp(e)}function F5(t,n=null,e=null,i){const r=O5(t,n,e,i);return r.resolveInjectorInitializers(),r}function O5(t,n=null,e=null,i,r=new Set){const o=[e||Yr,$0e(t)];return i=i||("object"==typeof t?void 0:Cn(t)),new y5(o,n||Ex(),i||null,r)}let Rs=(()=>{class t{static create(e,i){if(Array.isArray(e))return F5({name:""},i,e,"");{const r=e.name??"";return F5({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=J0,t.NULL=new f5,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>ct(Dx)}),t.__NG_ELEMENT_ID__=-1,t})();function le(t,n=ki.Default){const e=Gt();return null===e?ct(t,n):uR(Ea(),e,wi(t),n)}function H5(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iBo&&A5(t,n,Bo,!1),Lc(s?2:0,r),e(i,r)}finally{Mp(o),Lc(s?3:1,r)}}function _E(t,n,e){if(dT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,x1(t,e,r.hostVars,Bi),r)}function Fd(t,n,e,i,r,o){const s=sc(t,n);!function DE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Ri(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}(n[ir],s,o,t.value,e,i,r)}function oye(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&TE(e)}}function TE(t){for(let i=HT(t);null!==i;i=zT(i))for(let r=yl;r0&&TE(o)}const e=t[Rn].components;if(null!==e)for(let i=0;i0&&TE(r)}}function uye(t,n){const e=ac(n,t),i=e[Rn];(function dye(t,n){for(let e=n.length;e-1&&(WT(n,i),fx(e,i))}this._attachedToViewContainer=!1}BR(this._lView[Rn],this._lView)}onDestroy(n){G5(this._lView[Rn],this._lView,null,n)}markForCheck(){EE(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ji]&=-65}reattach(){this._lView[Ji]|=64}detectChanges(){Fx(this._lView[Rn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ot(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kve(t,n){g1(t,n,n[ir],2,null,null)}(this._lView[Rn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Ot(902,!1);this._appRef=n}}class hye extends w1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;Fx(n[Rn],n,n[ks],!1)}checkNoChanges(){}get context(){return null}}class n8 extends $c{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=no(n);return new C1(e,this.ngModule)}}function i8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pye{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=J_(i);const r=this.injector.get(n,dE,i);return r!==dE||e===dE?r:this.parentInjector.get(n,e,i)}}class C1 extends _5{get inputs(){return i8(this.componentDef.inputs)}get outputs(){return i8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _1e(t){return t.map(b1e).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Nd?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pye(n,o):n,a=s.get(Lp,null);if(null===a)throw new Ot(407,!1);const l=s.get(e1e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function U1e(t,n,e){return t.selectRootElement(n,e===yu.ShadowDom)}(c,i,this.componentDef.encapsulation):GT(c,u,function fye(t){const n=t.toLowerCase();return"svg"===n?RL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=CE(0,null,null,1,0,null,null,null,null,null),p=Mx(null,f,null,h,null,null,a,c,l,s,null);let m,g;bT(p);try{const v=this.componentDef;let y,_=null;v.findHostDirectiveDefs?(y=[],_=new Map,v.findHostDirectiveDefs(v,y,_),y.push(v)):y=[v];const C=function gye(t,n){const e=t[Rn],i=Bo;return t[i]=n,Ag(e,i,2,"#host",null)}(p,d),S=function vye(t,n,e,i,r,o,s,a){const l=r[Rn];!function yye(t,n,e,i){for(const r of t)n.mergedAttrs=s1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Ox(n,n.mergedAttrs,!0),null!==e&&QR(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mx(r,U5(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&SE(l,t,i.length-1),Nx(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=BL(f,Bo),d&&function _ye(t,n,e,i){if(i)CT(t,e,["ng-version",t1e.full]);else{const{attrs:r,classes:o}=function x1e(t){const n=[],e=[];let i=1,r=2;for(;i0&&KR(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function xye(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=s1(r.hostAttrs,e=s1(e,r.hostAttrs))}}(i)}function IE(t){return t===kh?{}:t===Yr?[]:t}function kye(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function Sye(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Dye(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function Px(t){return!!NE(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function NE(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Od(t,n,e){return t[n]=e}function tl(t,n,e){return!Object.is(t[n],e)&&(t[n]=e,!0)}function Rp(t,n,e,i){const r=tl(t,n,e);return tl(t,n+1,i)||r}function ht(t,n,e,i){const r=Gt();return tl(r,fg(),n)&&(Pr(),Fd(es(),r,t,n,e,i)),ht}function Ig(t,n,e,i){return tl(t,fg(),e)?n+Ri(e)+i:Bi}function Ng(t,n,e,i,r,o){const a=Rp(t,function Th(){return $i.lFrame.bindingIndex}(),e,r);return Eh(2),a?n+Ri(e)+i+Ri(r)+o:Bi}function J(t,n,e,i,r,o,s,a){const l=Gt(),c=Pr(),u=t+Bo,d=c.firstCreatePass?function Pye(t,n,e,i,r,o,s,a,l){const c=n.consts,u=Ag(n,t,4,s||null,yf(c,a));kE(n,e,u,yf(c,l)),ox(n,u);const d=u.tView=CE(2,u,i,r,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,c);return null!==n.queries&&(n.queries.template(n,u),d.queries=n.queries.embeddedTView(u)),u}(u,c,l,n,e,i,r,o,s):c.data[u];Ad(d,!1);const h=l[ir].createComment("");yx(c,l,h,d),el(h,l),Nx(l,l[u]=K5(h,l,h,d)),nx(d)&&xE(c,l,d),null!=s&&wE(l,d,a)}function uo(t){return hg(function Vge(){return $i.lFrame.contextLView}(),Bo+t)}function k(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!1),k}function FE(t,n,e,i,r){const s=r?"class":"style";ME(t,e,n.inputs[s],s,i)}function b(t,n,e,i){const r=Gt(),o=Pr(),s=Bo+t,a=r[ir],l=o.firstCreatePass?function Rye(t,n,e,i,r,o){const s=n.consts,l=Ag(n,t,2,i,yf(s,r));return kE(n,e,l,yf(s,o)),null!==l.attrs&&Ox(l,l.attrs,!1),null!==l.mergedAttrs&&Ox(l,l.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,l),l}(s,o,r,n,e,i):o.data[s],c=r[s]=GT(a,n,function Jge(){return $i.lFrame.currentNamespace}()),u=nx(l);return Ad(l,!0),QR(a,c,l),32!=(32&l.flags)&&yx(o,r,c,l),0===function Pge(){return $i.lFrame.elementDepthCount}()&&el(c,r),function Lge(){$i.lFrame.elementDepthCount++}(),u&&(xE(o,r,l),_E(o,l,r)),null!==i&&wE(r,l),b}function x(){let t=Ea();pT()?mT():(t=t.parent,Ad(t,!1));const n=t;!function Rge(){$i.lFrame.elementDepthCount--}();const e=Pr();return e.firstCreatePass&&(ox(e,t),dT(t)&&e.queries.elementEnd(t)),null!=n.classesWithoutHost&&function eve(t){return 0!=(8&t.flags)}(n)&&FE(e,n,Gt(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function tve(t){return 0!=(16&t.flags)}(n)&&FE(e,n,Gt(),n.stylesWithoutHost,!1),x}function ge(t,n,e,i){return b(t,n,e,i),x(),ge}function ta(t,n,e){const i=Gt(),r=Pr(),o=t+Bo,s=r.firstCreatePass?function $ye(t,n,e,i,r){const o=n.consts,s=yf(o,i),a=Ag(n,t,8,"ng-container",s);return null!==s&&Ox(a,s,!0),kE(n,e,a,yf(o,r)),null!==n.queries&&n.queries.elementStart(n,a),a}(o,r,i,n,e):r.data[o];Ad(s,!0);const a=i[o]=i[ir].createComment("");return yx(r,i,a,s),el(a,i),nx(s)&&(xE(r,i,s),_E(r,s,i)),null!=e&&wE(i,s),ta}function na(){let t=Ea();const n=Pr();return pT()?mT():(t=t.parent,Ad(t,!1)),n.firstCreatePass&&(ox(n,t),dT(t)&&n.queries.elementEnd(t)),na}function vt(){return Gt()}function S1(t){return!!t&&"function"==typeof t.then}const OE=function v8(t){return!!t&&"function"==typeof t.subscribe};function ye(t,n,e,i){const r=Gt(),o=Pr(),s=Ea();return function b8(t,n,e,i,r,o,s){const a=nx(i),c=t.firstCreatePass&&Z5(t),u=n[ks],d=Q5(n);let h=!0;if(3&i.type||s){const m=sc(i,n),g=s?s(m):m,v=d.length,y=s?C=>s(Ta(C[i.index])):i.index;let _=null;if(!s&&a&&(_=function Bye(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=x8(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=x8(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?ac(t.index,n):n);let l=_8(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=_8(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function j(t=1){return function Wge(t){return($i.lFrame.contextLView=function qge(t,n){for(;t>0;)n=n[cg],t--;return n}(t,$i.lFrame.contextLView))[ks]}(t)}function Vye(t,n){let e=null;const i=function m1e(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function jE(t){return 2|t}function Bp(t){return(131068&t)>>2}function PE(t,n){return-131069&t|n<<2}function LE(t){return 1|t}function M8(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?bf(o):Bp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];qye(t[a],n)&&(l=!0,t[a+1]=i?LE(u):jE(u)),a=i?bf(u):Bp(u)}l&&(t[e+1]=i?jE(o):LE(o))}function qye(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&_g(t,n)>=0}const ia={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function I8(t){return t.substring(ia.key,ia.keyEnd)}function N8(t,n){const e=ia.textEnd;return e===n?-1:(n=ia.keyEnd=function Kye(t,n,e){for(;n32;)n++;return n}(t,ia.key=n,e),$g(t,n,e))}function $g(t,n,e){for(;n=0;e=N8(n,e))lc(t,I8(n),!0)}function Du(t,n,e,i){const r=Gt(),o=Pr(),s=Eh(2);o.firstUpdatePass&&R8(o,t,s,i),n!==Bi&&tl(r,s,n)&&B8(o,o.data[_l()],r,r[ir],t,r[s+1]=function abe(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Cn(cc(t)))),t}(n,e),i,s)}function Tu(t,n,e,i){const r=Pr(),o=Eh(2);r.firstUpdatePass&&R8(r,null,o,i);const s=Gt();if(e!==Bi&&tl(s,o,e)){const a=r.data[_l()];if(H8(a,i)&&!L8(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=jr(l,e||"")),FE(r,a,s,e,i)}else!function sbe(t,n,e,i,r,o,s,a){r===Bi&&(r=Yr);let l=0,c=0,u=0=t.expandoStartIndex}function R8(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[_l()],s=L8(t,e);H8(o,i)&&null===n&&!s&&(n=!1),n=function tbe(t,n,e,i){const r=function vT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=D1(e=RE(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=RE(r,t,n,e,i),null===o){let l=function nbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Bp(i))return t[bf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=RE(null,t,n,l[1],i),l=D1(l,n.attrs,i),function ibe(t,n,e,i){t[bf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function rbe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=bf(t[a+1]);t[i+1]=$x(h,a),0!==h&&(t[h+1]=PE(t[h+1],i)),t[a+1]=function zye(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$x(a,0),0!==a&&(t[a+1]=PE(t[a+1],i)),a=i;else t[i+1]=$x(l,0),0===a?a=i:t[l+1]=PE(t[l+1],i),l=i;c&&(t[i+1]=jE(t[i+1])),M8(t,u,i,!0),M8(t,u,i,!1),function Wye(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&_g(o,n)>=0&&(e[i+1]=LE(e[i+1]))}(n,u,t,i,o),s=$x(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function RE(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?Yr:void 0);let f=d?IT(h,i):u===i?h:void 0;if(c&&!Bx(f)&&(f=IT(l,i)),Bx(f)&&(a=f,s))return a;const p=t[r+1];r=s?bf(p):Bp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=IT(l,i))}return a}function Bx(t){return void 0!==t}function H8(t,n){return 0!=(t.flags&(n?8:16))}function I(t,n=""){const e=Gt(),i=Pr(),r=t+Bo,o=i.firstCreatePass?Ag(i,r,1,n,null):i.data[r],s=e[r]=function UT(t,n){return t.createText(n)}(e[ir],n);yx(i,e,s,o),Ad(o,!1)}function Dt(t){return xn("",t,""),Dt}function xn(t,n,e){const i=Gt(),r=Ig(i,t,n,e);return r!==Bi&&Nh(i,_l(),r),xn}function Ld(t,n,e,i,r){const o=Gt(),s=Ng(o,t,n,e,i,r);return s!==Bi&&Nh(o,_l(),s),Ld}function dc(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!0),dc}const Vg="en-US";let u6=Vg;function VE(t,n,e,i,r){if(t=wi(t),Array.isArray(t))for(let o=0;o>20;if(Pp(t)||!t.multi){const f=new o1(l,r,le),p=zE(a,n,r?u:u+h,d);-1===p?(TT(dx(c,s),o,a),HE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=zE(a,n,u+h,d),p=zE(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){TT(dx(c,s),o,a);const v=function x_e(t,n,e,i,r){const o=new o1(t,e,le);return o.multi=[],o.index=n,o.componentProviders=0,O6(o,r,i&&!e),o}(r?__e:b_e,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),HE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else HE(o,t,f>-1?f:p,O6(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function HE(t,n,e,i){const r=Pp(n),o=function V0e(t){return!!t.useClass}(n);if(r||o){const l=(o?wi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function O6(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function zE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function y_e(t,n,e){const i=Pr();if(i.firstCreatePass){const r=xu(t);VE(e,i.data,i.blueprint,r,!0),VE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class zg{}class j6{}class P6 extends zg{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new n8(this);const i=rc(n);this._bootstrapComponents=Ih(i.bootstrap),this._r3Injector=O5(n,e,[{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],Cn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class GE extends j6{constructor(n){super(),this.moduleType=n}create(n){return new P6(this.moduleType,n)}}class C_e extends zg{constructor(n,e,i){super(),this.componentFactoryResolver=new n8(this),this.instance=null;const r=new y5([...n,{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],e||Ex(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gx(t,n,e=null){return new C_e(t,n,e).injector}let k_e=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=p5(0,e.type),r=i.length>0?Gx([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(ct(Nd))}),t})();function L6(t){t.getStandaloneInjector=n=>n.get(k_e).getOrCreateStandaloneInjector(t)}function wl(t,n,e){const i=bl()+t,r=Gt();return r[i]===Bi?Od(r,i,e?n.call(e):n()):function k1(t,n){return t[n]}(r,i)}function lr(t,n,e,i){return G6(Gt(),bl(),t,n,e,i)}function Sr(t,n,e,i,r){return function W6(t,n,e,i,r,o,s){const a=n+e;return Rp(t,a,r,o)?Od(t,a+2,s?i.call(s,r,o):i(r,o)):F1(t,a+2)}(Gt(),bl(),t,n,e,i,r)}function Ug(t,n,e,i,r,o){return function q6(t,n,e,i,r,o,s,a){const l=n+e;return function Lx(t,n,e,i,r){const o=Rp(t,n,e,i);return tl(t,n+2,r)||o}(t,l,r,o,s)?Od(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):F1(t,l+3)}(Gt(),bl(),t,n,e,i,r,o)}function F1(t,n){const e=t[n];return e===Bi?void 0:e}function G6(t,n,e,i,r,o){const s=n+e;return tl(t,s,r)?Od(t,s+1,o?i.call(o,r):i(r)):F1(t,s+1)}function XE(t,n,e){const i=t+Bo,r=Gt(),o=hg(r,i);return function O1(t,n){return t[Rn].data[n].pure}(r,i)?G6(r,bl(),n,o.transform,e,o):o.transform(e)}function YE(t){return n=>{setTimeout(t,void 0,n)}}const Ke=class z_e extends tr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=YE(o),r&&(r=YE(r)),s&&(s=YE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ue&&n.add(a),a}};function U_e(){return this._results[Symbol.iterator]()}class JE{get changes(){return this._changes||(this._changes=new Ke)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=JE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=U_e)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Rc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function dve(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=q_e,t})();const G_e=Si,W_e=class extends G_e{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[t1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),bE(i,r,n),new w1(r)}};function q_e(){return Wx(Ea(),Gt())}function Wx(t,n){return 4&t.type?new W_e(n,t,Sg(t,n)):null}let nl=(()=>{class t{}return t.__NG_ELEMENT_ID__=X_e,t})();function X_e(){return Q6(Ea(),Gt())}const Y_e=nl,J6=class extends Y_e{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Sg(this._hostTNode,this._hostLView)}get injector(){return new mg(this._hostTNode,this._hostLView)}get parentInjector(){const n=DT(this._hostTNode,this._hostLView);if(rR(n)){const e=cx(n,this._hostLView),i=lx(n);return new mg(e[Rn].data[i+8],e)}return new mg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=K6(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-yl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function l1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new C1(no(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Nd,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Rn];if(function jge(t){return _u(t[fs])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[fs],h=new J6(d,d[Qa],d[fs]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Zve(t,n,e,i){const r=yl+i,o=e.length;i>0&&(e[r-1][bu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=yl;d{class t{constructor(e){this.appInits=e,this.resolve=Xx,this.reject=Xx,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(ct(Yx,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const P1=new zn("AppId",{providedIn:"root",factory:function x$(){return`${lA()}${lA()}${lA()}`}});function lA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const w$=new zn("Platform Initializer"),L1=new zn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),C$=new zn("AnimationModuleType");let xxe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hc=new zn("LocaleId",{providedIn:"root",factory:()=>ar(hc,ki.Optional|ki.SkipSelf)||function wxe(){return typeof $localize<"u"&&$localize.locale||Vg}()});class kxe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let k$=(()=>{class t{compileModuleSync(e){return new GE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ih(rc(e).declarations).reduce((s,a)=>{const l=no(a);return l&&s.push(new C1(l)),s},[]);return new kxe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Txe=(()=>Promise.resolve(0))();function cA(t){typeof Zone>"u"?Txe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Wi{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ke(!1),this.onMicrotaskEmpty=new Ke(!1),this.onStable=new Ke(!1),this.onError=new Ke(!1),typeof Zone>"u")throw new Ot(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Exe(){let t=$o.requestAnimationFrame,n=$o.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function Ixe(t){const n=()=>{!function Mxe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call($o,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,dA(t),t.isCheckStableRunning=!0,uA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),dA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return T$(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),E$(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return T$(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),E$(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,dA(t),uA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Wi.isInAngularZone())throw new Ot(909,!1)}static assertNotInAngularZone(){if(Wi.isInAngularZone())throw new Ot(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Axe,Xx,Xx);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Axe={};function uA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function dA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function T$(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function E$(t){t._nesting--,uA(t)}class Nxe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ke,this.onMicrotaskEmpty=new Ke,this.onStable=new Ke,this.onError=new Ke}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const A$=new zn(""),Kx=new zn("");let pA,hA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,pA||(function Fxe(t){pA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Wi.assertNotInAngularZone(),cA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())cA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(fA),ct(Kx))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),fA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return pA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Oh=!1;let _f=null;const M$=new zn("AllowMultipleToken"),mA=new zn("PlatformDestroyListeners"),I$=new zn("appBootstrapListener");class N${constructor(n,e){this.name=n,this.token=e}}function O$(t,n,e=[]){const i=`Platform: ${n}`,r=new zn(i);return(o=[])=>{let s=gA();if(!s||s.injector.get(M$,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Pxe(t){if(_f&&!_f.get(M$,!1))throw new Ot(400,!1);_f=t;const n=t.get(P$);(function F$(t){const n=t.get(w$,null);n&&n.forEach(e=>e())})(t)}(function j$(t=[],n){return Rs.create({name:n,providers:[{provide:aE,useValue:"platform"},{provide:mA,useValue:new Set([()=>_f=null])},...t]})}(a,i))}return function Rxe(t){const n=gA();if(!n)throw new Ot(401,!1);return n}()}}function gA(){return _f?.get(P$)??null}let P$=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function R$(t,n){let e;return e="noop"===t?new Nxe:("zone.js"===t?void 0:t)||new Wi(n),e}(i?.ngZone,function L$(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Wi,useValue:r}];return r.run(()=>{const s=Rs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Dg,null);if(!l)throw new Ot(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qx(this._modules,a),c.unsubscribe()})}),function $$(t,n,e){try{const i=e();return S1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Jx);return c.runInitializers(),c.donePromise.then(()=>(function d6(t){jc(t,"Expected localeId to be defined"),"string"==typeof t&&(u6=t.toLowerCase().replace(/_/g,"-"))}(a.injector.get(hc,Vg)||Vg),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=B$({},i);return function Oxe(t,n,e){const i=new GE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Au);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Ot(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ot(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(mA,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function B$(t,n){return Array.isArray(n)?n.reduce(B$,t):{...t,...n}}let Au=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new rn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new rn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Wi.assertNotInAngularZone(),cA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Wi.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Tt(o,s.pipe(We()))}bootstrap(e,i){const r=e instanceof _5;if(!this._injector.get(Jx).done){!r&&function ag(t){const n=no(t)||Ka(t)||vl(t);return null!==n&&n.standalone}(e);throw new Ot(405,Oh)}let s;s=r?e:this._injector.get($c).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function jxe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(zg),c=s.create(Rs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(A$,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qx(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Ot(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(I$,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Ot(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(Nd),ct(Dg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qx(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let qo=(()=>{class t{}return t.__NG_ELEMENT_ID__=Bxe,t})();function Bxe(t){return function Vxe(t,n,e){if(i1(t)&&!e){const i=ac(t.index,n);return new w1(i,i)}return 47&t.type?new w1(n[Za],n):null}(Ea(),Gt(),16==(16&t))}class G${constructor(){}supports(n){return Px(n)}create(n){return new qxe(n)}}const Wxe=(t,n)=>n;class qxe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||Wxe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new Xxe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new W$),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new W$),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class Xxe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Yxe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class W${constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new Yxe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function q$(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kxe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Kxe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Y$(){return new tw([new G$])}let tw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Y$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:Y$}),t})();function J$(){return new R1([new X$])}let R1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||J$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:J$}),t})();const ewe=O$(null,"core",[]);let twe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(ct(Au))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();function qg(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}let xA=null;function jh(){return xA}class rwe{}const Ir=new zn("DocumentToken");let wA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function owe(){return ct(K$)}()},providedIn:"platform"}),t})();const swe=new zn("Location Initialized");let K$=(()=>{class t extends wA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return jh().getBaseHref(this._doc)}onPopState(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Q$()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Q$()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(){return function awe(){return new K$(ct(Ir))}()},providedIn:"platform"}),t})();function Q$(){return!!window.history.pushState}function CA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function Z$(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ph(t){return t&&"?"!==t[0]?"?"+t:t}let zp=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tB)},providedIn:"root"}),t})();const eB=new zn("appBaseHref");let tB=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ar(Ir).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return CA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ph(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),lwe=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=CA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),kA=(()=>{class t{constructor(e){this._subject=new Ke,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function dwe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(Z$(nB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ph(i))}normalize(e){return t.stripTrailingSlash(function uwe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,nB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ph,t.joinWithSlash=CA,t.stripTrailingSlash=Z$,t.\u0275fac=function(e){return new(e||t)(ct(zp))},t.\u0275prov=Et({token:t,factory:function(){return function cwe(){return new kA(ct(zp))}()},providedIn:"root"}),t})();function nB(t){return t.replace(/\/index.html$/,"")}function pB(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const jA=/\s+/,mB=[];let Rh=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=mB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(jA):mB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(jA):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(jA).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(le(tw),le(R1),le(ti),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class Gwe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let jn=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Gwe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),yB(a,r)}});for(let r=0,o=i.length;r{yB(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(tw))},t.\u0275dir=Zt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function yB(t,n){t.context.$implicit=n.item}let gn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new qwe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){bB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){bB("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class qwe{constructor(){this.$implicit=null,this.ngIf=null}}function bB(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Cn(n)}'.`)}class PA{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),_B=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new PA(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(dw,9))},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),wB=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Bl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(R1),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),kl=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(le(nl))},t.\u0275dir=Zt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Hn]}),t})(),Vs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const SB="browser";let _Ce=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new xCe(ct(Ir),window)}),t})();class xCe{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function wCe(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=TB(this.window.history)||TB(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function TB(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class EB{}class YCe extends rwe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class VA extends YCe{static makeCurrent(){!function iwe(t){xA||(xA=t)}(new VA)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function JCe(){return H1=H1||document.querySelector("base"),H1?H1.getAttribute("href"):null}();return null==e?null:function KCe(t){pw=pw||document.createElement("a"),pw.setAttribute("href",t);const n=pw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){H1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return pB(document.cookie,n)}}let pw,H1=null;const FB=new zn("TRANSITION_ID"),ZCe=[{provide:Yx,useFactory:function QCe(t,n,e){return()=>{e.get(Jx).donePromise.then(()=>{const i=jh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const mw=new zn("EventManagerPlugins");let gw=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),z1=(()=>{class t extends jB{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const HA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},zA=/%COMP%/g,RB=new zn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $B(t,n){return n.flat(100).map(e=>e.replace(zA,t))}function BB(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new UA(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof zB?r.applyToHost(e):r instanceof GA&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case yu.Emulated:o=new zB(s,a,i,this.appId,l);break;case yu.ShadowDom:return new l2e(s,a,e,i);default:o=new GA(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(ct(gw),ct(z1),ct(P1),ct(RB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class UA{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(HA[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(HB(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(HB(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=HA[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=HA[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Bl.DashCase|Bl.Important)?n.style.setProperty(e,i,r&Bl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Bl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,BB(i)):this.eventManager.addEventListener(n,e,BB(i))}}function HB(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class l2e extends UA{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$B(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class GA extends UA{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$B(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class zB extends GA{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function o2e(t){return"_ngcontent-%COMP%".replace(zA,t)}(s),this.hostAttr=function s2e(t){return"_nghost-%COMP%".replace(zA,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let c2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const UB=["alt","control","meta","shift"],u2e={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},d2e={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let h2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>jh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),UB.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=u2e[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),UB.forEach(s=>{s!==r&&(0,d2e[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const WB=[{provide:L1,useValue:SB},{provide:w$,useValue:function f2e(){VA.makeCurrent()},multi:!0},{provide:Ir,useFactory:function m2e(){return function h0e(t){ZT=t}(document),document},deps:[]}],g2e=O$(ewe,"browser",WB),qB=new zn(""),XB=[{provide:Kx,useClass:class e2e{addToWindow(n){$o.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},$o.getAllAngularTestabilities=()=>n.getAllTestabilities(),$o.getAllAngularRootElements=()=>n.getAllRootElements(),$o.frameworkStabilizers||($o.frameworkStabilizers=[]),$o.frameworkStabilizers.push(i=>{const r=$o.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?jh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:A$,useClass:hA,deps:[Wi,fA,Kx]},{provide:hA,useClass:hA,deps:[Wi,fA,Kx]}],YB=[{provide:aE,useValue:"root"},{provide:Dg,useFactory:function p2e(){return new Dg},deps:[]},{provide:mw,useClass:c2e,multi:!0,deps:[Ir,Wi,L1]},{provide:mw,useClass:h2e,multi:!0,deps:[Ir]},{provide:vw,useClass:vw,deps:[gw,z1,P1,RB]},{provide:Lp,useExisting:vw},{provide:jB,useExisting:z1},{provide:z1,useClass:z1,deps:[Ir]},{provide:gw,useClass:gw,deps:[mw,Wi]},{provide:EB,useClass:t2e,deps:[]},[]];let qA=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:P1,useValue:e.appId},{provide:FB,useExisting:P1},ZCe]}}}return t.\u0275fac=function(e){return new(e||t)(ct(qB,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[...YB,...XB],imports:[Vs,twe]}),t})(),JB=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function y2e(){return new JB(ct(Ir))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let ZB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):ct(e7),i},providedIn:"root"}),t})(),e7=(()=>{class t extends ZB{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case ko.NONE:return i;case ko.HTML:return Id(i,"HTML")?cc(i):c5(this._doc,String(i)).toString();case ko.STYLE:return Id(i,"Style")?cc(i):i;case ko.SCRIPT:if(Id(i,"Script"))return cc(i);throw new Error("unsafe value used in a script context");case ko.URL:return Id(i,"URL")?cc(i):wx(String(i));case ko.RESOURCE_URL:if(Id(i,"ResourceURL"))return cc(i);throw new Error(`unsafe value used in a resource URL context (see ${U_})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${U_})`)}}bypassSecurityTrustHtml(e){return function b0e(t){return new f0e(t)}(e)}bypassSecurityTrustStyle(e){return function _0e(t){return new p0e(t)}(e)}bypassSecurityTrustScript(e){return function x0e(t){return new m0e(t)}(e)}bypassSecurityTrustUrl(e){return function w0e(t){return new g0e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function C0e(t){return new v0e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function C2e(t){return new e7(t.get(Ir))}(ct(Rs)),i},providedIn:"root"}),t})();function U1(t){return(U1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function K(t,n,e){return(n=function S2e(t){var n=function k2e(t,n){if("object"!==U1(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==U1(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===U1(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}class t7{}class D2e{}const $h="*";function il(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ma(t,n=null){return{type:4,styles:n,timings:t}}function n7(t,n=null){return{type:2,steps:t,options:n}}function Dr(t){return{type:6,styles:t,offset:null}}function Ia(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i7(t){Promise.resolve().then(t)}class G1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YA="!";function o7(t){return new Ot(3e3,!1)}function ake(){return typeof window<"u"&&typeof window.document<"u"}function JA(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wf(t){switch(t.length){case 0:return new G1;case 1:return t[0];default:return new r7(t)}}function s7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case YA:v=r.get(m);break;case $h:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function Y2e(t){return new Ot(3502,!1)}();return a}function KA(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&QA(e,"start",t)));break;case"done":t.onDone(()=>i(e&&QA(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&QA(e,"destroy",t)))}}function QA(t,n,e){const o=ZA(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function ZA(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let eM=(t,n)=>!1,l7=(t,n,e)=>[],c7=null;function tM(t){const n=t.parentNode||t.host;return n===c7?null:n}(JA()||typeof Element<"u")&&(ake()?(c7=(()=>document.documentElement)(),eM=(t,n)=>{for(;n;){if(n===t)return!0;n=tM(n)}return!1}):eM=(t,n)=>t.contains(n),l7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let Up=null,u7=!1;const d7=eM,h7=l7;let f7=(()=>{class t{validateStyleProperty(e){return function cke(t){Up||(Up=function uke(){return typeof document<"u"?document.body:null}()||{},u7=!!Up.style&&"WebkitAppearance"in Up.style);let n=!0;return Up.style&&!function lke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in Up.style,!n&&u7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Up.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d7(e,i)}getParentElement(e){return tM(e)}query(e,i,r){return h7(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new G1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),nM=(()=>{class t{}return t.NOOP=new f7,t})();const dke=1e3,iM="ng-enter",yw="ng-leave",bw="ng-trigger",_w=".ng-trigger",m7="ng-animating",rM=".ng-animating";function Bh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:oM(parseFloat(n[1]),n[2])}function oM(t,n){return"s"===n?t*dke:t}function xw(t,n,e){return t.hasOwnProperty("duration")?t:function fke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o7()),{duration:0,delay:0,easing:""};r=oM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=oM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function T2e(){return new Ot(3100,!1)}()),a=!0),o<0&&(n.push(function E2e(){return new Ot(3101,!1)}()),a=!0),a&&n.splice(l,0,o7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function W1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function g7(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Cf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y7(t,n,e){return e?n+":"+e+";":""}function b7(t){let n="";for(let e=0;e{const o=aM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),JA()&&b7(t))}function Gp(t,n){t.style&&(n.forEach((e,i)=>{const r=aM(i);t.style[r]=""}),JA()&&b7(t))}function q1(t){return Array.isArray(t)?1==t.length?t[0]:n7(t):t}const sM=new RegExp("{{\\s*(.+?)\\s*}}","g");function _7(t){let n=[];if("string"==typeof t){let e;for(;e=sM.exec(t);)n.push(e[1]);sM.lastIndex=0}return n}function X1(t,n,e){const i=t.toString(),r=i.replace(sM,(o,s)=>{let a=n[s];return null==a&&(e.push(function M2e(t){return new Ot(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function ww(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gke=/-+([a-z0-9])/g;function aM(t){return t.replace(gke,(...n)=>n[1].toUpperCase())}function vke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function I2e(t){return new Ot(3004,!1)}()}}function x7(t,n){return window.getComputedStyle(t)[n]}const Sw="*";function Cke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function kke(t,n,e){if(":"==t[0]){const l=function Ske(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function U2e(t){return new Ot(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(w7(r,s));"<"==o[0]&&!(r==Sw&&s==Sw)&&n.push(w7(s,r))}(i,e,n)):e.push(t),e}const Dw=new Set(["true","1"]),Tw=new Set(["false","0"]);function w7(t,n){const e=Dw.has(t)||Tw.has(t),i=Dw.has(n)||Tw.has(n);return(r,o)=>{let s=t==Sw||t==r,a=n==Sw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Dw.has(t):Tw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Dw.has(n):Tw.has(n)),s&&a}}const Dke=new RegExp("s*:selfs*,?","g");function lM(t,n,e,i){return new Tke(t).build(n,e,i)}class Tke{constructor(n){this._driver=n}build(n,e,i){const r=new Mke(e);return this._resetContextStyleTimingState(r),pc(this,q1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function F2e(){return new Ot(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function O2e(){return new Ot(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{_7(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(ww(o.values()),e.errors.push(function j2e(t,n){return new Ot(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pc(this,q1(n.animation),e);return{type:1,matchers:Cke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Wp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pc(this,i,e)),options:Wp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Wp(n.options)}}visitAnimate(n,e){const i=function Nke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return cM(xw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=cM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=xw(e,n);return cM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Dr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Dr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$h?i.push(a):e.errors.push(new Ot(3002,!1)):i.push(g7(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function L2e(t,n,e,i,r){return new Ot(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function mke(t,n,e){const i=n.params||{},r=_7(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function A2e(t){return new Ot(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function R2e(){return new Ot(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let _=null!=y.offset?y.offset:function Ike(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=_&&(o++,C=y.offset=_),l=l||C<0||C>1,a=a||C0&&o{const _=h>0?y==f?1:h*y:s[y],C=_*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=_,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pc(this,q1(n.animation),e),options:Wp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:Wp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:Wp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Eke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Dke,"")),t=t.replace(/@\*/g,_w).replace(/@\w+/g,e=>_w+"-"+e.slice(1)).replace(/:animating/g,rM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fc(e.collectedStyles,e.currentQuerySelector,new Map);const a=pc(this,q1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:Wp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function H2e(){return new Ot(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:xw(n.timings,e.errors,!0);return{type:12,animation:pc(this,q1(n.animation),e),timings:i,options:null}}}class Mke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wp(t){return t?(t=W1(t)).params&&(t.params=function Ake(t){return t?W1(t):null}(t.params)):t={},t}function cM(t,n,e){return{duration:t,delay:n,easing:e}}function uM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ew{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jke=new RegExp(":enter","g"),Lke=new RegExp(":leave","g");function dM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Rke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Rke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ew;const d=new hM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[uM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bh(X1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bh(i.duration):null,a=null!=i.delay?Bh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Aw);const s=Bh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return xw(e.params?X1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Aw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Aw={};class hM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Aw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bh(i.duration)),null!=i.delay&&(r.delay=Bh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=X1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new hM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Aw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new $ke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jke,"."+this._enterClassName)).replace(Lke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function z2e(t){return new Ot(3014,!1)}()),a}}class Mw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$h),this._currentKeyframe.set(e,$h);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function Bke(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$h)}else Cf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=X1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$h),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Cf(a,new Map,this._backFill);c.forEach((u,d)=>{u===YA?n.add(d):u===$h&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?ww(n.values()):[],s=e.size?ww(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return uM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class $ke extends Mw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Cf(n[0]);l.set("offset",0),o.push(l);const c=Cf(n[0]);c.set("offset",S7(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Cf(n[d]);const f=h.get("offset");h.set("offset",S7((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return uM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function S7(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class fM{}const Vke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Hke extends fM{normalizePropertyName(n,e){return aM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(Vke.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function N2e(t,n){return new Ot(3005,!1)}())}return s+o}}function D7(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const pM={};class T7{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function zke(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||pM,p=this.buildStyles(i,a&&a.params||pM,d),m=l&&l.params||pM,g=this.buildStyles(r,m,d),v=new Set,y=new Map,_=new Map,C="void"===r,S={params:Uke(m,h),delay:this.ast.options?.delay},M=u?[]:dM(n,e,this.ast.animation,o,s,p,g,S,c,d);let $=0;if(M.forEach(R=>{$=Math.max(R.duration+R.delay,$)}),d.length)return D7(e,this._triggerName,i,r,C,p,g,[],[],y,_,$,d);M.forEach(R=>{const z=R.element,U=fc(y,z,new Set);R.preStyleProps.forEach(re=>U.add(re));const q=fc(_,z,new Set);R.postStyleProps.forEach(re=>q.add(re)),z!==e&&v.add(z)});const G=ww(v.values());return D7(e,this._triggerName,i,r,C,p,g,M,G,y,_,$)}}function Uke(t,n){const e=W1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class Gke{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=W1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=X1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class qke{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new Gke(r.style,r.options&&r.options.params||{},i))}),E7(this.states,"true","1"),E7(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new T7(n,r,this.states))}),this.fallbackTransition=function Xke(t,n,e){return new T7(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function E7(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const Yke=new Ew;class Jke{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=lM(this._driver,e,i,r);if(i.length)throw function J2e(t){return new Ot(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=dM(this._driver,e,o,iM,yw,new Map,new Map,i,Yke,r),s.forEach(u=>{const d=fc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function K2e(){return new Ot(3300,!1)}()),s=[]),r.length)throw function Q2e(t){return new Ot(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$h))})});const c=wf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function Z2e(t){return new Ot(3301,!1)}();return e}listen(n,e,i,r){const o=ZA(e,"","","");return KA(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const A7="ng-animate-queued",mM="ng-animate-disabled",tSe=[],M7={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},nSe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zc="__ng_removed";class gM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function sSe(t){return t??null}(i?n.value:n),i){const o=W1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Y1="void",vM=new gM(Y1);class iSe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Uc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function eke(t,n){return new Ot(3302,!1)}();if(null==i||0==i.length)throw function tke(t){return new Ot(3303,!1)}();if(!function aSe(t){return"start"==t||"done"==t}(i))throw function nke(t,n){return new Ot(3400,!1)}();const o=fc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fc(this._engine.statesByElement,n,new Map);return a.has(e)||(Uc(n,bw),Uc(n,bw+"-"+e),a.set(e,vM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function ike(t){return new Ot(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new yM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Uc(n,bw),Uc(n,bw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new gM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=vM),c.value!==Y1&&l.value===c.value){if(!function uSe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{Gp(n,g),Rd(n,v)})}return}const h=fc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Uc(n,A7),s.onStart(()=>{Xg(n,A7)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,_w,!0);i.forEach(r=>{if(r[zc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,Y1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&wf(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||vM,u=new gM(Y1),d=new yM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[zc];(!o||o===M7)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Uc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=ZA(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,KA(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class rSe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new iSe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Iw(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Iw(e))return;const o=e[zc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Uc(n,mM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Xg(n,mM))}removeNode(n,e,i,r){if(Iw(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[zc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Iw(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,_w,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,rM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return wf(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[zc];if(e&&e.setForRemoval){if(n[zc]=M7,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(mM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?wf(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function rke(t){return new Ot(3402,!1)}()}_flushAnimations(n,e){const i=new Ew,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Z=>{u.add(Z);const H=this.driver.query(Z,".ng-animate-queued",!0);for(let he=0;he{const he=iM+m++;p.set(H,he),Z.forEach(E=>Uc(E,he))});const g=[],v=new Set,y=new Set;for(let Z=0;Zv.add(E)):y.add(H))}const _=new Map,C=F7(h,Array.from(v));C.forEach((Z,H)=>{const he=yw+m++;_.set(H,he),Z.forEach(E=>Uc(E,he))}),n.push(()=>{f.forEach((Z,H)=>{const he=p.get(H);Z.forEach(E=>Xg(E,he))}),C.forEach((Z,H)=>{const he=_.get(H);Z.forEach(E=>Xg(E,he))}),g.forEach(Z=>{this.processLeaveNode(Z)})});const S=[],M=[];for(let Z=this._namespaceList.length-1;Z>=0;Z--)this._namespaceList[Z].drainQueuedTransitions(e).forEach(he=>{const E=he.player,N=he.element;if(S.push(E),this.collectedEnterElements.length){const xe=N[zc];if(xe&&xe.setForMove){if(xe.previousTriggersValues&&xe.previousTriggersValues.has(he.triggerName)){const tt=xe.previousTriggersValues.get(he.triggerName),ze=this.statesByElement.get(he.element);if(ze&&ze.has(he.triggerName)){const ot=ze.get(he.triggerName);ot.value=tt,ze.set(he.triggerName,ot)}}return void E.destroy()}}const F=!d||!this.driver.containsElement(d,N),Y=_.get(N),V=p.get(N),oe=this._buildInstruction(he,i,V,Y,F);if(oe.errors&&oe.errors.length)return void M.push(oe);if(F)return E.onStart(()=>Gp(N,oe.fromStyles)),E.onDestroy(()=>Rd(N,oe.toStyles)),void r.push(E);if(he.isFallbackTransition)return E.onStart(()=>Gp(N,oe.fromStyles)),E.onDestroy(()=>Rd(N,oe.toStyles)),void r.push(E);const fe=[];oe.timelines.forEach(xe=>{xe.stretchStartingKeyframe=!0,this.disabledNodes.has(xe.element)||fe.push(xe)}),oe.timelines=fe,i.append(N,oe.timelines),s.push({instruction:oe,player:E,element:N}),oe.queriedElements.forEach(xe=>fc(a,xe,[]).push(E)),oe.preStyleProps.forEach((xe,tt)=>{if(xe.size){let ze=l.get(tt);ze||l.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))}}),oe.postStyleProps.forEach((xe,tt)=>{let ze=c.get(tt);ze||c.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))})});if(M.length){const Z=[];M.forEach(H=>{Z.push(function oke(t,n){return new Ot(3505,!1)}())}),S.forEach(H=>H.destroy()),this.reportError(Z)}const $=new Map,G=new Map;s.forEach(Z=>{const H=Z.element;i.has(H)&&(G.set(H,H),this._beforeAnimationBuild(Z.player.namespaceId,Z.instruction,$))}),r.forEach(Z=>{const H=Z.element;this._getPreviousPlayers(H,!1,Z.namespaceId,Z.triggerName,null).forEach(E=>{fc($,H,[]).push(E),E.destroy()})});const R=g.filter(Z=>j7(Z,l,c)),z=new Map;N7(z,this.driver,y,c,$h).forEach(Z=>{j7(Z,l,c)&&R.push(Z)});const q=new Map;f.forEach((Z,H)=>{N7(q,this.driver,new Set(Z),l,YA)}),R.forEach(Z=>{const H=z.get(Z),he=q.get(Z);z.set(Z,new Map([...Array.from(H?.entries()??[]),...Array.from(he?.entries()??[])]))});const re=[],L=[],X={};s.forEach(Z=>{const{element:H,player:he,instruction:E}=Z;if(i.has(H)){if(u.has(H))return he.onDestroy(()=>Rd(H,E.toStyles)),he.disabled=!0,he.overrideTotalTime(E.totalTime),void r.push(he);let N=X;if(G.size>1){let Y=H;const V=[];for(;Y=Y.parentNode;){const oe=G.get(Y);if(oe){N=oe;break}V.push(Y)}V.forEach(oe=>G.set(oe,N))}const F=this._buildAnimation(he.namespaceId,E,$,o,q,z);if(he.setRealPlayer(F),N===X)re.push(he);else{const Y=this.playersByElement.get(N);Y&&Y.length&&(he.parentPlayer=wf(Y)),r.push(he)}}else Gp(H,E.fromStyles),he.onDestroy(()=>Rd(H,E.toStyles)),L.push(he),u.has(H)&&r.push(he)}),L.forEach(Z=>{const H=o.get(Z.element);if(H&&H.length){const he=wf(H);Z.setRealPlayer(he)}}),r.forEach(Z=>{Z.parentPlayer?Z.syncPlayerEvents(Z.parentPlayer):Z.destroy()});for(let Z=0;Z!F.destroyed);N.length?lSe(this,H,N):this.processLeaveNode(H)}return g.length=0,re.forEach(Z=>{this.players.push(Z),Z.onDone(()=>{Z.destroy();const H=this.players.indexOf(Z);this.players.splice(H,1)}),Z.play()}),re}elementContainsData(n,e){let i=!1;const r=e[zc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==Y1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Gp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[zc];if(g&&g.removedBeforeQueried)return new G1(p.duration,p.delay);const v=m!==l,y=function cSe(t){const n=[];return O7(t,n),n}((i.get(m)||tSe).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),_=o.get(m),C=s.get(m),S=s7(0,this._normalizer,0,p.keyframes,_,C),M=this._buildPlayer(p,S,y);if(p.subTimeline&&r&&d.add(m),v){const $=new yM(n,a,m);$.setRealPlayer(M),c.push($)}return M});c.forEach(p=>{fc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function oSe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Uc(p,m7));const f=wf(h);return f.onDestroy(()=>{u.forEach(p=>Xg(p,m7)),Rd(l,e.toStyles)}),d.forEach(p=>{fc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new G1(n.duration,n.delay)}}class yM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new G1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>KA(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Iw(t){return t&&1===t.nodeType}function I7(t,n){const e=t.style.display;return t.style.display=n??"none",e}function N7(t,n,e,i,r){const o=[];e.forEach(l=>o.push(I7(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[zc]=nSe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>I7(l,o[a++])),s}function F7(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Uc(t,n){t.classList?.add(n)}function Xg(t,n){t.classList?.remove(n)}function lSe(t,n,e){wf(e).onDone(()=>t.processLeaveNode(n))}function O7(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Nw{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new rSe(n,e,i),this._timelineEngine=new Jke(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=lM(this._driver,o,l,c);if(l.length)throw function X2e(t,n){return new Ot(3404,!1)}();a=function Wke(t,n,e){return new qke(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let hSe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Gp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gp(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bM(t){let n=null;return t.forEach((e,i)=>{(function fSe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class P7{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:x7(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class pSe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d7(n,e)}getParentElement(n){return tM(n)}query(n,e,i){return h7(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof P7);(function yke(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function pke(t){return t.length?t[0]instanceof Map?t:t.map(n=>g7(n)):[]}(e).map(f=>Cf(f));d=function bke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,x7(t,a)))}}return n}(n,d,c);const h=function dSe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=bM(n[0]),n.length>1&&(i=bM(n[n.length-1]))):n instanceof Map&&(e=bM(n)),e||i?new hSe(t,e,i):null}(n,d);return new P7(n,d,l,h)}}let mSe=(()=>{class t extends t7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:yu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n7(e):e;return L7(this._renderer,null,i,"register",[r]),new gSe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class gSe extends D2e{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new vSe(this._id,n,e||{},this._renderer)}}class vSe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L7(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L7(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const R7="@.disabled";let ySe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $7("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new bSe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Nw),ct(Wi))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class $7{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==R7?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class bSe extends $7{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==R7?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Se(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function xSe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wSe=(()=>{class t extends Nw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(nM),ct(fM),ct(Au))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const B7=[{provide:t7,useClass:mSe},{provide:fM,useFactory:function CSe(){return new Hke}},{provide:Nw,useClass:wSe},{provide:Lp,useFactory:function kSe(t,n,e){return new ySe(t,n,e)},deps:[vw,Nw,Wi]}],_M=[{provide:nM,useFactory:()=>new pSe},{provide:C$,useValue:"BrowserAnimations"},...B7],xM=[{provide:nM,useClass:f7},{provide:C$,useValue:"NoopAnimations"},...B7];let SSe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?xM:_M}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:_M,imports:[qA]}),t})(),DSe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:xM,imports:[qA]}),t})();function $n(...t){let n=t[t.length-1];return Sa(n)?(t.pop(),Oc(t,n)):st(t)}class Hs extends tr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Xr;return this._value}next(n){super.next(this._value=n)}}const Ow=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class wM extends O{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TSe extends O{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function CM(t,n,e,i,r=new TSe(t,e,i)){if(!r.closed)return n instanceof rn?n.subscribe(r):nc(n)(r)}const V7={};function jw(...t){let n,e;return Sa(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&et(t[0])&&(t=t[0]),st(t,e).lift(new ESe(n))}class ESe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new ASe(n,this.resultSelector))}}class ASe extends wM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V7),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lw(t){return t?function ISe(t){return new rn(n=>t.schedule(()=>n.complete()))}(t):Vh}function H7(t){return new rn(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?co(e):Lw()).subscribe(n)})}function qp(t,n){return new rn(n?e=>n.schedule(NSe,0,{error:t,subscriber:e}):e=>e.error(t))}function NSe({error:t,subscriber:n}){n.error(t)}function zl(t,n){return"function"==typeof n?e=>e.pipe(zl((i,r)=>co(t(i,r)).pipe(yn((o,s)=>n(i,o,r,s))))):e=>e.lift(new FSe(t))}class FSe{constructor(n){this.project=n}call(n,e){return e.subscribe(new OSe(n,this.project))}}class OSe extends W{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new ml(this),r=this.destination;r.add(i),this.innerSubscription=Fe(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const z7=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Sl(t){return n=>0===t?Lw():n.lift(new jSe(t))}class jSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new PSe(n,this.total))}}class PSe extends O{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ns(t,n){return function(i){return i.lift(new LSe(t,n))}}class LSe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new RSe(n,this.predicate,this.thisArg))}}class RSe extends O{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function Rw(t=null){return n=>n.lift(new $Se(t))}class $Se{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new BSe(n,this.defaultValue))}}class BSe extends O{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function U7(t=zSe){return n=>n.lift(new VSe(t))}class VSe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new HSe(n,this.errorFactory))}}class HSe extends O{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function zSe(){return new Ow}function kf(t,n){const e=arguments.length>=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,Sl(1),e?Rw(n):U7(()=>new Ow))}function Sf(t,n){return nt(t,n,1)}function Hh(){}function is(t,n,e){return function(r){return r.lift(new USe(t,n,e))}}class USe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new GSe(n,this.nextOrObserver,this.error,this.complete))}}class GSe extends O{constructor(n,e,i,r){super(n),this._tapNext=Hh,this._tapError=Hh,this._tapComplete=Hh,this._tapError=i||Hh,this._tapComplete=r||Hh,rt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hh,this._tapError=e.error||Hh,this._tapComplete=e.complete||Hh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ul(t){return function(e){const i=new WSe(t),r=e.lift(i);return i.caught=r}}class WSe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new qSe(n,this.selector,this.caught))}}class qSe extends W{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new ml(this);this.add(i);const r=Fe(e,i);r!==i&&this.add(r)}}}function G7(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new XSe(t,n,e))}}class XSe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YSe(n,this.accumulator,this.seed,this.hasSeed))}}class YSe extends O{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function kM(t){return function(e){return 0===t?Lw():e.lift(new JSe(t))}}class JSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new KSe(n,this.total))}}class KSe extends O{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,kM(1),e?Rw(n):U7(()=>new Ow))}class ZSe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new eDe(n,this.predicate,this.inclusive))}}class eDe extends O{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class nDe{constructor(n){this.value=n}call(n,e){return e.subscribe(new iDe(n,this.value))}}class iDe extends O{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function SM(t){return n=>n.lift(new rDe(t))}class rDe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new oDe(n,this.callback))}}class oDe extends O{constructor(n,e){super(n),this.add(new ue(e))}}const zi="primary",K1=Symbol("RouteTitle");class sDe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Yg(t){return new sDe(t)}function aDe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function X7(t){return Array.prototype.concat.apply([],t)}function Y7(t){return t.length>0?t[t.length-1]:null}function Na(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Df(t){return OE(t)?t:S1(t)?co(Promise.resolve(t)):$n(t)}const $w=!1,cDe={exact:function Q7(t,n,e){if(!Xp(t.segments,n.segments)||!Bw(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q7(t.children[i],n.children[i],e))return!1;return!0},subset:Z7},J7={exact:function uDe(t,n){return $d(t,n)},subset:function dDe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q7(t[e],n[e]))},ignored:()=>!0};function K7(t,n,e){return cDe[e.paths](t.root,n.root,e.matrixParams)&&J7[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z7(t,n,e){return e9(t,n,n.segments,e)}function e9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!Xp(r,e)||n.hasChildren()||!Bw(r,e,i))}if(t.segments.length===e.length){if(!Xp(t.segments,e)||!Bw(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z7(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(Xp(t.segments,r)&&Bw(t.segments,r,i)&&t.children[zi])&&e9(t.children[zi],n,o,i)}}function Bw(t,n,e){return n.every((i,r)=>J7[e](t[r].parameters,i.parameters))}class Tf{constructor(n=new fr([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return pDe.serialize(this)}}class fr{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Na(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Vw(this)}}class Q1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Yg(this.parameters)),this._parameterMap}toString(){return i9(this)}}function Xp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let Z1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new DM},providedIn:"root"}),t})();class DM{parse(n){const e=new CDe(n);return new Tf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${ey(n.root,!0)}`,i=function vDe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Hw(e)}=${Hw(r)}`).join("&"):`${Hw(e)}=${Hw(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function mDe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const pDe=new DM;function Vw(t){return t.segments.map(n=>i9(n)).join("/")}function ey(t,n){if(!t.hasChildren())return Vw(t);if(n){const e=t.children[zi]?ey(t.children[zi],!1):"",i=[];return Na(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${ey(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function fDe(t,n){let e=[];return Na(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Na(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[ey(t.children[zi],!1)]:[`${r}:${ey(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${Vw(t)}/${e[0]}`:`${Vw(t)}/(${e.join("//")})`}}function t9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Hw(t){return t9(t).replace(/%3B/gi,";")}function TM(t){return t9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zw(t){return decodeURIComponent(t)}function n9(t){return zw(t.replace(/\+/g,"%20"))}function i9(t){return`${TM(t.path)}${function gDe(t){return Object.keys(t).map(n=>`;${TM(n)}=${TM(t[n])}`).join("")}(t.parameters)}`}const yDe=/^[^\/()?;=#]+/;function Uw(t){const n=t.match(yDe);return n?n[0]:""}const bDe=/^[^=?&#]+/,xDe=/^[^&#]+/;class CDe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new fr([],{}):new fr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new fr(n,e)),i}parseSegment(){const n=Uw(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Ot(4009,$w);return this.capture(n),new Q1(zw(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Uw(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Uw(this.remaining);r&&(i=r,this.capture(i))}n[zw(e)]=zw(i)}parseQueryParam(n){const e=function _De(t){const n=t.match(bDe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wDe(t){const n=t.match(xDe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=n9(e),o=n9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Uw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Ot(4010,$w);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new fr([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Ot(4011,$w)}}function EM(t){return t.segments.length>0?new fr([],{[zi]:t}):t}function Gw(t){const n={};for(const i of Object.keys(t.children)){const o=Gw(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function kDe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new fr(t.segments.concat(n.segments),n.children)}return t}(new fr(t.segments,n))}function Yp(t){return t instanceof Tf}const AM=!1;function SDe(t,n,e,i,r){if(0===e.length)return Jg(n.root,n.root,n.root,i,r);const o=function l9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new a9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Na(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new a9(e,n,i)}(e);return o.toRoot()?Jg(n.root,n.root,new fr([],{}),i,r):function s(l){const c=function TDe(t,n,e,i){if(t.isAbsolute)return new Kg(n.root,!0,0);if(-1===i)return new Kg(e,e===n.root,0);return function c9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Ot(4005,AM&&"Invalid number of '../'");r=i.segments.length}return new Kg(i,!1,r-o)}(e,i+(ty(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Qg(c.segmentGroup,c.index,o.commands):MM(c.segmentGroup,c.index,o.commands);return Jg(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function ty(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function ny(t){return"object"==typeof t&&null!=t&&t.outlets}function Jg(t,n,e,i,r){let s,o={};i&&Na(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:s9(t,n,e);const a=EM(Gw(s));return new Tf(a,o,r)}function s9(t,n,e){const i={};return Na(t.children,(r,o)=>{i[o]=r===n?e:s9(r,n,e)}),new fr(t.segments,i)}class a9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&ty(i[0]))throw new Ot(4003,AM&&"Root segment cannot have matrix parameters");const r=i.find(ny);if(r&&r!==Y7(i))throw new Ot(4004,AM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kg{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function MM(t,n,e){if(t||(t=new fr([],{})),0===t.segments.length&&t.hasChildren())return Qg(t,n,e);const i=function ADe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(ny(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d9(l,c,s))return o;i+=2}else{if(!d9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=MM(t.children[s],n,o))}),Na(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new fr(t.segments,r))}}function IM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=IM(new fr([],{}),0,e))}),n}function u9(t){const n={};return Na(t,(e,i)=>n[i]=`${e}`),n}function d9(t,n,e){return t==e.path&&$d(n,e.parameters)}const iy="imperative";class Bd{constructor(n,e){this.id=n,this.url=e}}class Ww extends Bd{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class zh extends Bd{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ry extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class qw extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Xw extends Bd{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class IDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class FDe extends Bd{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ODe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PDe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class LDe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class RDe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $De{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BDe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VDe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class h9{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UDe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SDe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return UDe.\u0275fac(n)},providedIn:"root"}),t})();class f9{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=NM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=NM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=FM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return FM(n,this._root).map(e=>e.value)}}function NM(t,n){if(t===n.value)return n;for(const e of n.children){const i=NM(t,e);if(i)return i}return null}function FM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=FM(t,e);if(i.length)return i.unshift(n),i}return[]}class Uh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Zg(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class p9 extends f9{constructor(n,e){super(n),this.snapshot=e,OM(this,n)}toString(){return this.snapshot.toString()}}function m9(t,n){const e=function qDe(t,n){const s=new Yw([],{},{},"",{},zi,n,null,t.root,-1,{});return new v9("",new Uh(s,[]))}(t,n),i=new Hs([new Q1("",{})]),r=new Hs({}),o=new Hs({}),s=new Hs({}),a=new Hs(""),l=new Rr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new p9(new Uh(l,[]),e)}class Rr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(yn(c=>c[K1]))??$n(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(yn(n=>Yg(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(yn(n=>Yg(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function g9(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function XDe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Yw{get title(){return this.data?.[K1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Yg(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class v9 extends f9{constructor(n,e){super(e),this.url=n,OM(this,e)}toString(){return y9(this._root)}}function OM(t,n){n.value._routerState=t,n.children.forEach(e=>OM(t,e))}function y9(t){const n=t.children.length>0?` { ${t.children.map(y9).join(", ")} } `:"";return`${t.value}${n}`}function jM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$d(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),$d(n.params,e.params)||t.params.next(e.params),function lDe(t,n){if(t.length!==n.length)return!1;for(let e=0;e$d(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||PM(t.parent,n.parent))}function oy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JDe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return oy(t,i,r);return oy(t,i)})}(t,n,e);return new Uh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>oy(t,a)),s}}const i=function KDe(t){return new Rr(new Hs(t.url),new Hs(t.params),new Hs(t.queryParams),new Hs(t.fragment),new Hs(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>oy(t,o));return new Uh(i,r)}}const LM="ngNavigationCancelingError";function b9(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=Yp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=_9(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function _9(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[LM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function x9(t){return w9(t)&&Yp(t.url)}function w9(t){return t&&t[LM]}class QDe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new sy,this.attachRef=null}}let sy=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new QDe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Jw=!1;let Jp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new Ke,this.deactivateEvents=new Ke,this.attachEvents=new Ke,this.detachEvents=new Ke,this.parentContexts=ar(sy),this.location=ar(nl),this.changeDetector=ar(qo),this.environmentInjector=ar(Nd)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Ot(4012,Jw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Ot(4012,Jw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Ot(4012,Jw);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Ot(4013,Jw);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new ZDe(e,a,r.injector);if(i&&function eTe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Hn]}),t})();class ZDe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Rr?this.route:n===sy?this.childContexts:this.parent.get(n,e)}}let RM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[L6],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp],encapsulation:2}),t})();function C9(t,n){return t.providers&&!t._injector&&(t._injector=Gx(t.providers,n,`Route: ${t.path}`)),t._injector??n}function BM(t){const n=t.children&&t.children.map(BM),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=RM),e}function Gc(t){return t.outlet||zi}function k9(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function ay(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class oTe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),jM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Na(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new VDe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new $De(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(jM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),jM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=ay(r.snapshot),l=a?.get($c)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class S9{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Kw{constructor(n,e){this.component=n,this.route=e}}function sTe(t,n,e){const i=t._root;return ly(i,n?n._root:null,e,[i.value])}function ev(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function cge(t){return null!==q_(t)}(t)?n.get(t):t:i}function ly(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Zg(n);return t.children.forEach(s=>{(function lTe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function cTe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Xp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Xp(t.url,n.url)||!$d(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!PM(t,n)||!$d(t.queryParams,n.queryParams);default:return!PM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S9(i)):(o.data=s.data,o._resolvedData=s._resolvedData),ly(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Kw(a.outlet.component,s))}else s&&cy(n,a,r),r.canActivateChecks.push(new S9(i)),ly(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Na(o,(s,a)=>cy(s,e.getContext(a),r)),r}function cy(t,n,e){const i=Zg(t),r=t.value;Na(i,(o,s)=>{cy(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Kw(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function uy(t){return"function"==typeof t}function VM(t){return t instanceof Ow||"EmptyError"===t?.name}const Qw=Symbol("INITIAL_VALUE");function tv(){return zl(t=>jw(t.map(n=>n.pipe(Sl(1),function J1(...t){const n=t[t.length-1];return Sa(n)?(t.pop(),e=>Pw(t,e,n)):e=>Pw(t,e)}(Qw)))).pipe(yn(n=>{for(const e of n)if(!0!==e){if(e===Qw)return Qw;if(!1===e||e instanceof Tf)return e}return!0}),ns(n=>n!==Qw),Sl(1)))}function D9(t){return function Wt(...t){return wn(t)}(is(n=>{if(Yp(n))throw b9(0,n)}),yn(n=>!0===n))}const HM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function T9(t,n,e,i,r){const o=zM(t,n,e);return o.matched?function DTe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$n(r.map(s=>{const a=ev(s,t);return Df(function mTe(t){return t&&uy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9()):$n(!0)}(i=C9(n,i),n,e).pipe(yn(s=>!0===s?o:{...HM})):$n(o)}function zM(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...HM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||aDe)(e,t,n);if(!r)return{...HM};const o={};Na(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Zw(t,n,e,i){if(e.length>0&&function ATe(t,n,e){return e.some(i=>eC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new fr(n,function ETe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new fr([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new fr(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function MTe(t,n,e){return e.some(i=>eC(t,n,i))}(t,e,i)){const o=new fr(t.segments,function TTe(t,n,e,i,r){const o={};for(const s of i)if(eC(t,e,s)&&!r[Gc(s)]){const a=new fr([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new fr(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function eC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function E9(t,n,e,i){return!!(Gc(t)===i||i!==zi&&eC(n,e,t))&&("**"===t.path||zM(n,t,e).matched)}function A9(t,n,e){return 0===n.length&&!t.children[e]}const tC=!1;class nC{constructor(n){this.segmentGroup=n||null}}class M9{constructor(n){this.urlTree=n}}function dy(t){return qp(new nC(t))}function I9(t){return qp(new M9(t))}function ITe(t){return qp(new Ot(4e3,tC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class OTe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=Zw(this.urlTree.root,[],[],this.config).segmentGroup,e=new fr(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(yn(o=>this.createUrlTree(Gw(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ul(o=>{if(o instanceof M9)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof nC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(yn(r=>this.createUrlTree(Gw(r),n.queryParams,n.fragment))).pipe(Ul(r=>{throw r instanceof nC?this.noMatchError(r):r}))}noMatchError(n){return new Ot(4002,tC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=EM(n);return new Tf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(yn(o=>new fr([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return co(r).pipe(Sf(o=>{const s=i.children[o],a=k9(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(yn(l=>({segment:l,outlet:o})))}),G7((o,s)=>(o[s.outlet]=s.segment,o),{}),W7())}expandSegment(n,e,i,r,o,s){return co(i).pipe(Sf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ul(c=>{if(c instanceof nC)return $n(null);throw c}))),kf(a=>!!a),Ul((a,l)=>{if(VM(a))return A9(e,r,o)?$n(new fr([],{})):dy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return E9(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):dy(e):dy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?I9(o):this.lineralizeSegments(i,o).pipe(nt(s=>{const a=new fr(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zM(e,r,o);if(!a)return dy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?I9(d):this.lineralizeSegments(r,d).pipe(nt(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=C9(i,n),i.loadChildren?(i._loadedRoutes?$n({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(yn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new fr(r,{})))):$n(new fr(r,{}))):T9(e,i,r,n).pipe(zl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(nt(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=Zw(e,a,l,h),m=new fr(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(yn(_=>new fr(a,_)));if(0===h.length&&0===p.length)return $n(new fr(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(yn(y=>new fr(a.concat(y.segments),y.children)))})):dy(e)))}getChildConfig(n,e,i){return e.children?$n({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$n({routes:e._loadedRoutes,injector:e._loadedInjector}):function STe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$n(!0):$n(r.map(s=>{const a=ev(s,t);return Df(function dTe(t){return t&&uy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9())}(n,e,i).pipe(nt(r=>r?this.configLoader.loadChildren(n,e).pipe(is(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function NTe(t){return qp(_9(tC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$n({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $n(i);if(r.numberOfChildren>1||!r.children[zi])return ITe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Tf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Na(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Na(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new fr(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Ot(4001,tC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PTe{}class $Te{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=Zw(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(yn(e=>{if(null===e)return null;const i=new Yw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uh(i,e),o=new v9(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=g9(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return co(Object.keys(i.children)).pipe(Sf(r=>{const o=i.children[r],s=k9(e,r);return this.processSegmentGroup(n,s,o,r)}),G7((r,o)=>r&&o?(r.push(...o),r):null),function QSe(t,n=!1){return e=>e.lift(new ZSe(t,n))}(r=>null!==r),Rw(null),W7(),yn(r=>{if(null===r)return null;const o=F9(r);return function BTe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return co(e).pipe(Sf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),kf(s=>!!s),Ul(s=>{if(VM(s))return A9(i,r,o)?$n([]):$n(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!E9(e,i,r,o))return $n(null);let s;if("**"===e.path){const a=r.length>0?Y7(r).parameters:{},l=j9(i)+r.length;s=$n({snapshot:new Yw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),l,L9(e)),consumedSegments:[],remainingSegments:[]})}else s=T9(i,e,r,n).pipe(yn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=j9(i)+l.length;return{snapshot:new Yw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),d,L9(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(zl(a=>{if(null===a)return $n(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function VTe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Zw(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(yn(g=>null===g?null:[new Uh(l,g)]));if(0===h.length&&0===p.length)return $n([new Uh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(yn(g=>null===g?null:[new Uh(l,g)]))}))}}function HTe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function F9(t){const n=[],e=new Set;for(const i of t){if(!HTe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=F9(i.children);n.push(new Uh(i.value,r))}return n.filter(i=>!e.has(i))}function O9(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function j9(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function P9(t){return t.data||{}}function L9(t){return t.resolve||{}}function R9(t){return"string"==typeof t.title||null===t.title}function UM(t){return zl(n=>{const e=t(n);return e?co(e).pipe(yn(()=>n)):$n(n)})}const nv=new zn("ROUTES");let GM=(()=>{class t{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $n(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Df(e.loadComponent()).pipe(yn(B9),is(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),SM(()=>{this.componentLoaders.delete(e)})),r=new pe(i,()=>new tr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $n({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(yn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=X7(l.get(nv,[],ki.Self|ki.Optional)));return{routes:c.map(BM),injector:l}}),SM(()=>{this.childrenLoaders.delete(i)})),s=new pe(o,()=>new tr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Df(e()).pipe(yn(B9),nt(r=>r instanceof j6||Array.isArray(r)?$n(r):co(this.compiler.compileModuleAsync(r))))}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs),ct(k$))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function B9(t){return function KTe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let rC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new tr,this.configLoader=ar(GM),this.environmentInjector=ar(Nd),this.urlSerializer=ar(Z1),this.rootContexts=ar(sy),this.navigationId=0,this.afterPreactivation=()=>$n(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new LDe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PDe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Hs({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ns(i=>0!==i.id),yn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),zl(i=>{let r=!1,o=!1;return $n(i).pipe(is(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),zl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return V9(s.source)&&(e.browserUrlTree=s.extractedUrl),$n(s).pipe(zl(u=>{const d=this.transitions?.getValue();return this.events.next(new Ww(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vh:Promise.resolve(u)}),function jTe(t,n,e,i){return zl(r=>function FTe(t,n,e,i,r){return new OTe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(yn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),is(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UTe(t,n,e,i,r){return nt(o=>function RTe(t,n,e,i,r,o,s="emptyOnly"){return new $Te(t,n,e,i,r,s,o).recognize().pipe(zl(a=>null===a?function LTe(t){return new rn(n=>n.error(t))}(new PTe):$n(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(yn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),is(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new IDe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new Ww(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=m9(d,this.rootComponentType).snapshot;return $n(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}}),is(s=>{const a=new NDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),yn(s=>i={...s,guards:sTe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function vTe(t,n){return nt(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$n({...e,guardsResult:!0}):function yTe(t,n,e,i){return co(t).pipe(nt(r=>function kTe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$n(o.map(a=>{const l=ay(n)??r,c=ev(a,l);return Df(function pTe(t){return t&&uy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(kf())})).pipe(tv()):$n(!0)}(r.component,r.route,e,n,i)),kf(r=>!0!==r,!0))}(s,i,r,t).pipe(nt(a=>a&&function uTe(t){return"boolean"==typeof t}(a)?function bTe(t,n,e,i){return co(n).pipe(Sf(r=>Pw(function xTe(t,n){return null!==t&&n&&n(new RDe(t)),$n(!0)}(r.route.parent,i),function _Te(t,n){return null!==t&&n&&n(new BDe(t)),$n(!0)}(r.route,i),function CTe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function aTe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H7(()=>$n(s.guards.map(l=>{const c=ay(s.node)??e,u=ev(l,c);return Df(function fTe(t){return t&&uy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(kf())})).pipe(tv())));return $n(o).pipe(tv())}(t,r.path,e),function wTe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $n(!0);const r=i.map(o=>H7(()=>{const s=ay(n)??e,a=ev(o,s);return Df(function hTe(t){return t&&uy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(kf())}));return $n(r).pipe(tv())}(t,r.route,e))),kf(r=>!0!==r,!0))}(i,o,t,n):$n(a)),yn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),is(s=>{if(i.guardsResult=s.guardsResult,Yp(s.guardsResult))throw b9(0,s.guardsResult);const a=new FDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),ns(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),UM(s=>{if(s.guards.canActivateChecks.length)return $n(s).pipe(is(a=>{const l=new ODe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),zl(a=>{let l=!1;return $n(a).pipe(function GTe(t,n){return nt(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $n(e);let o=0;return co(r).pipe(Sf(s=>function WTe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!R9(r)&&(o[K1]=r.title),function qTe(t,n,e,i){const r=function XTe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $n({});const o={};return co(r).pipe(nt(s=>function YTe(t,n,e,i){const r=ay(n)??i,o=ev(t,r);return Df(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(kf(),is(a=>{o[s]=a}))),kM(1),function tDe(t){return n=>n.lift(new nDe(t))}(o),Ul(s=>VM(s)?Vh:qp(s)))}(o,t,n,i).pipe(yn(s=>(t._resolvedData=s,t.data=g9(t,e).resolve,r&&R9(r)&&(t.data[K1]=r.title),null)))}(s.route,i,t,n)),is(()=>o++),kM(1),nt(s=>o===r.length?$n(e):Vh))})}(e.paramsInheritanceStrategy,this.environmentInjector),is({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),is(a=>{const l=new jDe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),UM(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(is(u=>{l.component=u}),yn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return jw(a(s.targetSnapshot.root)).pipe(Rw(),Sl(1))}),UM(()=>this.afterPreactivation()),yn(s=>{const a=function YDe(t,n,e){const i=oy(t,n._root,e?e._root:void 0);return new p9(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),is(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>yn(i=>(new oTe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),is({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new zh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),SM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ul(s=>{if(o=!0,w9(s)){x9(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ry(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),x9(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V9(i.source)};e.scheduleNavigation(l,iy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Xw(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vh}))}))}cancelNavigationTransition(e,i,r){const o=new ry(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function V9(t){return t!==iy}let H9=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[K1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(QTe)},providedIn:"root"}),t})(),QTe=(()=>{class t extends H9{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(ct(JB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZTe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tEe)},providedIn:"root"}),t})();class eEe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let tEe=(()=>{class t extends eEe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oC=new zn("",{providedIn:"root",factory:()=>({})});let iEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(rEe)},providedIn:"root"}),t})(),rEe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function oEe(t){throw t}function sEe(t,n,e){return n.parse("/")}const aEe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},lEe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let cr=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=ar(xxe),this.isNgZoneEnabled=!1,this.options=ar(oC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||oEe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||sEe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=ar(iEe),this.routeReuseStrategy=ar(ZTe),this.urlCreationStrategy=ar(WDe),this.titleStrategy=ar(H9),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=X7(ar(nv,{optional:!0})??[]),this.navigationTransitions=ar(rC),this.urlSerializer=ar(Z1),this.location=ar(kA),this.isNgZoneEnabled=ar(Wi)instanceof Wi&&Wi.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=m9(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),iy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(BM),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Yp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,iy,null,i)}navigate(e,i={skipLocationChange:!1}){return function cEe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Nu=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new tr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof zh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=qg(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=qg(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=qg(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function d5(t,n,e){return function L0e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?u5:y1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(Rr),Ah("tabindex"),le(Ss),le(ti),le(zp))},t.\u0275dir=Zt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ht("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Hn]}),t})(),hy=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Ke,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof zh&&this.update()})}ngAfterContentInit(){$n(this.links.changes,$n(null)).pipe(A()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=co(e).pipe(A()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function uEe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(ti),le(Ss),le(qo),le(Nu,8))},t.\u0275dir=Zt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,Nu,5),2&e){let o;cn(o=un())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Hn]}),t})();class z9{}let dEe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(ns(e=>e instanceof zh),Sf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gx(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return co(r).pipe(A())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$n(null);const o=r.pipe(nt(s=>null===s?$n(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?co([o,this.loader.loadComponent(i)]).pipe(A()):o})}}return t.\u0275fac=function(e){return new(e||t)(ct(cr),ct(k$),ct(Nd),ct(z9),ct(GM))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const qM=new zn("");let U9=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Ww?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof zh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof h9&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new h9(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function V5(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var mc=(()=>((mc=mc||{})[mc.COMPLETE=0]="COMPLETE",mc[mc.FAILED=1]="FAILED",mc[mc.REDIRECTING=2]="REDIRECTING",mc))();const iv=!1;function Ef(t,n){return{\u0275kind:t,\u0275providers:n}}const XM=new zn("",{providedIn:"root",factory:()=>!1});function W9(){const t=ar(Rs);return n=>{const e=t.get(Au);if(n!==e.components[0])return;const i=t.get(cr),r=t.get(q9);1===t.get(YM)&&i.initialNavigation(),t.get(X9,null,ki.Optional)?.setUpPreloading(),t.get(qM,null,ki.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const q9=new zn(iv?"bootstrap done indicator":"",{factory:()=>new tr}),YM=new zn(iv?"initial navigation":"",{providedIn:"root",factory:()=>1});function gEe(){let t=[];return t=iv?[{provide:Sx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function HDe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Ef(1,t)}const X9=new zn(iv?"router preloader":"");function vEe(t){return Ef(0,[{provide:X9,useExisting:dEe},{provide:z9,useExisting:t}])}const fy=!1,Y9=new zn(fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),yEe=[kA,{provide:Z1,useClass:DM},cr,sy,{provide:Rr,useFactory:function G9(t){return t.routerState.root},deps:[cr]},GM,fy?{provide:XM,useValue:!0}:[]];function bEe(){return new N$("Router",cr)}let J9=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[yEe,fy&&i?.enableTracing?gEe().\u0275providers:[],{provide:nv,multi:!0,useValue:e},{provide:Y9,useFactory:CEe,deps:[[cr,new u1,new d1]]},{provide:oC,useValue:i||{}},i?.useHash?{provide:zp,useClass:lwe}:{provide:zp,useClass:tB},{provide:qM,useFactory:()=>{const t=ar(_Ce),n=ar(Wi),e=ar(oC),i=ar(rC),r=ar(Z1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new U9(r,i,t,n,e)}},i?.preloadingStrategy?vEe(i.preloadingStrategy).\u0275providers:[],{provide:N$,multi:!0,useFactory:bEe},i?.initialNavigation?kEe(i):[],[{provide:K9,useFactory:W9},{provide:I$,multi:!0,useExisting:K9}]]}}static forChild(e){return{ngModule:t,providers:[{provide:nv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(ct(Y9,8))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[RM]}),t})();function CEe(t){if(fy&&t)throw new Ot(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function kEe(t){return["disabled"===t.initialNavigation?Ef(3,[{provide:Yx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>{n.setUpLocationChangeListener()}}},{provide:YM,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ef(2,[{provide:YM,useValue:0},{provide:Yx,multi:!0,deps:[Rs],useFactory:n=>{const e=n.get(swe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(cr),o=n.get(q9);(function hEe(t,n){t.events.pipe(ns(e=>e instanceof zh||e instanceof ry||e instanceof Xw||e instanceof qw),yn(e=>e instanceof zh||e instanceof qw?mc.COMPLETE:e instanceof ry&&(0===e.code||1===e.code)?mc.REDIRECTING:mc.FAILED),ns(e=>e!==mc.REDIRECTING),Sl(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(rC).afterPreactivation=()=>(i(!0),o.closed?$n(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const K9=new zn(fy?"Router Initializer":"");function sC(t,n){return new rn(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let Q9=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti))},t.\u0275dir=Zt({type:t}),t})(),Kp=(()=>{class t extends Q9{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,features:[vi]}),t})();const ha=new zn("NgValueAccessor"),TEe={provide:ha,useExisting:Gi(()=>aC),multi:!0};let aC=(()=>{class t extends Kp{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Lr([TEe]),vi]}),t})();const EEe={provide:ha,useExisting:Gi(()=>Fa),multi:!0},MEe=new zn("CompositionEventMode");let Fa=(()=>{class t extends Q9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function AEe(){const t=jh()?jh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti),le(MEe,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Lr([EEe]),vi]}),t})();const IEe=!1;function Af(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function Z9(t){return null!=t&&"number"==typeof t.length}const Oa=new zn("NgValidators"),Mf=new zn("NgAsyncValidators"),NEe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Do{static min(n){return eV(n)}static max(n){return function tV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nV(n)}static requiredTrue(n){return function iV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rV(t){return Af(t.value)||NEe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oV(t){return n=>Af(n.value)||!Z9(n.value)?null:n.value.lengthZ9(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aV(t){if(!t)return lC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Af(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fV(n)}static composeAsync(n){return pV(n)}}function eV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dV(t,n){return n.map(e=>e(t))}function hV(t){return t.map(n=>function FEe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return uV(dV(e,n))}}function JM(t){return null!=t?fV(hV(t)):null}function pV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return function DEe(...t){if(1===t.length){const n=t[0];if(et(n))return sC(n,null);if(Ve(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return sC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return sC(t=1===t.length&&et(t[0])?t[0]:t,null).pipe(yn(e=>n(...e)))}return sC(t,null)}(dV(e,n).map(cV)).pipe(yn(uV))}}function KM(t){return null!=t?pV(hV(t)):null}function mV(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function gV(t){return t._rawValidators}function vV(t){return t._rawAsyncValidators}function QM(t){return t?Array.isArray(t)?t:[t]:[]}function cC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yV(t,n){const e=QM(n);return QM(t).forEach(r=>{cC(e,r)||e.push(r)}),e}function bV(t,n){return QM(n).filter(e=>!cC(t,e))}class _V{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=JM(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=KM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class Dl extends _V{get formDirective(){return null}get path(){return null}}class If extends _V{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class xV{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let rl=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(If,2))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[vi]}),t})(),ol=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Dl,10))},t.\u0275dir=Zt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[vi]}),t})();function wV(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const t3=!1,py="VALID",dC="INVALID",rv="PENDING",my="DISABLED";function n3(t){return(hC(t)?t.validators:t)||null}function i3(t,n){return(hC(n)?n.asyncValidators:t)||null}function hC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CV(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Ot(1e3,t3?function LEe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Ot(1001,t3?function REe(t,n){return`Cannot find form control ${wV(t,n)}`}(n,e):"")}function kV(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Ot(1002,t3?function $Ee(t,n){return`Must supply a value for form control ${wV(t,n)}`}(n,r):"")})}class fC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===py}get invalid(){return this.status===dC}get pending(){return this.status==rv}get disabled(){return this.status===my}get enabled(){return this.status!==my}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yV(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yV(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(bV(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(bV(n,this._rawAsyncValidators))}hasValidator(n){return cC(this._rawValidators,n)}hasAsyncValidator(n){return cC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=rv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=my,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===py||this.status===rv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?my:py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=rv,this._hasOwnPendingAsyncValidator=!0;const e=cV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Ke,this.statusChanges=new Ke}_calculateStatus(){return this._allControlsDisabled()?my:this.errors?dC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(rv)?rv:this._anyControlsHaveStatus(dC)?dC:py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){hC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function BEe(t){return Array.isArray(t)?JM(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function VEe(t){return Array.isArray(t)?KM(t):t||null}(this._rawAsyncValidators)}}class gy extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){kV(this,!0,n),Object.keys(n).forEach(i=>{CV(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class SV extends gy{}const Qp=new zn("CallSetDisabledState",{providedIn:"root",factory:()=>vy}),vy="always";function yy(t,n,e=vy){r3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function zEe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&DV(t,n)})}(t,n),function GEe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function UEe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&DV(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function HEe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),vC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function gC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function r3(t,n){const e=gV(t);null!==n.validator?t.setValidators(mV(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vV(t);null!==n.asyncValidator?t.setAsyncValidators(mV(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();gC(n._rawValidators,r),gC(n._rawAsyncValidators,r)}function vC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=gV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return gC(n._rawValidators,i),gC(n._rawAsyncValidators,i),e}function DV(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function AV(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MV(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const _y=class extends fC{constructor(n=null,e,i){super(n3(e),i3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MV(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){AV(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){AV(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MV(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const eAe={provide:ha,useExisting:Gi(()=>c3),multi:!0};let c3=(()=>{class t extends Kp{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Lr([eAe]),vi]}),t})(),jV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const u3=new zn("NgModelWithFormControlWarning"),oAe={provide:Dl,useExisting:Gi(()=>fa)};let fa=(()=>{class t extends Dl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ke,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(vC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return yy(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function YEe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function EV(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof _y)(r)&&(yy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function TV(t,n){r3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function WEe(t,n){return vC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){r3(this.form,this),this._oldForm&&vC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(le(Oa,10),le(Mf,10),le(Qp,8))},t.\u0275dir=Zt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Lr([oAe]),vi,Hn]}),t})();const lAe={provide:If,useExisting:Gi(()=>ja)};let ja=(()=>{class t extends If{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Ke,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function a3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Fa?e=o:function XEe(t){return Object.getPrototypeOf(t.constructor)===Kp}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function s3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function pC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(le(Dl,13),le(Oa,10),le(Mf,10),le(ha,10),le(u3,8))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Lr([lAe]),vi,Hn]}),t})();const cAe={provide:ha,useExisting:Gi(()=>ov),multi:!0};function BV(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let ov=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=BV(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function uAe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Lr([cAe]),vi]}),t})(),xy=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(BV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(ov,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const dAe={provide:ha,useExisting:Gi(()=>f3),multi:!0};function VV(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let f3=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(f3,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let Zp=(()=>{class t{constructor(){this._validator=lC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,features:[Hn]}),t})();const pAe={provide:Oa,useExisting:Gi(()=>p3),multi:!0};let p3=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function zV(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ht("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Lr([pAe]),vi]}),t})();const mAe={provide:Oa,useExisting:Gi(()=>Nf),multi:!0};let Nf=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=qg,this.createValidator=e=>nV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ht("required",i._enabled?"":null)},inputs:{required:"required"},features:[Lr([mAe]),vi]}),t})(),JV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[jV]}),t})();class KV extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){kV(this,!1,n),n.forEach((i,r)=>{CV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function QV(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let xAe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return QV(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new gy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new SV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(QV(i)?o=i:(o.validators=i,o.asyncValidators=r),new _y(e,{...o,nonNullable:!0})):new _y(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KV(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof _y||e instanceof fC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tl=(()=>{class t extends xAe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZV=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})(),wAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:u3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})();const m3=new zn("ngx-segment-analytics.config"),CAe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let g3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),yC=(()=>{class t{constructor(e,i,r){if(this._w=e,this._doc=i,this._config=Object.assign(Object.assign({},CAe),r),this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}get plugins(){return this._w.analytics.plugins}}return t.\u0275fac=function(e){return new(e||t)(ct(g3),ct(Ir),ct(m3))},t.\u0275prov=Et({factory:function(){return new t(ct(g3),ct(Ir),ct(m3))},token:t,providedIn:"root"}),t})();function kAe(t){return function DB(t){return t===SB}(t)?window:{}}let SAe=(()=>{class t{constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(e){return{ngModule:t,providers:[{provide:m3,useValue:e},yC]}}}return t.\u0275fac=function(e){return new(e||t)(ct(t,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:g3,useFactory:kAe,deps:[L1]}],imports:[Vs]}),t})();class bC{}class v3{}class Fu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Fu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Fu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Fu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class DAe{encodeKey(n){return eH(n)}encodeValue(n){return eH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const EAe=/%(\d[a-f0-9])/gi,AAe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eH(t){return encodeURIComponent(t).replace(EAe,(n,e)=>AAe[e]??n)}function _C(t){return`${t}`}class In{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new DAe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function TAe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(_C):[_C(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new In({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(_C(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(_C(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class MAe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nH(t){return typeof Blob<"u"&&t instanceof Blob}function iH(t){return typeof FormData<"u"&&t instanceof FormData}class Cy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function IAe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Fu),this.context||(this.context=new MAe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Cy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var zs=(()=>((zs=zs||{})[zs.Sent=0]="Sent",zs[zs.UploadProgress=1]="UploadProgress",zs[zs.ResponseHeader=2]="ResponseHeader",zs[zs.DownloadProgress=3]="DownloadProgress",zs[zs.Response=4]="Response",zs[zs.User=5]="User",zs))();class y3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Fu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class b3 extends y3{constructor(n={}){super(n),this.type=zs.ResponseHeader}clone(n={}){return new b3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class xC extends y3{constructor(n={}){super(n),this.type=zs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new xC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rH extends y3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function _3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let wC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Cy)o=e;else{let l,c;l=r.headers instanceof Fu?r.headers:new Fu(r.headers),r.params&&(c=r.params instanceof In?r.params:new In({fromObject:r.params})),o=new Cy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$n(o).pipe(Sf(l=>this.handler.handle(l)));if(e instanceof Cy||"events"===r.observe)return s;const a=s.pipe(ns(l=>l instanceof xC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(yn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(yn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new In).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,_3(r,i))}post(e,i,r={}){return this.request("POST",e,_3(r,i))}put(e,i,r={}){return this.request("PUT",e,_3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(ct(bC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function oH(t,n){return n(t)}function FAe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const x3=new zn("HTTP_INTERCEPTORS"),ky=new zn("HTTP_INTERCEPTOR_FNS");function jAe(){let t=null;return(n,e)=>(null===t&&(t=(ar(x3,{optional:!0})??[]).reduceRight(FAe,oH)),t(n,e))}let sH=(()=>{class t extends bC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ky)));this.chain=i.reduceRight((r,o)=>function OAe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(ct(v3),ct(Nd))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const $Ae=/^\)\]\}',?\n/;let lH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new rn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Fu(r.getAllResponseHeaders()),m=function BAe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new b3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const _=v;v=v.replace($Ae,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=_,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new xC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new rH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new rH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:zs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:zs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:zs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(ct(EB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const w3=new zn("XSRF_ENABLED"),cH=new zn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uH=new zn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dH{}let zAe=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=pB(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(L1),ct(cH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function UAe(t,n){const e=t.url.toLowerCase();if(!ar(w3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=ar(dH).getToken(),r=ar(uH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Ts=(()=>((Ts=Ts||{})[Ts.Interceptors=0]="Interceptors",Ts[Ts.LegacyInterceptors=1]="LegacyInterceptors",Ts[Ts.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ts[Ts.NoXsrfProtection=3]="NoXsrfProtection",Ts[Ts.JsonpSupport=4]="JsonpSupport",Ts[Ts.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ts))();function sv(t,n){return{\u0275kind:t,\u0275providers:n}}function GAe(...t){const n=[wC,lH,sH,{provide:bC,useExisting:sH},{provide:v3,useExisting:lH},{provide:ky,useValue:UAe,multi:!0},{provide:w3,useValue:!0},{provide:dH,useClass:zAe}];for(const e of t)n.push(...e.\u0275providers);return function R0e(t){return{\u0275providers:t}}(n)}const hH=new zn("LEGACY_INTERCEPTOR_FN");let qAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[GAe(sv(Ts.LegacyInterceptors,[{provide:hH,useFactory:jAe},{provide:ky,useExisting:hH,multi:!0}]))]}),t})();var oi=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(oi||(oi={})),oi))(),Sy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY"}(Sy||(Sy={})),Sy))();class C3{constructor(){K(this,"host",void 0),K(this,"timeoutMs",void 0)}}let xi=(()=>{class t{constructor(e,i){K(this,"httpClient",void 0),K(this,"config",void 0),this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new In({encoder:new Xn});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new In({encoder:new Xn});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new In({encoder:new Xn});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new In({encoder:new Xn});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new In({encoder:new Xn});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new In({encoder:new Xn});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Fu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Fu).set("Authorization","Basic "+btoa(e+":"+i))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(wC),ct(C3,8))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class Xn{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fH=new zn("window"),JAe=[{provide:fH,useFactory:()=>window}],k3="currentSession";let Xo=(()=>{class t{constructor(e,i,r,o){K(this,"window",void 0),K(this,"segment",void 0),K(this,"http",void 0),K(this,"consoleService",void 0),K(this,"currentSessionSubject",void 0),K(this,"currentSession",void 0),this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(k3));this.currentSessionSubject=new Hs(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return oi.USER_ROLE_ADMIN;case 2:return oi.USER_ROLE_DEVELOPER;case 3:return oi.USER_ROLE_MAINTAINER;case 4:return oi.USER_ROLE_READONLY;default:return oi.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(is(r=>{localStorage.setItem(k3,JSON.stringify(r)),this.currentSessionSubject.next(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(is(()=>{localStorage.removeItem(k3),this.currentSessionSubject.next(null)})):Vh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(fH),ct(yC),ct(wC),ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function KAe(t,n){if(1&t&&(b(0,"div",17),I(1),x()),2&t){const e=j();w(1),xn(" ",e.error," ")}}const QAe=function(t){return{"was-validated":t}},pH=function(t){return{"is-invalid":t}};let ZAe=(()=>{class t{constructor(e,i,r,o,s){K(this,"segment",void 0),K(this,"formBuilder",void 0),K(this,"route",void 0),K(this,"router",void 0),K(this,"authenticationService",void 0),K(this,"error",""),K(this,"loginForm",void 0),K(this,"submitted",void 0),K(this,"returnUrl",void 0),this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",Do.compose([Do.required])],password:["",Do.compose([Do.required,Do.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(yC),le(Tl),le(Rr),le(cr),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"h1",2),ge(3,"img",3),x(),J(4,KAe,2,1,"div",4),b(5,"div",5)(6,"div",6)(7,"h3",7),I(8,"Login"),x(),b(9,"form",8),ye("ngSubmit",function(){return i.onSubmit()}),b(10,"div",9)(11,"div",10)(12,"label",11),I(13,"Username"),x(),ge(14,"input",12),b(15,"div",13),I(16,"Please enter a username."),x()()(),b(17,"div",9)(18,"div",10)(19,"label",14),I(20,"Password"),x(),ge(21,"input",15),b(22,"div",13),I(23,"Password must be at least 8 characters."),x()()(),b(24,"button",16),I(25,"Login"),x()()()()()()),2&e&&(w(4),k("ngIf",i.error),w(5),k("formGroup",i.loginForm)("ngClass",lr(8,QAe,i.submitted)),w(5),k("ngClass",lr(10,pH,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(6),k("ngClass",lr(12,pH,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(2),k("disabled",!i.loginForm.valid||i.submitted))},dependencies:[Rh,gn,sl,Fa,rl,ol,Nf,fa,ja],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]})),t})(),eMe=(()=>{class t{constructor(e,i){K(this,"authService",void 0),K(this,"router",void 0),this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),tMe=(()=>{class t{constructor(e,i){K(this,"router",void 0),K(this,"authenticationService",void 0),this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(cr),ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class nMe extends ue{constructor(n,e){super()}schedule(n,e=0){return this}}class S3 extends nMe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let mH=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Hd extends mH{constructor(n,e=mH.now){super(n,()=>Hd.delegate&&Hd.delegate!==this?Hd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Hd.delegate&&Hd.delegate!==this?Hd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Dy=new Hd(S3);class rMe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new sMe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class oMe{constructor(){this.buffer=[]}}class sMe extends O{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(gH,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vH,e,{subscriber:this,context:s})),this.add(o.schedule(aMe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(gH,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new oMe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function gH(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function aMe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vH,e,{subscriber:i,context:o})),this.schedule(t,n))}function vH(t){const{subscriber:n,context:e}=t;n.closeContext(e)}class lMe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new cMe(n,this.compare,this.keySelector))}}class cMe extends O{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Es(t,n,e,i){return rt(e)&&(i=e,e=void 0),i?Es(t,n,e).pipe(yn(r=>et(r)?i(...r):i(r))):new rn(r=>{yH(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yH(t,n,e,i,r){let o;if(function hMe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function dMe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function uMe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function av(t=0,n,e){let i=-1;return bH(n)?i=Number(n)<1?1:Number(n):Sa(n)&&(e=n),Sa(e)||(e=Dy),new rn(r=>{const o=bH(t)?t:+t-e.now();return e.schedule(fMe,o,{index:0,period:i,subscriber:r})})}function fMe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function _H(...t){if(1===t.length){if(!et(t[0]))return t[0];t=t[0]}return st(t,void 0).lift(new pMe)}class pMe{call(n,e){return e.subscribe(new mMe(n))}}class mMe extends wM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Me extends W{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Ro](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Fe(this.observable,new ml(this))}}function yo(t){return n=>n.lift(new wMe(t))}class wMe{constructor(n){this.notifier=n}call(n,e){const i=new CMe(n),r=Fe(this.notifier,new ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class CMe extends W{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function D3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new kMe(t,e))}}class kMe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SMe(n,this.observables,this.project))}}class SMe extends wM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ou{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $n(this.value);case"E":return qp(this.error);case"C":return Lw()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ou("N",n):Ou.undefinedValueNotification}static createError(n){return new Ou("E",void 0,n)}static createComplete(){return Ou.completeNotification}}function T3(t,n=Dy){const i=function DMe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TMe(i,n))}Ou.completeNotification=new Ou("C"),Ou.undefinedValueNotification=new Ou("N",void 0);class TMe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new E3(n,this.delay,this.scheduler))}}class E3 extends O{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(E3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new EMe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ou.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ou.createComplete()),this.unsubscribe()}}class EMe{constructor(n,e){this.time=n,this.notification=e}}function $Me(t,n){if(1&t){const e=vt();b(0,"button",1),ye("click",function(){return $e(e),Be(j().close())}),b(1,"span",2),I(2,"\xd7"),x()()}}const lv=["*"],b3e=["dialog"];function Ff(t){return null!=t}typeof Element<"u"&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const CH={animation:!0,transitionTimerDelayMs:5};let pa=(()=>{class t{constructor(){this.animation=CH.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})();const TIe=()=>{},{transitionTimerDelayMs:EIe}=CH,EC=new Map,ma=(t,n,e)=>{let i=e.context||{};const r=EC.get(t);if(r)switch(e.runningTransition){case"continue":return Vh;case"stop":r.transition$.complete(),i=Object.assign(r.context,i),EC.delete(t)}!function TC(t){return(t||document.body).offsetHeight}(t);const o=n(t,i)||TIe;if(!e.animation||"none"===window.getComputedStyle(t).transitionProperty)return o(),$n(void 0);const s=new tr,a=s.pipe(function xMe(...t){return n=>Pw(n,$n(...t))}(!0));EC.set(t,{transition$:s,context:i});const l=function DIe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(t),c=Es(t,"transitionend").pipe(yo(a),ns(({target:d})=>d===t));return _H(av(l+EIe).pipe(yo(a)),c).pipe(yo(a)).subscribe(()=>{EC.delete(t),o(),s.next(),s.complete()}),s.asObservable()};let AH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),IIe=(()=>{class t{constructor(e){this.dismissible=!0,this.type="warning",this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const NIe=({classList:t})=>{t.remove("show")};let To=(()=>{class t{constructor(e,i,r){this._renderer=i,this._element=r,this.closed=new Ke,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ma(this._element.nativeElement,NIe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(le(IIe),le(Ss),le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Mn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[Hn],ngContentSelectors:lv,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"close",3,"click"],["aria-hidden","true"]]},template:function(e,i){1&e&&(Cu(),ku(0),J(1,$Me,3,0,"button",0)),2&e&&(w(1),k("ngIf",i.dismissible))},dependencies:[gn],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),MH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(e,i){2&e&&Mn("btn",!0)("active",i.active)("disabled",i.disabled)("focus",i.focused)}}),t})(),OIe=0,N3=(()=>{class t{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+OIe++,this.onChange=e=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}onRadioChange(e){this.writeValue(e.value),this.onChange(e.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(e){this._radios.add(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._disabled=e,this._updateRadiosDisabled()}unregister(e){this._radios.delete(e)}writeValue(e){this._value=e,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(e=>e.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(e=>e.updateDisabled())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[Lr([{provide:ha,useExisting:Gi(()=>t),multi:!0}])]}),t})(),IH=(()=>{class t{constructor(e,i,r,o,s){this._group=e,this._label=i,this._renderer=r,this._element=o,this._cd=s,this._value=null,this._group.register(this),this.updateDisabled()}set value(e){this._value=e;const i=e?e.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",i),this._group.onRadioValueUpdate()}set disabled(e){this._disabled=!1!==e,this.updateDisabled()}set focused(e){this._label&&(this._label.focused=e),e||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(e){this.value!==e&&this._cd.markForCheck(),this._checked=this.value===e,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}}return t.\u0275fac=function(e){return new(e||t)(le(N3),le(AC),le(Ss),le(ti),le(qo))},t.\u0275dir=Zt({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("focus",function(){return i.focused=!0})("blur",function(){return i.focused=!1}),2&e&&dc("checked",i.checked)("disabled",i.disabled)("name",i.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),NH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),LH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();var ur=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ur||(ur={})),ur))();const FC=(t,n)=>!!n&&n.some(e=>e.contains(t)),VH=(t,n)=>!n||null!=function kIe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),sNe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),aNe=t=>sNe?()=>setTimeout(()=>t(),100):t;function Ey(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(aNe(()=>{const c=Es(n,"keydown").pipe(yo(r),ns(h=>h.which===ur.Escape),is(h=>h.preventDefault())),u=Es(n,"mousedown").pipe(yn(h=>{const f=h.target;return 2!==h.button&&!FC(f,s)&&("inside"===e?FC(f,o)&&VH(f,a):"outside"===e?!FC(f,o):VH(f,a)||!FC(f,o))}),yo(r)),d=Es(n,"mouseup").pipe(D3(u),ns(([h,f])=>f),T3(0),yo(r));_H([c.pipe(yn(h=>0)),d.pipe(yn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const HH=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function zH(t){const n=Array.from(t.querySelectorAll(HH)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}const cNe=/\s+/,GH=new class lNe{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.pageYOffset-document.documentElement.clientTop,r_left=window.pageXOffset-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),h=parseFloat(l.marginRight);let f=0,p=0;switch(o){case"top":f=a.top-(e.offsetHeight+c+u);break;case"bottom":f=a.top+a.height;break;case"left":p=a.left-(e.offsetWidth+d+h);break;case"right":p=a.left+a.width}switch(s){case"top":f=a.top;break;case"bottom":f=a.top+a.height-e.offsetHeight;break;case"left":p=a.left;break;case"right":p=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?p=a.left+a.width/2-e.offsetWidth/2:f=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(f)}px)`;const m=e.getBoundingClientRect(),g=document.documentElement,v=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return m.left>=0&&m.top>=0&&m.right<=y&&m.bottom<=v}};function Ay(t,n,e,i,r){let o=Array.isArray(e)?e:e.split(cNe);const s=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=n.classList,l=f=>{const[p,m]=f.split("-"),g=[];return r&&(g.push(`${r}-${p}`),m&&g.push(`${r}-${p}-${m}`),g.forEach(v=>{a.add(v)})),g};r&&s.forEach(f=>{a.remove(`${r}-${f}`)});let c=o.findIndex(f=>"auto"===f);c>=0&&s.forEach(function(f){null==o.find(p=>-1!==p.search("^"+f))&&o.splice(c++,1,f)});const u=n.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of o){let f=l(d);if(GH.positionElements(t,n,d,i)){h=!0;break}r&&f.forEach(p=>{a.remove(p)})}return h||(d=o[0],l(d),GH.positionElements(t,n,d,i)),d}new Date(1882,10,12),new Date(2174,10,25);let ZH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,ZV]}),t})(),xNe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),jf=(()=>{class t{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,i){2&e&&Mn("disabled",i.disabled)},inputs:{disabled:"disabled"}}),t})(),Pf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,jf,4),2&e){let o;cn(o=un())&&(i.menuItems=o)}},hostVars:5,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&(ht("x-placement",i.placement),Mn("dropdown-menu",!0)("show",i.dropdown.isOpen()))}}),t})(),LC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ht("aria-expanded",i.dropdown.isOpen())}}),t})(),rm=(()=>{class t extends LC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ht("aria-expanded",i.dropdown.isOpen())},features:[Lr([{provide:LC,useExisting:Gi(()=>t)}]),vi]}),t})(),Pu=(()=>{class t{constructor(e,i,r,o,s,a,l){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._closed$=new tr,this._bodyContainer=null,this._open=!1,this.openChange=new Ke,this.placement=i.placement,this.container=i.container,this.autoClose=i.autoClose,this.display=l?"static":"dynamic",this._zoneSubscription=o.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Sl(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){Ey(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ur.Space&&i!==ur.Enter){if(i!==ur.Tab){if(a||s){if(this.open(),r.length){switch(i){case ur.ArrowDown:o=Math.min(o+1,r.length-1);break;case ur.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ur.Home:o=0;break;case ur.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(HH);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Es(e.target,"focusout").pipe(Sl(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Es(s,"click").pipe(Sl(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Ay(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const r=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,r),e.removeStyle(r,"position"),e.removeStyle(r,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1050"),i.appendChild(o,r),i.appendChild(this._document.body,o)}}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown"),i.placement="static"===this.display?null:e;const s=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,s);const a=this._bodyContainer;a&&(r.removeClass(a,"dropup"),r.removeClass(a,"dropdown"),r.addClass(a,s))}}}return t.\u0275fac=function(e){return new(e||t)(le(qo),le(xNe),le(Ir),le(Wi),le(ti),le(Ss),le(ez,8))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Pf,5),ni(r,LC,5)),2&e){let o;cn(o=un())&&(i._menu=o.first),cn(o=un())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("show",i.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Hn]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),nz=(()=>{class t{constructor(e){this.backdrop=!0,this.keyboard=!0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();class om{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class V3{constructor(n,e,i,r,o,s,a){this._type=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._componentFactoryResolver=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:r}=this._windowRef.location,s=this._ngZone.onStable.asObservable().pipe(Sl(1)).pipe(nt(()=>this._ngZone.run(()=>ma(r,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"}))));return{windowRef:this._windowRef,transition$:s}}close(n=!1){return this._windowRef?ma(this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(is(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),null!==(e=this._contentRef)&&void 0!==e&&e.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$n(void 0)}_getContentRef(n,e){if(n){if(n instanceof Si){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new om([i.rootNodes],i)}return new om([[this._renderer.createText(`${n}`)]])}return new om([])}}const wNe=()=>{};let iz=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):wNe}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({factory:function(){return new t(ct(Ir))},token:t,providedIn:"root"}),t})(),CNe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Sl(1)).subscribe(()=>{ma(this._el.nativeElement,({classList:e})=>e.add("show"),{animation:this.animation,runningTransition:"continue"})})}hide(){return ma(this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Su("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Mn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class rz{close(n){}dismiss(n){}}class kNe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tr,this._dismissed=new tr,this._hidden=new tr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(yo(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(yo(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$n(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),kC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Ny=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(Ny||(Ny={})),Ny))();let SNe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new tr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Ke,this.shown=new tr,this.hidden=new tr}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=kC(ma(e,()=>e.classList.remove("show"),i),ma(this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"continue"};kC(ma(e,()=>e.classList.add("show"),i),ma(this._dialogEl.nativeElement,()=>{},i)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Es(e,"keydown").pipe(yo(this._closed$),ns(r=>r.which===ur.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Ny.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Es(this._dialogEl.nativeElement,"mousedown").pipe(yo(this._closed$),is(()=>i=!1),zl(()=>Es(e,"mouseup").pipe(yo(this._closed$),Sl(1))),ns(({target:r})=>e===r)).subscribe(()=>{i=!0}),Es(e,"click").pipe(yo(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(Ny.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=zH(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ma(this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(le(Ir),le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&io(b3e,7),2&e){let r;cn(r=un())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ht("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Su("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Mn("fade",i.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:lv,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0,1)(2,"div",2),ku(3),x()()),2&e&&Su("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),oz=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new tr,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Ke,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Es(n,"focusin").pipe(yo(e),yn(o=>o.target));Es(n,"keydown").pipe(yo(e),ns(o=>o.which===ur.Tab),D3(r)).subscribe(([o,s])=>{const[a,l]=zH(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Es(n,"click").pipe(yo(e),D3(r),yn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:Ff(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new rz,d=this._getContentRef(e,o.injector||i,r,u,o);let h=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,f=this._attachWindowComponent(e,s,d),p=new kNe(f,d,h,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(f),p.result.then(l,l),p.result.then(c,c),u.close=m=>{p.close(m)},u.dismiss=m=>{p.dismiss(m)},this._applyWindowOptions(f.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),h&&h.instance&&this._applyBackdropOptions(h.instance,o),p}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(CNe).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(SNe).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{Ff(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{Ff(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof Si?this._createFromTemplateRef(r,o):function DC(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new om([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new om([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new om([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=Rs.create({providers:[{provide:rz,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new om([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct(Rs),ct(Ir),ct(iz),ct(Lp),ct(Wi))},t.\u0275prov=Et({factory:function(){return new t(ct(Au),ct(Dx),ct(Ir),ct(iz),ct(Lp),ct(Wi))},token:t,providedIn:"root"}),t})(),H3=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=Object.assign({},this._config,i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(ct($c),ct(Rs),ct(oz),ct(nz))},t.\u0275prov=Et({factory:function(){return new t(ct($c),ct(Dx),ct(oz),ct(nz))},token:t,providedIn:"root"}),t})(),sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[H3]}),t})(),DNe=(()=>{class t{constructor(e){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const az=t=>Ff(t)&&""!==t;let TNe=0,lz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),sm=(()=>{class t{constructor(e,i){this.elementRef=i,this.disabled=!1,this.shown=new Ke,this.hidden=new Ke,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Ff(this.domId)||(this.domId="ngb-nav-"+TNe++)}get active(){return this._nav.activeId===this.id}get id(){return az(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ff(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>am)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,lz,4),2&e){let o;cn(o=un())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),t})(),am=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Ke,this.shown=new Ke,this.hidden=new Ke,this.destroy$=new tr,this.navItemChange$=new tr,this.navChange=new Ke,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ur.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ur.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ur.Home:s=0;break;case ur.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Ff(this.activeId)){const e=this.items.first?this.items.first.id:null;az(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(yo(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(DNe),le(qo),le(Ir))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,sm,4),ni(r,fv,5)),2&e){let o;cn(o=un())&&(i.items=o),cn(o=un())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ht("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Mn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[Hn]}),t})(),fv=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(sm),le(am),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()}),2&e&&(dc("id",i.navItem.domId),ht("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Mn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))}}),t})(),cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();class NNe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const FNe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},vz=t=>t>0?T3(t):n=>n;let bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),_z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),QNe=(()=>{class t{constructor(e){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})(),ZNe=0,eFe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,i){2&e&&(dc("id",i.id),Su("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Mn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:lv,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(Cu(),ge(0,"div",0),b(1,"div",1),ku(2),x())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{bottom:.4rem;top:auto}"],encapsulation:2,changeDetection:0}),t})(),tFe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u,d){this._elementRef=e,this._renderer=i,this._ngZone=l,this._document=c,this._changeDetector=u,this.shown=new Ke,this.hidden=new Ke,this._ngbTooltipWindowId="ngb-tooltip-"+ZNe++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.triggers=a.triggers,this.container=a.container,this.disableTooltip=a.disableTooltip,this.tooltipClass=a.tooltipClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._popupService=new V3(eFe,r,s,i,this._ngZone,o,d),this._zoneSubscription=l.onStable.subscribe(()=>{this._windowRef&&Ay(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),Ey(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function yz(t,n,e,i,r,o,s=0,a=0){const l=function ONe(t,n=FNe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new NNe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function jNe(t,n,e,i){return new rn(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function PNe(t,n,e){return i=>{let r=null;const o=i.pipe(yn(l=>({open:l})),ns(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),We());return Tt(o.pipe(ns(l=>l.open),vz(t)),o.pipe(ns(l=>!l.open),vz(n))).pipe(ns(l=>l===r&&(r=null,l.open!==e())),yn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(Rs),le($c),le(nl),le(QNe),le(Wi),le(Ir),le(qo),le(Au))},t.\u0275dir=Zt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[Hn]}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();new zn("live announcer delay",{providedIn:"root",factory:function rFe(){return 100}});let Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();const lFe=[AH,MH,NH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz];let cFe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[lFe,AH,MH,NH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz]}),t})(),Iz=(()=>{class t{constructor(){K(this,"restrictedPages",new Map([["users",oi.USER_ROLE_ADMIN],["config",oi.USER_ROLE_DEVELOPER],["modules",oi.USER_ROLE_DEVELOPER],["apiexplorer",oi.USER_ROLE_DEVELOPER]]))}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function uFe(t,n){if(1&t&&(ta(0,5),b(1,"a",27),ge(2,"img",28),b(3,"span",12),I(4),x()(),na()),2&t){const e=j().$implicit;k("ngbNavItem",e.navItem),w(1),k("routerLink",e.routerLink),w(1),$p("src","/static/svg/",e.icon,".svg",y1),w(2),Dt(e.label)}}function dFe(t,n){1&t&&ge(0,"hr")}function hFe(t,n){if(1&t&&(J(0,uFe,5,4,"ng-container",26),J(1,dFe,1,0,"hr",25)),2&t){const e=n.$implicit;k("ngIf",j().getSessionRole()<=e.minRole),w(1),k("ngIf",e.separator)}}function fFe(t,n){if(1&t&&(b(0,"div",29)(1,"h2",30),ge(2,"img",31),I(3,"An error has occurred!"),x(),b(4,"h6",32),I(5),x(),b(6,"p"),I(7,"Please refresh the page to try again."),x()()),2&t){const e=j();w(5),Dt(e.error)}}function pFe(t,n){1&t&&(b(0,"div",33),ge(1,"img",34),x())}function mFe(t,n){1&t&&ge(0,"router-outlet")}const gFe=function(){return["/"]},vFe=function(){return["/login"]};let yFe=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"segment",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"routerSub",void 0),K(this,"segmentRouterSub",void 0),K(this,"loading",!0),K(this,"error",""),K(this,"routes",[{navItem:"status",routerLink:["/status"],label:"Status",minRole:oi.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:oi.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:oi.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:oi.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:oi.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:oi.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:oi.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:oi.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:oi.USER_ROLE_READONLY,icon:"chat"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:oi.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:oi.USER_ROLE_DEVELOPER,icon:"api-explorer"}]),this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function iMe(t){let n=arguments.length,e=Dy;Sa(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new rMe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof Ww&&(this.loading=!0),l instanceof zh&&(this.loading=!1),l instanceof ry&&(this.loading=!1),l instanceof Xw&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(function CC(t,n){return e=>e.lift(new lMe(t,n))}((a,l)=>!(l instanceof zh)||a.url===l.url)).subscribe(a=>{})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(yC),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(o){return i.onSidebarNavChange(o)}),b(4,"div",4),ta(5,5),b(6,"a",6),ge(7,"img",7)(8,"img",8),x(),na(),ge(9,"hr"),J(10,hFe,2,2,"ng-template",9),ge(11,"hr"),b(12,"a",10),ge(13,"img",11),b(14,"span",12),I(15,"Heroic Cloud"),x()(),b(16,"a",13),ge(17,"img",14),b(18,"span",12),I(19,"Documentation"),x()(),b(20,"a",15),ge(21,"img",16),b(22,"span",12),I(23,"Forum"),x()(),b(24,"a",17),ge(25,"img",18),b(26,"span",12),I(27,"Heroic Labs Blog"),x()(),ge(28,"hr"),b(29,"div",19),I(30),x(),ta(31,5),b(32,"a",20),ye("click",function(){return i.logout()}),ge(33,"img",21),b(34,"span",12),I(35,"Logout"),x()(),na(),x()(),b(36,"main",22),J(37,fFe,8,1,"div",23),J(38,pFe,2,0,"div",24),J(39,mFe,1,0,"router-outlet",25),x()()()),2&e&&(w(5),k("ngbNavItem","logo"),w(1),k("routerLink",wl(9,gFe)),w(4),k("ngForOf",i.routes),w(20),xn("Logged in as: ",i.getUsername(),""),w(1),k("ngbNavItem","logout"),w(1),k("routerLink",wl(10,vFe)),w(5),k("ngIf",i.error),w(1),k("ngIf",!i.error&&i.loading),w(1),k("ngIf",!i.error&&!i.loading))},dependencies:[Jp,Nu,hy,jn,gn,am,sm,fv],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})),t})(),bFe=(()=>{class t{constructor(e,i,r){K(this,"authService",void 0),K(this,"router",void 0),K(this,"globals",void 0),this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||Rs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class kFe extends CFe{}class EFe{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new AFe(n,this.dueTime,this.scheduler))}}class AFe extends O{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(MFe,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function MFe(t){t.debouncedNext()}function IFe(){}function W3(t){return null==t?IFe:function(){return this.querySelector(t)}}function FFe(){return[]}function Lz(t){return null==t?FFe:function(){return this.querySelectorAll(t)}}function Rz(t){return function(){return this.matches(t)}}function $z(t){return new Array(t.length)}function $C(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$C.prototype={constructor:$C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Bz="$";function RFe(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var q3="http://www.w3.org/1999/xhtml";const Vz={svg:"http://www.w3.org/2000/svg",xhtml:q3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function BC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Vz.hasOwnProperty(n)?{space:Vz[n],local:t}:t}function ZFe(t){return function(){this.removeAttribute(t)}}function eOe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tOe(t,n){return function(){this.setAttribute(t,n)}}function nOe(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function iOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function rOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Hz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sOe(t){return function(){this.style.removeProperty(t)}}function aOe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function lOe(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function pv(t,n){return t.style.getPropertyValue(n)||Hz(t).getComputedStyle(t,null).getPropertyValue(n)}function uOe(t){return function(){delete this[t]}}function dOe(t,n){return function(){this[t]=n}}function hOe(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function zz(t){return t.trim().split(/^|\s+/)}function X3(t){return t.classList||new Uz(t)}function Uz(t){this._node=t,this._names=zz(t.getAttribute("class")||"")}function Gz(t,n){for(var e=X3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Xz={},Vr=null;function HOe(t,n,e){return t=Yz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Yz(t,n,e){return function(i){var r=Vr;Vr=i;try{t.call(this,this.__data__,n,e)}finally{Vr=r}}}function UOe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=_&&(_=y+1);!(S=g[_])&&++_=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function GFe(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=WFe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?sOe:"function"==typeof n?lOe:aOe)(t,n,e??"")):pv(this.node(),t)},property:function fOe(t,n){return arguments.length>1?this.each((null==n?uOe:"function"==typeof n?hOe:dOe)(t,n)):this.node()[t]},classed:function vOe(t,n){var e=zz(t+"");if(arguments.length<2){for(var i=X3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?GOe:UOe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=i4e.exec(t))?new vc(n[1],n[2],n[3],1):(n=r4e.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=o4e.exec(t))?zC(n[1],n[2],n[3],n[4]):(n=s4e.exec(t))?zC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=a4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,1):(n=l4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,n[4]):iU.hasOwnProperty(t)?sU(iU[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function sU(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function zC(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function Ly(t,n,e,i){return 1===arguments.length?function u4e(t){return t instanceof Oy||(t=lm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function aU(){return"#"+K3(this.r)+K3(this.g)+K3(this.b)}function lU(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function K3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cU(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ud(t,n,e,i)}function uU(t){if(t instanceof Ud)return new Ud(t.h,t.s,t.l,t.opacity);if(t instanceof Oy||(t=lm(t)),!t)return new Ud;if(t instanceof Ud)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Ud(s,a,l,t.opacity)}function Ud(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Q3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function dU(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function Z3(t){return function(){return t}}function fU(t,n){var e=n-t;return e?function hU(t,n){return function(e){return t+e*n}}(t,e):Z3(isNaN(t)?n:t)}J3(Oy,lm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rU,formatHex:rU,formatHsl:function c4e(){return uU(this).formatHsl()},formatRgb:oU,toString:oU}),J3(vc,Ly,nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aU,formatHex:aU,formatRgb:lU,toString:lU})),J3(Ud,function d4e(t,n,e,i){return 1===arguments.length?uU(t):new Ud(t,n,e,i??1)},nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new Ud(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ud(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(Q3(t>=240?t-240:t+120,r,i),Q3(t,r,i),Q3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const UC=function t(n){var e=function m4e(t){return 1==(t=+t)?fU:function(n,e){return e-n?function p4e(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):Z3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Ly(r)).r,(o=Ly(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=fU(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function pU(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return dU((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=tI.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--gv}()}finally{gv=0,function T4e(){for(var t,e,n=GC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:GC=e);By=t,nI(i)}(),um=0}}function D4e(){var t=Vy.now(),n=t-WC;n>bU&&(qC-=n,WC=t)}function nI(t){gv||(Ry&&(Ry=clearTimeout(Ry)),t-um>24?(t<1/0&&(Ry=setTimeout(wU,t-Vy.now()-qC)),$y&&($y=clearInterval($y))):($y||(WC=Vy.now(),$y=setInterval(D4e,bU)),gv=1,_U(wU)))}function CU(t,n,e){var i=new YC;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}YC.prototype=xU.prototype={constructor:YC,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?XC():+e)+(null==n?0:+n),!this._next&&By!==this&&(By?By._next=this:GC=this,By=this),this._call=t,this._time=e,nI()},stop:function(){this._call&&(this._call=null,this._time=1/0,nI())}};var E4e=tU("start","end","cancel","interrupt"),A4e=[],kU=0,SU=1,iI=2,JC=3,DU=4,rI=5,KC=6;function QC(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function M4e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==SU)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===JC)return CU(s);f.state===DU?(f.state=KC,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ukU)throw new Error("too late; already scheduled");return e}function Gh(t,n){var e=Ru(t,n);if(e.state>JC)throw new Error("too late; already running");return e}function Ru(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function sI(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>iI&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?oI:Gh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function G4e(t,n){var e=BC(t),i="transform"===e?j4e:IU;return this.attrTween(t,"function"==typeof n?(e.local?U4e:z4e)(e,i,cI(this,"attr."+t,n)):null==n?(e.local?B4e:$4e)(e):(e.local?H4e:V4e)(e,i,n))},attrTween:function J4e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=BC(t);return this.tween(e,(i.local?X4e:Y4e)(i,n))},style:function _je(t,n,e){var i="transform"==(t+="")?O4e:IU;return null==n?this.styleTween(t,function gje(t,n){var e,i,r;return function(){var o=pv(this,t),s=(this.style.removeProperty(t),pv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,NU(t)):"function"==typeof n?this.styleTween(t,function yje(t,n,e){var i,r,o;return function(){var s=pv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=pv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,cI(this,"style."+t,n))).each(function bje(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Gh(this,t),c=l.on,u=null==l.value[o]?a||(a=NU(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function vje(t,n,e){var i,o,r=e+"";return function(){var s=pv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function Cje(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function wje(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function xje(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function Dje(t){return this.tween("text","function"==typeof t?function Sje(t){return function(){var n=t(this);this.textContent=n??""}}(cI(this,"text",t)):function kje(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function Aje(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function Eje(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function Tje(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function dje(){return this.on("end.remove",function uje(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function R4e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Ru(this.node(),e).tween,r=0,o=i.length;r0&&(R=z-N),C<0?he=E-F:C>0&&(q=re-F),y=fI,B.attr("cursor",qh.selection),Ie());break;default:return}hI()},!0).on("keyup.brush",function _t(){switch(Vr.keyCode){case 16:V&&(oe=fe=V=!1,Ie());break;case 18:y===bv&&(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv,Ie());break;case 32:y===fI&&(Vr.altKey?(_&&(X=Z-N*_,R=z+N*_),C&&(he=E-F*C,q=re+F*C),y=bv):(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv),B.attr("cursor",qh[v]),Ie());break;default:return}hI()},!0),function e4e(t){var n=t.document.documentElement,e=va(t).on("dragstart.drag",Y3,!0);"onselectstart"in n?e.on("selectstart.drag",Y3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Vr.view)}OU(),sI(g),c.call(g),ze.start()}function ie(){var At=Ne(g);V&&!oe&&!fe&&(Math.abs(At[0]-tt[0])>Math.abs(At[1]-tt[1])?fe=!0:oe=!0),tt=At,Y=!0,hI(),Ie()}function Ie(){var At;switch(N=tt[0]-xe[0],F=tt[1]-xe[1],y){case fI:case jU:_&&(N=Math.max(G-R,Math.min(L-X,N)),z=R+N,Z=X+N),C&&(F=Math.max(U-q,Math.min(H-he,F)),re=q+F,E=he+F);break;case yv:_<0?(N=Math.max(G-R,Math.min(L-R,N)),z=R+N,Z=X):_>0&&(N=Math.max(G-X,Math.min(L-X,N)),z=R,Z=X+N),C<0?(F=Math.max(U-q,Math.min(H-q,F)),re=q+F,E=he):C>0&&(F=Math.max(U-he,Math.min(H-he,F)),re=q,E=he+F);break;case bv:_&&(z=Math.max(G,Math.min(L,R-N*_)),Z=Math.max(G,Math.min(L,X+N*_))),C&&(re=Math.max(U,Math.min(H,q-F*C)),E=Math.max(U,Math.min(H,he+F*C)))}Zn?1:t>=n?0:NaN}function yI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function Xje(t){return(n,e)=>vI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var bI=Math.sqrt(50),_I=Math.sqrt(10),xI=Math.sqrt(2);function $U(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=bI?10:o>=_I?5:o>=xI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=bI?10:o>=_I?5:o>=xI?2:1)}function wI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=bI?r*=10:o>=_I?r*=5:o>=xI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return CI.setTime(+o),kI.setTime(+s),t(CI),t(kI),Math.floor(e(CI,kI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var SI=$u(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});SI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$u(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Jje=SI;var BU=$u(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});const Kje=BU;var Uy=6e4,Zje=6048e5;function dm(t){return $u(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Uy)/Zje})}var HU=dm(0),zU=(dm(1),dm(2),dm(3),dm(4),dm(5),dm(6),$u(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Uy)/864e5,t=>t.getDate()-1));const sPe=zU;var UU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Uy)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()});const aPe=UU;var GU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*Uy)},function(t,n){return(n-t)/Uy},function(t){return t.getMinutes()});const lPe=GU;var WU=$u(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()});const cPe=WU;var i2=$u(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});i2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$u(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):i2:null};const uPe=i2;var DI=new Date,TI=new Date;function Xh(t,n,e,i){function r(o){return t(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return t(o=new Date(+o)),o},r.ceil=function(o){return t(o=new Date(o-1)),n(o,1),t(o),o},r.round=function(o){var s=r(o),a=r.ceil(o);return o-s0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return DI.setTime(+o),TI.setTime(+s),t(DI),t(TI),Math.floor(e(DI,TI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var qU=6e4,YU=6048e5;function hm(t){return Xh(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/YU})}var JU=hm(0),r2=hm(1),_v=(hm(2),hm(3),hm(4)),KU=(hm(5),hm(6),Xh(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const QU=KU;function fm(t){return Xh(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qU)/YU})}var ZU=fm(0),o2=fm(1),xv=(fm(2),fm(3),fm(4)),eG=(fm(5),fm(6),Xh(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qU)/864e5},function(t){return t.getDate()-1}));const tG=eG;var EI=Xh(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});EI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Gy=EI;var AI=Xh(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});AI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Wy=AI;function MI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function II(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function qy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var wv,gG,nG={"-":"",_:" ",0:"0"},ya=/^\s*\d+/,_Pe=/^%/,xPe=/[\\^$*+?|[\]().{}]/g;function Gr(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function EPe(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function APe(t,n,e){var i=ya.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function MPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function oG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function IPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function sG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function NPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function FPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function OPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function jPe(t,n,e){var i=ya.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function PPe(t,n,e){var i=_Pe.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function LPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function RPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function aG(t,n){return Gr(t.getDate(),n,2)}function $Pe(t,n){return Gr(t.getHours(),n,2)}function BPe(t,n){return Gr(t.getHours()%12||12,n,2)}function VPe(t,n){return Gr(1+tG.count(Gy(t),t),n,3)}function lG(t,n){return Gr(t.getMilliseconds(),n,3)}function HPe(t,n){return lG(t,n)+"000"}function zPe(t,n){return Gr(t.getMonth()+1,n,2)}function UPe(t,n){return Gr(t.getMinutes(),n,2)}function GPe(t,n){return Gr(t.getSeconds(),n,2)}function WPe(t){var n=t.getDay();return 0===n?7:n}function qPe(t,n){return Gr(ZU.count(Gy(t)-1,t),n,2)}function cG(t){var n=t.getDay();return n>=4||0===n?xv(t):xv.ceil(t)}function XPe(t,n){return t=cG(t),Gr(xv.count(Gy(t),t)+(4===Gy(t).getDay()),n,2)}function YPe(t){return t.getDay()}function JPe(t,n){return Gr(o2.count(Gy(t)-1,t),n,2)}function KPe(t,n){return Gr(t.getFullYear()%100,n,2)}function QPe(t,n){return Gr((t=cG(t)).getFullYear()%100,n,2)}function ZPe(t,n){return Gr(t.getFullYear()%1e4,n,4)}function eLe(t,n){var e=t.getDay();return Gr((t=e>=4||0===e?xv(t):xv.ceil(t)).getFullYear()%1e4,n,4)}function tLe(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Gr(n/60|0,"0",2)+Gr(n%60,"0",2)}function uG(t,n){return Gr(t.getUTCDate(),n,2)}function nLe(t,n){return Gr(t.getUTCHours(),n,2)}function iLe(t,n){return Gr(t.getUTCHours()%12||12,n,2)}function rLe(t,n){return Gr(1+QU.count(Wy(t),t),n,3)}function dG(t,n){return Gr(t.getUTCMilliseconds(),n,3)}function oLe(t,n){return dG(t,n)+"000"}function sLe(t,n){return Gr(t.getUTCMonth()+1,n,2)}function aLe(t,n){return Gr(t.getUTCMinutes(),n,2)}function lLe(t,n){return Gr(t.getUTCSeconds(),n,2)}function cLe(t){var n=t.getUTCDay();return 0===n?7:n}function uLe(t,n){return Gr(JU.count(Wy(t)-1,t),n,2)}function hG(t){var n=t.getUTCDay();return n>=4||0===n?_v(t):_v.ceil(t)}function dLe(t,n){return t=hG(t),Gr(_v.count(Wy(t),t)+(4===Wy(t).getUTCDay()),n,2)}function hLe(t){return t.getUTCDay()}function fLe(t,n){return Gr(r2.count(Wy(t)-1,t),n,2)}function pLe(t,n){return Gr(t.getUTCFullYear()%100,n,2)}function mLe(t,n){return Gr((t=hG(t)).getUTCFullYear()%100,n,2)}function gLe(t,n){return Gr(t.getUTCFullYear()%1e4,n,4)}function vLe(t,n){var e=t.getUTCDay();return Gr((t=e>=4||0===e?_v(t):_v.ceil(t)).getUTCFullYear()%1e4,n,4)}function yLe(){return"+0000"}function fG(){return"%"}function pG(t){return+t}function mG(t){return Math.floor(+t/1e3)}function vG(t){return null===t?NaN:+t}!function wLe(t){wv=function bPe(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Xy(r),u=Yy(r),d=Xy(o),h=Yy(o),f=Xy(s),p=Yy(s),m=Xy(a),g=Yy(a),v=Xy(l),y=Yy(l),_={a:function H(ze){return s[ze.getDay()]},A:function he(ze){return o[ze.getDay()]},b:function E(ze){return l[ze.getMonth()]},B:function N(ze){return a[ze.getMonth()]},c:null,d:aG,e:aG,f:HPe,g:QPe,G:eLe,H:$Pe,I:BPe,j:VPe,L:lG,m:zPe,M:UPe,p:function F(ze){return r[+(ze.getHours()>=12)]},q:function Y(ze){return 1+~~(ze.getMonth()/3)},Q:pG,s:mG,S:GPe,u:WPe,U:qPe,V:XPe,w:YPe,W:JPe,x:null,X:null,y:KPe,Y:ZPe,Z:tLe,"%":fG},C={a:function V(ze){return s[ze.getUTCDay()]},A:function oe(ze){return o[ze.getUTCDay()]},b:function fe(ze){return l[ze.getUTCMonth()]},B:function Ne(ze){return a[ze.getUTCMonth()]},c:null,d:uG,e:uG,f:oLe,g:mLe,G:vLe,H:nLe,I:iLe,j:rLe,L:dG,m:sLe,M:aLe,p:function xe(ze){return r[+(ze.getUTCHours()>=12)]},q:function tt(ze){return 1+~~(ze.getUTCMonth()/3)},Q:pG,s:mG,S:lLe,u:cLe,U:uLe,V:dLe,w:hLe,W:fLe,x:null,X:null,y:pLe,Y:gLe,Z:yLe,"%":fG},S={a:function z(ze,ot,B){var ne=f.exec(ot.slice(B));return ne?(ze.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function U(ze,ot,B){var ne=d.exec(ot.slice(B));return ne?(ze.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function q(ze,ot,B){var ne=v.exec(ot.slice(B));return ne?(ze.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function re(ze,ot,B){var ne=m.exec(ot.slice(B));return ne?(ze.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function L(ze,ot,B){return G(ze,n,ot,B)},d:oG,e:oG,f:jPe,g:rG,G:iG,H:sG,I:sG,j:IPe,L:OPe,m:MPe,M:NPe,p:function R(ze,ot,B){var ne=c.exec(ot.slice(B));return ne?(ze.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:APe,Q:LPe,s:RPe,S:FPe,u:kPe,U:SPe,V:DPe,w:CPe,W:TPe,x:function X(ze,ot,B){return G(ze,e,ot,B)},X:function Z(ze,ot,B){return G(ze,i,ot,B)},y:rG,Y:iG,Z:EPe,"%":PPe};function M(ze,ot){return function(B){var Le,_t,At,ne=[],ie=-1,Ie=0,Ye=ze.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Ie=II(qy(ne.y,0,1))).getUTCDay(),Ie=Ye>4||0===Ye?r2.ceil(Ie):r2(Ie),Ie=QU.offset(Ie,7*(ne.V-1)),ne.y=Ie.getUTCFullYear(),ne.m=Ie.getUTCMonth(),ne.d=Ie.getUTCDate()+(ne.w+6)%7):(Ye=(Ie=MI(qy(ne.y,0,1))).getDay(),Ie=Ye>4||0===Ye?o2.ceil(Ie):o2(Ie),Ie=tG.offset(Ie,7*(ne.V-1)),ne.y=Ie.getFullYear(),ne.m=Ie.getMonth(),ne.d=Ie.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?II(qy(ne.y,0,1)).getUTCDay():MI(qy(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,II(ne)):MI(ne)}}function G(ze,ot,B,ne){for(var Le,_t,ie=0,Ie=ot.length,Ye=B.length;ie=Ye)return-1;if(37===(Le=ot.charCodeAt(ie++))){if(Le=ot.charAt(ie++),!(_t=S[Le in nG?ot.charAt(ie++):Le])||(ne=_t(ze,B,ne))<0)return-1}else if(Le!=B.charCodeAt(ne++))return-1}return ne}return _.x=M(e,_),_.X=M(i,_),_.c=M(n,_),C.x=M(e,C),C.X=M(i,C),C.c=M(n,C),{format:function(ze){var ot=M(ze+="",_);return ot.toString=function(){return ze},ot},parse:function(ze){var ot=$(ze+="",!1);return ot.toString=function(){return ze},ot},utcFormat:function(ze){var ot=M(ze+="",C);return ot.toString=function(){return ze},ot},utcParse:function(ze){var ot=$(ze+="",!0);return ot.toString=function(){return ze},ot}}}(t),gG=wv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const CLe=yI(vI).right,bG=(yI(vG),CLe);function kLe(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function DLe(t){return+t}var _G=[0,1];function Cv(t){return t}function NI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function SLe(t){return function(){return t}}(isNaN(n)?NaN:.5)}function ELe(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?ALe:ELe,l=c=null,d}function d(h){return isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,DLe),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=kLe,u()},d.clamp=function(h){return arguments.length?(s=!!h||Cv,u()):s!==Cv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Cv,Cv)}function Jy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Ky=1e3,Qy=60*Ky,Zy=60*Qy,eb=24*Zy,NLe=7*eb,CG=30*eb,FI=365*eb;function FLe(t){return new Date(t)}function OLe(t){return t instanceof Date?+t:+new Date(+t)}function kG(t,n,e,i,r,o,s,a,l){var c=wG(),u=c.invert,d=c.domain,h=l(".%L"),f=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),_=l("%Y"),C=[[s,1,Ky],[s,5,5*Ky],[s,15,15*Ky],[s,30,30*Ky],[o,1,Qy],[o,5,5*Qy],[o,15,15*Qy],[o,30,30*Qy],[r,1,Zy],[r,3,3*Zy],[r,6,6*Zy],[r,12,12*Zy],[i,1,eb],[i,2,2*eb],[e,1,NLe],[n,1,CG],[n,3,3*CG],[t,1,FI]];function S($){return(s($)<$?h:o($)<$?f:r($)<$?p:i($)<$?m:n($)<$?e($)<$?g:v:t($)<$?y:_)($)}function M($,G,R){if(null==$&&($=10),"number"==typeof $){var q,z=Math.abs(R-G)/$,U=yI(function(re){return re[2]}).right(C,z);return U===C.length?(q=wI(G/FI,R/FI,$),$=t):U?(q=(U=C[z/C[U-1][2]=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s2(t){if(!(n=jLe.exec(t)))throw new Error("invalid format: "+t);var n;return new OI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function OI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function a2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function kv(t){return(t=a2(Math.abs(t)))?t[1]:NaN}function DG(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}s2.prototype=OI.prototype,OI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const TG={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function PLe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return DG(100*t,n)},r:DG,s:function VLe(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(SG=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+a2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function EG(t){return t}var l2,jI,IG,AG=Array.prototype.map,MG=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function qLe(t){var n=t.domain;return t.ticks=function(e){var i=n();return function Yje(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),s=new Array(o=Math.ceil(n-t+1));++r0;){if((c=$U(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function bo(){var t=wG();return t.copy=function(){return xG(t,bo())},Jy.apply(t,arguments),qLe(t)}function NG(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(AG.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?EG:function $Le(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(AG.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=s2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,_=d.precision,C=d.trim,S=d.type;"n"===S?(y=!0,S="g"):TG[S]||(void 0===_&&(_=12),C=!0,S="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var M="$"===m?e:"#"===m&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",$="$"===m?i:/[%p]/.test(S)?s:"",G=TG[S],R=/[defgprs%]/.test(S);function z(U){var L,X,Z,q=M,re=$;if("c"===S)re=G(U)+re,U="";else{var H=(U=+U)<0||1/U<0;if(U=isNaN(U)?l:G(Math.abs(U),_),C&&(U=function BLe(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(U)),H&&0==+U&&"+"!==p&&(H=!1),q=(H?"("===p?p:a:"-"===p||"("===p?"":p)+q,re=("s"===S?MG[8+SG/3]:"")+re+(H&&"("===p?")":""),R)for(L=-1,X=U.length;++L(Z=U.charCodeAt(L))||Z>57){re=(46===Z?r+U.slice(L+1):U.slice(L))+re,U=U.slice(0,L);break}}y&&!g&&(U=n(U,1/0));var he=q.length+U.length+re.length,E=he>1)+q+U+re+E.slice(he);break;default:U=E+q+U+re}return o(U)}return _=void 0===_?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),z.toString=function(){return d+""},z}return{format:c,formatPrefix:function u(d,h){var f=c(((d=s2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(kv(h)/3))),m=Math.pow(10,-p),g=MG[8+p/3];return function(v){return f(m*v)+g}}}}(t),jI=l2.format,IG=l2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const FG=Symbol("implicit");function PI(){var t=new Map,n=[],e=[],i=FG;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==FG)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return PI(n,e).unknown(i)},Jy.apply(r,arguments),r}function La(){var o,s,t=PI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function jG(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],avm)if(Math.abs(u*a-l*c)>vm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((LI-Math.acos((p+d-m)/(2*g*v)))/2),_=y/v,C=y/g;Math.abs(_-1)>vm&&(this._+="L"+(t+_*c)+","+(n+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>vm||Math.abs(this._y1-c)>vm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%RI+RI),d>YLe?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>vm&&(this._+="A"+e+","+e+",0,"+ +(d>=LI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const BI=LG;function mo(t){return function(){return t}}function RG(t){return t[0]}function $G(t){return t[1]}function c2(){var t=RG,n=$G,e=mo(!0),i=null,r=gm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=BI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],_[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),_[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):_[d]))}if(v)return a=null,v+""||null}function c(){return c2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:mo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:mo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:mo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function BG(){}function VI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function VG(t,n){this._context=t,this._k=(1-n)/6}function HG(t,n){this._context=t,this._k=(1-n)/6}function zG(t){this._curve=t}function fRe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function XG(t,n){var r,s,a,l,c,e=new rb(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=FRe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new rb(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(YG)}function FRe(t){return t.children}function ORe(t){t.data=t.data.data}function YG(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rb(t){this.data=t,this.depth=this.height=0,this.parent=null}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:VI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new VG(i,n)}return e.tension=function(i){return t(+i)},e}(0),HG.prototype={areaStart:BG,areaEnd:BG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new HG(i,n)}return e.tension=function(i){return t(+i)},e}(0),function UG(t){function n(e){return new zG(t(e))}return n._curve=t,n}(gm),zG.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function gRe(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,_,C,S,M,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),M=g*g*S,(_=Math.max(y/M,M/v))>C){g-=c;break}C=_}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),rb.prototype=XG.prototype={constructor:rb,count:function _Re(){return this.eachAfter(bRe)},each:function xRe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function kRe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function SRe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function DRe(t){for(var n=this,e=function TRe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function ERe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function ARe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function MRe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function IRe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function NRe(){return XG(this).eachBefore(ORe)}};const $Re=["caretElm"];function BRe(t,n){}const VRe=function(t){return{model:t}};function HRe(t,n){if(1&t&&(b(0,"span"),J(1,BRe,0,0,"ng-template",5),x()),2&t){const e=j();w(1),k("ngTemplateOutlet",e.template)("ngTemplateOutletContext",lr(2,VRe,e.context))}}function zRe(t,n){1&t&&ge(0,"span",6),2&t&&k("innerHTML",j().title,kx)}function URe(t,n){if(1&t&&(at(),Ip(),ge(0,"ngx-charts-scale-legend",4)),2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function GRe(t,n){if(1&t){const e=vt();at(),Ip(),b(0,"ngx-charts-legend",5),ye("labelClick",function(r){return $e(e),Be(j().legendLabelClick.emit(r))})("labelActivate",function(r){return $e(e),Be(j().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return $e(e),Be(j().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const QG=["*"],WRe=["ngx-charts-axis-label",""],ZG=["ticksel"],qRe=["ngx-charts-x-axis-ticks",""];function XRe(t,n){if(1&t&&(at(),b(0,"g",3)(1,"title"),I(2),x(),b(3,"text",4),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function YRe(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",6),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),ht("y1",-e.gridLineHeight)}}function JRe(t,n){if(1&t&&(at(),b(0,"g"),J(1,YRe,2,2,"g",5),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(1),k("ngIf",i.showGridLines)}}const KRe=["ngx-charts-x-axis",""];function QRe(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksHeight(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function ZRe(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const e5e=["ngx-charts-y-axis-ticks",""];function t5e(t,n){if(1&t&&(at(),b(0,"g",4)(1,"title"),I(2),x(),b(3,"text",5),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function n5e(t,n){if(1&t&&(at(),ge(0,"path",6)),2&t){const e=j();ht("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function i5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",j(3).gridLineWidth)}function r5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",-j(3).gridLineWidth)}function o5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,i5e,1,1,"line",8),J(2,r5e,1,1,"line",8),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),k("ngIf","left"===e.orient),w(1),k("ngIf","right"===e.orient)}}function s5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,o5e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(1),k("ngIf",i.showGridLines)}}function a5e(t,n){if(1&t&&(at(),b(0,"g")(1,"title"),I(2),x(),b(3,"text",11),I(4),x()()),2&t){const e=j(2).$implicit,i=j();w(2),Dt(i.tickTrim(i.tickFormat(e.value))),w(1),ht("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),xn(" ",e.name," ")}}function l5e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",10),J(2,a5e,5,6,"g",7),x()),2&t){const e=j().$implicit,i=j();ht("transform",i.transform(e.value)),w(1),ht("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),k("ngIf",i.showRefLabels)}}function c5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,l5e,3,4,"g",7),x()),2&t){const e=j();w(1),k("ngIf",e.showRefLines)}}const u5e=["ngx-charts-y-axis",""];function d5e(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksWidth(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function h5e(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const f5e=["ngx-charts-circle-series",""];function p5e(t,n){if(1&t&&(at(),ge(0,"rect",4)),2&t){const e=j(2);k("@animationState","active"),ht("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const m5e=function(t){return{name:t}};function g5e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"defs"),ge(2,"g",1),x(),J(3,p5e,1,6,"rect",2),b(4,"g",3),ye("select",function(){$e(e);const r=j();return Be(r.onClick(r.circle.data))})("activate",function(){return $e(e),Be(j().activateCircle())})("deactivate",function(){return $e(e),Be(j().deactivateCircle())}),x()()}if(2&t){const e=j();w(2),k("name",e.gradientId)("stops",e.circle.gradientStops),w(1),k("ngIf",e.barVisible&&"standard"===e.type),w(1),Mn("active",e.isActive(lr(18,m5e,e.circle.seriesName))),k("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const v5e=["ngx-charts-circle",""],x5e=["ngx-charts-svg-linear-gradient",""];function w5e(t,n){if(1&t&&(at(),ge(0,"stop")),2&t){const e=n.$implicit;rr("stop-color",e.color)("stop-opacity",e.opacity),ht("offset",e.offset+"%")}}const S5e=["ngx-charts-area",""];function D5e(t,n){if(1&t&&(at(),b(0,"defs"),ge(1,"g",2),x()),2&t){const e=j();w(1),k("name",e.gradientId)("stops",e.gradientStops)}}const E5e=["tooltipAnchor"],A5e=["ngx-charts-tooltip-area",""];function M5e(t,n){if(1&t&&(b(0,"div",6),ge(1,"span",7),I(2),x()),2&t){const e=n.$implicit,i=j(2);w(1),rr("background-color",e.color),w(1),xn(" ",i.getToolTipText(e)," ")}}function I5e(t,n){if(1&t&&(at(),Ip(),b(0,"div",4),J(1,M5e,3,3,"div",5),x()),2&t){const e=n.model;w(1),k("ngForOf",e)}}const N5e=["ngx-charts-timeline",""];function F5e(t,n){if(1&t&&(b(0,"header",4)(1,"span",5),I(2),x()()),2&t){const e=j();w(2),Dt(e.title)}}function O5e(t,n){if(1&t){const e=vt();b(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return $e(e),Be(j().labelClick.emit(r))})("activate",function(r){return $e(e),Be(j().activate(r))})("deactivate",function(r){return $e(e),Be(j().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j();w(1),k("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Us=["tooltipTemplate"],p2=["seriesTooltipTemplate"],Eo=function(t,n){return[t,n]},n6e=["ngx-charts-line",""];function i6e(t,n){if(1&t){const e=vt();at(),b(0,"g",7),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateXAxisHeight(r))}),x()}if(2&t){const e=j();k("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function r6e(t,n){if(1&t){const e=vt();at(),b(0,"g",8),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateYAxisWidth(r))}),x()}if(2&t){const e=j();k("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function o6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",9),x()),2&t){const e=n.$implicit,i=j();k("@animationState","active"),w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function s6e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"g",13),ye("select",function(r){return $e(e),Be(j(2).onClick(r))})("activate",function(r){return $e(e),Be(j(2).onActivate(r))})("deactivate",function(r){return $e(e),Be(j(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function a6e(t,n){if(1&t){const e=vt();at(),b(0,"g",10),ye("mouseleave",function(){return $e(e),Be(j().hideCircles())}),b(1,"g",11),ye("hover",function(r){return $e(e),Be(j().updateHoveredVertical(r))}),x(),J(2,s6e,2,9,"g",12),x()}if(2&t){const e=j();w(1),k("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),k("ngForOf",e.results)}}function l6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",15),x()),2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function c6e(t,n){if(1&t){const e=vt();at(),b(0,"g",14),ye("onDomainChange",function(r){return $e(e),Be(j().updateDomain(r))}),J(1,l6e,2,8,"g",4),x()}if(2&t){const e=j();k("results",e.results)("view",Sr(10,Eo,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ht("transform",e.timelineTransform),w(1),k("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const u6e=["ngx-charts-line-series",""];function d6e(t,n){if(1&t&&(at(),ge(0,"g",4)),2&t){const e=j();k("name",e.gradientId)("stops",e.gradientStops)}}function h6e(t,n){if(1&t&&(at(),ge(0,"g",5)),2&t){const e=j();Mn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),k("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let iW=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function a$e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new kFe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Nz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct($c),ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function l$e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function c$e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:l$e(o.value,t,n)}),this[r]}}}}var Gs=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Gs||(Gs={})),Gs))();const Lf=7;function rW(t,n,e){return"top"===e?t.top-Lf:"bottom"===e?t.top+t.height-n.height+Lf:"center"===e?t.top+t.height/2-n.height/2:void 0}function oW(t,n,e){return"left"===e?t.left-Lf:"right"===e?t.left+t.width-n.width+Lf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=rW(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Lf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Lf),"center"===r&&(o=e.height/2-i.height/2);const s=rW(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=oW(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Lf),"right"===r&&(o=e.width-n.width/2-i.width/2-Lf),"center"===r&&(o=e.width/2-i.width/2);const s=oW(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===Gs.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===Gs.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===Gs.right)return Gs.left;if(n===Gs.left)return Gs.right;if(n===Gs.top)return Gs.bottom;if(n===Gs.bottom)return Gs.top}return n}}let u$e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&io($Re,5),2&e){let r;cn(r=un())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,w5),2&e&&Su(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(b(0,"div"),ge(1,"span",0,1),b(3,"div",2),J(4,HRe,2,4,"span",3),J(5,zRe,1,1,"span",4),x()()),2&e&&(w(1),function J8(t,n,e){Tu(lc,Pd,Ig(Gt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),k("hidden",!i.showCaret),w(3),k("ngIf",!i.title),w(1),k("ngIf",i.title))},dependencies:[gn,kl],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function SFe(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);r>3&&o&&Object.defineProperty(n,e,o)}([c$e(100)],t.prototype,"onWindowResize",null),t})();class d$e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let UI=(()=>{class t extends d$e{constructor(e){super(e),this.type=u$e}}return t.\u0275fac=function(e){return new(e||t)(ct(iW))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),os=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Ke,this.legendLabelActivate=new Ke,this.legendLabelDeactivate=new Ke}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Lr([UI]),Hn],ngContentSelectors:QG,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0),at(),b(1,"svg",1),ku(2),x(),J(3,URe,1,5,"ngx-charts-scale-legend",2),J(4,GRe,1,7,"ngx-charts-legend",3),x()),2&e&&(rr("width",i.view[0],"px"),k("@animationState","active")("@.disabled",!i.animations),w(1),ht("width",i.chartWidth)("height",i.view[1]),w(2),k("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),k("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[gn,vW,bW]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma("500ms 100ms",Dr({opacity:1}))])])]},changeDetection:0}),t})(),h$e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Ke,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275dir=Zt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),ss=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Ke}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new h$e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new EFe(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Hn],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"div")},encapsulation:2}),t})(),GI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Hn],attrs:WRe,decls:2,vars:6,template:function(e,i){1&e&&(at(),b(0,"text"),I(1),x()),2&e&&(ht("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),xn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Rf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function sW(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Ke,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:qRe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,XRe,5,7,"g",1),x(),J(3,JRe,2,2,"g",2)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngForOf",i.ticks))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),Wl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Ke,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&io(aW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:KRe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,QRe,1,12,"g",0),J(2,ZRe,1,5,"g",1),x()),2&e&&(ht("class",i.xAxisClassName)("transform",i.transform),w(1),k("ngIf",i.xScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,aW],encapsulation:2,changeDetection:0}),t})();let lW=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Ke,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Yh(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:e5e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,t5e,5,9,"g",1),x(),J(3,n5e,1,2,"path",2),J(4,s5e,2,2,"g",3),J(5,c5e,2,1,"g",3)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),k("ngForOf",i.ticks),w(1),k("ngForOf",i.referenceLines))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),El=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Ke,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&io(lW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:u5e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,d5e,1,14,"g",0),J(2,h5e,1,5,"g",1),x()),2&e&&(ht("class",i.yAxisClassName)("transform",i.transform),w(1),k("ngIf",i.yScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,lW],encapsulation:2,changeDetection:0}),t})(),cW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();var m2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(m2||(m2={})),m2))(),g2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(g2||(g2={})),g2))(),$f=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}($f||($f={})),$f))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Gs.top,this.tooltipAlignment=g2.center,this.tooltipType=m2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$f.all,this.tooltipImmediateExit=!1,this.show=new Ke,this.hide=new Ke}get listensForFocus(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.focus}get listensForHover(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(le(UI),le(nl),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),uW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[iW,UI],imports:[Vs]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function oa(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const dW={};function Al(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,dW[t]?Al():(dW[t]=!0,t)}let YI,ob=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${oa(r)} \u2022 ${oa(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:f5e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&J(0,g5e,5,20,"g",0),2&e&&k("ngIf",i.circle)},dependencies:function(){return[gn,Bu,v2,bm]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma(250,Dr({opacity:1}))])])]},changeDetection:0}),t})(),v2=(()=>{class t{constructor(){this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:v5e,decls:1,vars:8,template:function(e,i){1&e&&(at(),ge(0,"circle")),2&e&&ht("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),bm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Hn],attrs:x5e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(at(),b(0,"linearGradient",0),J(1,w5e,1,5,"stop",1),x()),2&e&&(k("id",i.name),ht("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),k("ngForOf",i.stops))},dependencies:[jn],encapsulation:2,changeDetection:0}),t})(),XI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Ke,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=va(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Hn],attrs:S5e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(J(0,D5e,2,2,"defs",0),at(),ge(1,"path",1)),2&e&&(k("ngIf",i.gradient),w(1),rr("opacity",i.opacity),ht("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[gn,bm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?YI=window:typeof global<"u"&&(YI=global);const gW=YI.MouseEvent;function JI(t,n=!1,e=!0){if("function"==typeof gW)return new gW(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let sb=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Ke}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=JI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&io(E5e,5),2&e){let r;cn(r=un())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:A5e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(at(),b(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),J(2,I5e,2,1,"ng-template",null,1,Ur),ge(4,"rect",2,3),x()),2&e){const r=uo(3);w(1),ht("x",0)("width",i.dims.width)("height",i.dims.height),w(3),rr("opacity",i.anchorOpacity)("pointer-events","none"),k("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ht("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[jn,Bu],encapsulation:2,data:{animation:[il("animationState",[Ia("inactive => active",[Dr({opacity:0}),Ma(250,Dr({opacity:.7}))]),Ia("active => inactive",[Dr({opacity:.7}),Ma(250,Dr({opacity:0}))])])]},changeDetection:0}),t})(),ab=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Ke,this.onDomainChange=new Ke,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+Al().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=pm().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=bo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=mm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function qje(){return gI(e2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Vr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),va(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),va(this.element).select(".brush").call(this.brush),va(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Hn],attrs:N5e,ngContentSelectors:QG,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(Cu(),at(),b(0,"g",0)(1,"filter"),ge(2,"feColorMatrix",1),x(),b(3,"g",2),ku(4),x(),ge(5,"rect",3)(6,"g",4),x()),2&e&&(ht("transform",i.transform),w(1),ht("id",i.filterId),w(4),ht("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),vW=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Ke,this.labelActivate=new Ke,this.labelDeactivate=new Ke,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Hn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(b(0,"div"),J(1,F5e,3,1,"header",0),b(2,"div",1)(3,"ul",2),J(4,O5e,2,4,"li",3),x()()()),2&e&&(rr("width",i.width,"px"),w(1),k("ngIf",(null==i.title?null:i.title.length)>0),w(2),rr("max-height",i.height-45,"px"),Mn("horizontal-legend",i.horizontal),w(1),k("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[jn,gn,yW]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),yW=(()=>{class t{constructor(){this.isActive=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.toggle=new Ke}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(b(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),b(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),b(2,"span",2),I(3),x()()),2&e&&(Mn("active",i.isActive),k("title",i.formattedLabel),w(1),rr("background-color",i.color),w(2),xn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),bW=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(le(ZB))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Hn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"span"),I(3),x()(),ge(4,"div",2),b(5,"div",1)(6,"span"),I(7),x()()()),2&e&&(rr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Mn("horizontal-legend",i.horizontal),w(3),Dt(i.valueRange[1].toLocaleString()),w(1),rr("background",i.gradient),w(3),Dt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,cW,uW,Vs,cW,uW]}),t})();let xW=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class vs{constructor(n,e,i,r){"string"==typeof n&&(n=xW.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=xW.find(o=>o.name===n)),"quantile"===e)r=jG().range(n.domain).domain(i);else if("ordinal"===e)r=PI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=NG(0,1,1/o.length);r=bo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=bo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=bo().domain(this.domain).range([0,1]),r=La().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let f$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),CW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),m$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),y$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),DW=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Ke,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=va(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Hn],attrs:n6e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(at(),ge(0,"path",0)),2&e&&(k("@animationState","active"),ht("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({strokeDasharray:2e3,strokeDashoffset:2e3}),Ma(1e3,Dr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),b$e=(()=>{class t extends ss{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=gm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Ke,this.deactivate=new Ke,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function gs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+Al().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function b2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Bf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=pm().range([0,i]).domain(e):"linear"===this.scaleType?(r=bo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=mm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=bo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new vs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Us,5),ni(r,p2,5)),2&e){let o;cn(o=un())&&(i.tooltipTemplate=o.first),cn(o=un())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[vi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(b(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),at(),b(1,"defs")(2,"clipPath"),ge(3,"rect"),x()(),b(4,"g",1),J(5,i6e,1,10,"g",2),J(6,r6e,1,12,"g",3),b(7,"g"),J(8,o6e,2,11,"g",4),J(9,a6e,3,9,"g",5),x()(),J(10,c6e,2,13,"g",6),x()),2&e&&(k("view",Sr(17,Eo,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ht("id",i.clipPathId),w(1),ht("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ht("transform",i.transform),w(1),k("ngIf",i.xAxis),w(1),k("ngIf",i.yAxis),w(1),ht("clip-path",i.clipPath),w(1),k("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),k("ngIf",!i.tooltipDisabled),w(1),k("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[jn,gn,Wl,El,sb,os,ob,ab,_$e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[il("animationState",[Ia(":leave",[Dr({opacity:1}),Ma(500,Dr({opacity:0}))])])]},changeDetection:0}),t})(),_$e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return c2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return Sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return Sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function KI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function ZI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function QI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+Al().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Hn],attrs:u6e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(at(),b(0,"g")(1,"defs"),J(2,d6e,1,2,"g",0),x(),ge(3,"g",1)(4,"g",2),J(5,h6e,1,9,"g",3),x()),2&e&&(w(2),k("ngIf",i.hasGradient),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),k("ngIf",i.hasRange))},dependencies:[gn,XI,bm,DW],encapsulation:2,changeDetection:0}),t})(),TW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})();Math;let iN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),S$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iN,TW]}),t})(),A$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),N$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),j$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iN,CW]}),t})(),L$e=(()=>{class t{constructor(){!function P$e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,f$e,CW,m$e,y$e,TW,S$e,A$e,iN,N$e,j$e]}),t})();function R$e(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function $$e(t,n){1&t&&ge(0,"img",31)}function B$e(t,n){1&t&&ge(0,"img",32)}function V$e(t,n){1&t&&ge(0,"img",33)}function H$e(t,n){1&t&&ge(0,"img",34)}function z$e(t,n){if(1&t&&(b(0,"tr",24)(1,"td"),ta(2,25),J(3,$$e,1,0,"img",26),J(4,B$e,1,0,"img",27),J(5,V$e,1,0,"img",28),J(6,H$e,1,0,"img",29),na(),b(7,"span"),I(8),x()(),b(9,"td"),I(10),b(11,"span",30),I(12),x()(),b(13,"td"),I(14),b(15,"span",30),I(16),x()(),b(17,"td"),I(18),b(19,"span",30),I(20),x()(),b(21,"td"),I(22),b(23,"span",30),I(24),x()()()),2&t){const e=n.$implicit,i=j(2);w(2),k("ngSwitch",e.health),w(1),k("ngSwitchCase",0),w(1),k("ngSwitchCase",1),w(1),k("ngSwitchCase",2),w(1),k("ngSwitchCase",3),w(2),Dt(e.name),w(2),xn("",e.session_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),xn("",e.presence_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),xn("",e.match_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),xn("",e.goroutine_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function U$e(t,n){if(1&t&&(b(0,"tbody"),J(1,z$e,25,18,"tr",22),b(2,"tr",3),ge(3,"td",23),b(4,"th",3),I(5),x(),b(6,"th",3),I(7),x(),b(8,"th",3),I(9),x(),b(10,"th",3),I(11),x()()()),2&t){const e=j();w(1),k("ngForOf",e.statusData.nodes),w(4),Dt(e.getTotalSessionCount()),w(2),Dt(e.getMaxPresenceCount()),w(2),Dt(e.getTotalMatchCount()),w(2),Dt(e.getTotalGorountineCount())}}function G$e(t,n){if(1&t&&(b(0,"option",35),I(1),x()),2&t){const e=n.$implicit,i=j();Fh("value",e),w(1),Dt(i.ranges[e])}}const w2=function(t){return{"background-color":t}};function W$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function q$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,W$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function X$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",37),J(2,q$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function Y$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function J$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Y$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function K$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",43),J(2,J$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function Q$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function Z$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Q$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function eBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",44),J(2,Z$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function tBe(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function nBe(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,tBe,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function iBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",45),J(2,nBe,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let rBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"showDelta",!1),K(this,"statusData",void 0),K(this,"rateGraphData",[]),K(this,"latencyGraphData",[]),K(this,"inputGraphData",[]),K(this,"outputGraphData",[]),K(this,"rangeForm",void 0),K(this,"ranges",{1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"}),K(this,"rangesKeys",Object.keys(this.ranges).map(o=>+o)),K(this,"colorScheme",{domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]}),K(this,"samples",60),K(this,"refreshTimer",void 0),K(this,"$refreshTimer",void 0),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Status"),x(),J(2,R$e,4,2,"ngb-alert",1),b(3,"table",2),ye("mouseover",function(){return i.showDelta=!0})("mouseout",function(){return i.showDelta=!1}),b(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Node name"),x(),b(8,"th",4),I(9,"Sessions"),x(),b(10,"th",4),I(11,"Presences"),x(),b(12,"th",4),I(13,"Authoritative Matches"),x(),b(14,"th",4),I(15,"Goroutines"),x()()(),J(16,U$e,12,5,"tbody",5),x(),b(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),I(21,"View:"),x(),b(22,"div",9)(23,"select",10),ye("change",function(o){return i.setRange(o)}),J(24,G$e,2,2,"option",11),function qE(t,n){const e=Pr();let i;const r=t+Bo;e.firstCreatePass?(i=function R_e(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Ap(i.type)),s=Pc(le);try{const a=ux(!1),l=o();return ux(a),function Lye(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,Gt(),r,l),l}finally{Pc(s)}}(25,"sortNumbers"),x()()()()(),b(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),I(30,"Processing Latency"),x(),b(31,"small"),I(32," (ms)"),x()()(),b(33,"div",13)(34,"div",14)(35,"h5",15),I(36,"Rate"),x(),b(37,"small"),I(38," (rpc/s)"),x()()()(),b(39,"div",12)(40,"div",16),J(41,X$e,4,12,"div",17),x(),b(42,"div",16),J(43,K$e,4,12,"div",17),x()(),b(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),I(48,"Input"),x(),b(49,"small"),I(50," (kb/s)"),x()()(),b(51,"div",13)(52,"div",14)(53,"h5",15),I(54,"Output"),x(),b(55,"small"),I(56," (kb/s)"),x()()()(),b(57,"div",12)(58,"div",16),J(59,eBe,4,12,"div",17),x(),b(60,"div",16),J(61,iBe,4,12,"div",17),x()()),2&e&&(w(2),k("ngIf",i.error),w(14),k("ngIf",i.statusData),w(1),k("formGroup",i.rangeForm),w(7),k("ngForOf",XE(25,8,i.rangesKeys)),w(17),k("ngIf",i.latencyGraphData.length>0),w(2),k("ngIf",i.rateGraphData.length>0),w(16),k("ngIf",i.inputGraphData.length>0),w(2),k("ngIf",i.outputGraphData.length>0))},dependencies:function(){return[jn,gn,wB,dw,_B,To,Pu,tFe,b$e,sl,xy,wy,ov,rl,ol,fa,ja,sBe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})),t})(),oBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),sBe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275pipe",gl({name:"sortNumbers",type:t,pure:!1})),t})();var aBe=De(870),rN=De(327);const lBe=["fileSelector"];function cBe(t,n){if(1&t&&(b(0,"div",8),I(1),x()),2&t){const e=j(2);w(1),Dt(e.dropZoneLabel)}}function uBe(t,n){if(1&t){const e=vt();b(0,"div")(1,"input",9),ye("click",function(r){return $e(e),Be(j(2).openFileSelector(r))}),x()()}if(2&t){const e=j(2);w(1),Fh("value",e.browseBtnLabel),k("className",e.browseBtnClassName)}}function dBe(t,n){if(1&t&&(J(0,cBe,2,1,"div",6),J(1,uBe,2,2,"div",7)),2&t){const e=j();k("ngIf",e.dropZoneLabel),w(1),k("ngIf",e.showBrowseBtn)}}function hBe(t,n){}const fBe=function(t){return{openFileSelector:t}};class C2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let OW=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),jW=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Ke,this.onFileOver=new Ke,this.onFileLeave=new Ke,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new C2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=av(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new C2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new C2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(le(Wi),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&ni(r,OW,5,Si),2&e){let o;cn(o=un())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&io(lBe,7),2&e){let r;cn(r=un())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(b(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),b(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),J(4,dBe,2,2,"ng-template",null,4,Ur),J(6,hBe,0,0,"ng-template",5),x()()),2&e){const r=uo(5);Mn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),k("className",i.dropZoneClassName),w(1),k("className",i.contentClassName),w(1),k("accept",i.accept)("multiple",i.multiple),ht("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),k("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",lr(13,fBe,i.openFileSelector))}},dependencies:[gn,kl],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),pBe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t,bootstrap:function(){return[jW]}}),t.\u0275inj=Ci({imports:[Vs]}),t})();function mBe(t,n){1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3,"Failed to retrieve configuration."),x()()),2&t&&k("dismissible",!1)}function gBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(2).$implicit;k("id",e.name),w(1),Dt(e.value)}}function vBe(t,n){1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t&&k("id",j(2).$implicit.name)}function yBe(t,n){if(1&t&&(b(0,"div",35)(1,"b"),I(2),x(),b(3,"label",27)(4,"a",28),ge(5,"img",10),x()()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.flatConfig[e+1].name),w(1),k("for",i.flatConfig[e+1].name),w(1),$p("href","https://heroiclabs.com/docs/install-configuration/#",i.flatConfig[e+1].name,"",y1)}}function bBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(3).index,i=j();k("id",i.flatConfig[e+1].name),w(1),Dt(i.flatConfig[e+1].value)}}function _Be(t,n){if(1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t){const e=j(3).index;k("id",j().flatConfig[e+1].name)}}function xBe(t,n){if(1&t&&(b(0,"div",36),J(1,bBe,2,2,"span",29),J(2,_Be,2,1,"span",30),x()),2&t){const e=j(2).index,i=j();w(1),k("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),k("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function wBe(t,n){if(1&t&&(b(0,"div",26)(1,"div",7)(2,"b"),I(3),x(),b(4,"label",27)(5,"a",28),ge(6,"img",10),x()()(),b(7,"div",7),J(8,gBe,2,2,"span",29),J(9,vBe,2,1,"span",30),x(),J(10,yBe,6,3,"div",31),J(11,xBe,3,2,"div",32),x()),2&t){const e=j(),i=e.index,r=e.$implicit,o=j();Mn("border-top-0",i>0),w(3),Dt(r.name),w(1),k("for",r.name),w(1),$p("href","https://heroiclabs.com/docs/install-configuration/#",r.value.name,"",y1),w(3),k("ngIf",!o.isEmpty(r.value)),w(1),k("ngIf",o.isEmpty(r.value)),w(1),k("ngIf",i{class t{constructor(e,i,r,o,s,a){K(this,"config",void 0),K(this,"route",void 0),K(this,"httpClient",void 0),K(this,"modalService",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"configError",""),K(this,"uploadError",""),K(this,"deleteError",""),K(this,"jsonConfig",void 0),K(this,"flatConfig",void 0),K(this,"nakamaVersion",void 0),K(this,"file",void 0),K(this,"uploading",!1),K(this,"uploadSuccess",!1),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"confirmDeleteForm",void 0),K(this,"apiConfig",void 0),this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,aBe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});rN.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(T3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(C3),le(Rr),le(wC),le(H3),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:43,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/install-configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],["autocomplete","off",3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,i){if(1&e){const r=vt();J(0,mBe,4,1,"ngb-alert",0),b(1,"h2",1),I(2,"Server Configuration"),x(),b(3,"div",2)(4,"h5")(5,"b"),I(6,"Server version:"),x(),I(7),x(),b(8,"button",3),ye("click",function(){return i.exportYaml()}),I(9,"Export Configuration"),x()(),b(10,"div",4),J(11,CBe,2,1,"ng-container",5),b(12,"div",6)(13,"div",7)(14,"b"),I(15,"runtime.env"),x(),b(16,"label",8)(17,"a",9),ge(18,"img",10),x()()(),b(19,"div",11),J(20,SBe,2,1,"div",12),J(21,DBe,3,0,"div",12),x()()(),b(22,"h5",13),I(23,"Import storage data"),x(),b(24,"p"),I(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),J(26,TBe,6,2,"ngb-alert",0),J(27,EBe,4,1,"ngb-alert",14),b(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return i.dropped(s)}),J(29,ABe,2,0,"ng-template",16),x(),b(30,"h5",13),I(31,"Delete all data"),x(),J(32,MBe,6,2,"ngb-alert",0),J(33,IBe,4,1,"ngb-alert",14),b(34,"div",17)(35,"div"),ge(36,"img",18),b(37,"small",19),I(38,"Warning - this operation is not reversible!"),x()(),J(39,FBe,19,5,"ng-template",null,20,Ur),b(41,"button",21),ye("click",function(){$e(r);const s=uo(40);return Be(i.openDeleteDataModal(s))}),I(42,"Delete all"),x()()}2&e&&(k("ngIf",i.configError),w(7),xn(" ",i.nakamaVersion,""),w(4),k("ngForOf",i.flatConfig),w(9),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&i.jsonConfig.runtime.env.length>0),w(1),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&0===i.jsonConfig.runtime.env.length),w(5),k("ngIf",i.uploadError),w(1),k("ngIf",i.uploadSuccess),w(1),k("disabled",i.uploading),w(4),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(8),k("disabled",i.deleting))},dependencies:[jW,OW,Rh,jn,gn,To,sl,Fa,rl,ol,fa,ja],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})),t})(),jBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function PBe(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function LBe(t,n){1&t&&(b(0,"tr")(1,"td",51),I(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),k("colSpan",4))}function RBe(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td")(6,"span",36),I(7,"Administrator"),x(),b(8,"span",36),I(9,"Developer"),x(),b(10,"span",36),I(11,"Maintainer"),x(),b(12,"span",36),I(13,"View Only"),x()(),b(14,"td")(15,"button",52),ye("click",function(){const o=$e(e).$implicit;return Be(j().deleteUser(o.username))}),I(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.username),w(2),Dt(e.email),w(2),k("hidden",e.role!==i.adminRole),w(2),k("hidden",e.role!==i.developerRole),w(2),k("hidden",e.role!==i.maintainerRole),w(2),k("hidden",e.role!==i.readonlyRole)}}function $Be(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3,"An error occurred:"),x(),b(4,"p",53),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.userCreateError)}}const oN=function(t){return{"is-invalid":t}};let BBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"userCreateError",""),K(this,"users",[]),K(this,"createUserForm",void 0),K(this,"adminRole",oi.USER_ROLE_ADMIN),K(this,"developerRole",oi.USER_ROLE_DEVELOPER),K(this,"maintainerRole",oi.USER_ROLE_MAINTAINER),K(this,"readonlyRole",oi.USER_ROLE_READONLY),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Do.required],email:["",[Do.required,Do.email]],password:["",Do.compose([Do.required,Do.minLength(8)])],role:[+this.readonlyRole,Do.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=oi.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=oi.USER_ROLE_ADMIN;break;case 2:e=oi.USER_ROLE_DEVELOPER;break;case 3:e=oi.USER_ROLE_MAINTAINER;break;case 4:e=oi.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Management"),x(),J(2,PBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Username"),x(),b(8,"th"),I(9,"Email"),x(),b(10,"th",5),I(11,"Role"),x(),b(12,"th",6),I(13,"Action"),x()()(),b(14,"tbody"),J(15,LBe,3,1,"tr",7),J(16,RBe,17,6,"tr",8),x()(),b(17,"h5",9),I(18,"Add new user"),x(),b(19,"ngb-alert",10)(20,"h6",11),I(21,"User roles"),x(),b(22,"div",12)(23,"div",13)(24,"div",14),ge(25,"img",15),b(26,"h6",16),I(27,"Administrator"),x()(),b(28,"small"),I(29," Owners have complete control over the server, its users and resources. "),x()(),b(30,"div",13)(31,"div",14),ge(32,"img",17),b(33,"h6",16),I(34,"Developer"),x()(),b(35,"small"),I(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),b(37,"div",13)(38,"div",14),ge(39,"img",18),b(40,"h6",16),I(41,"Maintainer"),x()(),b(42,"small"),I(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),b(44,"div",13)(45,"div",14),ge(46,"img",19),b(47,"h6",16),I(48,"View Only"),x()(),b(49,"small"),I(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),J(51,$Be,6,2,"ngb-alert",1),b(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return i.addUser()}),b(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),I(58,"Email"),x()(),b(59,"div",26),ge(60,"input",27),b(61,"div",28),I(62,"Email is required"),x()()()(),b(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),I(67,"Username"),x()(),b(68,"div",26),ge(69,"input",30),b(70,"div",28),I(71,"Username is required"),x()()()(),b(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),I(76,"Password"),x()(),b(77,"div",26),ge(78,"input",32),b(79,"div",28),I(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),b(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),I(85,"Role"),x()(),b(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),I(90,"Administrator"),x(),b(91,"span",36),I(92,"Developer"),x(),b(93,"span",36),I(94,"Maintainer"),x(),b(95,"span",36),I(96,"View Only"),x()(),b(97,"div",37),ge(98,"button",38),b(99,"div",39)(100,"button",40),ye("click",function(){return i.f.role.setValue(+i.adminRole)}),I(101,"Administrator"),x(),b(102,"button",40),ye("click",function(){return i.f.role.setValue(+i.developerRole)}),I(103,"Developer"),x(),b(104,"button",40),ye("click",function(){return i.f.role.setValue(+i.maintainerRole)}),I(105,"Maintainer"),x(),b(106,"button",40),ye("click",function(){return i.f.role.setValue(+i.readonlyRole)}),I(107,"View Only"),x()()()(),b(108,"div",28),I(109,"Role is required"),x()()()(),b(110,"div",41)(111,"div",42),ge(112,"div",24),b(113,"div",26)(114,"div",43),ge(115,"input",44),b(116,"label",45),I(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),b(118,"div",46)(119,"button",47),I(120,"Save"),x()()()()),2&e&&(w(2),k("ngIf",i.error),w(13),k("ngIf",0===i.users.length),w(1),k("ngForOf",i.users),w(3),k("type","secondary"),w(32),k("ngIf",i.userCreateError),w(2),k("formGroup",i.createUserForm),w(7),k("ngClass",lr(18,oN,i.f.email.dirty&&i.f.email.errors)),w(1),k("hidden",i.f.email.disabled||i.f.email.valid||i.f.email.pristine),w(8),k("ngClass",lr(20,oN,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(8),k("ngClass",lr(22,oN,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(10),k("hidden",i.f.role.value!==+i.adminRole),w(2),k("hidden",i.f.role.value!==+i.developerRole),w(2),k("hidden",i.f.role.value!==+i.maintainerRole),w(2),k("hidden",i.f.role.value!==+i.readonlyRole),w(13),k("hidden",i.f.role.disabled||i.f.role.valid||i.f.role.pristine),w(11),k("disabled",i.createUserForm.invalid))},dependencies:[Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Fa,aC,rl,ol,Nf,fa,ja],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})),t})(),VBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function HBe(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Failed to retrieve runtime information: ",e.error,"")}}function zBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function UBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Go modules were found."),x(),ge(3,"td"),x())}function GBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function WBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Lua modules were found."),x(),ge(3,"td"),x())}function qBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function XBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No JavaScript modules were found."),x(),ge(3,"td"),x())}const sN=function(){return["/apiexplorer"]},aN=function(t){return{endpoint:t}};function YBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function JBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Go RPC functions were found."),x()())}function KBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function QBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Lua RPC functions were found."),x()())}function ZBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function e7e(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No JavaScript RPC functions were found."),x()())}let t7e=(()=>{class t{constructor(e,i){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"runtimeInfo",void 0),this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Runtime Modules"),x(),J(2,HBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),I(7,"Go Modules"),x(),b(8,"th",4),I(9,"Last Modified"),x()()(),b(10,"tbody"),J(11,zBe,5,2,"tr",5),J(12,UBe,4,0,"tr",6),x(),b(13,"thead",3)(14,"tr")(15,"th",7),I(16,"Lua Modules"),x()()(),b(17,"tbody"),J(18,GBe,5,2,"tr",5),J(19,WBe,4,0,"tr",6),x(),b(20,"thead",3)(21,"tr")(22,"th",7),I(23,"JavaScript Modules"),x()()(),b(24,"tbody"),J(25,qBe,5,2,"tr",5),J(26,XBe,4,0,"tr",6),x()(),b(27,"h4",8),I(28,"Registered RPC Functions"),x(),b(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),I(33,"Go RPC Functions"),x()()(),b(34,"tbody"),J(35,YBe,7,6,"tr",5),J(36,JBe,3,0,"tr",6),x(),b(37,"thead",3)(38,"tr")(39,"th",7),I(40,"Lua RPC Functions"),x()()(),b(41,"tbody"),J(42,KBe,7,6,"tr",5),J(43,QBe,3,0,"tr",6),x(),b(44,"thead",3)(45,"tr")(46,"th",7),I(47,"JavaScript RPC Functions"),x()()(),b(48,"tbody"),J(49,ZBe,7,6,"tr",5),J(50,e7e,3,0,"tr",6),x()()),2&e&&(w(2),k("ngIf",i.error),w(9),k("ngForOf",i.runtimeInfo.go_modules),w(1),k("ngIf",0===i.runtimeInfo.go_modules.length),w(6),k("ngForOf",i.runtimeInfo.lua_modules),w(1),k("ngIf",0===i.runtimeInfo.lua_modules.length),w(6),k("ngForOf",i.runtimeInfo.js_modules),w(1),k("ngIf",0===i.runtimeInfo.js_modules.length),w(9),k("ngForOf",i.runtimeInfo.go_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.go_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.lua_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.lua_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.js_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.js_rpc_functions.length))},dependencies:[Nu,jn,gn,To],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})),t})(),n7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function i7e(t,n){1&t&&(b(0,"span"),I(1,"Filter by collection"),x())}function r7e(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.f.collection.value)}}function o7e(t,n){if(1&t){const e=vt();b(0,"button",34),ye("click",function(){const o=$e(e).$implicit;return Be(j().f.collection.setValue(o))}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function s7e(t,n){if(1&t&&(b(0,"ngb-alert",35),ge(1,"img",36),b(2,"h6",37),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying storage objects: ",e.error,"")}}function a7e(t,n){1&t&&(b(0,"th",38),I(1,"Remove"),x())}function l7e(t,n){1&t&&(b(0,"tr")(1,"td",39),I(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function c7e(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteObject(r,s,a))}),I(2,"Delete"),x()()}}function u7e(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(2),x(),b(3,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(4),x(),b(5,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(6),x(),b(7,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(8),x(),J(9,c7e,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.collection),w(2),Dt(e.key),w(2),Dt(e.user_id),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let d7e=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"collections",[]),K(this,"objects",[]),K(this,"objectCount",0),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Objects"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),J(12,i7e,2,0,"span",10),J(13,r7e,2,1,"span",10),x(),b(14,"div",11)(15,"button",12),ye("click",function(){return i.f.collection.reset()}),I(16,"\u2718 Deselect collection"),x(),ge(17,"div",13),J(18,o7e,2,1,"button",14),x()()(),ge(19,"input",15)(20,"input",16),b(21,"div",17)(22,"span",18),ye("click",function(){return i.f.user_id.setValue(i.systemUserId)}),ge(23,"img",19),x()(),b(24,"div",17)(25,"button",20),ye("click",function(){return i.search(0)}),I(26,"Search"),x()()()()(),b(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return i.search(0)}),ge(30,"img",24),x(),b(31,"button",23),ye("click",function(){return i.search(1)}),ge(32,"img",25),x()()()()(),J(33,s7e,4,2,"ngb-alert",26),b(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),I(39,"Collection Name"),x(),b(40,"th"),I(41,"Key Name"),x(),b(42,"th",30),I(43,"User ID"),x(),b(44,"th",31),I(45,"Last Update"),x(),J(46,a7e,2,0,"th",32),x()(),b(47,"tbody"),J(48,l7e,3,0,"tr",10),J(49,u7e,10,5,"tr",33),x()()()),2&e&&(w(3),xn("",i.objectCount," objects found."),w(4),k("formGroup",i.searchForm),w(4),k("disabled",0===i.collections.length),w(1),k("ngIf",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngIf",i.f.collection.value&&""!==i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngForOf",i.collections),w(7),k("disabled",i.disableSearch()),w(4),k("disabled",0===i.objects.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.objects.length),w(1),k("ngForOf",i.objects))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),h7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),f7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();var lN,PW,LW,RW,$W,BW,VW,HW,zW,UW,GW,WW,qW,XW,YW,JW,KW,QW,ZW,eq,tq,nq,iq,rq,oq,sq,aq,lq,cq,uq,dq,hq,fq,pq,mq,gq,vq,yq,bq,_q,xq,wq,Cq,kq,Sq,Dq,Tq,Eq,Aq,Mq,Iq,Nq,Fq,Oq,jq,Pq,Lq,Rq,$q,Bq,Vq,Hq,zq,Uq,Gq,Wq,qq,Xq,Yq,Jq,Kq,Qq,Zq,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,bX,_X,xX,wX,CX,kX,SX,DX,TX,EX,AX,MX,IX,NX,FX,OX,jX,PX,LX,RX,$X,BX,VX,HX,zX,UX,GX,WX,qX,XX,YX,JX,KX,QX,ZX,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,bY,_Y,xY,wY,CY,kY,SY,DY,TY,EY,AY,MY,IY,NY,FY,OY,jY,PY,LY,RY,$Y,BY,VY,HY,zY,UY,GY,WY,qY,XY,YY,JY,KY,QY,ZY,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,bJ,_J,xJ,wJ,CJ,kJ,SJ,DJ,TJ,EJ,AJ,MJ,IJ,NJ,FJ,OJ,jJ,PJ,LJ,RJ,$J,BJ,VJ,HJ,zJ,UJ,GJ,WJ,qJ,XJ,YJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,bK,_K,xK,wK,CK,kK,SK,DK,TK,EK,AK,MK,IK,NK,FK,OK,jK,PK,LK,RK,$K,BK,VK,HK,zK,UK,GK,WK,qK,p7e=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],m7e=["mainAxis","crossAxis","limiter"];function lb(t){var n="function"==typeof Map?new Map:void 0;return lb=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return cN(e,arguments,qi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),cb(r,e)},lb(t)}function cN(t,n,e){return(cN=ZK()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&cb(a,o.prototype),a}).apply(null,arguments)}function Ae(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function XK(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=k2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}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 o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function vn(){vn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(q,re,L){q[re]=L.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(q,re,L){return Object.defineProperty(q,re,{value:L,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{l({},"")}catch{l=function(re,L,X){return re[L]=X}}function c(q,re,L,X){var H=Object.create((re&&re.prototype instanceof h?re:h).prototype),he=new R(X||[]);return i(H,"_invoke",{value:S(q,L,he)}),H}function u(q,re,L){try{return{type:"normal",arg:q.call(re,L)}}catch(X){return{type:"throw",arg:X}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(z([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function _(q){["next","throw","return"].forEach(function(re){l(q,re,function(L){return this._invoke(re,L)})})}function C(q,re){function L(Z,H,he,E){var N=u(q[Z],q,H);if("throw"!==N.type){var F=N.arg,Y=F.value;return Y&&"object"==bn(Y)&&e.call(Y,"__await")?re.resolve(Y.__await).then(function(V){L("next",V,he,E)},function(V){L("throw",V,he,E)}):re.resolve(Y).then(function(V){F.value=V,he(F)},function(V){return L("throw",V,he,E)})}E(N.arg)}var X;i(this,"_invoke",{value:function(Z,H){function he(){return new re(function(E,N){L(Z,H,E,N)})}return X=X?X.then(he,he):he()}})}function S(q,re,L){var X="suspendedStart";return function(Z,H){if("executing"===X)throw new Error("Generator is already running");if("completed"===X){if("throw"===Z)throw H;return{value:void 0,done:!0}}for(L.method=Z,L.arg=H;;){var he=L.delegate;if(he){var E=M(he,L);if(E){if(E===d)continue;return E}}if("next"===L.method)L.sent=L._sent=L.arg;else if("throw"===L.method){if("suspendedStart"===X)throw X="completed",L.arg;L.dispatchException(L.arg)}else"return"===L.method&&L.abrupt("return",L.arg);X="executing";var N=u(q,re,L);if("normal"===N.type){if(X=L.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:L.done}}"throw"===N.type&&(X="completed",L.method="throw",L.arg=N.arg)}}}function M(q,re){var L=re.method,X=q.iterator[L];if(void 0===X)return re.delegate=null,"throw"===L&&q.iterator.return&&(re.method="return",re.arg=void 0,M(q,re),"throw"===re.method)||"return"!==L&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+L+"' method")),d;var Z=u(X,q.iterator,re.arg);if("throw"===Z.type)return re.method="throw",re.arg=Z.arg,re.delegate=null,d;var H=Z.arg;return H?H.done?(re[q.resultName]=H.value,re.next=q.nextLoc,"return"!==re.method&&(re.method="next",re.arg=void 0),re.delegate=null,d):H:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,d)}function $(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function G(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function R(q){this.tryEntries=[{tryLoc:"root"}],q.forEach($,this),this.reset(!0)}function z(q){if(q){var re=q[o];if(re)return re.call(q);if("function"==typeof q.next)return q;if(!isNaN(q.length)){var L=-1,X=function Z(){for(;++L=0;--X){var Z=this.tryEntries[X],H=Z.completion;if("root"===Z.tryLoc)return L("end");if(Z.tryLoc<=this.prev){var he=e.call(Z,"catchLoc"),E=e.call(Z,"finallyLoc");if(he&&E){if(this.prev=0;--L){var X=this.tryEntries[L];if(X.tryLoc<=this.prev&&e.call(X,"finallyLoc")&&this.prev=0;--re){var L=this.tryEntries[re];if(L.finallyLoc===q)return this.complete(L.completion,L.afterLoc),G(L),d}},catch:function(q){for(var re=this.tryEntries.length-1;re>=0;--re){var L=this.tryEntries[re];if(L.tryLoc===q){var X=L.completion;if("throw"===X.type){var Z=X.arg;G(L)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(q,re,L){return this.delegate={iterator:z(q),resultName:re,nextLoc:L},"next"===this.method&&(this.arg=void 0),d}},t}function YK(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Zi(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){YK(o,i,r,s,a,"next",l)}function a(l){YK(o,i,r,s,a,"throw",l)}s(void 0)})}}function Un(t,n){return KK(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||k2(t,n)||JK()}function JK(){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 KK(t){if(Array.isArray(t))return t}function QK(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ze(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ke(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function eQ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function qd(t,n){return new t(n)}var db,D2=new Map,fN=0;function fQ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function x7e(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=hN(t),m=D2.get(p)||function w7e(t,n){var e={stylesheet:b7e(n),rules:{}};return D2.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),fN+=1,f}function hb(t){db=t}function Tv(){if(!db)throw new Error("Function called outside component initialization");return db}function Wc(t){Tv().$$.on_mount.push(t)}function Hu(t){Tv().$$.on_destroy.push(t)}function pQ(){var t=Tv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=hQ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function mQ(t,n){return Tv().$$.context.set(t,n),n}function xa(t){return Tv().$$.context.get(t)}function T2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Ev=[],Vi=[],E2=[],pN=[],gQ=Promise.resolve(),mN=!1;function vQ(){mN||(mN=!0,gQ.then(yQ))}function Xl(){return vQ(),gQ}function _m(t){E2.push(t)}function zu(t){pN.push(t)}var A2,gN=new Set,Av=0;function yQ(){if(0===Av){var t=db;do{try{for(;Avl.start&&(a=d(l,_),l=null,vN(t,a.b,"start"),G&&(u(),c=fQ(t,s,a.b,a.duration,0,S,o.css))),a&&(z>=a.end?($(s=a.b,1-s),vN(t,a.b,"end"),l||(a.b?u():--a.group.r||ho(a.group.c)),a=null):z>=a.start&&(s=a.a+a.d*S((z-a.start)/a.duration),$(s,1-s))),!(!a&&!l)},0===ub.size&&dN(lQ),new Promise(function(z){ub.add({c:p,f:z})}))}return{run:function(f){ba(o)?(A2||(A2=Promise.resolve()).then(function(){A2=null}),A2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var yN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function D7e(t,n){t.d(1),n.delete(t.key)}function bN(t,n){ce(t,1,1,function(){n.delete(t.key)})}function N2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var _=d(r,o,p),C=e(_),S=s.get(C);S?i&&S.p(_,n):(S=c(C,_)).c(),v.set(C,g[p]=S),C in m&&y.set(C,Math.abs(p-m[C]))}var M=new Set,$=new Set;function G(L){Q(L,1),L.m(a,u),s.set(L.key,L),u=L.first,f--}for(;h&&f;){var R=g[f-1],z=t[h-1],U=R.key,q=z.key;R===z?(u=R.first,h--,f--):v.has(q)?!s.has(U)||M.has(U)?G(R):$.has(q)?h--:y.get(U)>y.get(q)?($.add(U),G(R)):(M.add(q),h--):(l(z,s),h--)}for(;h--;){var re=t[h];v.has(re.key)||l(re,s)}for(;f;)G(g[f-1]);return g}function xm(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function F2(t){return"object"===bn(t)&&null!==t?t:{}}function Uu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function mt(t){t&&t.c()}function ft(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||_m(function(){var a,l=t.$$.on_mount.map(rQ).filter(ba);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,si(l)):ho(l),t.$$.on_mount=[]}),s.forEach(_m)}function pt(t,n){var e=t.$$;null!==e.fragment&&(ho(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=db;hb(t);var c=t.$$={fragment:null,ctx:[],props:o,update:Lt,not_equal:r,bound:oQ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:oQ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function T7e(t,n){-1===t.$$.dirty[0]&&(Ev.push(t),vQ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function M7e(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function I7e(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?iQ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var F7e=yN.window;function O7e(t){pi(t,"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 _Q(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=t[1].closeButton&&xQ(t),C=t[2];return C&&(s=qd(C,{})),{c:function(){n=be("div"),e=be("div"),i=be("div"),_&&_.c(),r=it(),o=be("div"),s&&mt(s.$$.fragment),P(o,"class",a=Ao(t[1].classContent)+" svelte-n7cvum"),P(o,"style",t[9]),Mt(o,"content",!t[0]),P(i,"class",l=Ao(t[1].classWindow)+" svelte-n7cvum"),P(i,"role","dialog"),P(i,"aria-modal","true"),P(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),P(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),P(i,"style",t[8]),Mt(i,"window",!t[0]),P(e,"class",h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"),P(e,"style",t[7]),Mt(e,"wrap",!t[0]),P(n,"id",f=t[1].id),P(n,"class",p=Ao(t[1].classBg)+" svelte-n7cvum"),P(n,"style",t[6]),Mt(n,"bg",!t[0])},m:function(S,M){Pe(S,n,M),de(n,e),de(e,i),_&&_.m(i,null),de(i,r),de(i,o),s&&ft(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[Ft(i,"introstart",function(){ba(t[13])&&t[13].apply(this,arguments)}),Ft(i,"outrostart",function(){ba(t[14])&&t[14].apply(this,arguments)}),Ft(i,"introend",function(){ba(t[15])&&t[15].apply(this,arguments)}),Ft(i,"outroend",function(){ba(t[16])&&t[16].apply(this,arguments)}),Ft(n,"mousedown",t[20]),Ft(n,"mouseup",t[21])],v=!0)},p:function(S,M){if((t=S)[1].closeButton?_?(_.p(t,M),2&M[0]&&Q(_,1)):((_=xQ(t)).c(),Q(_,1),_.m(i,r)):_&&($t(),ce(_,1,1,function(){_=null}),Bt()),C!==(C=t[2])){if(s){$t();var $=s;ce($.$$.fragment,1,0,function(){pt($,1)}),Bt()}C?(mt((s=qd(C,{})).$$.fragment),Q(s.$$.fragment,1),ft(s,o,null)):s=null}(!g||2&M[0]&&a!==(a=Ao(t[1].classContent)+" svelte-n7cvum"))&&P(o,"class",a),(!g||512&M[0])&&P(o,"style",t[9]),(!g||3&M[0])&&Mt(o,"content",!t[0]),(!g||2&M[0]&&l!==(l=Ao(t[1].classWindow)+" svelte-n7cvum"))&&P(i,"class",l),(!g||2&M[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&P(i,"aria-label",c),(!g||2&M[0]&&u!==(u=t[1].ariaLabelledBy||null))&&P(i,"aria-labelledby",u),(!g||256&M[0])&&P(i,"style",t[8]),(!g||3&M[0])&&Mt(i,"window",!t[0]),(!g||2&M[0]&&h!==(h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"))&&P(e,"class",h),(!g||128&M[0])&&P(e,"style",t[7]),(!g||3&M[0])&&Mt(e,"wrap",!t[0]),(!g||2&M[0]&&f!==(f=t[1].id))&&P(n,"id",f),(!g||2&M[0]&&p!==(p=Ao(t[1].classBg)+" svelte-n7cvum"))&&P(n,"class",p),(!g||64&M[0])&&P(n,"style",t[6]),(!g||3&M[0])&&Mt(n,"bg",!t[0])},i:function(S){g||(Q(_),s&&Q(s.$$.fragment,S),_m(function(){d||(d=I2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),_m(function(){m||(m=I2(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(S){ce(_),s&&ce(s.$$.fragment,S),d||(d=I2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=I2(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(S){S&&je(n),_&&_.d(),s&&pt(s),t[50](null),S&&d&&d.end(),t[51](null),t[52](null),S&&m&&m.end(),v=!1,ho(y)}}}function xQ(t){var n,e,i,r,o,s=[P7e,j7e],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function j7e(t){var n,e,i,r;return{c:function(){P(n=be("button"),"class",e=Ao(t[1].classCloseButton)+" svelte-n7cvum"),P(n,"aria-label","Close modal"),P(n,"style",t[10]),P(n,"type","button"),Mt(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=Ft(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Ao(o[1].classCloseButton)+" svelte-n7cvum")&&P(n,"class",e),1024&s[0]&&P(n,"style",o[10]),3&s[0]&&Mt(n,"close",!o[0])},i:Lt,o:Lt,d:function(o){o&&je(n),i=!1,r()}}}function P7e(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=qd(r,o(t))),{c:function(){n&&mt(n.$$.fragment),e=_r()},m:function(s,a){n&&ft(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){$t();var l=n;ce(l.$$.fragment,1,0,function(){pt(l,1)}),Bt()}r?(mt((n=qd(r,o(s))).$$.fragment),Q(n.$$.fragment,1),ft(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&Q(n.$$.fragment,s),i=!0)},o:function(s){n&&ce(n.$$.fragment,s),i=!1},d:function(s){s&&je(e),n&&pt(n,s)}}}function L7e(t){var n,e,i,r,o=t[2]&&_Q(t),s=t[49].default,a=Ms(s,t,t[48],null);return{c:function(){o&&o.c(),n=it(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=Ft(F7e,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&Q(o,1)):((o=_Q(l)).c(),Q(o,1),o.m(n.parentNode,n)):o&&($t(),ce(o,1,1,function(){o=null}),Bt()),a&&a.p&&(!e||131072&c[1])&&Ns(a,s,l,l[48],e?Is(s,l[48],c,null):Fs(l[48]),null)},i:function(l){e||(Q(o),Q(a,l),e=!0)},o:function(l){ce(o),ce(a,l),e=!1},d:function(l){o&&o.d(l),l&&je(n),a&&a.d(l),i=!1,r()}}}function wQ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ze(Ze({},e),{},{props:Ze(Ze({},n),e.props)}))}}function R7e(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,_=void 0===y?{}:y,C=n.$$scope,S=pQ(),$=n.isTabbable,G=void 0===$?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:$,R=n.show,z=void 0===R?null:R,U=n.id,q=void 0===U?null:U,re=n.key,L=void 0===re?"simple-modal":re,X=n.ariaLabel,Z=void 0===X?null:X,H=n.ariaLabelledBy,he=void 0===H?null:H,E=n.closeButton,N=void 0===E||E,F=n.closeOnEsc,Y=void 0===F||F,V=n.closeOnOuterClick,oe=void 0===V||V,fe=n.styleBg,Ne=void 0===fe?{}:fe,xe=n.styleWindowWrap,tt=void 0===xe?{}:xe,ze=n.styleWindow,ot=void 0===ze?{}:ze,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Ie=void 0===ie?{}:ie,Ye=n.classBg,Le=void 0===Ye?null:Ye,_t=n.classWindowWrap,At=void 0===_t?null:_t,_n=n.classWindow,ci=void 0===_n?null:_n,on=n.classContent,Ni=void 0===on?null:on,pn=n.classCloseButton,Fr=void 0===pn?null:pn,$r=n.unstyled,wr=void 0!==$r&&$r,Or=n.setContext,Ai=void 0===Or?mQ:Or,Wr=n.transitionBg,jo=void 0===Wr?N7e:Wr,Fn=n.transitionBgProps,xt=void 0===Fn?{duration:250}:Fn,ui=n.transitionWindow,Fi=void 0===ui?jo:ui,Cr=n.transitionWindowProps,xo=void 0===Cr?xt:Cr,Qo=n.disableFocusTrap,gt=void 0!==Qo&&Qo,On={id:q,ariaLabel:Z,ariaLabelledBy:he,closeButton:N,closeOnEsc:Y,closeOnOuterClick:oe,styleBg:Ne,styleWindowWrap:tt,styleWindow:ot,styleContent:ne,styleCloseButton:Ie,classBg:Le,classWindowWrap:At,classWindow:ci,classContent:Ni,classCloseButton:Fr,transitionBg:jo,transitionBgProps:xt,transitionWindow:Fi,transitionWindowProps:xo,disableFocusTrap:gt,isTabbable:G,unstyled:wr},ai=Ze({},On),bi=null,Er=function(Ue){return Ue?Object.keys(Ue).reduce(function(Dn,ii){return"".concat(Dn,"; ").concat((hi=ii,hi.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ii]);var hi},""):""},qr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},ao=function(){e(6,a=Er(Object.assign({},{width:window.innerWidth,height:window.innerHeight},ai.styleBg))),e(7,l=Er(ai.styleWindowWrap)),e(8,c=Er(ai.styleWindow)),e(9,u=Er(ai.styleContent)),e(10,d=Er(ai.styleCloseButton)),e(11,h=ai.transitionBg),e(12,f=ai.transitionWindow)},Js=function(){},vr=Js,Ks=Js,qa=Js,Xa=Js,Ic=function(Ue){var ii=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hi=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,bi=wQ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,ai=Ze(Ze({},On),ii)),ao(),He(),e(13,vr=function(di){hi.onOpen&&hi.onOpen(di),S("open"),S("opening")}),e(14,Ks=function(di){hi.onClose&&hi.onClose(di),S("close"),S("closing")}),e(15,qa=function(di){hi.onOpened&&hi.onOpened(di),S("opened")}),e(16,Xa=function(di){hi.onClosed&&hi.onClosed(di),S("closed")})},we=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};bi&&(e(14,Ks=Ue.onClose||Ks),e(16,Xa=Ue.onClosed||Xa),e(2,bi=null),qe())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},qe=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};Ai(L,{open:Ic,close:we});var ut=!1;return Hu(function(){ut&&we()}),Wc(function(){e(47,ut=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,G=Ue.isTabbable),"show"in Ue&&e(23,z=Ue.show),"id"in Ue&&e(24,q=Ue.id),"key"in Ue&&e(25,L=Ue.key),"ariaLabel"in Ue&&e(26,Z=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,he=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,N=Ue.closeButton),"closeOnEsc"in Ue&&e(29,Y=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,oe=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Ne=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,tt=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,ot=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Ie=Ue.styleCloseButton),"classBg"in Ue&&e(36,Le=Ue.classBg),"classWindowWrap"in Ue&&e(37,At=Ue.classWindowWrap),"classWindow"in Ue&&e(38,ci=Ue.classWindow),"classContent"in Ue&&e(39,Ni=Ue.classContent),"classCloseButton"in Ue&&e(40,Fr=Ue.classCloseButton),"unstyled"in Ue&&e(0,wr=Ue.unstyled),"setContext"in Ue&&e(41,Ai=Ue.setContext),"transitionBg"in Ue&&e(42,jo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Fi=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,xo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,gt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&ut&&(qr(z)?Ic(z):we())},[wr,ai,bi,i,r,o,a,l,c,u,d,h,f,vr,Ks,qa,Xa,qr,we,function(Ue){if(ai.closeOnEsc&&bi&&"Escape"===Ue.key&&(Ue.preventDefault(),we()),bi&&"Tab"===Ue.key&&!ai.disableFocusTrap){var Dn=o.querySelectorAll("*"),ii=Array.from(Dn).filter(ai.isTabbable).sort(function(di,kr){return di.tabIndex-kr.tabIndex}),hi=ii.indexOf(document.activeElement);-1===hi&&Ue.shiftKey&&(hi=0),hi+=ii.length+(Ue.shiftKey?-1:1),ii[hi%=ii.length].focus(),Ue.preventDefault()}},function(Ue){!ai.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){ai.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),we())},G,z,q,L,Z,he,N,Y,oe,Ne,tt,ot,ne,Ie,Le,At,ci,Ni,Fr,Ai,jo,xt,Fi,xo,gt,ut,C,_,function(Ue){Vi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Jo,ro,Gu,Xd,Wu,qc,CQ=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,R7e,L7e,ys,{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},O7e,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Jo||(Jo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(ro||(ro={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Xd||(Xd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(qc||(qc={}));var wm=[{start:0,end:100}],Cm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},$7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),B7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),kQ=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),_N="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",xN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",V7e="NO",wN="SELF",CN="NEXT_INSIDE",H7e=(ql(lN={},qc.asc,"ascending"),ql(lN,qc.desc,"descending"),lN),z7e=0;function fb(){return++z7e}function Uf(t){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function oo(t){return Array.isArray(t)}function Mo(t){return null!==t&&"object"===Uf(t)&&t.constructor===Object}function SQ(t){return!(!t||"object"!==Uf(t))&&"add"===t.op}function DQ(t){return!(!t||"object"!==Uf(t))&&"remove"===t.op}function kN(t){return!(!t||"object"!==Uf(t))&&"replace"===t.op}function SN(t){return!(!t||"object"!==Uf(t))&&"copy"===t.op}function Mv(t){return!(!t||"object"!==Uf(t))&&"move"===t.op}function DN(t){return(DN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function U7e(t,n){return t===n}function TQ(t){return t.slice(0,t.length-1)}function EQ(t){return"object"===DN(t)&&null!==t}function pb(t){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function AQ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function G7e(t,n,e){return r=function(o,s){if("object"!==pb(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==pb(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===pb(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function TN(t){if(oo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Mo(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Mo(t)||oo(t))return EN(t,r,o);if(i){var s=W7e.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var W7e=/^\d+$/;function MQ(t,n,e){if(0===n.length)return e(t);if(!EQ(t))throw new Error("Path doesn't exist");var i=n[0];return EN(t,i,MQ(t[i],n.slice(1),e))}function AN(t,n){if(0===n.length)return t;if(!EQ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=TN(t);return oo(i)&&i.splice(parseInt(e),1),Mo(i)&&delete i[e],i}return t}var r=n[0];return EN(t,r,AN(t[r],n.slice(1)))}function MN(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return MQ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=TN(o);return s.splice(parseInt(r),0,e),s})}function Xc(t,n){return void 0!==t&&(0===n.length||null!==t&&Xc(t[n[0]],n.slice(1)))}function Xu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function ln(t){return t.map(IQ).join("")}function IQ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function IN(t,n){return t+IQ(n)}function Iv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:U7e;if(p.length=0?G=function(){var z="",U=!0;"-"==t[s]&&(z+=h()),z+="0"==t[s]?h():m(),"."==t[s]&&(z+=h()+m(),U=!1),"e"!=t[s]&&"E"!=t[s]||(z+=h(),"+"!=t[s]&&"-"!=t[s]||(z+=h()),z+=m(),U=!1);var q=+z;return a&&U&&(q>Number.MAX_SAFE_INTEGER||q="a"&&G<="f"?$+=G.charCodeAt()-n9e+10:G>="0"&&G<="9"?$+=+G:C()}return String.fromCharCode($)}function m(){for(var M="";t[s]>="0"&&t[s]<="9";)M+=h();if(M.length)return M;S(),_()}function g(M,$){v(M,$,y())}function v(M,$,G){i[M]=i[M]||{},i[M][$]=G}function y(){return{line:r,column:o,pos:s}}function _(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),_()}function S(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},O2.stringify=function(t,n,e){if(j2(t)){var i,r,o=0,s="object"==bn(e)?e.space:e;switch(bn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var r9e=/"|\\/g,o9e=/[\b]/g,s9e=/\f/g,a9e=/\n/g,l9e=/\r/g,c9e=/\t/g;function P2(t){return'"'+(t=t.replace(r9e,"\\$&").replace(s9e,"\\f").replace(o9e,"\\b").replace(a9e,"\\n").replace(l9e,"\\r").replace(c9e,"\\t"))+'"'}var u9e=/~/g,d9e=/\//g;function ON(t){return t.replace(u9e,"~0").replace(d9e,"~1")}function jN(t){return(jN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function PN(t){var n="function"==typeof Map?new Map:void 0;return PN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return LN(e,arguments,vb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),gb(r,e)},PN(t)}function LN(t,n,e){return(LN=RQ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&gb(a,o.prototype),a}).apply(null,arguments)}function RQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gb(t,n){return(gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function vb(t){return(vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var Gf=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&gb(l,c)}(a,PN(Error));var n,e,i,s=(n=a,e=RQ(),function(){var l,c=vb(n);if(e){var u=vb(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function h9e(t,n){if(n&&("object"===jN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function L2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function R2(t){return t>=48&&t<=57}function f9e(t){return t>=32&&t<=1114111}var p9e=/^[,:[\]{}()\n]$/;function $Q(t){return m9e.test(t)||t&&B2(t.charCodeAt(0))}var m9e=/^[[{\w-]$/;function g9e(t){return 10===t||13===t||9===t||8===t||12===t}function $2(t){return 32===t||10===t||9===t||13===t}function v9e(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function B2(t){return BQ(t)||RN(t)}function BQ(t){return 34===t||8220===t||8221===t}function RN(t){return 39===t||8216===t||8217===t||96===t||180===t}function yb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function km(t,n){var e=t.length;if(!$2(t.charCodeAt(e-1)))return t+n;for(;$2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function y9e(t,n,e){return t.substring(0,n)+t.substring(n+e)}var b9e={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_9e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yd(t){var n=0,e="";r()||function(){throw new Gf("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),$Q(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=km(e,",")),function(){for(var _=!0,C=!0;C;)_?_=!1:l(44)||(e=km(e,",")),C=r();C||(e=yb(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=yb(e,",")),n>=t.length)return e;function r(){o();var _=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&S<=57)for(n++;R2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);R2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);R2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),_}function o(){var _=n,C=s();do{(C=a())&&(C=s())}while(C);return n>_}function s(){for(var _,C="";(_=$2(t.charCodeAt(n)))||v9e(t.charCodeAt(n));)C+=_?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;$2(t.charCodeAt(n-1))&&n>0;)n--;var S=t.slice(C,n);return e+=JSON.stringify(S),!0}}function f(_){if(!R2(t.charCodeAt(n))){var C=t.slice(_,n);throw new Gf("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(_){throw new Gf("Invalid character "+JSON.stringify(_),n)}function m(){throw new Gf("Object key expected",n)}function g(){throw new Gf("Object value expected",n)}function v(){throw new Gf("Colon expected",n)}function y(_){for(var C=_+2;/\w/.test(t[C]);)C++;var S=t.slice(_,C);throw new Gf('Invalid unicode character "'.concat(S,'"'),n)}!function(){throw new Gf("Unexpected character "+JSON.stringify(t[n]),n)}()}function x9e(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ws(t){return parseInt(t,10)}function $N(t){return w9e.test(t)}var w9e=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Io(t){return"object"===bn(t)&&null!==t&&t.constructor===Object}function Ho(t){return"object"===bn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function BN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return BN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return BN(n)}catch{return!1}return!1}function VQ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function VN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return bn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Io(t))return"object";var e=n.stringify(t);return e&&$N(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var C9e=/^https?:\/\/\S+$/;function V2(t){return"string"==typeof t&&C9e.test(t)}function Nv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&($N(e)?n.parse(e):t)}var k9e=/^-?[0-9]+$/,zQ="object"==(typeof global>"u"?"undefined":bn(global))&&global&&global.Object===Object&&global,S9e="object"==(typeof self>"u"?"undefined":bn(self))&&self&&self.Object===Object&&self,Ca=zQ||S9e||Function("return this")(),ll=Ca.Symbol,UQ=Object.prototype,D9e=UQ.hasOwnProperty,T9e=UQ.toString,bb=ll?ll.toStringTag:void 0,E9e=Object.prototype.toString,GQ=ll?ll.toStringTag:void 0;function Ml(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":GQ&&GQ in Object(t)?function(n){var e=D9e.call(n,bb),i=n[bb];try{n[bb]=void 0;var r=!0}catch{}var o=T9e.call(n);return r&&(e?n[bb]=i:delete n[bb]),o}(t):E9e.call(t)}function ls(t){return null!=t&&"object"==bn(t)}function Yl(t){return"symbol"==bn(t)||ls(t)&&"[object Symbol]"==Ml(t)}function WQ(t){return"number"==typeof t?t:Yl(t)?NaN:+t}function Ko(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var lZ=aZ(nZ),K9e=/\{\n\/\* \[wrapped with (.+)\] \*/,Q9e=/,? & /,Z9e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function q2(t){return function(){return t}}var eVe=function(){try{var t=Dm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),X2=eVe,tVe=X2?function(t,n){return X2(t,"toString",{configurable:!0,enumerable:!1,value:q2(n),writable:!0})}:cl,UN=aZ(tVe);function Jc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var nVe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function uZ(t,n,e){var o,i=n+"";return UN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(Z9e,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Jc(nVe,function(s){var a="_."+s[0];o&s[1]&&!J2(r,a)&&r.push(a)}),r.sort()}((o=i.match(K9e))?o[1].split(Q9e):[],e)))}function dZ(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return zN(t)&&lZ(h,d),h.placeholder=i,uZ(h,t,n)}function Pv(t){return t.placeholder}var iVe=/^(?:0|[1-9]\d*)$/;function Zh(t,n){var e=bn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&iVe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Il(t){return null!=t&&Cb(t.length)&&!Kd(t)}function Nl(t,n,e){if(!zo(e))return!1;var i=bn(n);return!!("number"==i?Il(e)&&Zh(n,e.length):"string"==i&&n in e)&&Kc(e[n],t)}function Lv(t){return dr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Nl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,yZ=vZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,bZ=yZ&&yZ.exports===vZ?Ca.Buffer:void 0,nf=(bZ?bZ.isBuffer:void 0)||Q2,Uo={};function Cc(t){return function(n){return t(n)}}Uo["[object Float32Array]"]=Uo["[object Float64Array]"]=Uo["[object Int8Array]"]=Uo["[object Int16Array]"]=Uo["[object Int32Array]"]=Uo["[object Uint8Array]"]=Uo["[object Uint8ClampedArray]"]=Uo["[object Uint16Array]"]=Uo["[object Uint32Array]"]=!0,Uo["[object Arguments]"]=Uo["[object Array]"]=Uo["[object ArrayBuffer]"]=Uo["[object Boolean]"]=Uo["[object DataView]"]=Uo["[object Date]"]=Uo["[object Error]"]=Uo["[object Function]"]=Uo["[object Map]"]=Uo["[object Number]"]=Uo["[object Object]"]=Uo["[object RegExp]"]=Uo["[object Set]"]=Uo["[object String]"]=Uo["[object WeakMap]"]=!1;var _Z="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,Sb=_Z&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,qN=Sb&&Sb.exports===_Z&&zQ.process,Qc=function(){try{return Sb&&Sb.require&&Sb.require("util").types||qN&&qN.binding&&qN.binding("util")}catch{}}(),xZ=Qc&&Qc.isTypedArray,Tm=xZ?Cc(xZ):function(t){return ls(t)&&Cb(t.length)&&!!Uo[Ml(t)]},hVe=Object.prototype.hasOwnProperty;function wZ(t,n){var e=Pi(t),i=!e&&qf(t),r=!e&&!i&&nf(t),o=!e&&!i&&!r&&Tm(t),s=e||i||r||o,a=s?WN(t.length,String):[],l=a.length;for(var c in t)!n&&!hVe.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zh(c,l))||a.push(c);return a}function CZ(t,n){return function(e){return t(n(e))}}var fVe=CZ(Object.keys,Object),pVe=Object.prototype.hasOwnProperty;function XN(t){if(!kb(t))return fVe(t);var n=[];for(var e in Object(t))pVe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function qs(t){return Il(t)?wZ(t):XN(t)}var mVe=Object.prototype.hasOwnProperty,gVe=Lv(function(t,n){if(kb(n)||Il(n))Qd(n,qs(n),t);else for(var e in n)mVe.call(n,e)&&wb(t,e,n[e])}),kZ=gVe,vVe=Object.prototype.hasOwnProperty;function Fl(t){return Il(t)?wZ(t,!0):function yVe(t){if(!zo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=kb(t),e=[];for(var i in t)("constructor"!=i||!n&&vVe.call(t,i))&&e.push(i);return e}(t)}var bVe=Lv(function(t,n){Qd(n,Fl(n),t)}),Z2=bVe,_Ve=Lv(function(t,n,e,i){Qd(n,Fl(n),t,i)}),Rv=_Ve,xVe=Lv(function(t,n,e,i){Qd(n,qs(n),t,i)}),SZ=xVe,wVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CVe=/^\w*$/;function YN(t,n){if(Pi(t))return!1;var e=bn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Yl(t))||CVe.test(t)||!wVe.test(t)||null!=n&&t in Object(n)}var Db=Dm(Object,"create"),kVe=Object.prototype.hasOwnProperty,SVe=Object.prototype.hasOwnProperty;function Em(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},rf.prototype.set=function(t,n){var e=this.__data__,i=ek(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var Tb=Dm(Ca,"Map");function tk(t,n){var i,r,e=t.__data__;return("string"==(r=bn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function sf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?$a(a,n-1,e,i,r):Yf(r,a):i||(r[r.length]=a)}return r}function KN(t){return null!=t&&t.length?$a(t,1):[]}function af(t){return UN(pZ(t,void 0,KN),t+"")}var EZ=af(JN),ik=CZ(Object.getPrototypeOf,Object),AZ=Function.prototype.toString,FVe=Object.prototype.hasOwnProperty,OVe=AZ.call(Object);function Bv(t){if(!ls(t)||"[object Object]"!=Ml(t))return!1;var n=ik(t);if(null===n)return!0;var e=FVe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&AZ.call(e)==OVe}function rk(t){if(!ls(t))return!1;var n=Ml(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Bv(t)}var jVe=dr(function(t,n){try{return wc(t,void 0,n)}catch(e){return rk(e)?e:new Error(e)}}),QN=jVe;function ZN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Ui(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var eF=dr(function(t,n,e){var i=1;if(e.length){var r=Wf(e,Pv(eF));i|=32}return ef(t,i,n,e,r)});eF.placeholder={};var tF=eF,PVe=af(function(t,n){return Jc(n,function(e){e=Zd(e),tf(t,e,tF(t[e],t))}),t}),MZ=PVe,nF=dr(function(t,n,e){var i=3;if(e.length){var r=Wf(e,Pv(nF));i|=32}return ef(n,i,t,e,r)});nF.placeholder={};var IZ=nF;function Zc(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:Zc(t,n,e)}var LVe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Vv(t){return LVe.test(t)}var iF="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rF="\\ud83c[\\udffb-\\udfff]",NZ="[^\\ud800-\\udfff]",FZ="(?:\\ud83c[\\udde6-\\uddff]){2}",OZ="[\\ud800-\\udbff][\\udc00-\\udfff]",jZ="(?:"+iF+"|"+rF+")?",$Ve="[\\ufe0e\\ufe0f]?"+jZ+"(?:\\u200d(?:"+[NZ,FZ,OZ].join("|")+")[\\ufe0e\\ufe0f]?"+jZ+")*",BVe="(?:"+[NZ+iF+"?",iF,FZ,OZ,"[\\ud800-\\udfff]"].join("|")+")",VVe=RegExp(rF+"(?="+rF+")|"+BVe+$Ve,"g");function Ku(t){return Vv(t)?function(n){return n.match(VVe)||[]}(t):function(n){return n.split("")}(t)}function PZ(t){return function(n){var e=Vv(n=Jr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?Jf(e,1).join(""):n.slice(1);return i[t]()+r}}var ok=PZ("toUpperCase");function oF(t){return ok(Jr(t).toLowerCase())}function sF(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function JZ(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Mm(xc(t),n,e)}function Qu(t){var n=this.__data__=new rf(t);this.size=n.size}function KZ(t,n){return t&&Qd(n,qs(n),t)}Qu.prototype.clear=function(){this.__data__=new rf,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof rf){var i=e.__data__;if(!Tb||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new sf(i)}return e.set(t,n),this.size=e.size,this};var QZ="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,ZZ=QZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,eee=ZZ&&ZZ.exports===QZ?Ca.Buffer:void 0,tee=eee?eee.allocUnsafe:void 0;function nee(t,n){if(n)return t.slice();var e=t.length,i=tee?tee(e):new t.constructor(e);return t.copy(i),i}function Kf(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Nm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&_-c>=o}function g(){var C,S,_=Mb();if(m(_))return v(_);a=setTimeout(g,(S=n-((C=_)-l),d?CHe(S,o-(C-c)):S))}function v(_){return a=void 0,h&&i?f(_):(i=r=void 0,s)}function y(){var _=Mb(),C=m(_);if(i=arguments,r=this,l=_,C){if(void 0===a)return function p(_){return c=_,a=setTimeout(g,n),u?f(_):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,zo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?wHe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Mb())},y}function Fee(t,n){return null==t||t!=t?n:t}var Oee=Object.prototype,kHe=Oee.hasOwnProperty,SHe=dr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Nl(n[0],n[1],r)&&(i=1);++e=200&&(o=Eb,s=!1,n=new Nm(n));e:for(;++r=0&&t.slice(e,r)==n}function Qee(t){return function(n){var i,r,o,e=eh(n);return"[object Map]"==e?CF(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Ko(r,function(o){return[o,i[o]]})}(n,t(n))}}var vk=Qee(qs),yk=Qee(Fl),FHe=aF({"&":"&","<":"<",">":">",'"':""","'":"'"}),Zee=/[&<>"']/g,OHe=RegExp(Zee.source);function PF(t){return(t=Jr(t))&&OHe.test(t)?t.replace(Zee,FHe):t}var ete=/[\\^$.*+?()[\]{}|]/g,jHe=RegExp(ete.source);function tte(t){return(t=Jr(t))&&jHe.test(t)?t.replace(ete,"\\$&"):t}function nte(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Ui(l))<0&&(l+=c),l=a>l?0:LF(l);a-1?r[o?n[s]:s]:void 0}}var LHe=Math.max;function RF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=LHe(i+r,0)),Y2(t,Li(n),r)}var lte=ate(RF);function cte(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function ute(t,n){return cte(t,Li(n),th)}var RHe=Math.max,$He=Math.min;function $F(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Ui(e),r=e<0?RHe(i+r,0):$He(r,i-1)),Y2(t,Li(n),r,!0)}var dte=ate($F);function hte(t,n){return cte(t,Li(n),jF)}function sa(t){return t&&t.length?t[0]:void 0}function fte(t,n){var e=-1,i=Il(t)?Array(t.length):[];return Qf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Wv(t,n){return(Pi(t)?Ko:fte)(t,Li(n))}function pte(t,n){return $a(Wv(t,n),1)}function mte(t,n){return $a(Wv(t,n),1/0)}function gte(t,n,e){return e=void 0===e?1:Ui(e),$a(Wv(t,n),e)}function vte(t){return null!=t&&t.length?$a(t,1/0):[]}function yte(t,n){return null!=t&&t.length?$a(t,n=void 0===n?1:Ui(n)):[]}function bte(t){return ef(t,512)}var _te=uF("floor");function xte(t){return af(function(n){var e=n.length,i=e,r=Yc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==W2(o))var s=new Yc([],!0)}for(i=s?i:e;++in}function _k(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Ite=_k(BF),Nte=_k(function(t,n){return t>=n}),HHe=Object.prototype.hasOwnProperty;function zHe(t,n){return null!=t&&HHe.call(t,n)}function Fte(t,n){return null!=t&&Cee(t,n,zHe)}var UHe=Math.max,GHe=Math.min;function Ote(t,n,e){return n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),(i=t=xc(t))>=GHe(r=n,o=e)&&i-1:!!r&&jv(t,n,e)>-1}var qHe=Math.max;function Pte(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=qHe(i+r,0)),jv(t,n,r)}function Xi(t){return null!=t&&t.length?Zc(t,0,-1):[]}var XHe=Math.min;function HF(t,n,e){for(var i=e?OF:J2,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Ko(u,Cc(n))),l=XHe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Nm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function cne(t){return void 0===t}function une(t){return ls(t)&&"[object WeakMap]"==eh(t)}function dne(t){return ls(t)&&"[object WeakSet]"==Ml(t)}function hne(t){return Li("function"==typeof t?t:eu(t,1))}var oze=Array.prototype.join;function fne(t,n){return null==t?"":oze.call(t,n)}var sze=zv(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),pne=sze,aze=dk(function(t,n,e){tf(t,e,n)}),mne=aze,lze=Math.max,cze=Math.min;function gne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Ui(e))<0?lze(i+r,0):cze(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):Y2(t,cZ,r,!0)}var uze=zv(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),vne=uze,yne=PZ("toLowerCase");function WF(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function One(t,n){var e=t.length;if(e)return Zh(n+=n<0?e:0,e)?t[n]:void 0}function jne(t,n){return t&&t.length?One(t,Ui(n)):void 0}function Pne(t){return t=Ui(t),dr(function(n){return One(n,t)})}function ZF(t,n){return null==(t=Ute(t,n=Xf(n,t)))||delete t[Zd(Ln(n))]}function pze(t){return Bv(t)?void 0:t}var mze=af(function(t,n){var e={};if(null==t)return e;var i=!1;n=Ko(n,function(o){return o=Xf(o,t),i||(i=o.length>1),o}),Qd(t,pF(t),e),i&&(e=eu(e,7,pze));for(var r=n.length;r--;)ZF(e,n[r]);return e}),Lne=mze;function jb(t,n,e,i){if(!zo(t))return t;for(var r=-1,o=(n=Xf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(fte(t,function(o,s,a){return{criteria:Ko(n,function(c){return c(o)}),index:++i,value:o}}))}function zne(t,n,e,i){return null==t?[]:(Pi(n)||(n=null==n?[]:[n]),Pi(e=i?void 0:e)||(e=null==e?[]:[e]),Hne(t,n,e))}function tO(t){return af(function(n){return n=Ko(n,Cc(Li)),dr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var Une=tO(Ko),vze=Math.min,yze=dr(function(t,n){var e=(n=1==n.length&&Pi(n[0])?Ko(n[0],Cc(Li)):Ko($a(n,1),Cc(Li))).length;return dr(function(i){for(var r=-1,o=vze(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=bze(n/2))&&(t+=t)}while(n);return e}var _ze=TF("length"),iO="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rO="\\ud83c[\\udffb-\\udfff]",Xne="[^\\ud800-\\udfff]",Yne="(?:\\ud83c[\\udde6-\\uddff]){2}",Jne="[\\ud800-\\udbff][\\udc00-\\udfff]",Kne="(?:"+iO+"|"+rO+")?",wze="[\\ufe0e\\ufe0f]?"+Kne+"(?:\\u200d(?:"+[Xne,Yne,Jne].join("|")+")[\\ufe0e\\ufe0f]?"+Kne+")*",Cze="(?:"+[Xne+iO+"?",iO,Yne,Jne,"[\\ud800-\\udfff]"].join("|")+")",Qne=RegExp(rO+"(?="+rO+")|"+Cze+wze,"g");function Jv(t){return Vv(t)?function(n){for(var e=Qne.lastIndex=0;Qne.test(n);)++e;return e}(t):_ze(t)}var kze=Math.ceil;function Ck(t,n){var e=(n=void 0===n?" ":_c(n)).length;if(e<2)return e?nO(n,t):n;var i=nO(n,kze(t/Jv(n)));return Vv(n)?Jf(Ku(i),0,t).join(""):i.slice(0,t)}var Sze=Math.ceil,Dze=Math.floor;function Zne(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return Ck(Dze(r),e)+t+Ck(Sze(r),e)}function eie(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;return n&&i-1;)a!==t&&sie.call(a,l,1),sie.call(t,l,1);return t}function dO(t,n){return t&&t.length&&n&&n.length?uO(t,n):t}var aie=dr(dO);function lie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,Li(e)):t}function cie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,void 0,e):t}var Nze=Array.prototype.splice;function uie(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;Zh(r)?Nze.call(t,r,1):ZF(t,r)}}return t}var Fze=af(function(t,n){var e=null==t?0:t.length,i=JN(t,n);return uie(t,Ko(n,function(r){return Zh(r,e)?+r:r}).sort(Vne)),i}),die=Fze,Oze=Math.floor,jze=Math.random;function hO(t,n){return t+Oze(jze()*(n-t+1))}var Pze=parseFloat,Lze=Math.min,Rze=Math.random;function hie(t,n,e){if(e&&"boolean"!=typeof e&&Nl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Jd(t),void 0===n?(n=t,t=0):n=Jd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=Rze();return Lze(t+r*(n-t+Pze("1e-"+((r+"").length-1))),n)}return hO(t,n)}var $ze=Math.ceil,Bze=Math.max;function fie(t){return function(n,e,i){return i&&"number"!=typeof i&&Nl(n,e,i)&&(e=i=void 0),n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),function(r,o,s,a){for(var l=-1,c=Bze($ze((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Nl(t,n[0],n[1])?n=[]:e>2&&Nl(n[0],n[1],n[2])&&(n=[n[0]]),Hne(t,$a(n,1),[])}),pO=Kze,Qze=Math.floor,Zze=Math.min;function mO(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Yl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Yl(s)&&(e?s<=n:s>>0)?(t=Jr(t))&&("string"==typeof n||null!=n&&!xk(n))&&!(n=_c(n))&&Vv(t)?Jf(Ku(t),0,e):t.split(n,e):[]}var eUe=Math.max;function Wie(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:eUe(Ui(n),0),dr(function(e){var i=e[n],r=Jf(e,0,n);return i&&Yf(r,i),wc(t,this,r)})}var tUe=zv(function(t,n,e){return t+(e?" ":"")+ok(n)}),qie=tUe;function Xie(t,n,e){return t=Jr(t),e=null==e?0:Mm(Ui(e),0,t.length),n=_c(n),t.slice(e,e+n.length)==n}function Yie(){return{}}function Jie(){return""}function Kie(){return!0}var Qie=H2(function(t,n){return t-n},0);function Zie(t){return t&&t.length?XF(t,cl):0}function ere(t,n){return t&&t.length?XF(t,Li(n)):0}function tre(t){var n=null==t?0:t.length;return n?Zc(t,1,n):[]}function nre(t,n,e){return t&&t.length?Zc(t,0,(n=e||void 0===n?1:Ui(n))<0?0:n):[]}function ire(t,n,e){var i=null==t?0:t.length;return i?Zc(t,(n=i-(n=e||void 0===n?1:Ui(n)))<0?0:n,i):[]}function rre(t,n){return t&&t.length?mk(t,Li(n),!1,!0):[]}function ore(t,n){return t&&t.length?mk(t,Li(n)):[]}function sre(t,n){return n(t),t}var are=Object.prototype,nUe=are.hasOwnProperty;function lre(t,n,e,i){return void 0===t||Kc(t,are[e])&&!nUe.call(i,e)?n:t}var iUe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function rUe(t){return"\\"+iUe[t]}var cre=/<%=([\s\S]+?)%>/g,Tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:cre,variable:"",imports:{_:{escape:PF}}},oUe=/\b__p \+= '';/g,sUe=/\b(__p \+=) '' \+/g,aUe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lUe=/[()=,{}\[\]\/\s]/,cUe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ek=/($^)/,uUe=/['\n\r\u2028\u2029\\]/g,ure=Object.prototype.hasOwnProperty;function dre(t,n,e){var i=Tk.imports._.templateSettings||Tk;e&&Nl(t,n,e)&&(n=void 0),t=Jr(t),n=Rv({},n,i,lre);var r,o,s=Rv({},n.imports,i.imports,lre),a=qs(s),l=VF(s,a),c=0,u=n.interpolate||Ek,d="__p += '",h=RegExp((n.escape||Ek).source+"|"+u.source+"|"+(u===cre?cUe:Ek).source+"|"+(n.evaluate||Ek).source+"|$","g"),f=ure.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,_,C,S){return y||(y=_),d+=t.slice(c,S).replace(uUe,rUe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=S+g.length,g}),d+="';\n";var p=ure.call(n,"variable")&&n.variable;if(p){if(lUe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(oUe,""):d).replace(sUe,"$1").replace(aUe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=QN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,rk(m))throw m;return m}function gO(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return zo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Gv(t,n,{leading:i,maxWait:n,trailing:r})}function Kv(t,n){return n(t)}var dUe=Math.min;function vO(t,n){if((t=Ui(t))<1||t>9007199254740991)return[];var e=4294967295,i=dUe(t,4294967295);t-=4294967295;for(var r=WN(i,n=nh(n));++e-1;);return e}function bre(t,n){for(var e=-1,i=t.length;++e-1;);return e}function _re(t,n,e){if((t=Jr(t))&&(e||void 0===n))return KQ(t);if(!t||!(n=_c(n)))return t;var i=Ku(t),r=Ku(n);return Jf(i,bre(i,r),yre(i,r)+1).join("")}function xre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.slice(0,JQ(t)+1);if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,0,yre(i,Ku(n))+1).join("")}var hUe=/^\s+/;function wre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.replace(hUe,"");if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,bre(i,Ku(n))).join("")}var fUe=/\w*$/;function Cre(t,n){var e=30,i="...";if(zo(n)){var r="separator"in n?n.separator:r;e="length"in n?Ui(n.length):e,i="omission"in n?_c(n.omission):i}var o=(t=Jr(t)).length;if(Vv(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-Jv(i);if(a<1)return i;var l=s?Jf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),xk(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Jr(fUe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(_c(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function kre(t){return GN(t,1)}var pUe=aF({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Sre=/&(?:amp|lt|gt|quot|#39);/g,mUe=RegExp(Sre.source);function Dre(t){return(t=Jr(t))&&mUe.test(t)?t.replace(Sre,pUe):t}var gUe=Uv&&1/lk(new Uv([,-0]))[1]==1/0?function(t){return new Uv(t)}:go,vUe=gUe;function Zf(t,n,e){var i=-1,r=J2,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=OF;else if(o>=200){var c=n?null:vUe(t);if(c)return lk(c);s=!1,r=Eb,l=new Nm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Tr&&Zh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Kv,args:[r],thisArg:void 0}),new Yc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Vre=CUe;function Hre(){return dF(this)}function zre(){var t=this.__wrapped__;if(t instanceof Tr){var n=t;return this.__actions__.length&&(n=new Tr(this)),(n=n.reverse()).__actions__.push({func:Kv,args:[kk],thisArg:void 0}),new Yc(n,this.__chain__)}return this.thru(kk)}function _O(t,n,e){var i=t.length;if(i<2)return i?Zf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,bO(t,e)}),Kre=SUe,Gn={chunk:YZ,compact:mee,concat:gee,difference:Vee,differenceBy:Hee,differenceWith:zee,drop:Gee,dropRight:Wee,dropRightWhile:qee,dropWhile:Xee,fill:rte,findIndex:RF,findLastIndex:$F,first:sa,flatten:KN,flattenDeep:vte,flattenDepth:yte,fromPairs:Ete,head:sa,indexOf:Pte,initial:Xi,intersection:Lte,intersectionBy:Rte,intersectionWith:$te,join:fne,last:Ln,lastIndexOf:gne,nth:jne,pull:aie,pullAll:dO,pullAllBy:lie,pullAllWith:cie,pullAt:die,remove:_ie,reverse:kk,slice:Fie,sortedIndex:Pie,sortedIndexBy:Lie,sortedIndexOf:Rie,sortedLastIndex:$ie,sortedLastIndexBy:Bie,sortedLastIndexOf:Vie,sortedUniq:zie,sortedUniqBy:Uie,tail:tre,take:nre,takeRight:ire,takeRightWhile:rre,takeWhile:ore,union:Tre,unionBy:Ere,unionWith:Are,uniq:Mre,uniqBy:Ire,uniqWith:Nre,unzip:Ak,unzipWith:bO,without:$re,xor:Ure,xorBy:Gre,xorWith:Wre,zip:qre,zipObject:Yre,zipObjectDeep:Jre,zipWith:Kre},vo={countBy:Iee,each:gk,eachRight:Nb,every:ite,filter:ste,find:lte,findLast:dte,flatMap:pte,flatMapDeep:mte,flatMapDepth:gte,forEach:gk,forEachRight:Nb,groupBy:qv,includes:jte,invokeMap:Wte,keyBy:mne,map:Wv,orderBy:zne,partition:lO,reduce:vie,reduceRight:yie,reject:bie,sample:Tie,sampleSize:Eie,shuffle:Iie,size:Nie,some:jie,sortBy:pO},DUe={now:Mb},_s={after:QQ,ary:GN,before:ZN,bind:tF,bindKey:IZ,curry:hk,curryRight:fk,debounce:Gv,defer:$ee,delay:Bee,flip:bte,memoize:$v,negate:Yv,once:Bne,overArgs:Gne,partial:sO,partialRight:iie,rearg:mie,rest:Cie,spread:Wie,throttle:gO,unary:kre,wrap:Bre},mi={castArray:qZ,clone:hee,cloneDeep:fee,cloneDeepWith:_F,cloneWith:pee,conformsTo:Eee,eq:Kc,gt:Ite,gte:Nte,isArguments:qf,isArray:Pi,isArrayBuffer:Xte,isArrayLike:Il,isArrayLikeObject:bs,isBoolean:Yte,isBuffer:nf,isDate:Kte,isElement:Qte,isEmpty:Hi,isEqual:or,isEqualWith:Zte,isError:rk,isFinite:ene,isFunction:Kd,isInteger:UF,isLength:Cb,isMap:yF,isMatch:tne,isMatchWith:nne,isNaN:ine,isNative:rne,isNil:one,isNull:sne,isNumber:GF,isObject:zo,isObjectLike:ls,isPlainObject:Bv,isRegExp:xk,isSafeInteger:lne,isSet:bF,isString:Fb,isSymbol:Yl,isTypedArray:Tm,isUndefined:cne,isWeakMap:une,isWeakSet:dne,lt:bne,lte:_ne,toArray:KF,toFinite:Jd,toInteger:Ui,toLength:LF,toNumber:xc,toPlainObject:NF,toSafeInteger:mre,toString:Jr},Ol={add:YQ,ceil:XZ,divide:Uee,floor:_te,max:kne,maxBy:Sne,mean:Tne,meanBy:Ene,min:Nne,minBy:Xv,multiply:Fne,round:Sie,subtract:Qie,sum:Zie,sumBy:ere},TUe=JZ,EUe=Ote,AUe=hie,Ii={assign:kZ,assignIn:Z2,assignInWith:Rv,assignWith:SZ,at:EZ,create:Nee,defaults:jee,defaultsDeep:Lee,entries:vk,entriesIn:yk,extend:Z2,extendWith:Rv,findKey:ute,findLastKey:hte,forIn:kte,forInRight:Ste,forOwn:Dte,forOwnRight:Tte,functions:Ate,functionsIn:Mte,get:nk,has:Fte,hasIn:uk,invert:Vte,invertBy:zte,invoke:Gte,keys:qs,keysIn:Fl,mapKeys:xne,mapValues:qF,merge:Ane,mergeWith:FF,omit:Lne,omitBy:$ne,pick:rie,pickBy:eO,result:kie,set:Aie,setWith:Mie,toPairs:vk,toPairsIn:yk,transform:vre,unset:Fre,update:jre,updateWith:Pre,values:Fm,valuesIn:Rre},ih={at:Vre,chain:dF,commit:xF,lodash:me,next:QF,plant:cO,reverse:zre,tap:sre,thru:Kv,toIterator:yO,toJSON:Om,value:Om,valueOf:Om,wrapperChain:Hre},Kr={camelCase:WZ,capitalize:oF,deburr:lF,endsWith:Kee,escape:PF,escapeRegExp:tte,kebabCase:pne,lowerCase:vne,lowerFirst:yne,pad:Zne,padEnd:eie,padStart:tie,parseInt:nie,repeat:xie,replace:wie,snakeCase:Oie,split:Gie,startCase:qie,startsWith:Xie,template:dre,templateSettings:Tk,toLower:fre,toUpper:gre,trim:_re,trimEnd:xre,trimStart:wre,truncate:Cre,unescape:Dre,upperCase:Lre,upperFirst:ok,words:cF},so={attempt:QN,bindAll:MZ,cond:See,conforms:Tee,constant:q2,defaultTo:Fee,flow:wte,flowRight:Cte,identity:cl,iteratee:hne,matches:wne,matchesProperty:Cne,method:Mne,methodOf:Ine,mixin:YF,noop:go,nthArg:Pne,over:Une,overEvery:Wne,overSome:qne,property:EF,propertyOf:oie,range:fO,rangeRight:pie,stubArray:sk,stubFalse:Q2,stubObject:Yie,stubString:Jie,stubTrue:Kie,times:vO,toPath:pre,uniqueId:ep},MUe=Math.max,IUe=Math.min,NUe=Math.min,FUe=Array.prototype,Qre=Object.prototype.hasOwnProperty,Zre=ll?ll.iterator:void 0,OUe=Math.max,eoe=Math.min,wO=function(t){return function(n,e,i){if(null==i){var r=zo(e),o=r&&qs(e),s=o&&o.length&&bk(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(YF);me.after=_s.after,me.ary=_s.ary,me.assign=Ii.assign,me.assignIn=Ii.assignIn,me.assignInWith=Ii.assignInWith,me.assignWith=Ii.assignWith,me.at=Ii.at,me.before=_s.before,me.bind=_s.bind,me.bindAll=so.bindAll,me.bindKey=_s.bindKey,me.castArray=mi.castArray,me.chain=ih.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=so.cond,me.conforms=so.conforms,me.constant=so.constant,me.countBy=vo.countBy,me.create=Ii.create,me.curry=_s.curry,me.curryRight=_s.curryRight,me.debounce=_s.debounce,me.defaults=Ii.defaults,me.defaultsDeep=Ii.defaultsDeep,me.defer=_s.defer,me.delay=_s.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=vo.filter,me.flatMap=vo.flatMap,me.flatMapDeep=vo.flatMapDeep,me.flatMapDepth=vo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=_s.flip,me.flow=so.flow,me.flowRight=so.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Ii.functions,me.functionsIn=Ii.functionsIn,me.groupBy=vo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Ii.invert,me.invertBy=Ii.invertBy,me.invokeMap=vo.invokeMap,me.iteratee=so.iteratee,me.keyBy=vo.keyBy,me.keys=qs,me.keysIn=Ii.keysIn,me.map=vo.map,me.mapKeys=Ii.mapKeys,me.mapValues=Ii.mapValues,me.matches=so.matches,me.matchesProperty=so.matchesProperty,me.memoize=_s.memoize,me.merge=Ii.merge,me.mergeWith=Ii.mergeWith,me.method=so.method,me.methodOf=so.methodOf,me.mixin=wO,me.negate=Yv,me.nthArg=so.nthArg,me.omit=Ii.omit,me.omitBy=Ii.omitBy,me.once=_s.once,me.orderBy=vo.orderBy,me.over=so.over,me.overArgs=_s.overArgs,me.overEvery=so.overEvery,me.overSome=so.overSome,me.partial=_s.partial,me.partialRight=_s.partialRight,me.partition=vo.partition,me.pick=Ii.pick,me.pickBy=Ii.pickBy,me.property=so.property,me.propertyOf=so.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=so.range,me.rangeRight=so.rangeRight,me.rearg=_s.rearg,me.reject=vo.reject,me.remove=Gn.remove,me.rest=_s.rest,me.reverse=Gn.reverse,me.sampleSize=vo.sampleSize,me.set=Ii.set,me.setWith=Ii.setWith,me.shuffle=vo.shuffle,me.slice=Gn.slice,me.sortBy=vo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Kr.split,me.spread=_s.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=ih.tap,me.throttle=_s.throttle,me.thru=Kv,me.toArray=mi.toArray,me.toPairs=Ii.toPairs,me.toPairsIn=Ii.toPairsIn,me.toPath=so.toPath,me.toPlainObject=mi.toPlainObject,me.transform=Ii.transform,me.unary=_s.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Ii.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Ii.update,me.updateWith=Ii.updateWith,me.values=Ii.values,me.valuesIn=Ii.valuesIn,me.without=Gn.without,me.words=Kr.words,me.wrap=_s.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Ii.toPairs,me.entriesIn=Ii.toPairsIn,me.extend=Ii.assignIn,me.extendWith=Ii.assignInWith,wO(me,me),me.add=Ol.add,me.attempt=so.attempt,me.camelCase=Kr.camelCase,me.capitalize=Kr.capitalize,me.ceil=Ol.ceil,me.clamp=TUe,me.clone=mi.clone,me.cloneDeep=mi.cloneDeep,me.cloneDeepWith=mi.cloneDeepWith,me.cloneWith=mi.cloneWith,me.conformsTo=mi.conformsTo,me.deburr=Kr.deburr,me.defaultTo=so.defaultTo,me.divide=Ol.divide,me.endsWith=Kr.endsWith,me.eq=mi.eq,me.escape=Kr.escape,me.escapeRegExp=Kr.escapeRegExp,me.every=vo.every,me.find=vo.find,me.findIndex=Gn.findIndex,me.findKey=Ii.findKey,me.findLast=vo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Ii.findLastKey,me.floor=Ol.floor,me.forEach=vo.forEach,me.forEachRight=vo.forEachRight,me.forIn=Ii.forIn,me.forInRight=Ii.forInRight,me.forOwn=Ii.forOwn,me.forOwnRight=Ii.forOwnRight,me.get=Ii.get,me.gt=mi.gt,me.gte=mi.gte,me.has=Ii.has,me.hasIn=Ii.hasIn,me.head=Gn.head,me.identity=cl,me.includes=vo.includes,me.indexOf=Gn.indexOf,me.inRange=EUe,me.invoke=Ii.invoke,me.isArguments=mi.isArguments,me.isArray=Pi,me.isArrayBuffer=mi.isArrayBuffer,me.isArrayLike=mi.isArrayLike,me.isArrayLikeObject=mi.isArrayLikeObject,me.isBoolean=mi.isBoolean,me.isBuffer=mi.isBuffer,me.isDate=mi.isDate,me.isElement=mi.isElement,me.isEmpty=mi.isEmpty,me.isEqual=mi.isEqual,me.isEqualWith=mi.isEqualWith,me.isError=mi.isError,me.isFinite=mi.isFinite,me.isFunction=mi.isFunction,me.isInteger=mi.isInteger,me.isLength=mi.isLength,me.isMap=mi.isMap,me.isMatch=mi.isMatch,me.isMatchWith=mi.isMatchWith,me.isNaN=mi.isNaN,me.isNative=mi.isNative,me.isNil=mi.isNil,me.isNull=mi.isNull,me.isNumber=mi.isNumber,me.isObject=zo,me.isObjectLike=mi.isObjectLike,me.isPlainObject=mi.isPlainObject,me.isRegExp=mi.isRegExp,me.isSafeInteger=mi.isSafeInteger,me.isSet=mi.isSet,me.isString=mi.isString,me.isSymbol=mi.isSymbol,me.isTypedArray=mi.isTypedArray,me.isUndefined=mi.isUndefined,me.isWeakMap=mi.isWeakMap,me.isWeakSet=mi.isWeakSet,me.join=Gn.join,me.kebabCase=Kr.kebabCase,me.last=Ln,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Kr.lowerCase,me.lowerFirst=Kr.lowerFirst,me.lt=mi.lt,me.lte=mi.lte,me.max=Ol.max,me.maxBy=Ol.maxBy,me.mean=Ol.mean,me.meanBy=Ol.meanBy,me.min=Ol.min,me.minBy=Ol.minBy,me.stubArray=so.stubArray,me.stubFalse=so.stubFalse,me.stubObject=so.stubObject,me.stubString=so.stubString,me.stubTrue=so.stubTrue,me.multiply=Ol.multiply,me.nth=Gn.nth,me.noop=so.noop,me.now=DUe.now,me.pad=Kr.pad,me.padEnd=Kr.padEnd,me.padStart=Kr.padStart,me.parseInt=Kr.parseInt,me.random=AUe,me.reduce=vo.reduce,me.reduceRight=vo.reduceRight,me.repeat=Kr.repeat,me.replace=Kr.replace,me.result=Ii.result,me.round=Ol.round,me.sample=vo.sample,me.size=vo.size,me.snakeCase=Kr.snakeCase,me.some=vo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Kr.startCase,me.startsWith=Kr.startsWith,me.subtract=Ol.subtract,me.sum=Ol.sum,me.sumBy=Ol.sumBy,me.template=Kr.template,me.times=so.times,me.toFinite=mi.toFinite,me.toInteger=Ui,me.toLength=mi.toLength,me.toLower=Kr.toLower,me.toNumber=mi.toNumber,me.toSafeInteger=mi.toSafeInteger,me.toString=mi.toString,me.toUpper=Kr.toUpper,me.trim=Kr.trim,me.trimEnd=Kr.trimEnd,me.trimStart=Kr.trimStart,me.truncate=Kr.truncate,me.unescape=Kr.unescape,me.uniqueId=so.uniqueId,me.upperCase=Kr.upperCase,me.upperFirst=Kr.upperFirst,me.each=vo.forEach,me.eachRight=vo.forEachRight,me.first=Gn.head,wO(me,(xO={},th(me,function(t,n){Qre.call(me.prototype,n)||(xO[n]=t)}),xO),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Kr.templateSettings).imports._=me,Jc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Jc(["drop","take"],function(t,n){Tr.prototype[t]=function(e){e=void 0===e?1:OUe(Ui(e),0);var i=this.__filtered__&&!n?new Tr(this):this.clone();return i.__filtered__?i.__takeCount__=eoe(e,i.__takeCount__):i.__views__.push({size:eoe(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Tr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Jc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Tr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Li(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Jc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Tr.prototype[t]=function(){return this[e](1).value()[0]}}),Jc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Tr.prototype[t]=function(){return this.__filtered__?new Tr(this):this[e](1)}}),Tr.prototype.compact=function(){return this.filter(cl)},Tr.prototype.find=function(t){return this.filter(t).head()},Tr.prototype.findLast=function(t){return this.reverse().find(t)},Tr.prototype.invokeMap=dr(function(t,n){return"function"==typeof t?new Tr(this):this.map(function(e){return Ob(e,t,n)})}),Tr.prototype.reject=function(t){return this.filter(Yv(Li(t)))},Tr.prototype.slice=function(t,n){t=Ui(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Tr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Ui(n))<0?e.dropRight(-n):e.take(n-t)),e)},Tr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tr.prototype.toArray=function(){return this.take(4294967295)},th(Tr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Tr,c=a[0],u=l||Pi(s),d=function(v){var y=r.apply(me,Yf([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Tr(this);var g=t.apply(s,a);return g.__actions__.push({func:Kv,args:[d],thisArg:void 0}),new Yc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Jc(["pop","push","shift","sort","splice","unshift"],function(t){var n=FUe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Pi(o)?o:[],r)}return this[e](function(s){return n.apply(Pi(s)?s:[],r)})}}),th(Tr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";Qre.call(Ov,i)||(Ov[i]=[]),Ov[i].push({name:n,func:e})}}),Ov[K2(void 0,2).name]=[{name:"wrapper",func:void 0}],Tr.prototype.clone=function(){var t=new Tr(this.__wrapped__);return t.__actions__=Jl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Jl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Jl(this.__views__),t},Tr.prototype.reverse=function(){if(this.__filtered__){var t=new Tr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Tr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Pi(t),i=n<0,r=e?t.length:0,o=function(S,M,$){for(var G=-1,R=$.length;++G1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Io(l)||n&&c.length>0)&&(e[ln(c)]=!0),Io(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function noe(t){return Ze({},t)}function ioe(t){return Object.values(t)}function roe(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(si(o))),r}function kO(t,n){try{return n.parse(t)}catch{return n.parse(Yd(t))}}function ooe(t,n){try{return kO(t,n)}catch{return}}function Ik(t,n){t=t.replace(aoe,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function soe(t){t=t.replace(aoe,"");try{return Yd(t)}catch{}try{var n=Yd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var aoe=/,\s*$/;function Nk(t,n){var e=uoe.exec(n);if(e){var i=Ws(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Qv(t)?t:{text:e.stringify(t.json,null,n)}}function loe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return DO(t)?t:{json:n.parse(t.text)}}function Fk(t,n,e){return Zv(t,n,e).text}function coe(t,n){return function RUe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Qv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Io(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var uoe=/(position|char) (\d+)/,$Ue=/line (\d+)/,BUe=/column (\d+)/;function hoe(t){return VUe.test(t)&&t.length>2}var VUe=/^[[{]\S/;function TO(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?HUe:zUe:e?UUe:GUe}var HUe={escapeValue:function(t){return foe(goe(String(t)))},unescapeValue:function(t){return voe(poe(t))}},zUe={escapeValue:function(t){return goe(String(t))},unescapeValue:function(t){return voe(t)}},UUe={escapeValue:function(t){return foe(String(t))},unescapeValue:function(t){return poe(t)}},GUe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function foe(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function poe(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return moe[e]||e}catch{return n}})}var moe={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},WUe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function goe(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return moe[n]||n})}function voe(t){return t.replace(/\\["bfnrt\\]/g,function(n){return WUe[n]||n})}function jm(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function yoe(t,n){return Pb(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function Pm(t,n,e){return Pb(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function Pb(t,n){return!!EO(t,n)}function EO(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function boe(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function Ok(t,n,e){var i=e0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,boe(r))}}function e0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function jk(t){var e=e0(t)?.document.activeElement;return!!e&&Pb(e,function(i){return i===t})}function _oe(t,n){return EO(t,function(e){return e.nodeName===n})}function AO(t){return Pm(t,"data-type","selectable-key")?ro.key:Pm(t,"data-type","selectable-value")?ro.value:Pm(t,"data-type","insert-selection-area-inside")?ro.inside:Pm(t,"data-type","insert-selection-area-after")?ro.after:ro.multi}function t0(t){return encodeURIComponent(ln(t))}function xoe(t){var e=EO(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Xu(decodeURIComponent(e)):null}function tp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in XUe||e.push(i),e.join(n)}var XUe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},MO=yN.window;function YUe(t){pi(t,"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 woe(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,G="left"===v||_+u>window.innerWidth&&_>u;return{left:G?y.right-g:_+g,top:$?C-p:y.bottom+p,positionAbove:$,positionLeft:G}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,z=n.top,U=n.width,q=void 0===U?0:U,re=n.height,L=void 0===re?0:re;return{left:R,top:z,positionAbove:z+L>window.innerHeight&&z>L,positionLeft:R+q>window.innerWidth&&R>q}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function QUe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!Pb(l.target,function(c){return c===i})&&s(o.id)}return Wc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===tp(l)&&s(o.id)},function(l){a(l)},s,function(l){Vi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Vi[l?"unshift":"push"](function(){e(1,i=l)})}]}var ZUe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QUe,JUe,ys,{popup:0,closeAbsolutePopup:6},YUe),r}return Se(e)}();function koe(t,n,e){var i=t.slice();return i[6]=n[e],i}function Soe(t){var n,e;return n=new ZUe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eGe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(iGe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var iGe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function Lb(t){return{value:t,label:Hi(t)?"(whole item)":tu(Kl(t))}}function rh(t){return t.map(function(n){return NO.test(n)?"?.[".concat(n,"]"):IO.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var IO=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,NO=/^\d+$/;function Rb(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function oh(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var rGe={id:"javascript",name:"JavaScript",description:"\n

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

\n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(rh(e.path)),a=function FO(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function HQ(t){return k9e.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(rh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(rh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\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')()(t);return void 0!==e?e:null}},oGe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 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.5H93c-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.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 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.5H210.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.7zM176 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-80V416H256v16c0 44.2-35.8 80-80 80z"]},$b={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},Bb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},sGe={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 aGe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var OGe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,FGe,NGe,Ei,{path:4,value:0,readOnly:1,onPatch:5,focus:6},IGe),r}return Se(e)}();function Poe(t){for(var n=pO(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=Rk(n,u);jO(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(Io(l)&&i(o)){r[ln(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Ze(Ze({},n),{},{expandedMap:r})}function Loe(t,n){var e=n0(t.expandedMap,n),i=n0(t.enforceStringMap,n),r=n0(t.visibleSectionsMap,n);return Ze(Ze({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Roe(t,n,e){if(e){var i=Ze({},t.enforceStringMap);return i[n]=e,Ze(Ze({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ze({},t.enforceStringMap);return delete r[n],Ze(Ze({},t),{},{enforceStringMap:r})}return t}function $oe(t,n,e){var i=Yu(t,e),r=e.reduce(function(o,s){return SQ(s)?Boe(i,o,s):DQ(s)?Voe(i,o,s):kN(s)?(u=(c=s).path,d=BO(a=i,(l=o).expandedMap),h=BO(a,l.enforceStringMap),f=BO(a,l.visibleSectionsMap),Mo(c.value)||oo(c.value)||delete d[u],oo(c.value)||delete f[u],(Mo(c.value)||oo(c.value))&&delete h[u],Ze(Ze({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):SN(s)||Mv(s)?function(a,l,c){if(Mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=$O(LO(l.expandedMap,c.from),u),h=$O(LO(l.enforceStringMap,c.from),u),f=$O(LO(l.visibleSectionsMap,c.from),u),p=l;Mv(c)&&(p=Voe(a,p,{op:"remove",path:c.from}));var m=RO((p=Boe(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=RO(p.enforceStringMap,h),v=RO(p.visibleSectionsMap,f);return Ze(Ze({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Boe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r);if(oo(Sn(t,r))){var s=Ws(Ln(i)),a=r0(n.expandedMap,r,s,1),l=r0(n.enforceStringMap,r,s,1),c=r0(n.visibleSectionsMap,r,s,1);return c=Hoe(c,o,function(u){return zoe(u,s,1)}),Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Voe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=n0(a,i),l=n0(l,i),c=n0(c,i),oo(s)){var u=Ws(Ln(i));a=r0(a,r,u,-1),l=r0(l,r,u,-1),c=Hoe(c=r0(c,r,u,-1),o,function(d){return zoe(d,u,-1)})}return Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function n0(t,n){var e={},i=ln(n);return Object.keys(t).forEach(function(r){Iv(r,i)||(e[r]=t[r])}),e}function LO(t,n){var e={};return Object.keys(t).forEach(function(i){Iv(i,n)&&(e[i]=t[i])}),e}function RO(t,n){return Ze(Ze({},t),n)}function $O(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function r0(t,n,e,i){for(var r=n.length,o=ln(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:ln(u),value:t[c]}))}}if(0===s.length)return t;var h=Ze({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function BO(t,n){var e={};return Object.keys(n).filter(function(i){return Xc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function Hoe(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!or(i,r)){var o=Ze({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function zoe(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function lf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof Nv(o,i)}function Vb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function VO(t,n){var e=[];return function i(r,o){e.push(o);var s=ln(o);if(r&&!0===n.expandedMap[s]){if(oo(r)){var a=Rk(n,s);jO(r,a,function(l){i(r[l],o.concat(String(l)))})}Mo(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function Uoe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=ln(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),oo(o)){var l=Rk(n,a);jO(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Mo(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function HO(t,n,e){var i=VO(t,n),r=i.map(ln).indexOf(ln(e));return-1!==r&&r0;){if(!0===t.pointersMap[ln(i)])return!0;i.pop()}return xs(t)?e===ro.key&&or(t.focusPath,n):!(!Yi(t)||!(e===ro.value&&or(t.focusPath,n)||l0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===ro.key||e===ro.value||e===ro.multi)))}function qoe(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Nr(r)?r.focusPath:sa(r.paths),s=function LGe(t,n,e){var i=VO(t,n),r=i.map(ln),o=ln(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Xs(r)?Os(t,r.anchorPath,r.anchorPath):Os(t,r.anchorPath,l);if(xs(r)){var u=Sn(t,Xi(s));return Array.isArray(u)||Hi(s)?mr(s,!1):iu(s,!1)}return Yi(r)?mr(s,!1):Zu(r)||Xs(r)?Os(t,o,o):Os(t,a,l)}function Xoe(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=Uoe(t,n,e),o=r.findIndex(function(s){return or(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,Xi(r)))?mr(r,!1):iu(r,!1)}function a0(t,n){if(1===n.length){var e=sa(n);if("replace"===e.op||"move"===e.op)return mr(Ju(t,e.path),!1)}if(!Hi(n)&&n.every(function(s){return"move"===s.op})){var i=sa(n),r=n.slice(1);if((SN(i)||Mv(i))&&i.from!==i.path&&r.every(function(s){return(SN(s)||Mv(s))&&s.from===s.path}))return iu(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Hi(o))return{type:ro.multi,paths:o,anchorPath:sa(o),focusPath:Ln(o),pointersMap:Yoe(o)}}function Yoe(t){var n={};return t.forEach(function(e){n[ln(e)]=!0}),n}function Bk(t){return ql({},ln(t),!0)}function zb(t){return void 0!==t&&(xs(t)||Yi(t)||Nr(t)&&1===t.paths.length)}function Joe(t,n){return zb(n)&&Ho(Sn(t,n.focusPath))?n.focusPath:Xi(n.focusPath)}function l0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function WGe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function ase(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Mo(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else lse(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function lse(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function WO(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function cse(t,n,e){var i=t;return Nb(e,function(r){i=WO(i,n,r.start,r.end)}),i}function qGe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=Xi(s),u=Sn(t,c),d=Ln(s),h=Gb(c,Object.keys(u),d,WO(d,e,a,l));return{newSelection:a0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(ln(s)));var p="string"==typeof f?f:String(f),m=ln(s),g=lf(f,n.enforceStringMap,m,r),v=WO(p,e,a,l),y=[{op:"replace",path:ln(s),value:g?v:Nv(v,r)}];return{newSelection:a0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function XGe(t,n,e,i,r){for(var o=ase(e,t,1/0),s=[],a=0;an.floating[o]&&(s=Xk(s)),{main:s,cross:Xk(s)}}var OWe={start:"end",end:"start"};function e4(t){return t.replace(/start|end/g,function(n){return OWe[n]})}var jWe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,he,E,N,F,Y,V,oe;return vn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,_=void 0===(y=u.fallbackAxisSideDirection)?"none":y,S=void 0===(C=u.flipAlignment)||C,M=XK(u,p7e),$=Bm(r),G=Bm(a)===a,fe.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=fe.sent,z=m||(G||!S?[Xk(a)]:(void 0,xe=Xk(Ne=a),[e4(Ne),xe,e4(xe)])),m||"none"===_||z.push.apply(z,si(function(Ne,xe,tt,ze){var ot=Wk(Ne),B=function(ne,ie,Ie){var Ye=["left","right"],Le=["right","left"];switch(ne){case"top":case"bottom":return Ie?ie?Le:Ye:ie?Ye:Le;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(Bm(Ne),"start"===tt,ze);return ot&&(B=B.map(function(ne){return ne+"-"+ot}),xe&&(B=B.concat(B.map(e4)))),B}(a,S,_,R))),U=[a].concat(si(z)),fe.next=29,Sse(n,M);case 29:if(q=fe.sent,re=[],L=(null==(i=o.flip)?void 0:i.overflows)||[],h&&re.push(q[$]),p&&(X=FWe(r,s,R),re.push(q[X.main],q[X.cross])),L=[].concat(si(L),[{placement:r,overflows:re}]),re.every(function(Ne){return Ne<=0})){fe.next=48;break}if(N=((null==(he=o.flip)?void 0:he.index)||0)+1,!(F=U[N])){fe.next=37;break}return fe.abrupt("return",{data:{index:N,overflows:L},reset:{placement:F}});case 37:if(Y=null==(E=L.filter(function(Ne){return Ne.overflows[0]<=0}).sort(function(Ne,xe){return Ne.overflows[1]-xe.overflows[1]})[0])?void 0:E.placement,Y){fe.next=46;break}fe.t0=v,fe.next="bestFit"===fe.t0?42:"initialPlacement"===fe.t0?45:46;break;case 42:return oe=null==(V=L.map(function(Ne){return[Ne.placement,Ne.overflows.filter(function(xe){return xe>0}).reduce(function(xe,tt){return xe+tt},0)]}).sort(function(Ne,xe){return Ne[1]-xe[1]})[0])?void 0:V[0],oe&&(Y=oe),fe.abrupt("break",46);case 45:Y=a;case 46:if(r===Y){fe.next=48;break}return fe.abrupt("return",{reset:{placement:Y}});case 48:return fe.abrupt("return",{});case 49:case"end":return fe.stop()}var Ne,xe},e)}))()}}},PWe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o;return vn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Zi(vn().mark(function l(c,u){var d,h,f,p,m,g,v,y,_,C,S,M,$,G;return vn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=Bm(d),g=Wk(d),v="x"===qk(d),y=["left","top"].includes(m)?-1:1,_=p&&v?-1:1,C="function"==typeof u?u(c):u,S="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ze({mainAxis:0,crossAxis:0,alignmentAxis:null},C),M=S.mainAxis,$=S.crossAxis,G=S.alignmentAxis,R.abrupt("return",(g&&"number"==typeof G&&($="end"===g?-1*G:G),v?{x:$*_,y:M*y}:{x:M*y,y:$*_}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function LWe(t){return"x"===t?"y":"x"}var RWe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,$;return vn().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=XK(a,m7e),m={x:r,y:o},G.next=14,Sse(n,p);case 14:return g=G.sent,v=qk(Bm(s)),y=LWe(v),_=m[v],C=m[y],c&&(_=Dse(_+g["y"===v?"top":"left"],_,_-g["y"===v?"bottom":"right"])),d&&(C=Dse(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),$=f.fn(Ze(Ze({},n),{},(ql(i={},v,_),ql(i,y,C),i))),G.abrupt("return",Ze(Ze({},$),{},{data:{x:$.x-r,y:$.y-o}}));case 22:case"end":return G.stop()}},e)}))()}}};function kc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function lh(t){return kc(t).getComputedStyle(t)}var t4,Tse=Math.min,qb=Math.max,Yk=Math.round;function Ese(t){var n=lh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Yk(e)!==r||Yk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function ap(t){return Mse(t)?(t.nodeName||"").toLowerCase():""}function Ase(){if(t4)return t4;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t4=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ch(t){return t instanceof kc(t).HTMLElement}function td(t){return t instanceof kc(t).Element}function Mse(t){return t instanceof kc(t).Node}function Ise(t){return typeof ShadowRoot<"u"&&(t instanceof kc(t).ShadowRoot||t instanceof ShadowRoot)}function Jk(t){var n=lh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function $We(t){return["table","td","th"].includes(ap(t))}function n4(t){var n=/firefox/i.test(Ase()),e=lh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function i4(){return/^((?!chrome|android).)*safari/i.test(Ase())}function r4(t){return["html","body","#document"].includes(ap(t))}function Nse(t){return td(t)?t:t.contextElement}var Fse={x:1,y:1};function m0(t){var n=Nse(t);if(!ch(n))return Fse;var e=n.getBoundingClientRect(),i=Ese(n),r=i.width,o=i.height,s=i.fallback,a=(s?Yk(e.width):e.width)/r,l=(s?Yk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function Vm(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=Nse(t),l=Fse;n&&(i?td(i)&&(l=m0(i)):l=m0(t));var c=a?kc(a):window,u=i4()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=kc(a),g=i&&td(i)?kc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=m0(v),_=v.getBoundingClientRect(),C=getComputedStyle(v);_.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,_.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=_.x,h+=_.y,v=kc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function lp(t){return((Mse(t)?t.ownerDocument:t.document)||window.document).documentElement}function Kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ose(t){return Vm(lp(t)).left+Kk(t).scrollLeft}function Xb(t){if("html"===ap(t))return t;var n=t.assignedSlot||t.parentNode||Ise(t)&&t.host||lp(t);return Ise(n)?n.host:n}function jse(t){var n=Xb(t);return r4(n)?n.ownerDocument.body:ch(n)&&Jk(n)?n:jse(n)}function Yb(t,n){var e;void 0===n&&(n=[]);var i=jse(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=kc(i);return r?n.concat(o,o.visualViewport||[],Jk(i)?i:[]):n.concat(i,Yb(i))}function Pse(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=kc(l),d=lp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=i4();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=lp(t),c=lp(l),u=Kk(l),h=qb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=qb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Ose(l),m=-u.scrollTop,"rtl"===lh(d).direction&&(p+=qb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=Vm(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ch(l)?m0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ze({},n);if(i4()){var o,s,a=kc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return QO(i)}function Lse(t,n){return ch(t)&&"fixed"!==lh(t).position?n?n(t):t.offsetParent:null}function Rse(t,n){for(var e=kc(t),i=Lse(t,n);i&&$We(i)&&"static"===lh(i).position;)i=Lse(i,n);return i&&("html"===ap(i)||"body"===ap(i)&&"static"===lh(i).position&&!n4(i))?e:i||function(r){for(var o=Xb(r);ch(o)&&!r4(o);){if(n4(o))return o;o=Xb(o)}return null}(t)||e}function BWe(t,n,e){var i=ch(n),r=lp(n),o=Vm(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==ap(n)||Jk(r))&&(s=Kk(n)),ch(n)){var l=Vm(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Ose(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var VWe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=Yb(c).filter(function(y){return td(y)&&"body"!==ap(y)}),f=null,p="fixed"===lh(c).position,m=p?Xb(c):c;td(m)&&!r4(m);){var g=lh(m),v=n4(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=Xb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(si(o),[i]),l=s.reduce(function(c,u){var d=Pse(n,u,r);return c.top=qb(d.top,c.top),c.right=Tse(d.right,c.right),c.bottom=Tse(d.bottom,c.bottom),c.left=qb(d.left,c.left),c},Pse(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ch(e),o=lp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==ap(e)||Jk(o))&&(s=Kk(e)),ch(e))){var c=Vm(e);a=m0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return ch(t)?Ese(t):t.getBoundingClientRect()},getOffsetParent:Rse,getDocumentElement:lp,getScale:m0,getElementRects:function(t){var n=this;return Zi(vn().mark(function e(){var i,r,o,s,a;return vn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Rse,a=n.getDimensions,l.t0=BWe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ze,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===lh(t).direction}};function UWe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==bn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function GWe(t){return o4.apply(this,arguments)}function o4(){return o4=Zi(vn().mark(function t(n){var e,i,r,o,s;return vn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==bn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),o4.apply(this,arguments)}function WWe(t){pi(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function qWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","0 0 20 20"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var XWe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,qWe,ys,{},WWe),r}return Se(e)}();function YWe(t){pi(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function JWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","-2 -2 50 50"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"role","presentation"),P(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var Qk=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,JWe,ys,{},YWe),r}return Se(e)}();function KWe(t){pi(t,"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 QWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("circle"),"class","circle_path svelte-1p3nqvd"),P(e,"cx","50"),P(e,"cy","50"),P(e,"r","20"),P(e,"fill","none"),P(e,"stroke","currentColor"),P(e,"stroke-width","5"),P(e,"stroke-miterlimit","10"),P(n,"class","loading svelte-1p3nqvd"),P(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var ZWe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,QWe,ys,{},KWe),r}return Se(e)}();function eqe(t){pi(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var tqe=function(t){return{value:8&t[0]}},$se=function(t){return{value:t[3]}},nqe=function(t){return{listOpen:64&t[0]}},Bse=function(t){return{listOpen:t[6]}},iqe=function(t){return{}},Vse=function(t){return{}},rqe=function(t){return{}},Hse=function(t){return{}},oqe=function(t){return{selection:8&t[0]}},zse=function(t){return{selection:t[3]}};function Use(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var sqe=function(t){return{}},Gse=function(t){return{}},aqe=function(t){return{selection:8&t[0]}},Wse=function(t){return{selection:t[127],index:t[129]}},lqe=function(t){return{}},qse=function(t){return{}},cqe=function(t){return{}},Xse=function(t){return{}};function Yse(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var uqe=function(t){return{item:16777216&t[0]}},Jse=function(t){return{item:t[127],index:t[129]}},dqe=function(t){return{filteredItems:16777216&t[0]}},Kse=function(t){return{filteredItems:t[24]}};function Qse(t){var n,e,i,r,o,s,a=[pqe,fqe,hqe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=be("div"),i&&i.c(),P(n,"class","svelte-select-list svelte-tyxmms"),Mt(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[_a(t[49].call(null,n)),Ft(n,"scroll",t[41]),Ft(n,"pointerdown",Jh(t[50])),Ft(n,"pointerup",Kh(Jh(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&($t(),ce(l[h],1,1,function(){l[h]=null}),Bt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),Q(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Mt(n,"prefloat",u[28])},i:function(u){r||(Q(i),r=!0)},o:function(u){ce(i),r=!1},d:function(u){u&&je(n),~e&&l[e].d(),t[91](null),o=!1,ho(s)}}}function hqe(t){var n,e,i=t[83].empty,r=Ms(i,t,t[82],Xse),o=r||{c:function(){(e=be("div")).textContent="No options",P(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:Lt,d:function(s){s&&je(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Ns(r,i,s,s[82],n?Is(i,s[82],a,cqe):Fs(s[82]),Xse)},i:function(s){n||(Q(o,s),n=!0)},o:function(s){ce(o,s),n=!1},d:function(s){o&&o.d(s)}}}function fqe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Qe,Jn)}:Dn,hi=n.debounceWait,di=void 0===hi?300:hi,kr=n.hideEmptyState,Qr=void 0!==kr&&kr,gi=n.inputAttributes,yr=void 0===gi?{}:gi,Ee=n.listAutoWidth,St=void 0===Ee||Ee,Ht=n.showChevron,sn=void 0!==Ht&&Ht,hn=n.listOffset,ri=void 0===hn?5:hn,Oi=n.hoverItemIndex,Bn=void 0===Oi?0:Oi,ei=n.floatingConfig,Yn=void 0===ei?{}:ei,br=n.class,Ar=void 0===br?"":br;function Po(Qe){var Jn=[],er={};Qe.forEach(function(wd){var Br=$r(wd);Jn.includes(Br)||(Jn.push(Br),er[Br]=[],Br&&er[Br].push(Object.assign(Js(Br,wd),{id:Br,groupHeader:!0,selectable:Wr}))),er[Br].push(Object.assign({groupItem:!!Br},wd))});var Qs=[];return Or(Jn).forEach(function(wd){er[wd]&&Qs.push.apply(Qs,si(er[wd]))}),Qs}function ca(){var Qe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,Bn=Qe<0?0:Qe),!Jn&&$r&&c[Bn]&&!c[Bn].selectable&&wo(1)}function md(){var Qe=!0;if(B){var Jn=[],er=[];B.forEach(function(Qs){Jn.includes(Qs[Fn])?Qe=!1:(Jn.push(Qs[Fn]),er.push(Qs))}),Qe||e(3,B=er)}return Qe}function hu(Qe){var Jn=Qe?Qe[Fn]:B[Fn];return _n.find(function(er){return er[Fn]===Jn})}function ua(Qe){return Rl.apply(this,arguments)}function Rl(){return(Rl=Zi(vn().mark(function Qe(Jn){var er;return vn().wrap(function(Qs){for(;;)switch(Qs.prev=Qs.next){case 0:er=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==er})),$("clear",er);case 3:case"end":return Qs.stop()}},Qe)}))).apply(this,arguments)}function gd(Qe){var Jn;ze&&F===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Qe&&$("focus",Qe),F.focus(),e(2,ze=!0))}function Ps(Qe){return vd.apply(this,arguments)}function vd(){return(vd=Zi(vn().mark(function Qe(Jn){return vn().wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!fi&&!z_){er.next=2;break}return er.abrupt("return");case 2:(Ue||ze)&&($("blur",Jn),yd(),e(2,ze=!1),e(26,f=void 0),F.blur());case 3:case"end":return er.stop()}},Qe)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Zi(vn().mark(function Qe(){return vn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Qe)})),Tv().$$.before_update.push(y),Wc(function(){Ue&&e(2,ze=!0),ze&&F&&F.focus()});var an,eT=n.ariaValues,Ce=void 0===eT?function(Qe){return"Option ".concat(Qe,", selected.")}:eT,lt=n.ariaListOpen,It=void 0===lt?function(Qe,Jn){return"You are currently focused on option ".concat(Qe,". There are ").concat(Jn," results available.")}:lt,Jt=n.ariaFocused,nn=void 0===Jt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Jt,Vn=null;function li(){clearTimeout(an),an=setTimeout(function(){fi=!1},100)}Hu(function(){var Qe;null===(Qe=Vn)||void 0===Qe||Qe.remove()});var fi=!1;function Lo(Qe){Qe&&!1!==Qe.selectable&&function(Jn){if(Jn){e(4,ie="");var er=Object.assign({},Jn);if(er.groupHeader&&!er.selectable)return;e(3,B=V?B?B.concat([er]):[er]:e(3,B=er)),setTimeout(function(){qr&&yd(),e(26,f=void 0),$("change",B),$("select",Jn)})}}(Qe)}function Ls(Qe){fi||e(7,Bn=Qe)}function Zo(Qe){var Qs,Jn=Qe.item,er=Qe.i;if(!1!==Jn?.selectable){if(B&&!V&&B[Fn]===Jn[Fn])return yd();((Qs=Jn).groupHeader&&Qs.selectable||Qs.selectable||!Qs.hasOwnProperty("selectable"))&&(e(7,Bn=er),Lo(Jn)),z_=!1}}function wo(Qe){if(0===c.filter(function(er){return!Object.hasOwn(er,"selectable")||!0===er.selectable}).length)return e(7,Bn=0);e(7,Qe>0&&Bn===c.length-1?Bn=0:Qe<0&&0===Bn?Bn=c.length-1:Bn+=Qe);var Jn=c[Bn];Jn&&!1===Jn.selectable&&(1!==Qe&&-1!==Qe||wo(Qe))}var $l=bd,wh=bd;function bd(Qe){return{update:function(Jn){Jn.scroll&&(li(),Qe.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Mr={strategy:"absolute",placement:"bottom-start",middleware:[PWe(ri),jWe(),RWe()],autoUpdate:!1},tc=Un(function zWe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ze(Ze(Ze({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ze({platform:VWe},d),p=Ze(Ze({},f.platform),{},{_c:h}),EWe(c,u,Ze(Ze({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function HWe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(si(td(t)?Yb(t):t.contextElement?Yb(t.contextElement):[]),si(Yb(n))):[];p.forEach(function(_){f&&_.addEventListener("scroll",e,{passive:!0}),l&&_.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?Vm(t):null;return h&&function _(){var C=Vm(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(_)}(),e(),function(){var _;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(_=g)||_.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Mr),3),fu=tc[0],_d=tc[1],Ch=tc[2],xd=!0,z_=!1;return t.$$set=function(Qe){"justValue"in Qe&&e(53,R=Qe.justValue),"filter"in Qe&&e(54,U=Qe.filter),"getItems"in Qe&&e(55,re=Qe.getItems),"id"in Qe&&e(56,X=Qe.id),"name"in Qe&&e(8,H=Qe.name),"container"in Qe&&e(0,E=Qe.container),"input"in Qe&&e(1,F=Qe.input),"multiple"in Qe&&e(9,V=Qe.multiple),"multiFullItemClearable"in Qe&&e(10,fe=Qe.multiFullItemClearable),"disabled"in Qe&&e(11,xe=Qe.disabled),"focused"in Qe&&e(2,ze=Qe.focused),"value"in Qe&&e(3,B=Qe.value),"filterText"in Qe&&e(4,ie=Qe.filterText),"placeholder"in Qe&&e(57,Ye=Qe.placeholder),"placeholderAlwaysShow"in Qe&&e(58,_t=Qe.placeholderAlwaysShow),"items"in Qe&&e(52,_n=Qe.items),"label"in Qe&&e(12,on=Qe.label),"itemFilter"in Qe&&e(59,pn=Qe.itemFilter),"groupBy"in Qe&&e(60,$r=Qe.groupBy),"groupFilter"in Qe&&e(61,Or=Qe.groupFilter),"groupHeaderSelectable"in Qe&&e(62,Wr=Qe.groupHeaderSelectable),"itemId"in Qe&&e(13,Fn=Qe.itemId),"loadOptions"in Qe&&e(63,ui=Qe.loadOptions),"containerStyles"in Qe&&e(14,Cr=Qe.containerStyles),"hasError"in Qe&&e(15,Qo=Qe.hasError),"filterSelectedItems"in Qe&&e(64,On=Qe.filterSelectedItems),"required"in Qe&&e(16,bi=Qe.required),"closeListOnChange"in Qe&&e(65,qr=Qe.closeListOnChange),"createGroupHeaderItem"in Qe&&e(66,Js=Qe.createGroupHeaderItem),"searchable"in Qe&&e(17,Ks=Qe.searchable),"inputStyles"in Qe&&e(18,Xa=Qe.inputStyles),"clearable"in Qe&&e(68,we=Qe.clearable),"loading"in Qe&&e(5,qe=Qe.loading),"listOpen"in Qe&&e(6,Ue=Qe.listOpen),"debounce"in Qe&&e(69,ii=Qe.debounce),"debounceWait"in Qe&&e(70,di=Qe.debounceWait),"hideEmptyState"in Qe&&e(19,Qr=Qe.hideEmptyState),"inputAttributes"in Qe&&e(71,yr=Qe.inputAttributes),"listAutoWidth"in Qe&&e(72,St=Qe.listAutoWidth),"showChevron"in Qe&&e(20,sn=Qe.showChevron),"listOffset"in Qe&&e(73,ri=Qe.listOffset),"hoverItemIndex"in Qe&&e(7,Bn=Qe.hoverItemIndex),"floatingConfig"in Qe&&e(74,Yn=Qe.floatingConfig),"class"in Qe&&e(21,Ar=Qe.class),"ariaValues"in Qe&&e(75,Ce=Qe.ariaValues),"ariaListOpen"in Qe&&e(76,It=Qe.ariaListOpen),"ariaFocused"in Qe&&e(77,nn=Qe.ariaFocused),"$$scope"in Qe&&e(82,S=Qe.$$scope)},t.$$.update=function(){var Qe,Jn,er,Qs,wd,Br;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var Br,Zs=(_n||[]).find(function(pu){return pu[Fn]===B});e(3,B=Zs||(ql(Br={},Fn,B),ql(Br,"label",B),Br))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(pu){return"string"==typeof pu?{value:pu,label:pu}:pu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!yr&&Ks||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},yr)),X&&e(27,v.id=X,v),Ks||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=si(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&$("input",B):p&&JSON.stringify(B[Fn])===JSON.stringify(p[Fn])||$("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&$("input",B),6&t.$$.dirty[0]&&!ze&&F&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ui||0!==ie.length)&&(ui?ii(Zi(vn().mark(function Br(){var Zs;return vn().wrap(function(pu){for(;;)switch(pu.prev=pu.next){case 0:return e(5,qe=!0),pu.next=3,re({dispatch:$,loadOptions:ui,convertStringItemsToObjects:lae,filterText:ie});case 3:(Zs=pu.sent)?(e(5,qe=Zs.loading),e(6,Ue=Ue?Zs.listOpen:ie.length>0),e(2,ze=Ue&&Zs.focused),e(52,_n=$r?Po(Zs.filteredItems):Zs.filteredItems)):(e(5,qe=!1),e(2,ze=!0),e(6,Ue=!0));case 5:case"end":return pu.stop()}},Br)})),di):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=U({loadOptions:ui,filterText:ie,items:_n,multiple:V,value:B,itemId:Fn,groupBy:$r,label:on,filterSelectedItems:On,itemFilter:pn,convertStringItemsToObjects:lae,filterGroupedItems:Po})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Qe=c.findIndex(function(Br){return Br[Fn]===B[Fn]}),ca(Qe,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,Bn=0),16&t.$$.dirty[0]&&ie&&e(7,Bn=0),128&t.$$.dirty[0]&&$("hoverItem",Bn),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&we&&!xe&&!qe),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=_t&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(er=V&&B.length>0?B.map(function(Br){return Br[on]}).join(", "):B[on],Ce(er)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Br=c[Bn];return Ue&&Br?It(Br[on],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(Br=_n)&&0!==Br.length&&!Br.some(function(Zs){return"object"!==bn(Zs)})&&B&&(V?!B.some(function(Zs){return!Zs||!Zs[Fn]}):B[Fn])&&(Array.isArray(B)?e(3,B=B.map(function(Zs){return hu(Zs)||Zs})):e(3,B=hu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(Br){return Br[Fn]}):null:B&&B[Fn]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||$("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&ca(),16777216&t.$$.dirty[0]&&function(Br){Ue&&$("filter",Br)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Qs=Yn)||void 0===Qs?void 0:Qs.autoUpdate)&&e(81,Mr.autoUpdate=!0,Mr),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Yn&&Ch(Object.assign(Mr,Yn)),8388608&t.$$.dirty[0]&&e(30,u=!!Vn),8388672&t.$$.dirty[0]&&function(Br,Zs){if(!Br||!Zs)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Vn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Vn&&(wd=E.getBoundingClientRect().width,e(23,Vn.style.width=St?wd+"px":"auto",Vn)),128&t.$$.dirty[0]&&e(29,d=Bn),70&t.$$.dirty[0]&&F&&Ue&&!ze&&gd()},[E,F,ze,B,ie,qe,Ue,Bn,H,V,fe,xe,on,Fn,Cr,Qo,bi,Ks,Xa,Qr,sn,Ar,function(){$("clear",B),e(3,B=void 0),yd(),gd()},Vn,c,i,f,v,xd,d,u,l,a,s,o,r,ua,function(Qe){if(ze)switch(Qe.stopPropagation(),Qe.key){case"Escape":Qe.preventDefault(),yd();break;case"Enter":if(Qe.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[Fn]===c[Bn][Fn]){yd();break}Lo(c[Bn])}break;case"ArrowDown":Qe.preventDefault(),Ue?wo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Qe.preventDefault(),Ue?wo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&ze){if(0===c.length||B&&B[Fn]===c[Bn][Fn])return yd();Qe.preventDefault(),Lo(c[Bn]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(ua(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(X){return{value:X,label:X}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],z=null!==(i=M)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?Lb(M.filter.path):null,U=null!==(o=M)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?G.find(function(X){var Z;return X.value===(null===(Z=M.filter)||void 0===Z?void 0:Z.relation)}):null,q=(null===(a=M)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",re=null!==(c=M)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?Lb(M.sort.path):null,L=null!==(d=M)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(X){var Z;return X.value===(null===(Z=M.sort)||void 0===Z?void 0:Z.direction)}):null;return t.$$set=function(X){"json"in X&&e(11,C=X.json),"queryOptions"in X&&e(10,M=X.queryOptions),"onChange"in X&&e(12,$=X.onChange)},t.$$.update=function(){var X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne,ie,Ie,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?CO(C):[]),34816&t.$$.dirty&&e(13,m=f?CO(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(Lb)),8192&t.$$.dirty&&e(6,v=m?m.map(Lb):[]),1088&t.$$.dirty&&e(5,y=null!==(X=M)&&void 0!==X&&null!==(Z=X.projection)&&void 0!==Z&&Z.paths&&v?M.projection.paths.map(function(ie){return v.find(function(Ie){return or(Ie.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(he=(null===(H=z)||void 0===H?void 0:H.value)||null,or(null===(E=M)||void 0===E||null===(N=E.filter)||void 0===N?void 0:N.path,he)||(_("changeFilterPath",he),e(10,M=qu(M,["filter","path"],he,!0)),$(M))),2&t.$$.dirty&&(Y=(null===(F=U)||void 0===F?void 0:F.value)||null,or(null===(V=M)||void 0===V||null===(oe=V.filter)||void 0===oe?void 0:oe.relation,Y)||(_("changeFilterRelation",Y),e(10,M=qu(M,["filter","relation"],Y,!0)),$(M))),4&t.$$.dirty&&(or(null===(Ne=M)||void 0===Ne||null===(xe=Ne.filter)||void 0===xe?void 0:xe.value,fe=q||null)||(_("changeFilterValue",fe),e(10,M=qu(M,["filter","value"],fe,!0)),$(M))),8&t.$$.dirty&&(ie=(null===(tt=re)||void 0===tt?void 0:tt.value)||null,or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.sort)||void 0===Ye?void 0:Ye.path,ie)||(_("changeSortPath",ie),e(10,M=qu(M,["sort","path"],ie,!0)),$(M))),16&t.$$.dirty&&(ot=(null===(ze=L)||void 0===ze?void 0:ze.value)||null,or(null===(B=M)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,ot)||(_("changeSortDirection",ot),e(10,M=qu(M,["sort","direction"],ot,!0)),$(M))),32&t.$$.dirty&&function(ie){var Ie,Ye;or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.projection)||void 0===Ye?void 0:Ye.paths,ie)||(_("changeProjectionPaths",ie),e(10,M=qu(M,["projection","paths"],ie,!0)),$(M))}(y?y.map(function(ie){return ie.value}):null)},[z,U,q,re,L,y,v,g,G,R,M,C,$,m,p,f,function(X){e(0,z=X)},function(X){e(1,U=X)},function(){e(2,q=this.value)},function(X){e(3,re=X)},function(X){e(4,L=X)},function(X){e(5,y=X),e(10,M),e(6,v),e(13,m),e(15,f),e(11,C)}]}var wqe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,xqe,_qe,Ei,{json:11,queryOptions:10,onChange:12},bqe),r}return Se(e)}();function Cqe(t){pi(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function cae(t,n,e){var i=t.slice();return i[5]=n[e],i}function kqe(t){var n,e;return n=new sr({props:{data:Bb}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Sqe(t){var n,e;return n=new sr({props:{data:$b}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function uae(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[Sqe,kqe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=be("button"),i.c(),r=it(),o=tn(d),s=it(),P(n,"type","button"),P(n,"class","jse-query-language svelte-19cxesy"),P(n,"title",a="Select ".concat(t[5].name," as query language")),Mt(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),de(n,r),de(n,o),de(n,s),l=!0,c||(u=Ft(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):($t(),ce(f[y],1,1,function(){f[y]=null}),Bt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),Q(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&P(n,"title",a),(!l||3&v)&&Mt(n,"selected",t[5].id===t[0])},i:function(g){l||(Q(i),l=!0)},o:function(g){ce(i),l=!1},d:function(g){g&&je(n),f[e].d(),c=!1,u()}}}function Dqe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&dae(t);return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),(e=be("div")).textContent="Transform",i=it(),u&&u.c(),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),de(n,e),de(n,i),u&&u.m(n,null),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Ft(o,"click",t[2]),l=!0)},p:function(d,h){var f=Un(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&Q(u,1)):((u=dae(d)).c(),Q(u,1),u.m(n,r)):u&&($t(),ce(u,1,1,function(){u=null}),Bt())},i:function(d){a||(Q(u),Q(s.$$.fragment,d),a=!0)},o:function(d){ce(u),ce(s.$$.fragment,d),a=!1},d:function(d){d&&je(n),u&&u.d(),pt(s),l=!1,c()}}}function Iqe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xa("simple-modal").close,c=xa("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Eqe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Vi[h?"unshift":"push"](function(){e(1,i=h)})}]}var Nqe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Iqe,Mqe,Ei,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Aqe),r}return Se(e)}(),s4=wa("jsoneditor:AutoScrollHandler"),Fqe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},hae=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Fqe,s=y.a11y||!1,bn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),bn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,bn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Zk=wa("jsoneditor:History");function fae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Zk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Zk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Zk("undo",h),a(),h}},redo:function d(){if(o())return Zk("redo",e[i-=1]),a(),e[i]}}}function g0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var v0=wa("validation");function pae(t,n,e,i){return v0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Oqe(t,n,e,i){if(v0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Xd.info}]};if(0===t.length)return null;try{var r=g0(function(){return e.parse(t)},function(l){return v0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:g0(function(){return i.parse(t)},function(l){return v0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=g0(function(){return n(o)},function(l){return v0("validate: validated json in ".concat(l," ms"))});return Hi(s)?null:{validationErrors:s}}catch(l){var a=g0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yd(c)),!0}catch{return!1}}(t,e)},function(c){return v0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:Nk(t,l.message||l.toString()),isRepairable:a}}}var eS=wa("jsoneditor:FocusTracker");function a4(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(eS("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){eS("blur"),l=!1,a()}))}(0,t.onMount)(function(){eS("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){eS("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function jqe(t){pi(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function mae(t,n,e){var i=t.slice();return i[8]=n[e],i}function gae(t){var n,e;return n=new sr({props:{data:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function vae(t){var n,e;return n=new sr({props:{data:t[8].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function yae(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&vae(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=be("button"),d&&d.c(),e=it(),i=tn(u),r=it(),P(n,"type","button"),P(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),P(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),de(n,e),de(n,i),de(n,r),a=!0,l||(c=[Ft(n,"click",h),Ft(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&Q(d,1)):((d=vae(t)).c(),Q(d,1),d.m(n,e)):d&&($t(),ce(d,1,1,function(){d=null}),Bt()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&P(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(Q(d),a=!0)},o:function(p){ce(d),a=!1},d:function(p){p&&je(n),d&&d.d(),l=!1,ho(c)}}}function Pqe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&gae(t),f=t[3],p=[],m=0;m100&&Cae(t);return{c:function(){n=be("table"),e=be("tbody");for(var u=0;u100?c?c.p(u,d):((c=Cae(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&xae(t);function y(){return t[6](t[7])}return{c:function(){n=be("tr"),e=be("td"),mt(i.$$.fragment),r=it(),o=be("td"),s=tn(m),a=it(),l=be("td"),c=tn(g),u=it(),d=be("td"),v&&v.c(),P(e,"class","jse-validation-error-icon svelte-1oe8e8r"),P(o,"class","svelte-1oe8e8r"),P(l,"class","svelte-1oe8e8r"),P(d,"class","jse-validation-error-action svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(_,C){Pe(_,n,C),de(n,e),ft(i,e,null),de(n,r),de(n,o),de(o,s),de(n,a),de(n,l),de(l,c),de(n,u),de(n,d),v&&v.m(d,null),h=!0,f||(p=Ft(n,"click",y),f=!0)},p:function(_,C){t=_,(!h||1&C)&&m!==(m=tu(Kl(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&Q(v,1)):((v=xae(t)).c(),Q(v,1),v.m(d,null)):v&&($t(),ce(v,1,1,function(){v=null}),Bt())},i:function(_){h||(Q(i.$$.fragment,_),Q(v),h=!0)},o:function(_){ce(i.$$.fragment,_),ce(v),h=!1},d:function(_){_&&je(n),pt(i),v&&v.d(),f=!1,p()}}}function Cae(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=be("tr"),e=be("td"),i=it(),r=be("td"),o=it(),s=be("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=it(),d=be("td"),P(e,"class","svelte-1oe8e8r"),P(r,"class","svelte-1oe8e8r"),P(s,"class","svelte-1oe8e8r"),P(d,"class","svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(n,u),de(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&je(n)}}}function Vqe(t){var n,e,i=!Hi(t[0]),r=i&&_ae(t);return{c:function(){r&&r.c(),n=_r()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=Un(s,1)[0];1&a&&(i=!Hi(o[0])),i?r?(r.p(o,a),1&a&&Q(r,1)):((r=_ae(o)).c(),Q(r,1),r.m(n.parentNode,n)):r&&($t(),ce(r,1,1,function(){r=null}),Bt())},i:function(o){e||(Q(r),e=!0)},o:function(o){ce(r),e=!1},d:function(o){r&&r.d(o),o&&je(n)}}}function Hqe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var l4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Hqe,Vqe,Ei,{validationErrors:0,selectError:1},Rqe),r}return Se(e)}(),zqe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Uqe(t){pi(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function Gqe(t){var n,e,i,r,o,s,a,l,c;return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),e=be("div"),i=tn(t[0]),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),de(n,e),de(e,i),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Ft(o,"click",t[3]),l=!0)},p:function(u,d){var h=Un(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(Q(s.$$.fragment,u),a=!0)},o:function(u){ce(s.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(s),l=!1,c()}}}function Wqe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xa("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var c4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wqe,Gqe,Ei,{title:0,onClose:1},Uqe),r}return Se(e)}();function qqe(t){pi(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function Xqe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G;return e=new c4({props:{title:"Copying and pasting"}}),{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).textContent="These actions are unavailable via the menu. Please use:",s=it(),a=be("div"),l=be("div"),(c=be("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=it(),h=be("div"),(f=be("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=it(),g=be("div"),(v=be("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),_=it(),C=be("div"),(S=be("button")).textContent="Close",P(c,"class","jse-key svelte-1olothd"),P(l,"class","jse-shortcut"),P(f,"class","jse-key svelte-1olothd"),P(h,"class","jse-shortcut"),P(v,"class","jse-key svelte-1olothd"),P(g,"class","jse-shortcut"),P(a,"class","jse-shortcuts svelte-1olothd"),P(S,"type","button"),P(S,"class","jse-primary svelte-1olothd"),P(C,"class","jse-actions svelte-1olothd"),P(r,"class","jse-modal-contents svelte-1olothd"),P(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(a,l),de(l,c),de(l,u),de(a,d),de(a,h),de(h,f),de(h,p),de(a,m),de(a,g),de(g,v),de(g,y),de(r,_),de(r,C),de(C,S),M=!0,$||(G=Ft(S,"click",t[0]),$=!0)},p:Lt,i:function(R){M||(Q(e.$$.fragment,R),M=!0)},o:function(R){ce(e.$$.fragment,R),M=!1},d:function(R){R&&je(n),pt(e),$=!1,G()}}}function Yqe(t){return[xa("simple-modal").close,zqe?"\u2318":"Ctrl"]}var kae=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Yqe,Xqe,Ei,{},qqe),r}return Se(e)}();function Sae(t){return!!t&&("space"===t.type||!0===t.space)}function tS(t){return!!t&&("separator"===t.type||!0===t.separator)}function Jb(t){return!!t&&"function"==typeof t.onClick}function u4(t){return!!t&&"dropdown-button"===t.type&&Jb(t.main)&&Array.isArray(t.items)}function Dae(t){return Io(t)&&Io(t.parseError)}function Kqe(t){pi(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var Qqe=function(t){return{}},Tae=function(t){return{}};function Eae(t,n,e){var i=t.slice();return i[3]=n[e],i}var Zqe=function(t){return{}},Aae=function(t){return{}};function eXe(t){var n,e=Fae(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Fae(i[3])+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function tXe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Mae(t),u=t[3].text&&Iae(t);return{c:function(){n=be("button"),c&&c.c(),e=it(),u&&u.c(),P(n,"type","button"),P(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),P(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),de(n,e),u&&u.m(n,null),s=!0,a||(l=Ft(n,"click",function(){ba(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&Q(c,1)):((c=Mae(t)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),t[3].text?u?u.p(t,h):((u=Iae(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&P(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&P(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(Q(c),s=!0)},o:function(d){ce(c),s=!1},d:function(d){d&&je(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function nXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function iXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Mae(t){var n,e;return n=new sr({props:{data:t[3].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Iae(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&je(n)}}}function Nae(t){var n,e,i,r,o,s,a,l=[iXe,nXe,tXe,eXe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!tS(d[3])),n?0:(null==e&&(e=!!Sae(d[3])),e?1:(null==i&&(i=!!Jb(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=_r()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(d){a||(Q(o),a=!0)},o:function(d){ce(o),a=!1},d:function(d){c[r].d(d),d&&je(s)}}}function rXe(t){for(var n,e,i,r,o=t[2].left,s=Ms(o,t,t[1],Aae),a=t[0],l=[],c=0;c0&&_.height>0}),u),c=u(e);function u(y){var _=y.getBoundingClientRect();return{x:_.left+_.width/2,y:_.top+_.height/2,rect:_,element:y}}function d(y,_){var S=y.x-_.x,M=(y.y-_.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(S*S+M*M)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(Xv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(Xv(g.filter(function(y){return o(y.element)}),h)||Xv(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Vi[a?"unshift":"push"](function(){e(2,i=a)})}]}var Jae=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,GXe,UXe,Ei,{items:0,tip:1},EXe),r}return Se(e)}();function WXe(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qXe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$=n.json,G=n.documentState,R=n.parser,z=n.showTip,U=n.onCloseContextMenu,q=n.onEditKey,re=n.onEditValue,L=n.onToggleEnforceString,X=n.onCut,Z=n.onCopy,H=n.onPaste,he=n.onRemove,E=n.onDuplicate,N=n.onExtract,F=n.onInsertBefore,Y=n.onInsert,V=n.onConvert,oe=n.onInsertAfter,fe=n.onSort,Ne=n.onTransform;function xe(){U(),q()}function tt(){U(),re()}function ze(){U(),L()}function ot(){U(),X(!0)}function B(){U(),X(!1)}function ne(){U(),Z(!0)}function ie(){U(),Z(!1)}function Ie(){U(),H()}function Ye(){U(),he()}function Le(){U(),E()}function _t(){U(),N()}function At(pn){U(),c?V(pn):Y(pn)}function _n(){U(),fe()}function ci(){U(),Ne()}function on(){U(),F()}function Ni(){U(),oe()}return t.$$set=function(pn){"json"in pn&&e(2,$=pn.json),"documentState"in pn&&e(3,G=pn.documentState),"parser"in pn&&e(4,R=pn.parser),"showTip"in pn&&e(0,z=pn.showTip),"onCloseContextMenu"in pn&&e(5,U=pn.onCloseContextMenu),"onEditKey"in pn&&e(6,q=pn.onEditKey),"onEditValue"in pn&&e(7,re=pn.onEditValue),"onToggleEnforceString"in pn&&e(8,L=pn.onToggleEnforceString),"onCut"in pn&&e(9,X=pn.onCut),"onCopy"in pn&&e(10,Z=pn.onCopy),"onPaste"in pn&&e(11,H=pn.onPaste),"onRemove"in pn&&e(12,he=pn.onRemove),"onDuplicate"in pn&&e(13,E=pn.onDuplicate),"onExtract"in pn&&e(14,N=pn.onExtract),"onInsertBefore"in pn&&e(15,F=pn.onInsertBefore),"onInsert"in pn&&e(16,Y=pn.onInsert),"onConvert"in pn&&e(17,V=pn.onConvert),"onInsertAfter"in pn&&e(18,oe=pn.onInsertAfter),"onSort"in pn&&e(19,fe=pn.onSort),"onTransform"in pn&&e(20,Ne=pn.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=G.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==$),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Hi(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn($,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Io(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Nr(i)||xs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Nr(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&zb(i)&&!s&&!Array.isArray(Sn($,Xi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&zb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!Ho(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?Lm(i)&&!Io(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,_=m?Lm(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?Lm(i)&&Ho(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,S=null!=i&&lf(a,G.enforceStringMap,ln(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,M=[{type:"row",items:[{type:"button",onClick:xe,icon:h0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:tt,icon:h0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:h0,text:l,title:"Edit the value (Double-click on the value)",onClick:tt,disabled:!f},{type:"button",icon:S?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:ze,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:ot,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:ot,disabled:!c},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Ie,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:Le,icon:wse,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:_t,icon:wWe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_n,icon:Gk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:ci,icon:Hk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return At("structure")},icon:m?Uk:f0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return At("object")},icon:m?Uk:f0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return At("array")},icon:m?Uk:f0,text:"Array",title:g+" array",disabled:!_},{type:"button",onClick:function(){return At("value")},icon:m?Uk:f0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:on,icon:_We,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Ni,icon:vWe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[z,M,$,G,R,U,q,re,L,X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,s,c,C,g,m,_,y,v,d,u,o,p,S,f,l,h,i,a,r]}var XXe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,qXe,WXe,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function YXe(t){pi(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Kae(t,n,e){var i=t.slice();return i[13]=n[e],i}function Qae(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=be("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=it(),P(n,"type","button"),P(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=Ft(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&je(n),a=!1,l()}}}function JXe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&_.end<=M.start)&&$.push(_),M.start>=(G?_.end:v.end)&&$.push(M),a=$))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var ZXe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QXe,JXe,Ei,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},YXe),r}return Se(e)}();function eYe(t){pi(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function tYe(t){var n,e,i,r,o;return e=new sr({props:{data:ru}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-context-menu-pointer svelte-1yzl4st"),P(n,"title",xN),Mt(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Ft(n,"click",t[1]),r=!0)},p:function(s,a){var l=Un(a,1)[0];(!i||1&l)&&Mt(n,"jse-selected",s[0])},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nYe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var cp=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,nYe,tYe,Ei,{selected:0,onContextMenu:2},eYe),r}return Se(e)}();function iYe(t){pi(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function rYe(t){var n,e,i,r,o,s,a,l=[aYe,sYe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=be("div"),i.c(),P(n,"data-type","selectable-key"),P(n,"class",r=Ao(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=Ft(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),Q(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Ao(d[6](d[0]))+" svelte-24a1b2"))&&P(n,"class",r)},i:function(d){o||(Q(i),o=!0)},o:function(d){ce(i),o=!1},d:function(d){d&&je(n),c[e].d(),s=!1,a()}}}function oYe(t){var n,e;return n=new tse({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function sYe(t){var n,e=jm(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=jm(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function aYe(t){var n,e;return n=new pse({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ele(t){var n,e;return n=new cp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function lYe(t){var n,e,i,r,o,s=[oYe,rYe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&ele(t);return{c:function(){e.c(),i=it(),c&&c.c(),r=_r()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=Un(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):($t(),ce(a[f],1,1,function(){a[f]=null}),Bt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),Q(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&($t(),ce(c,1,1,function(){c=null}),Bt()):c?(c.p(u,h),28&h&&Q(c,1)):((c=ele(u)).c(),Q(c,1),c.m(r.parentNode,r))},i:function(u){o||(Q(e),Q(c),o=!0)},o:function(u){ce(e),ce(c),o=!1},d:function(u){a[n].d(u),u&&je(i),c&&c.d(u),u&&je(r)}}}function cYe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&xs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&ip(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(iu(o,!0)))},function(h){return ah("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=Xi(o).concat(p);d.onSelect(f===CN?mr(m,!1):iu(m,!1)),f!==wN&&d.focus()},function(){d.onSelect(iu(o,!1)),d.focus()},o,s,l,u]}var uYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cYe,lYe,Ei,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},iYe),r}return Se(e)}();function tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function nle(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=$k(u.selection),v=f.findIndex(function(z){return or(z.path,g)}),y=0,_=v,C=function(){var z;return null===(z=f[_+1])||void 0===z?void 0:z.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),_+=1;var M=Sn(h,Xi(g)),$=Array.isArray(M),G=null===(d=f[$?_:_+1])||void 0===d?void 0:d.path,R=_-v;return G?{beforePath:G,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,_,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=Xi(d.focusPath),g=Sn(u,m);if(!(p||f&&l0(f,m)&&f.length>m.length))return[];var v=o0(d),y=$k(d),_=Ln(v),C=Ln(y),S=f?f[m.length]:void 0;if(!Mo(g)){if(oo(g)){var M=Ws(_),$=Ws(C),G=void 0!==S?Ws(S):g.length;return vO($-M+1,Gz?[].concat(si(R.slice(z,U+1)),si(R.slice(q,R.length))).map(function(re){return Rm(m,re)}):[].concat(si(R.slice(q,z)),si(R.slice(U+1,R.length))).map(function(re){return Rm(m,re)}):[]}(n,o,s),l=Sn(n,Xi(o0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=o0(m=u.selection),y=$k(m),_=f.findIndex(function($){return or($.path,v)}),C=f.findIndex(function($){return or($.path,y)}),Os(p,null===(d=f[_+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function uh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Iv(e,n)})}function mYe(t){pi(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function gYe(t){var n,e,i,r,o,s;return e=new sr({props:{data:$m}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=[Ft(n,"click",function(){ba(t[0])&&t[0].apply(this,arguments)}),_a(i=qO.call(null,n,Ze({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Un(l,1)[0];t=a,i&&ba(i.update)&&2&c&&i.update.call(null,Ze({text:t[1]},t[2]))},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,ho(s)}}}function vYe(t,n,e){var i,r=xa("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var _0=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vYe,gYe,ys,{validationError:3,onExpand:0},mYe),r}return Se(e)}();function yYe(t){pi(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var bYe=function(t){return{}},ile=function(t){return{}};function rle(t,n,e){var i=t.slice();return i[53]=n[e],i}var _Ye=function(t){return{}},ole=function(t){return{}};function sle(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function ale(t,n,e){var i=t.slice();return i[50]=n[e],i}var xYe=function(t){return{}},lle=function(t){return{}};function wYe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),d=t[34].identifier,h=Ms(d,t,t[35],ile),f=!t[17]&&cle();o=new pYe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:dse(t[6],t[9]),context:t[8]}});var p=u&&ule(t),m=t[15]&&dle(t),g=!t[17]&&hle(t);return{c:function(){n=be("div"),e=be("div"),h&&h.c(),i=it(),f&&f.c(),r=it(),mt(o.$$.fragment),s=it(),p&&p.c(),a=it(),m&&m.c(),l=it(),g&&g.c(),P(e,"class","jse-contents svelte-1wlxti1"),P(n,"class","jse-contents-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(v,y){Pe(v,n,y),de(n,e),h&&h.m(e,null),de(e,i),f&&f.m(e,null),de(e,r),ft(o,e,null),de(e,s),p&&p.m(e,null),de(n,a),m&&m.m(n,null),de(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Ns(h,d,v,v[35],c?Is(d,v[35],y,bYe):Fs(v[35]),ile),v[17]?f&&(f.d(1),f=null):f||((f=cle()).c(),f.m(e,r));var _={};2&y[0]&&(_.path=v[1]),1&y[0]&&(_.value=v[0]),8192&y[0]&&(_.enforceString=v[13]),65664&y[0]&&(_.selection=v[16]?v[7]:void 0),576&y[0]&&(_.searchResultItems=dse(v[6],v[9])),256&y[0]&&(_.context=v[8]),o.$set(_),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Nr(v[7]))&&!v[7].edit&&or(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&Q(p,1)):((p=ule(v)).c(),Q(p,1),p.m(e,null)):p&&($t(),ce(p,1,1,function(){p=null}),Bt()),v[15]?m?(m.p(v,y),32768&y[0]&&Q(m,1)):((m=dle(v)).c(),Q(m,1),m.m(n,l)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=hle(v)).c(),g.m(n,null)),(!c||262144&y[0])&&P(n,"style",v[18])},i:function(v){c||(Q(h,v),Q(o.$$.fragment,v),Q(p),Q(m),c=!0)},o:function(v){ce(h,v),ce(o.$$.fragment,v),ce(p),ce(m),c=!1},d:function(v){v&&je(n),h&&h.d(v),f&&f.d(),pt(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function CYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[DYe,SYe],S=[];function M(E,N){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],ole),R=!t[17]&&fle();function z(E,N){return E[12]?EYe:TYe}var U=z(t),q=U(t),re=_&&ple(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&mle(t);function X(E,N){return E[12]?MYe:E[17]?void 0:AYe}var Z=X(t),H=Z&&Z(t),he=t[12]&&gle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H&&H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(c,"class","jse-meta svelte-1wlxti1"),P(c,"data-type","selectable-value"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,N){Pe(E,n,N),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H&&H.m(n,null),Pe(E,p,N),he&&he.m(E,N),Pe(E,m,N),g=!0,v||(y=Ft(i,"click",t[21]),v=!0)},p:function(E,N){var F=r;(r=M(E))===F?S[r].p(E,N):($t(),ce(S[F],1,1,function(){S[F]=null}),Bt(),(o=S[r])?o.p(E,N):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&N[1])&&Ns(G,$,E,E[35],g?Is($,E[35],N,_Ye):Fs(E[35]),ole),E[17]?R&&(R.d(1),R=null):R||((R=fle()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,N):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&N[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Nr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,N),65922&N[0]&&Q(re,1)):((re=ple(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),36864&N[0]&&Q(L,1)):((L=mle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,N):(H&&H.d(1),(H=Z&&Z(E))&&(H.c(),H.m(n,null))),(!g||262144&N[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,N),4096&N[0]&&Q(he,1)):((he=gle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H&&H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function kYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[FYe,NYe],S=[];function M(E,N){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],lle),R=!t[17]&&_le();function z(E,N){return E[12]?jYe:OYe}var U=z(t),q=U(t),re=_&&xle(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&wle(t);function X(E,N){return E[12]?LYe:PYe}var Z=X(t),H=Z(t),he=t[12]&&Cle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(u,"data-type","selectable-value"),P(c,"class","jse-meta svelte-1wlxti1"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,N){Pe(E,n,N),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H.m(n,null),Pe(E,p,N),he&&he.m(E,N),Pe(E,m,N),g=!0,v||(y=Ft(i,"click",t[21]),v=!0)},p:function(E,N){var F=r;(r=M(E))===F?S[r].p(E,N):($t(),ce(S[F],1,1,function(){S[F]=null}),Bt(),(o=S[r])?o.p(E,N):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&N[1])&&Ns(G,$,E,E[35],g?Is($,E[35],N,xYe):Fs(E[35]),lle),E[17]?R&&(R.d(1),R=null):R||((R=_le()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,N):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&N[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Nr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,N),65922&N[0]&&Q(re,1)):((re=xle(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),36864&N[0]&&Q(L,1)):((L=wle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,N):(H.d(1),(H=Z(E))&&(H.c(),H.m(n,null))),(!g||262144&N[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,N),4096&N[0]&&Q(he,1)):((he=Cle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function cle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function ule(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function dle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hle(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function SYe(t){var n,e;return n=new sr({props:{data:rp}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function DYe(t){var n,e;return n=new sr({props:{data:ru}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function TYe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=be("div")).textContent="{",e=it(),i=be("button"),r=tn(d),o=it(),s=tn(h),a=it(),(l=be("div")).textContent="}",P(n,"class","jse-bracket svelte-1wlxti1"),P(i,"type","button"),P(i,"class","jse-tag svelte-1wlxti1"),P(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),de(i,r),de(i,o),de(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=Ft(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&je(n),f&&je(e),f&&je(i),f&&je(a),f&&je(l),c=!1,u()}}}function EYe(t){var n;return{c:function(){(n=be("div")).textContent="{",P(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function ple(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function mle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function AYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function MYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),P(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[29]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function gle(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Xs(t[7])),c=l&&vle(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=it(),p&&p.c(),P(n,"class","jse-props svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),de(n,e);for(var v=0;v]',s=it(),v&&v.c(),P(n,"class","jse-items svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(y,_){Pe(y,n,_),d&&d.m(n,null),de(n,e);for(var C=0;C=Le.start&&ne<=Le.end});if(!ie)return null;toe(ie.start,Math.min(p.length,ie.end),function(Le){return tt(String(Le))})}else Object.keys(p).forEach(tt);return xe}(S,l||wm);if(G("dragSelectionStart",{selection:S,items:F}),F){var Y=o0(S),V=F.findIndex(function(fe){return or(fe.path,Y)}),oe=f4({json:M.getJson(),documentState:M.getDocumentState(),deltaY:0,items:F}).offset;e(11,U={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:X(),selectionStartIndex:V,selectionItemsCount:Qoe(S).length,items:F,offset:oe,didMoveItems:!1}),aa.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",he)}else G("Cannot drag the current selection (probably spread over multiple sections)")}else $(E)}},function(E){aa.selecting||aa.dragging||(E.stopPropagation(),Pm(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):Pm(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):Pm(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(z))},function(E){E.stopPropagation(),z=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(cf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(uf(m)))},function(E){M.onSelect(cf(m)),M.onContextMenu(E)},function(E){M.onSelect(uf(m)),M.onContextMenu(E)},$,h,f]}var p4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,BYe,$Ye,Ei,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},yYe,[-1,-1]),r}return Se(e)}(),VYe=p4,HYe={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"]},zYe={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"]},m4={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"]},UYe={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 GYe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function WYe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,_=n.onRedo,C=n.onSort,S=n.onTransform,M=n.onContextMenu,$=n.onCopy,G=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(z){"json"in z&&e(2,u=z.json),"selection"in z&&e(3,d=z.selection),"readOnly"in z&&e(4,h=z.readOnly),"showSearch"in z&&e(1,p=z.showSearch),"historyState"in z&&e(5,m=z.historyState),"onExpandAll"in z&&e(6,g=z.onExpandAll),"onCollapseAll"in z&&e(7,v=z.onCollapseAll),"onUndo"in z&&e(8,y=z.onUndo),"onRedo"in z&&e(9,_=z.onRedo),"onSort"in z&&e(10,C=z.onSort),"onTransform"in z&&e(11,S=z.onTransform),"onContextMenu"in z&&e(12,M=z.onContextMenu),"onCopy"in z&&e(13,$=z.onCopy),"onRenderMenu"in z&&e(14,G=z.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Nr(d)||xs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:HYe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!Ho(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:zYe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!Ho(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:sp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:$,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:S,disabled:h||void 0===u},l,{type:"button",icon:bse,title:xN,className:"jse-contextmenu",onClick:M},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:_,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=G(c)||c)},[o,p,u,d,h,m,g,v,y,_,C,S,M,$,G,s,a,l,c,r,i]}var qYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,WYe,GYe,Ei,{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}),r}return Se(e)}();function XYe(t){pi(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Mle(t){var n;return{c:function(){(n=be("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',P(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function YYe(t){var n,e,i,r,o,s,a,l=!t[0]&&Mle();return{c:function(){n=be("div"),e=be("div"),i=it(),r=be("div"),o=tn("Empty document\n "),l&&l.c(),s=it(),a=be("div"),P(e,"class","jse-space jse-before svelte-1q2qkk2"),P(r,"class","jse-contents svelte-1q2qkk2"),P(a,"class","jse-space jse-after svelte-1q2qkk2"),P(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),de(n,e),de(n,i),de(n,r),de(r,o),l&&l.m(r,null),de(n,s),de(n,a)},p:function(c,u){Un(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Mle()).c(),l.m(r,null))},i:Lt,o:Lt,d:function(c){c&&je(n),l&&l.d()}}}function JYe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var KYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,JYe,YYe,Ei,{readOnly:0},XYe),r}return Se(e)}(),g4={},QYe={get exports(){return g4},set exports(t){g4=t}},Ile=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(oo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function eJe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function tJe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:ln(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Io(t))return function ZYe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*v4(u,d)});for(var s=[],a=0;aQb&&jle();return{c:function(){n=be("div");for(var d=0;dQb?u?u.p(d,f):((u=jle()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:Lt,o:Lt,d:function(d){d&&je(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return fO(0,v.length).map(String);if(Io(v)){var y=Object.keys(v).slice(0);return y.sort(v4),y}return[]},function(g){return Xc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Vi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Vi[g?"unshift":"push"](function(){e(4,o=g)})}]}var yJe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vJe,gJe,Ei,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},fJe),r}return Se(e)}();function bJe(t){pi(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function Ule(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",L=!t[4]&&Gle(t),X=[xJe,_Je],Z=[];function H(E,N){return E[2]?0:1}a=H(t),l=Z[a]=X[a](t),y=new sr({props:{data:DWe}}),S=new sr({props:{data:bWe}}),G=new sr({props:{data:p0}});var he=t[0]&&!t[4]&&Wle(t);return{c:function(){n=be("div"),e=be("form"),L&&L.c(),i=it(),r=be("div"),o=be("div"),s=be("div"),l.c(),c=it(),u=be("label"),d=be("input"),h=it(),f=be("div"),p=tn(re),m=tn(t[10]),g=it(),v=be("button"),mt(y.$$.fragment),_=it(),C=be("button"),mt(S.$$.fragment),M=it(),$=be("button"),mt(G.$$.fragment),R=it(),he&&he.c(),P(s,"class","jse-search-icon svelte-3lbrbf"),P(d,"class","jse-search-input svelte-3lbrbf"),P(d,"title","Enter text to search"),P(d,"type","text"),P(d,"placeholder","Find"),P(u,"class","jse-search-input-label svelte-3lbrbf"),P(u,"about","jse-search input"),P(f,"class","jse-search-count svelte-3lbrbf"),Mt(f,"jse-visible",""!==t[8]),P(v,"type","button"),P(v,"class","jse-search-next svelte-3lbrbf"),P(v,"title","Go to next search result (Enter)"),P(C,"type","button"),P(C,"class","jse-search-previous svelte-3lbrbf"),P(C,"title","Go to previous search result (Shift+Enter)"),P($,"type","button"),P($,"class","jse-search-clear svelte-3lbrbf"),P($,"title","Close search box (Esc)"),P(o,"class","jse-search-section svelte-3lbrbf"),P(r,"class","jse-search-contents svelte-3lbrbf"),P(e,"class","jse-search-form svelte-3lbrbf"),P(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,N){Pe(E,n,N),de(n,e),L&&L.m(e,null),de(e,i),de(e,r),de(r,o),de(o,s),Z[a].m(s,null),de(o,c),de(o,u),de(u,d),Hf(d,t[8]),de(o,h),de(o,f),de(f,p),de(f,m),de(o,g),de(o,v),ft(y,v,null),de(o,_),de(o,C),ft(S,C,null),de(o,M),de(o,$),ft(G,$,null),de(r,R),he&&he.m(r,null),z=!0,U||(q=[Ft(d,"input",t[21]),_a(CJe.call(null,d)),Ft(v,"click",t[22]),Ft(C,"click",t[23]),Ft($,"click",t[24]),Ft(e,"submit",t[12]),Ft(e,"keydown",t[13])],U=!0)},p:function(E,N){E[4]?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),16&N&&Q(L,1)):((L=Gle(E)).c(),Q(L,1),L.m(e,i));var F=a;(a=H(E))===F?Z[a].p(E,N):($t(),ce(Z[F],1,1,function(){Z[F]=null}),Bt(),(l=Z[a])?l.p(E,N):(l=Z[a]=X[a](E)).c(),Q(l,1),l.m(s,null)),256&N&&d.value!==E[8]&&Hf(d,E[8]),(!z||8&N)&&re!==(re=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,re),(!z||1024&N)&&qn(m,E[10]),(!z||256&N)&&Mt(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?he?he.p(E,N):((he=Wle(E)).c(),he.m(r,null)):he&&(he.d(1),he=null)},i:function(E){z||(Q(L),Q(l),Q(y.$$.fragment,E),Q(S.$$.fragment,E),Q(G.$$.fragment,E),z=!0)},o:function(E){ce(L),ce(l),ce(y.$$.fragment,E),ce(S.$$.fragment,E),ce(G.$$.fragment,E),z=!1},d:function(E){E&&je(n),L&&L.d(),Z[a].d(),pt(y),pt(S),pt(G),he&&he.d(),U=!1,ho(q)}}}function Gle(t){var n,e,i,r,o;return e=new sr({props:{data:t[0]?ru:rp}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-replace-toggle svelte-3lbrbf"),P(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Ft(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?ru:rp),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function _Je(t){var n,e;return n=new sr({props:{data:KO}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function xJe(t){var n,e;return n=new sr({props:{data:gWe,spin:!0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wle(t){var n,e,i,r,o,s,a,l;return{c:function(){n=be("div"),e=be("input"),i=it(),(r=be("button")).textContent="Replace",o=it(),(s=be("button")).textContent="All",P(e,"class","jse-replace-input svelte-3lbrbf"),P(e,"title","Enter replacement text"),P(e,"type","text"),P(e,"placeholder","Replace"),P(r,"type","button"),P(r,"title","Replace current occurrence (Ctrl+Enter)"),P(r,"class","svelte-3lbrbf"),P(s,"type","button"),P(s,"title","Replace all occurrences"),P(s,"class","svelte-3lbrbf"),P(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),de(n,e),Hf(e,t[9]),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=[Ft(e,"input",t[25]),Ft(r,"click",t[14]),Ft(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&Hf(e,c[9])},d:function(c){c&&je(n),a=!1,ho(l)}}}function wJe(t){var n,e,i=t[1]&&Ule(t);return{c:function(){i&&i.c(),n=_r()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=Un(o,1)[0];r[1]?i?(i.p(r,s),2&s&&Q(i,1)):((i=Ule(r)).c(),Q(i,1),i.m(n.parentNode,n)):i&&($t(),ce(i,1,1,function(){i=null}),Bt())},i:function(r){e||(Q(i),e=!0)},o:function(r){ce(i),e=!1},d:function(r){i&&i.d(r),r&&je(n)}}}function CJe(t){t.select()}function kJe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?go:g,y=n.onPrevious,_=void 0===y?go:y,C=n.onNext,S=void 0===C?go:C,M=n.onReplace,$=void 0===M?go:M,G=n.onReplaceAll,R=void 0===G?go:G,z=n.onClose,U=void 0===z?go:z,q="",re="",L="";function X(){e(0,f=!f&&!m)}function Z(){m||$(q,L)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,_=H.onPrevious),"onNext"in H&&e(6,S=H.onNext),"onReplace"in H&&e(18,$=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,U=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Gv(v,300)),1048832&t.$$.dirty&&r(q),2&t.$$.dirty&&s&&""!==q&&v(q)},[f,s,a,d,m,_,S,U,q,L,i,X,function(H){H.preventDefault(),q!==re?(re=q,r.cancel(),v(q)):S()},function(H){H.stopPropagation();var he=tp(H);"Enter"===he&&(H.preventDefault(),S()),"Shift+Enter"===he&&(H.preventDefault(),_()),"Ctrl+Enter"===he&&(H.preventDefault(),f?Z():S()),"Ctrl+H"===he&&(H.preventDefault(),X()),"Escape"===he&&(H.preventDefault(),U())},Z,function(){m||R(q,L)},c,v,$,R,r,function(){e(8,q=this.value)},function(){return S()},function(){return _()},function(){return U()},function(){e(9,L=this.value)}]}var SJe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,kJe,wJe,Ei,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},bJe),r}return Se(e)}(),qle=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function DJe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',P(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function HJe(t){var n,e,i,r,o,s,a,l,c,u=[UJe,zJe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-qojdc1"),P(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),de(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Ft(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[76](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function zJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new SJe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new VYe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:go}});var m=t[18]&&rce(t),g=t[23]&&oce(t);return f=new l4({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=be("div"),mt(s.$$.fragment),a=it(),l=be("div"),mt(c.$$.fragment),u=it(),m&&m.c(),d=it(),g&&g.c(),h=it(),mt(f.$$.fragment),P(o,"class","jse-search-box-container svelte-qojdc1"),P(l,"class","jse-contents svelte-qojdc1"),P(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),ft(s,o,null),Pe(v,a,y),Pe(v,l,y),ft(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),ft(f,v,y),p=!0},p:function(v,y){var _,C,S,M,$={};524288&y[0]&&($.show=v[19]),131072&y[0]&&($.resultCount=(null===(_=v[17])||void 0===_||null===(C=_.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&($.activeIndex=(null===(S=v[17])||void 0===S?void 0:S.activeIndex)||0),1048576&y[0]&&($.showReplace=v[20]),2097152&y[0]&&($.searching=v[21]),1&y[0]&&($.readOnly=v[0]),s.$set($);var G={};1024&y[0]&&(G.value=v[10]),65536&y[0]&&(G.expandedMap=v[16].expandedMap),65536&y[0]&&(G.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(G.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(G.validationErrorsMap=v[24]),131072&y[0]&&(G.searchResultItemsMap=null===(M=v[17])||void 0===M?void 0:M.itemsMap),65536&y[0]&&(G.selection=v[16].selection),8192&y[0]&&(G.context=v[13]),c.$set(G),v[18]?m?(m.p(v,y),262144&y[0]&&Q(m,1)):((m=rce(v)).c(),Q(m,1),m.m(d.parentNode,d)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[23]?g?(g.p(v,y),8388608&y[0]&&Q(g,1)):((g=oce(v)).c(),Q(g,1),g.m(h.parentNode,h)):g&&($t(),ce(g,1,1,function(){g=null}),Bt());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(m),Q(g),Q(f.$$.fragment,v),p=!0)},o:function(v){ce(s.$$.fragment,v),ce(c.$$.fragment,v),ce(m),ce(g),ce(f.$$.fragment,v),p=!1},d:function(v){v&&je(o),pt(s),v&&je(a),v&&je(l),pt(c),t[77](null),v&&je(u),m&&m.d(v),v&&je(d),g&&g.d(v),v&&je(h),pt(f,v)}}}function UJe(t){var n,e,i,r,o=[WJe,GJe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=_r()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):($t(),ce(s[u],1,1,function(){s[u]=null}),Bt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),Q(e,1),e.m(i.parentNode,i))},i:function(l){r||(Q(e),r=!0)},o:function(l){ce(e),r=!1},d:function(l){s[n].d(l),l&&je(i)}}}function rce(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:zk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function oce(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:Wb,text:"Ok",onClick:t[8]},{icon:op,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:Wb,text:"Ok",onClick:i[8]},{icon:op,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function GJe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[47]}]}}),i=new tce({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function WJe(t){var n,e;return n=new KYe({props:{readOnly:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qJe(t){var n,e,i,r,o,s,a,l,c=t[1]&&nce(t),u=t[2]&&ice(t),h=[];return o=h[r=t[25]?1:0]=[HJe,VJe][r](t),{c:function(){n=be("div"),c&&c.c(),e=it(),u&&u.c(),i=it(),o.c(),P(n,"class","jse-tree-mode svelte-qojdc1"),Mt(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),de(n,e),u&&u.m(n,null),de(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Ft($Je,"mousedown",t[49]),Ft(n,"keydown",t[41]),Ft(n,"mousedown",t[42]),Ft(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&Q(c,1)):((c=nce(f)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),f[2]?u?(u.p(f,p),4&p[0]&&Q(u,1)):((u=ice(f)).c(),Q(u,1),u.m(n,i)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),o.p(f,p),(!s||2&p[0])&&Mt(n,"no-main-menu",!f[1])},i:function(f){s||(Q(c),Q(u),Q(o),s=!0)},o:function(f){ce(c),ce(u),ce(o),s=!1},d:function(f){f&&je(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,ho(l)}}}function XJe(t,n,e){var i,r=wa("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xa("simple-modal").open,h=ep(),f=ep(),p=xa("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=hae(),_=n.readOnly,C=n.externalContent,S=n.mainMenuBar,M=n.navigationBar,$=n.escapeControlCharacters,G=n.escapeUnicodeCharacters,R=n.parser,z=n.parseMemoizeOne,U=n.validator,q=n.validationParser,re=n.pathParser,L=n.indentation,X=n.onError,Z=n.onChange,H=n.onChangeMode,he=n.onRenderValue,E=n.onRenderMenu,N=n.onClassName,F=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal,Ne=!1;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(l)},hasFocus:function(){return Ne&&document.hasFocus()||jk(l)},onFocus:function(){v=!0,F&&F()},onBlur:function(){v=!1,Y&&Y()}});var xe=void 0;function tt(Ce){r("updateSelection",Ce);var lt="function"==typeof Ce?Ce(ie.selection):Ce;or(lt,ie.selection)||e(16,ie=Ze(Ze({},ie),{},{selection:lt}))}var ze,ot,B,ne=!1,ie=Lk(),Ie=!1,Ye=!1,Le=!1,_t="";function At(Ce){return _n.apply(this,arguments)}function _n(){return(_n=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return r("search text updated",lt),e(74,_t=lt),It.next=4,Xl();case 4:return It.next=6,Fr();case 6:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function ci(){return(ci=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?GGe(ze):void 0),lt.next=3,Fr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function on(){return(on=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?WGe(ze):void 0),lt.next=3,Fr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function Ni(){return(Ni=Zi(vn().mark(function Ce(lt,It){var Jt,nn,an,li;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(nn=null===(Jt=ze)||void 0===Jt?void 0:Jt.activeItem,r("handleReplace",{replacementText:It,activeItem:nn}),nn){fi.next=4;break}return fi.abrupt("return");case 4:return an=qGe(c,ie,It,nn,R),li=an.newSelection,Yn(an.operations,function(Lo,Ls){return{state:Ze(Ze({},Ls),{},{selection:li})}}),fi.next=8,Xl();case 8:return fi.next=10,Fr();case 10:case"end":return fi.stop()}},Ce)}))).apply(this,arguments)}function pn(){return(pn=Zi(vn().mark(function Ce(lt,It){var Jt,an;return vn().wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return r("handleReplaceAll",{text:lt,replacementText:It}),Jt=XGe(c,ie,lt,It,R),an=Jt.newSelection,Yn(Jt.operations,function(li,fi){return{state:Ze(Ze({},fi),{},{selection:an})}}),Vn.next=5,Xl();case 5:return Vn.next=7,Fr();case 7:case"end":return Vn.stop()}},Ce)}))).apply(this,arguments)}function Fr(){return $r.apply(this,arguments)}function $r(){return($r=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(It=null===(lt=ze)||void 0===lt?void 0:lt.activeItem,r("focusActiveSearchResult",ze),!It){nn.next=9;break}return e(16,ie=Ze(Ze({},PO(c,ie,Jt=It.path)),{},{selection:void 0})),nn.next=7,Xl();case 7:return nn.next=9,hn(Jt);case 9:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}var Ai,Wr,wr=fae({onChange:function(Ce){e(22,Or=Ce)}}),Or=wr.getState(),jo=gO(function(Ce,lt){if(""===Ce)return r("clearing search result"),void(void 0!==ze&&e(17,ze=void 0));e(21,Le=!0),setTimeout(function(){r("searching...",Ce);var nn,an,Vn,li,fi,Lo,Ls,It=ase(Ce,lt,1e3);e(17,(nn=It,Vn=null!=(an=ze)&&an.activeItem?use(an.activeItem):void 0,li=nn.findIndex(function(Zo){return or(Vn,use(Zo))}),fi=-1!==li?li:void 0!==an?.activeIndex&&an?.activeIndex0?0:-1,Ls=(Lo=nn.map(function(Zo,wo){return Ze(Ze({},Zo),{},{active:wo===fi})}))[fi],ze={items:Lo,itemsMap:qv(Lo,function(Zo){return ln(Zo.path)}),activeItem:Ls,activeIndex:fi})),e(21,Le=!1)})},300),Fn=!1,xt=[],ui=Zb(pae);function Fi(Ce,lt,It,Jt){g0(function(){var nn;try{nn=ui(Ce,lt,It,Jt)}catch(an){nn=[{path:[],message:"Failed to validate: "+an.message,severity:Xd.warning}]}or(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),xe?{parseError:xe,isRepairable:!1}:(Fi(c,U,R,q),Hi(xt)?null:{validationErrors:xt})}function xo(){return c}function Qo(){return ie}function On(Ce){ne||(ne=!0,e(16,ie=nu(Ce,ie,[],coe({json:Ce},10240)?sh:Hb)))}function ai(Ce){void 0!==ie.selection&&(ie.selection&&Xc(Ce,ie.selection.anchorPath)&&Xc(Ce,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Ze(Ze({},ie),{},{selection:s0(Ce,ie)}))))}function bi(Ce){var lt=Ce.previousJson,It=Ce.previousState,Jt=Ce.previousText,nn=Ce.previousTextIsRepaired;void 0===lt&&void 0===Jt||(void 0!==c?wr.add(void 0!==lt?{undo:{patch:[{op:"replace",path:"",value:lt}],state:ul(It),json:void 0,text:Jt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ul(ie),json:void 0,text:u,textIsRepaired:Fn}}:{undo:{patch:void 0,json:void 0,text:Jt,state:ul(It),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ul(ie),text:u,textIsRepaired:Fn}}):void 0!==lt&&wr.add({undo:{patch:void 0,json:lt,state:ul(It),text:Jt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Fn,state:ul(ie)}}))}function Er(Ce,lt){if(r("patch",Ce,lt),void 0===c)throw new Error("Cannot apply patch: no JSON");var It={json:c,text:u},Jt=c,nn=ie,an=u,Vn=Fn,li=ose(c,Ce),fi=$oe(c,ie,Ce),Lo=a0(c,Ce),Ls=function(wh,bd){return void 0!==bd||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ze(Ze({},wh),{},{selection:bd}):wh}(fi.documentState,Lo,!1);r("patch updatedSelection",Lo);var Zo="function"==typeof lt?lt(fi.json,Ls):void 0;e(10,c=Zo&&void 0!==Zo.json?Zo.json:fi.json);var wo=Zo&&void 0!==Zo.state?Zo.state:Ls;e(16,ie=wo),e(11,u=void 0),e(23,Fn=!1),e(18,B=void 0),ai(c),wr.add({undo:{patch:li,json:void 0,text:an,state:ul(nn),textIsRepaired:Vn},redo:{patch:Ce,json:void 0,state:ul(wo),text:u,textIsRepaired:Fn}});var $l={json:c,previousJson:Jt,undo:li,redo:Ce};return ei(It,$l),$l}function qr(){!_&&ie.selection&&tt(iu(ie.selection.focusPath,!0))}function ao(){if(!_&&ie.selection){var Ce=ie.selection.focusPath,lt=Sn(c,Ce);Ho(lt)?(r("openJSONEditorModal",{path:It=Ce,value:Jt=lt}),Ne=!0,fe({content:{json:Jt},path:It,onPatch:Wr.onPatch,onClose:function(){Ne=!1,Ps()}})):tt(mr(Ce,!0))}var It,Jt}function Js(){if(!_&&Yi(ie.selection)){var Ce=ie.selection.focusPath,lt=ln(Ce),It=Sn(c,Ce),Jt=!lf(It,ie.enforceStringMap,lt,R),nn=Jt?String(It):Nv(String(It),R);r("handleToggleEnforceString",{enforceString:Jt,value:It,updatedValue:nn}),Yn([{op:"replace",path:lt,value:nn}],function(an,Vn){return{state:Roe(Vn,lt,Jt)}})}}function vr(){return Ks.apply(this,arguments)}function Ks(){return Ks=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return lt=!(It.length>0&&void 0!==It[0])||It[0],Jt.next=3,Jle({json:c,documentState:ie,indentation:lt?L:void 0,readOnly:_,parser:R,onPatch:Yn});case 3:case"end":return Jt.stop()}},Ce)})),Ks.apply(this,arguments)}function qa(){return Xa.apply(this,arguments)}function Xa(){return Xa=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(lt=!(It.length>0&&void 0!==It[0])||It[0],void 0!==c){Jt.next=3;break}return Jt.abrupt("return");case 3:return Jt.next=5,Kle({json:c,documentState:ie,indentation:lt?L:void 0,parser:R});case 5:case"end":return Jt.stop()}},Ce)})),Xa.apply(this,arguments)}function Ic(){d(kae,{},Ze(Ze({},Cm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ps()}})}function we(Ce,lt){d(jae,{text:Ce,onParse:Ik,onRepair:soe,onApply:lt},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ps()}})}function He(){Zle({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:_,onChange:Z,onPatch:Yn})}function qe(){!_&&void 0!==c&&ie.selection&&c0(ie.selection)&&!Hi(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Yn(nse(c,Qoe(ie.selection))))}function ut(){_||!ie.selection||!Nr(ie.selection)&&!Yi(ie.selection)||Hi(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Yn(function(lt,It){if(Yi(It))return[{op:"move",from:ln(It.focusPath),path:""}];if(!Nr(It))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Jt=Sn(lt,Xi(It.focusPath));if(oo(Jt))return[{op:"replace",path:"",value:It.paths.map(function(an){var Vn=Ws(Ln(an));return Jt[Vn]})}];if(Mo(Jt)){var nn={};return It.paths.forEach(function(an){var Vn=String(Ln(an));nn[Vn]=Jt[Vn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(It))}(c,ie.selection),function(lt,It){if(Ho(lt))return{state:np(lt,It,[])}}))}function Ue(Ce){void 0!==c&&rS({insertType:Ce,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br})}function Dn(Ce){xs(ie.selection)&&tt(mr(ie.selection.focusPath,!1)),Ue(Ce)}function ii(Ce){if(!_&&ie.selection)if(Lm(ie.selection))try{var lt=ie.selection.anchorPath,It=Sn(c,lt),Jt=function(an,Vn,li){if("array"===Vn){if(Array.isArray(an))return an;if(Io(an))return ioe(an);if("string"==typeof an)try{var fi=li.parse(an);if(Array.isArray(fi))return fi;if(Io(fi))return ioe(fi)}catch{return[an]}return[an]}if("object"===Vn){if(Array.isArray(an))return noe(an);if(Io(an))return an;if("string"==typeof an)try{var Lo=li.parse(an);if(Io(Lo))return Lo;if(Array.isArray(Lo))return noe(Lo)}catch{return{value:an}}return{value:an}}if("value"===Vn)return Ho(an)?li.stringify(an):an;throw new Error("Cannot convert ".concat(VN(an,li)," to ").concat(Vn))}(It,Ce,R);if(Jt===It)return;var nn=[{op:"replace",path:ln(lt),value:Jt}];r("handleConvert",{selection:ie.selection,path:lt,type:Ce,operations:nn}),Yn(nn,function(an,Vn){return{state:np(an,Vn,ie.selection.focusPath)}})}catch(an){X(an)}else X(new Error("Cannot convert current selection to ".concat(Ce)))}function hi(){var Ce=qoe(c,ie,!1),lt=Xi(ie.selection.focusPath);!Hi(Ce.focusPath)&&or(lt,Xi(Ce.focusPath))?tt(uf(Ce.focusPath)):tt(cf(lt)),r("insert before",{selection:ie.selection,selectionBefore:Ce,parentPath:lt}),Xl().then(Rl)}function di(){var Ce=Nr(ie.selection)?Ln(ie.selection.paths):ie.selection.focusPath;r("insert after",Ce),tt(uf(Ce)),Xl().then(Rl)}function kr(Ce){return Qr.apply(this,arguments)}function Qr(){return(Qr=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,ece({char:lt,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br,onSelect:tt});case 2:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function gi(){if(!_&&wr.getState().canUndo){var Ce=wr.undo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.undo.patch?Yu(c,Ce.undo.patch):Ce.undo.json),e(16,ie=Ce.undo.state),e(11,u=Ce.undo.text),e(23,Fn=Ce.undo.textIsRepaired),r("undo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.undo.patch,undo:Ce.redo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function yr(){if(!_&&wr.getState().canRedo){var Ce=wr.redo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.redo.patch?Yu(c,Ce.redo.patch):Ce.redo.json),e(16,ie=Ce.redo.state),e(11,u=Ce.redo.text),e(23,Fn=Ce.redo.textIsRepaired),r("redo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.redo.patch,undo:Ce.undo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function Ee(Ce){var lt;_||void 0===c||(Ne=!0,V({id:h,json:c,rootPath:Ce,onSort:(lt=Zi(vn().mark(function It(Jt){var nn;return vn().wrap(function(an){for(;;)switch(an.prev=an.next){case 0:r("onSort",Ce,nn=Jt.operations),Yn(nn,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,Ce)),{},{selection:mr(Ce,!1)})}});case 3:case"end":return an.stop()}},It)})),function(It){return lt.apply(this,arguments)}),onClose:function(){Ne=!1,Ps()}}))}function St(){ie.selection&&Ee(Joe(c,ie.selection))}function Ht(Ce){var It=Ce.rootPath,Jt=Ce.onTransform,nn=Ce.onClose;void 0!==c&&It&&(Ne=!0,oe({id:Ce.id||f,json:c,rootPath:It,onTransform:Jt?function(an){Jt({operations:an,json:c,transformedJson:Yu(c,an)})}:function(an){r("onTransform",It,an),Yn(an,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,It)),{},{selection:mr(It,!1)})}})},onClose:function(){Ne=!1,Ps(),nn&&nn()}}))}function sn(){ie.selection&&Ht({rootPath:Joe(c,ie.selection)})}function hn(Ce){return ri.apply(this,arguments)}function ri(){return ri=Zi(vn().mark(function Ce(lt){var It,Jt,nn,an,li=arguments;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return It=!(li.length>1&&void 0!==li[1])||li[1],e(16,ie=PO(c,ie,Xi(lt))),fi.next=4,Xl();case 4:if(!(Jt=Oi(lt))){fi.next=14;break}if(r("scrollTo",{path:lt,elem:Jt,refContents:s}),nn=s.getBoundingClientRect(),an=Jt.getBoundingClientRect(),It){fi.next=12;break}if(!(an.bottom>nn.top&&an.topIt.bottom-20&&y(lt,{container:s,offset:-(It.height-nn-20),duration:0})}}function ei(Ce,lt){(void 0!==Ce.json||void 0!==Ce?.text)&&(void 0!==u?Z({text:u,json:void 0},Ce,{contentErrors:Cr(),patchResult:lt}):void 0!==c&&Z({text:void 0,json:c},Ce,{contentErrors:Cr(),patchResult:lt}))}function Yn(Ce,lt){if(!_)return r("handlePatch",Ce,lt),Er(Ce,lt)}function br(Ce,lt){var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Fn,li=nu(c,ie,[],sh),fi="function"==typeof lt?lt(Ce,li):void 0;e(10,c=fi&&void 0!==fi.json?fi.json:Ce),e(16,ie=fi&&void 0!==fi.state?fi.state:li),e(11,u=void 0),e(23,Fn=!1),ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Ar(Ce,lt){r("handleChangeText");var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Fn;try{e(10,c=z(Ce)),e(16,ie=nu(c,ie,[],sh)),e(11,u=void 0),e(23,Fn=!1)}catch{try{e(10,c=z(Yd(Ce))),e(16,ie=nu(c,ie,[],sh)),e(11,u=Ce),e(23,Fn=!0)}catch{e(10,c=void 0),e(16,ie=Lk({json:c,expand:sh})),e(11,u=Ce),e(23,Fn=!1)}}if("function"==typeof lt){var li=lt(c,ie);e(10,c=li&&li.json?li.json:c),e(16,ie=li&&li.state?li.state:ie)}ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Po(Ce,lt){var It=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:Ce,expanded:lt,recursive:It}),e(16,ie=lt?It?nu(c,ie,Ce,Hb):function PGe(t,n){return Ze(Ze({},t),{},{expandedMap:Ze(Ze({},t.expandedMap),{},ql({},ln(n),!0))})}(ie,Ce):Loe(ie,Ce)),ie.selection&&!lt&&function RGe(t,n){return l0(t.focusPath,n)&&(t.focusPath.length>n.length||Xs(t))}(ie.selection,Ce)&&tt(void 0),setTimeout(function(){jk(l)||Ps()})}function ca(Ce){r("openFind",{findAndReplace:Ce}),e(19,Ie=!1),e(20,Ye=!1),Xl().then(function(){e(19,Ie=!0),e(20,Ye=Ce)})}function md(Ce,lt){r("handleExpandSection",Ce,lt);var nn,an,Vn,It=ln(Ce);e(16,(an=It,Vn=lt,ie=Ze(Ze({},nn=ie),{},{visibleSectionsMap:Ze(Ze({},nn.visibleSectionsMap),{},ql({},an,Poe(Rk(nn,an).concat(Vn))))})))}function hu(Ce){r("pasted json as text",Ce),e(18,B=Ce)}function ua(Ce){Ne=!0;var Lo=m(XXe,{json:c,documentState:ie,parser:R,showTip:Ce.showTip,onEditKey:qr,onEditValue:ao,onToggleEnforceString:Js,onCut:vr,onCopy:qa,onPaste:Ic,onRemove:He,onDuplicate:qe,onExtract:ut,onInsertBefore:hi,onInsert:Dn,onConvert:ii,onInsertAfter:di,onSort:St,onTransform:sn,onCloseContextMenu:function(){g(Lo),Ps()}},{left:Ce.left,top:Ce.top,offsetTop:Ce.offsetTop,offsetLeft:Ce.offsetLeft,width:Ce.width,height:Ce.height,anchor:Ce.anchor,closeOnOuterClick:!0,onClose:function(){Ne=!1,Ps()}})}function Rl(Ce){if(!_&&!ip(ie.selection)){if(Ce&&(Ce.stopPropagation(),Ce.preventDefault()),Ce&&"contextmenu"===Ce.type&&Ce.target!==a)ua({left:Ce.clientX,top:Ce.clientY,width:260,height:336,showTip:!1});else{var lt,It=null===(lt=s)||void 0===lt?void 0:lt.querySelector(".jse-context-menu-pointer.jse-selected");if(It)ua({anchor:It,offsetTop:2,width:260,height:336,showTip:!1});else{var Jt,nn=null===(Jt=s)||void 0===Jt?void 0:Jt.getBoundingClientRect();nn&&ua({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),It=(lt=B).path,Jt=lt.contents,tt(mr(It,!1)),nn.next=5,Xl();case 5:Yn([{op:"replace",path:ln(It),value:Jt}],function(an,Vn){return{state:np(an,Vn,It)}});case 7:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}function Ps(){r("focus"),a&&(a.focus(),a.select())}function vd(Ce){return lt=c,It=ie,nn=Xi(Jt=Ce),an=[Ln(Jt)],(li=(Vn=Sn(lt,nn))?HO(Vn,It,an):void 0)?mr(nn.concat(li),!1):uf(Jt);var lt,It,Jt,nn,an,Vn,li}function yd(Ce){i&&i.onDrag(Ce)}function eT(){i&&i.onDragEnd()}return t.$$set=function(Ce){"readOnly"in Ce&&e(0,_=Ce.readOnly),"externalContent"in Ce&&e(50,C=Ce.externalContent),"mainMenuBar"in Ce&&e(1,S=Ce.mainMenuBar),"navigationBar"in Ce&&e(2,M=Ce.navigationBar),"escapeControlCharacters"in Ce&&e(51,$=Ce.escapeControlCharacters),"escapeUnicodeCharacters"in Ce&&e(52,G=Ce.escapeUnicodeCharacters),"parser"in Ce&&e(3,R=Ce.parser),"parseMemoizeOne"in Ce&&e(53,z=Ce.parseMemoizeOne),"validator"in Ce&&e(54,U=Ce.validator),"validationParser"in Ce&&e(55,q=Ce.validationParser),"pathParser"in Ce&&e(4,re=Ce.pathParser),"indentation"in Ce&&e(5,L=Ce.indentation),"onError"in Ce&&e(6,X=Ce.onError),"onChange"in Ce&&e(56,Z=Ce.onChange),"onChangeMode"in Ce&&e(57,H=Ce.onChangeMode),"onRenderValue"in Ce&&e(58,he=Ce.onRenderValue),"onRenderMenu"in Ce&&e(7,E=Ce.onRenderMenu),"onClassName"in Ce&&e(59,N=Ce.onClassName),"onFocus"in Ce&&e(60,F=Ce.onFocus),"onBlur"in Ce&&e(61,Y=Ce.onBlur),"onSortModal"in Ce&&e(62,V=Ce.onSortModal),"onTransformModal"in Ce&&e(63,oe=Ce.onTransformModal),"onJSONEditorModal"in Ce&&e(64,fe=Ce.onJSONEditorModal)},t.$$.update=function(){var Ce,lt;3145728&t.$$.dirty[1]&&e(73,ot=TO({escapeControlCharacters:$,escapeUnicodeCharacters:G})),524288&t.$$.dirty[1]&&function gt(Ce){void 0!==Ce.json&&function(lt){if(void 0!==lt){var It=!or(c,lt);if(r("update external json",{isChanged:It,currentlyText:void 0===c}),It){var Jt={json:c,text:u},nn=ie,an=c,Vn=u,li=Fn;e(10,c=lt),On(c),e(11,u=void 0),e(23,Fn=!1),ai(c),bi({previousJson:an,previousState:nn,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.json),void 0!==Ce.text&&function(lt){if(void 0!==lt&&void 0===C.json){var It=lt!==u;if(r("update external text",{isChanged:It}),It){var Jt={json:c,text:u},nn=c,an=ie,Vn=u,li=Fn;try{e(10,c=z(lt)),On(c),e(11,u=lt),e(23,Fn=!1),xe=void 0}catch(fi){try{e(10,c=z(Yd(lt))),On(c),e(11,u=lt),e(23,Fn=!0),xe=void 0,ai(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Fn=!1),xe=Nk(u,fi.message||fi.toString())}}ai(c),bi({previousJson:nn,previousState:an,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&jo(_t,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Fi(c,U,R,q),4096&t.$$.dirty[0]&&e(24,(lt={},(Ce=xt).forEach(function(It){lt[ln(It.path)]=It}),Ce.forEach(function(It){for(var Jt=It.path;Jt.length>0;){var nn=ln(Jt=Xi(Jt));nn in lt||(lt[nn]={isChildError:!0,path:Jt,message:"Contains invalid data",severity:Xd.warning})}}),Ai=lt)),512&t.$$.dirty[0]&&(i=s?function(Ce){var lt,It;function Jt(li){return li<20?200:li<50?400:1200}function nn(){Ce&&(Ce.scrollTop+=.05*(lt||0))}function an(li){It&&li===lt||(Vn(),s4("startAutoScroll",li),lt=li,It=setInterval(nn,50))}function Vn(){It&&(s4("stopAutoScroll"),clearInterval(It),It=void 0,lt=void 0)}return s4("createAutoScrollHandler",Ce),{onDrag:function(li){if(Ce){var fi=li.clientY,Lo=Ce.getBoundingClientRect(),Ls=Lo.top,Zo=Lo.bottom;fiZo?an(Jt(fi-Zo)):Vn()}},onDragEnd:function(){Vn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Wr={readOnly:_,parser:R,normalization:ot,getJson:xo,getDocumentState:Qo,findElement:Oi,findNextInside:vd,focus:Ps,onPatch:Yn,onInsert:Ue,onExpand:Po,onSelect:tt,onFind:ca,onExpandSection:md,onPasteJson:hu,onRenderValue:he,onContextMenu:ua,onClassName:N||function(){},onDrag:yd,onDragEnd:eT}),8192&t.$$.dirty[0]&&r("context changed",Wr)},[_,S,M,R,re,L,X,E,function(){return Fn&&void 0!==c&&br(c),{json:c,text:u}},s,c,u,xt,Wr,a,l,ie,ze,B,Ie,Ye,Le,Or,Fn,Ai,o,At,function(){return ci.apply(this,arguments)},function(){return on.apply(this,arguments)},function(Ce,lt){return Ni.apply(this,arguments)},function(Ce,lt){return pn.apply(this,arguments)},function(){e(19,Ie=!1),e(20,Ye=!1),At(""),Ps()},function(Ce){r("select validation error",Ce),tt(mr(Ce.path,!1)),hn(Ce.path)},qa,function(Ce){Ce.preventDefault(),Qle({clipboardText:Ce.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onChangeText:Ar,openRepairModal:we})},gi,yr,function(){Ee([])},function(){Ht({rootPath:[]})},function(){Po([],!0,!0)},function(){Po([],!1,!0)},function(Ce){var lt=tp(Ce),It=Ce.shiftKey;if(r("keydown",{combo:lt,key:Ce.key}),"Ctrl+X"===lt&&(Ce.preventDefault(),vr(!0)),"Ctrl+Shift+X"===lt&&(Ce.preventDefault(),vr(!1)),"Ctrl+C"===lt&&(Ce.preventDefault(),qa(!0)),"Ctrl+Shift+C"===lt&&(Ce.preventDefault(),qa(!1)),"Ctrl+D"===lt&&(Ce.preventDefault(),qe()),"Delete"!==lt&&"Backspace"!==lt||(Ce.preventDefault(),He()),"Insert"===lt&&(Ce.preventDefault(),Ue("structure")),"Ctrl+A"===lt&&(Ce.preventDefault(),tt(mr([],!1))),"Ctrl+Q"===lt&&Rl(Ce),"ArrowUp"===lt||"Shift+ArrowUp"===lt){Ce.preventDefault();var Jt=ie.selection?qoe(c,ie,It,!0)||ie.selection:s0(c,ie);tt(Jt),Bn(Jt.focusPath)}if("ArrowDown"===lt||"Shift+ArrowDown"===lt){Ce.preventDefault();var nn=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Nr(Mr)?Mr.focusPath:Ln(Mr.paths),fu=HO(wo,$l,tc),_d=fu,Ch=fu;if(null===fu||null==_d||null==Ch)return null;if(wh){var xd=HO(wo,Ho(Sn(wo,tc))?Loe($l,tc):$l,tc);return null===xd?null:Zu(Mr)?Os(wo,xd,xd):Xs(Mr)?Os(wo,_d,Ch):Os(wo,Mr.anchorPath,xd)}if(xs(Mr)){var z_=Sn(wo,Xi(fu));return Array.isArray(z_)?mr(Ch,!1):iu(Ch,!1)}return Yi(Mr)?mr(Ch,!1):Xs(Mr)?Os(wo,_d,Ch):Os(wo,fu,fu)}(c,ie,It,!0)||ie.selection:s0(c,ie);tt(nn),Bn(nn.focusPath)}if("ArrowLeft"===lt||"Shift+ArrowLeft"===lt){Ce.preventDefault();var an=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.previous;if(wh)return Nr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath);if(fu&&_d)return zO(_d);var xd=Sn(wo,Xi(Mr.focusPath));return Yi(Mr)&&Array.isArray(xd)?Os(wo,Mr.focusPath,Mr.focusPath):Nr(Mr)&&!Array.isArray(xd)?iu(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(an),Bn(an.focusPath)}if("ArrowRight"===lt||"Shift+ArrowRight"===lt){Ce.preventDefault();var Vn=ie.selection&&void 0!==c?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.next;return wh?Nr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath):fu&&_d?zO(_d):Nr(Mr)?mr(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(Vn),Bn(Vn.focusPath)}if("Enter"===lt&&ie.selection){if(!_&&Nr(ie.selection)&&1===ie.selection.paths.length){var li=ie.selection.focusPath,fi=Sn(c,Xi(li));Array.isArray(fi)&&tt(mr(li,!1))}!_&&xs(ie.selection)&&(Ce.preventDefault(),tt(Ze(Ze({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(Ce.preventDefault(),Ho(Sn(c,ie.selection.focusPath))?Po(ie.selection.focusPath,!0):_||tt(Ze(Ze({},ie.selection),{},{edit:!0})))}if(1===lt.replace(/^Shift\+/,"").length&&ie.selection)return Ce.preventDefault(),void kr(Ce.key);if("Enter"===lt&&(Zu(ie.selection)||Xs(ie.selection)))return Ce.preventDefault(),void kr("");if("Ctrl+Enter"===lt&&Yi(ie.selection)){var Lo=Sn(c,ie.selection.focusPath);V2(Lo)&&window.open(String(Lo),"_blank")}if("Escape"===lt&&ie.selection&&(Ce.preventDefault(),tt(void 0)),"Ctrl+F"===lt&&(Ce.preventDefault(),ca(!1)),"Ctrl+H"===lt&&(Ce.preventDefault(),ca(!0)),"Ctrl+Z"===lt){Ce.preventDefault();var Ls=document.activeElement;Ls&&Ls.blur&&Ls.focus?(Ls.blur(),setTimeout(function(){gi(),setTimeout(function(){return Ls.select()})})):gi()}if("Ctrl+Shift+Z"===lt){Ce.preventDefault();var Zo=document.activeElement;Zo&&Zo.blur&&Zo.focus?(Zo.blur(),setTimeout(function(){yr(),setTimeout(function(){return Zo.select()})})):yr()}},function(Ce){r("handleMouseDown",Ce),setTimeout(function(){setTimeout(function(){v||yoe(Ce.target,"BUTTON")||(Ps(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Ze(Ze({},ie),{},{selection:Os(c||{},[],[])}))))})})},Rl,function(Ce){_||ua({anchor:_oe(Ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Jo.text)},function(Ce){tt(Ce),Ps(),hn(Ce.focusPath)},function(Ce){!Pb(Ce.target,function(It){return It===l})&&ip(ie.selection)&&(r("click outside the editor, stop edit mode"),tt(function(It){return xs(It)||Yi(It)?Ze(Ze({},It),{},{edit:!1}):It}),v&&a&&(a.focus(),a.blur()),Xl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,$,G,z,U,q,Z,H,he,N,F,Y,V,oe,fe,function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hb;r("expand");var lt=Ze(Ze({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=nu(c,lt,[],Ce))},Cr,xo,Er,Ht,hn,Oi,Ps,ot,_t,function(Ce){e(19,Ie=Ce)},function(Ce){Vi[Ce?"unshift":"push"](function(){e(14,a=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(9,s=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(15,l=Ce)})}]}var k4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,XJe,qJe,Ei,{readOnly:0,externalContent: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,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},BJe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function YJe(t){pi(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function sce(t){var n,e,i,r,o,s=[KJe,JJe],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function JJe(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function KJe(t){var n,e;return n=new wqe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ace(t){var n,e;return n=new k4({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function QJe(t){var n,e;return{c:function(){n=be("div"),e=tn(t[17]),P(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function ZJe(t){var n,e;return n=new k4({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne=t[21](t[0]).description+"";n=new Nqe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new sr({props:{data:t[15]?ru:rp}});var ie=t[15]&&sce(t);X=new sr({props:{data:t[16]?ru:rp}});var Ie=t[16]&&ace(t),Ye=[ZJe,QJe],Le=[];function _t(At,_n){return At[17]?1:0}return Y=_t(t),V=Le[Y]=Ye[Y](t),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=be("div"),o=be("div"),(s=be("div")).innerHTML='
    Language
    ',a=it(),l=be("div"),c=it(),(u=be("div")).innerHTML='
    Path
    ',d=it(),h=be("input"),p=it(),m=be("div"),g=be("div"),v=be("button"),mt(y.$$.fragment),_=tn("\n Wizard"),C=it(),ie&&ie.c(),S=it(),(M=be("div")).innerHTML='
    Query
    ',$=it(),G=be("textarea"),R=it(),z=be("div"),U=be("div"),q=be("div"),re=be("div"),L=be("button"),mt(X.$$.fragment),Z=tn("\n Original"),H=it(),Ie&&Ie.c(),he=it(),E=be("div"),(N=be("div")).innerHTML='
    Preview
    ',F=it(),V.c(),oe=it(),fe=be("div"),Ne=be("button"),xe=tn("Transform"),P(s,"class","jse-label svelte-107mggt"),P(l,"class","jse-description svelte-107mggt"),P(u,"class","jse-label svelte-107mggt"),P(h,"class","jse-path svelte-107mggt"),P(h,"type","text"),h.readOnly=!0,P(h,"title","Selected path"),h.value=f=Hi(t[1])?"(whole document)":tu(Kl(t[1])),P(v,"type","button"),P(v,"class","svelte-107mggt"),P(g,"class","jse-label-inner svelte-107mggt"),P(m,"class","jse-label svelte-107mggt"),P(M,"class","jse-label svelte-107mggt"),P(G,"class","jse-query svelte-107mggt"),P(G,"spellcheck","false"),G.value=t[13],P(o,"class","jse-query-contents svelte-107mggt"),P(L,"type","button"),P(L,"class","svelte-107mggt"),P(re,"class","jse-label-inner svelte-107mggt"),P(q,"class","jse-label svelte-107mggt"),P(U,"class","jse-original-data svelte-107mggt"),Mt(U,"jse-hide",!t[16]),P(N,"class","jse-label svelte-107mggt"),P(E,"class","jse-preview-data svelte-107mggt"),P(z,"class","jse-data-contents svelte-107mggt"),Mt(z,"jse-hide-original-data",!t[16]),P(r,"class","jse-main-contents svelte-107mggt"),P(Ne,"type","button"),P(Ne,"class","jse-primary svelte-107mggt"),Ne.disabled=tt=!!t[17],P(fe,"class","jse-actions svelte-107mggt"),P(i,"class","jse-modal-contents svelte-107mggt")},m:function(At,_n){ft(n,At,_n),Pe(At,e,_n),Pe(At,i,_n),de(i,r),de(r,o),de(o,s),de(o,a),de(o,l),l.innerHTML=ne,de(o,c),de(o,u),de(o,d),de(o,h),de(o,p),de(o,m),de(m,g),de(g,v),ft(y,v,null),de(v,_),de(o,C),ie&&ie.m(o,null),de(o,S),de(o,M),de(o,$),de(o,G),de(r,R),de(r,z),de(z,U),de(U,q),de(q,re),de(re,L),ft(X,L,null),de(L,Z),de(U,H),Ie&&Ie.m(U,null),de(z,he),de(z,E),de(E,N),de(E,F),Le[Y].m(E,null),de(i,oe),de(i,fe),de(fe,Ne),de(Ne,xe),ze=!0,ot||(B=[Ft(v,"click",t[25]),Ft(G,"input",t[23]),Ft(L,"click",t[26]),Ft(Ne,"click",t[24]),_a(nKe.call(null,Ne))],ot=!0)},p:function(At,_n){var ci={};512&_n[0]&&(ci.queryLanguages=At[9]),1&_n[0]&&(ci.queryLanguageId=At[0]),n.$set(ci),(!ze||1&_n[0])&&ne!==(ne=At[21](At[0]).description+"")&&(l.innerHTML=ne),(!ze||2&_n[0]&&f!==(f=Hi(At[1])?"(whole document)":tu(Kl(At[1])))&&h.value!==f)&&(h.value=f);var on={};32768&_n[0]&&(on.data=At[15]?ru:rp),y.$set(on),At[15]?ie?(ie.p(At,_n),32768&_n[0]&&Q(ie,1)):((ie=sce(At)).c(),Q(ie,1),ie.m(o,S)):ie&&($t(),ce(ie,1,1,function(){ie=null}),Bt()),(!ze||8192&_n[0])&&(G.value=At[13]);var Ni={};65536&_n[0]&&(Ni.data=At[16]?ru:rp),X.$set(Ni),At[16]?Ie?(Ie.p(At,_n),65536&_n[0]&&Q(Ie,1)):((Ie=ace(At)).c(),Q(Ie,1),Ie.m(U,null)):Ie&&($t(),ce(Ie,1,1,function(){Ie=null}),Bt()),(!ze||65536&_n[0])&&Mt(U,"jse-hide",!At[16]);var pn=Y;(Y=_t(At))===pn?Le[Y].p(At,_n):($t(),ce(Le[pn],1,1,function(){Le[pn]=null}),Bt(),(V=Le[Y])?V.p(At,_n):(V=Le[Y]=Ye[Y](At)).c(),Q(V,1),V.m(E,null)),(!ze||65536&_n[0])&&Mt(z,"jse-hide-original-data",!At[16]),(!ze||131072&_n[0]&&tt!==(tt=!!At[17]))&&(Ne.disabled=tt)},i:function(At){ze||(Q(n.$$.fragment,At),Q(y.$$.fragment,At),Q(ie),Q(X.$$.fragment,At),Q(Ie),Q(V),ze=!0)},o:function(At){ce(n.$$.fragment,At),ce(y.$$.fragment,At),ce(ie),ce(X.$$.fragment,At),ce(Ie),ce(V),ze=!1},d:function(At){pt(n,At),At&&je(e),At&&je(i),pt(y),ie&&ie.d(),pt(X),Ie&&Ie.d(),Le[Y].d(),ot=!1,ho(B)}}}function tKe(t){var n,e,i,r,o;return e=new Doe({props:{$$slots:{default:[eKe]},$$scope:{ctx:t}}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=_a(iS.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nKe(t){t.focus()}function iKe(t,n,e){var i,r,o=wa("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+fb():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,_=n.queryLanguageId,C=n.onChangeQueryLanguage,S=n.onRenderValue,M=n.onClassName,$=n.onTransform,G=xa("simple-modal").close,R="".concat(a,":").concat(ln(u)),z=ed[R]||{},U=!1!==ed.showWizard,q=!1!==ed.showOriginal,re=z.queryOptions||{},L=_===z.queryLanguageId&&z.query?z.query:he(_).createQuery(l,z.queryOptions||{}),X=z.isManual||!1,Z=void 0,H={text:""};function he(N){return y.find(function(F){return F.id===N})||y[0]}var E=Gv(function(N,F){try{o("previewTransform",{query:F});var Y=he(_).executeQuery(N,F,p);e(18,H={json:Y}),e(17,Z=void 0)}catch(V){e(18,H={text:""}),e(17,Z=V.toString())}},300);return t.$$set=function(N){"id"in N&&e(28,a=N.id),"json"in N&&e(29,l=N.json),"rootPath"in N&&e(1,u=N.rootPath),"indentation"in N&&e(2,d=N.indentation),"escapeControlCharacters"in N&&e(3,h=N.escapeControlCharacters),"escapeUnicodeCharacters"in N&&e(4,f=N.escapeUnicodeCharacters),"parser"in N&&e(5,p=N.parser),"parseMemoizeOne"in N&&e(6,m=N.parseMemoizeOne),"validationParser"in N&&e(7,g=N.validationParser),"pathParser"in N&&e(8,v=N.pathParser),"queryLanguages"in N&&e(9,y=N.queryLanguages),"queryLanguageId"in N&&e(0,_=N.queryLanguageId),"onChangeQueryLanguage"in N&&e(30,C=N.onChangeQueryLanguage),"onRenderValue"in N&&e(10,S=N.onRenderValue),"onClassName"in N&&e(11,M=N.onClassName),"onTransform"in N&&e(31,$=N.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,L),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:re,query:L,queryLanguageId:_,isManual:X},ed),o("store state in memory",R,ed[R]))},[_,u,d,h,f,p,m,g,v,y,S,M,re,L,i,U,q,Z,H,r,G,he,function(N){e(12,re=N),e(13,L=he(_).createQuery(l,N)),e(33,X=!1),o("updateQueryByWizard",{queryOptions:re,query:L,isManual:X})},function(N){e(13,L=N.target.value),e(33,X=!0),o("handleChangeQuery",{query:L,isManual:X})},function(){try{o("handleTransform",{query:L});var N=he(_).executeQuery(i,L,p);$([{op:"replace",path:ln(u),value:N}]),G()}catch(F){console.error(F),e(18,H={text:""}),e(17,Z=F.toString())}},function(){e(15,U=!U),e(32,ed.showWizard=U,ed)},function(){e(16,q=!q),e(32,ed.showOriginal=q,ed)},function(N){o("handleChangeQueryLanguage",N),e(0,_=N),C(N);var F=he(_);e(13,L=F.createQuery(l,re)),e(33,X=!1)},a,l,C,$,ed,X]}var rKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,iKe,tKe,Ei,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},YJe,[-1,-1]),r}return Se(e)}(),up={};function oKe(t){pi(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function lce(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new Hm({props:c}),Vi.push(function(){return Uu(o,"value",l)}),{c:function(){n=be("tr"),(e=be("th")).textContent="Property",i=it(),r=be("td"),mt(o.$$.fragment),P(e,"class","svelte-1y818v2"),P(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),de(n,e),de(n,i),de(n,r),ft(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],zu(function(){return s=!1})),o.$set(h)},i:function(u){a||(Q(o.$$.fragment,u),a=!0)},o:function(u){ce(o.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(o)}}}function cce(t){var n,e;return{c:function(){n=be("div"),e=tn(t[5]),P(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&je(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z;e=new c4({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&lce(t);function he(F){t[15](F)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),S=new Hm({props:E}),Vi.push(function(){return Uu(S,"value",he)});var N=t[5]&&cce(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),o=be("table"),(s=be("colgroup")).innerHTML=' \n ',a=it(),l=be("tbody"),c=be("tr"),(u=be("th")).textContent="Path",d=it(),h=be("td"),f=be("input"),m=it(),H&&H.c(),g=it(),v=be("tr"),(y=be("th")).textContent="Direction",_=it(),C=be("td"),mt(S.$$.fragment),$=it(),G=be("div"),N&&N.c(),R=it(),z=be("div"),U=be("button"),q=tn("Sort"),P(u,"class","svelte-1y818v2"),P(f,"class","jse-path svelte-1y818v2"),P(f,"type","text"),f.readOnly=!0,P(f,"title","Selected path"),f.value=p=Hi(t[0])?"(whole document)":tu(Kl(t[0])),P(h,"class","svelte-1y818v2"),P(y,"class","svelte-1y818v2"),P(C,"class","svelte-1y818v2"),P(o,"class","svelte-1y818v2"),P(G,"class","jse-space svelte-1y818v2"),P(U,"type","button"),P(U,"class","jse-primary svelte-1y818v2"),U.disabled=re=!!t[4]&&!t[1],P(z,"class","jse-actions svelte-1y818v2"),P(r,"class","jse-modal-contents svelte-1y818v2"),P(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(F,Y){Pe(F,n,Y),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(o,s),de(o,a),de(o,l),de(l,c),de(c,u),de(c,d),de(c,h),de(h,f),de(l,m),H&&H.m(l,null),de(l,g),de(l,v),de(v,y),de(v,_),de(v,C),ft(S,C,null),de(r,$),de(r,G),N&&N.m(G,null),de(r,R),de(r,z),de(z,U),de(U,q),L=!0,X||(Z=[Ft(U,"click",t[8]),_a(aKe.call(null,U)),_a(iS.call(null,n,t[6]))],X=!0)},p:function(F,Y){var V=Un(Y,1)[0],oe={};16&V&&(oe.title=F[4]?"Sort array items":"Sort object keys"),e.$set(oe),(!L||1&V&&p!==(p=Hi(F[0])?"(whole document)":tu(Kl(F[0])))&&f.value!==p)&&(f.value=p),F[4]&&(F[3].length>1||void 0===F[1])?H?(H.p(F,V),26&V&&Q(H,1)):((H=lce(F)).c(),Q(H,1),H.m(l,g)):H&&($t(),ce(H,1,1,function(){H=null}),Bt());var fe={};!M&&4&V&&(M=!0,fe.value=F[2],zu(function(){return M=!1})),S.$set(fe),F[5]?N?N.p(F,V):((N=cce(F)).c(),N.m(G,null)):N&&(N.d(1),N=null),(!L||18&V&&re!==(re=!!F[4]&&!F[1]))&&(U.disabled=re)},i:function(F){L||(Q(e.$$.fragment,F),Q(H),Q(S.$$.fragment,F),L=!0)},o:function(F){ce(e.$$.fragment,F),ce(H),ce(S.$$.fragment,F),L=!1},d:function(F){F&&je(n),pt(e),H&&H.d(),pt(S),N&&N.d(),X=!1,ho(Z)}}}function aKe(t){t.focus()}function lKe(t,n,e){var i,r,o,s=wa("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xa("simple-modal").close,h="".concat(a,":").concat(ln(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=up[h]&&up[h].selectedProperty||void 0,v=up[h]&&up[h].selectedDirection||p,y=void 0;return t.$$set=function(_){"id"in _&&e(9,a=_.id),"json"in _&&e(10,l=_.json),"rootPath"in _&&e(0,c=_.rootPath),"onSort"in _&&e(11,u=_.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?CO(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(Lb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,up[h]={selectedProperty:g,selectedDirection:v},up),s("store state in memory",h,up[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var _,C;e(5,y=void 0);var S=null===(_=g)||void 0===_?void 0:_.value,M=null===(C=v)||void 0===C?void 0:C.value,$=Nle(l,c,S,M);u({operations:$,rootPath:c,itemPath:S,direction:M}),d()}catch(G){e(5,y=G.toString())}},a,l,u,up,r,function(_){e(1,g=_),e(3,o),e(13,r),e(4,i)},function(_){e(2,v=_)}]}var cKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,lKe,sKe,Ei,{id:9,json:10,rootPath:0,onSort:11},oKe),r}return Se(e)}();function dh(){}function sS(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function uKe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function dKe(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,_=n.canTransform,C=n.onRenderMenu;return t.$$set=function(S){"readOnly"in S&&e(1,s=S.readOnly),"onFormat"in S&&e(2,a=S.onFormat),"onCompact"in S&&e(3,l=S.onCompact),"onSort"in S&&e(4,c=S.onSort),"onTransform"in S&&e(5,u=S.onTransform),"onToggleSearch"in S&&e(6,d=S.onToggleSearch),"onUndo"in S&&e(7,h=S.onUndo),"onRedo"in S&&e(8,f=S.onRedo),"canUndo"in S&&e(9,p=S.canUndo),"canRedo"in S&&e(10,m=S.canRedo),"canFormat"in S&&e(11,g=S.canFormat),"canCompact"in S&&e(12,v=S.canCompact),"canSort"in S&&e(13,y=S.canSort),"canTransform"in S&&e(14,_=S.canTransform),"onRenderMenu"in S&&e(15,C=S.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:m4,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:UYe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!_},{type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,r]}var hKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,dKe,uKe,Ei,{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}),r}return Se(e)}(),fo=function(){function t(){ke(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),aS.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),aS.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new t_(this),o=new t_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new t_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new dce(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new hce(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):aS.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,fo);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function fKe(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ke(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new pKe(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(uce(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=lS(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return pr(qi(e.prototype),"replace",this).call(this,i,r,o);var s=lS(this.text,lS(o.text,uce(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):aS.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),aS=function(t){wt(e,fo);var n=Ct(e);function e(i,r){var o;ke(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return pr(qi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return pr(qi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Un(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,z){return R+z.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,_=[];function C(R){var z;if(R.lines>p&&R instanceof e){var U,q=Re(R.children);try{for(q.s();!(U=q.n()).done;)C(U.value)}catch(re){q.e(re)}finally{q.f()}}else R.lines>m&&(v>m||!v)?(S(),g.push(R)):R instanceof id&&v&&(z=_[_.length-1])instanceof id&&R.lines+z.lines<=32?(v+=R.lines,y+=R.length+1,_[_.length-1]=new id(z.text.concat(R.text),z.length+1+R.length)):(v+R.lines>f&&S(),v+=R.lines,y+=R.length+1,_.push(R))}function S(){0!=v&&(g.push(1==_.length?_[0]:e.from(_,y)),y=-1,v=_.length=0)}var M,$=Re(i);try{for($.s();!(M=$.n()).done;)C(M.value)}catch(R){$.e(R)}finally{$.f()}return S(),1==g.length?g[0]:new e(g,o)}}]),e}();function lS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ke(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),dce=function(){function t(n,e,i){ke(this,t),this.value="",this.done=!1,this.cursor=new t_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),hce=function(){function t(n){ke(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(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}}]),t}();typeof Symbol<"u"&&(fo.prototype[Symbol.iterator]=function(){return this.iter()},t_.prototype[Symbol.iterator]=dce.prototype[Symbol.iterator]=hce.prototype[Symbol.iterator]=function(){return this});for(var pKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),w0="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(t){return t?parseInt(t,36):1}),cS=1;cSt)return w0[n-1]<=t;return!1}function fce(t){return t>=127462&&t<=127487}function Pl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?gKe:pce)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function pce(t,n,e){if(n==t.length)return n;n&&mce(t.charCodeAt(n))&&gce(t.charCodeAt(n-1))&&n--;var i=Ba(t,n);for(n+=Sc(i);n=0&&fce(Ba(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function gKe(t,n,e){for(;n>0;){var i=pce(t,n-2,e);if(i=56320&&t<57344}function gce(t){return t>=55296&&t<56320}function Ba(t,n){var e=t.charCodeAt(n);if(!gce(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return mce(i)?i-56320+(e-55296<<10)+65536:e}function S4(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Sc(t){return t<65536?1:2}var D4=/\r\n?|\n/,Ll=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ll||(Ll={})),C0=function(){function t(n){ke(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ll.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ll.Simple&&c>=n&&(i==Ll.TrackDel&&rn||i==Ll.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,C0);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return T4(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return E4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){T4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return C0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new n_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&dp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var _=y?"string"==typeof y?fo.of(y.split(o||D4)):y:fo.empty,C=_.length;if(m==v&&0==C)return;ml&&dl(s,m-l,-1),dl(s,v-m,C),dp(a,s,_),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function dp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function E4(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new n_(t),a=new n_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);dl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):C0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new n_(t),s=new n_(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):C0.create(i);if(0==o.ins)dl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;dl(i,l,u,a),r&&u&&dp(r,i,s.text)}else-1==s.ins?(dl(i,o.off?0:o.len,l,a),r&&dp(r,i,o.textBit(l))):(dl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&dp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else dl(i,0,s.ins,a),r&&dp(r,i,s.text),s.next()}}var n_=function(){function t(n){ke(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?fo.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?fo.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),uS=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return en.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return en.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return en.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),en=function(){function t(n,e){ke(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return uS.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return uS.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function yce(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var A4=0,Qn=function(){function t(n,e,i,r,o){ke(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=A4++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new dS([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:M4),!!n.static,n.enables)}}]),t}();function M4(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var dS=function(){function t(n,e,i,r){ke(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=A4++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||I4(m,h)){var v=o(m);if(c?!bce(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var _=hS(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Va)||g.field(C,!1)==m.field(C,!1)})||(c?bce(v=o(m),_,s):s(v=o(m),_)))return m.values[l]=_,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function bce(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,_ce.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(A4++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function i_(t){return function(n){return new xce(n,t)}}var k0={highest:i_(0),high:i_(1),default:i_(2),low:i_(3),lowest:i_(4)},xce=Se(function t(n,e){ke(this,t),this.inner=n,this.prec=e}),hp=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new F4(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),F4=Se(function t(n,e){ke(this,t),this.compartment=n,this.inner=e}),wce=function(){function t(n,e,i,r,o,s){for(ke(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,S,M,$,G,o=[],s=Object.create(null),a=new Map,l=Re((C=n,S=e,M=a,$=[[],[],[],[],[]],G=new Map,function R(z,U){var q=G.get(z);if(null!=q){if(q<=U)return;var re=$[q].indexOf(z);re>-1&&$[q].splice(re,1),z instanceof F4&&M.delete(z.compartment)}if(G.set(z,U),Array.isArray(z)){var L,X=Re(z);try{for(X.s();!(L=X.n()).done;)R(L.value,U)}catch(he){X.e(he)}finally{X.f()}}else if(z instanceof F4){if(M.has(z.compartment))throw new RangeError("Duplicate use of compartment in extensions");var Z=S.get(z.compartment)||z.inner;M.set(z.compartment,Z),R(Z,U)}else if(z instanceof xce)R(z.inner,z.prec);else if(z instanceof Va)$[U].push(z),z.provides&&R(z.provides,U);else if(z instanceof dS)$[U].push(z),z.facet.extensions&&R(z.facet.extensions,2);else{var H=z.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(z,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,U)}}(C,2),$.reduce(function(z,U){return z.concat(U)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Va?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(S){return C.slot(S)})},p=0,m=o;p>1;function N(F){for(var Y=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function hS(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Cce=Qn.define(),kce=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Sce=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Dce=Qn.define(),Tce=Qn.define(),Ece=Qn.define(),Ace=Qn.define({combine:function(t){return!!t.length&&t[0]}}),fp=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new _Ke}}]),t}(),_Ke=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new fp(this,n)}}]),t}(),xKe=function(){function t(n){ke(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new hr(this,n)}}]),t}(),hr=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new xKe((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();hr.reconfigure=hr.define(),hr.appendConfig=hr.define();var Ql=function(){function t(n,e,i,r,o,s){ke(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&yce(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{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(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function wKe(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Mce(u,O4(l,h,a.changes.newLength),!0))}return u==a?a:Ql.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Dce));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:wKe(u,h))}}catch(_){d.e(_)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Ql.create(c,f,a.selection&&a.selection.map(p),hr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet(Tce),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Ql?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Ql?y[0]:Ice(c,S0(y),!1)}return a}(s):s)}Ql.time=fp.define(),Ql.userEvent=fp.define(),Ql.addToHistory=fp.define(),Ql.remote=fp.define();var CKe=[];function S0(t){return null==t?CKe:Array.isArray(t)?t:[t]}var j4,cs=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(cs||(cs={})),kKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{j4=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Fo=function(){function t(n,e,i,r,o,s){ke(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return r_(this,i),hS(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return fo.of(n.split(this.facet(t.lineSeparator)||D4))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(r_(this,e),hS(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Va&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Ace)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Cce));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function SKe(t){return function(n){if(!/\S/.test(n))return cs.Space;if(function(i){if(j4)return j4.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||kKe.test(o)))return!0}return!1}(n))return cs.Word;for(var e=0;e-1)return cs.Word;return cs.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Pl(i,a,!1);if(s(i.slice(c,a))!=cs.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:en.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=wce.resolve(n.extensions||[],new Map),i=n.doc instanceof fo?n.doc:fo.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||D4)),r=n.selection?n.selection instanceof en?n.selection:en.single(n.selection.anchor,n.selection.head):en.single(0);return yce(r,i.length),e.staticFacet(kce)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function su(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();Um.prototype.startSide=Um.prototype.endSide=0,Um.prototype.point=!1,Um.prototype.mapMode=Ll.TrackDel;var P4=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function L4(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var DKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Go=function(){function t(n,e,i,r){ke(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(L4)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Fce(this,null,-1).goto(0),h=0,f=[],p=new Gm;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return R4.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R4.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=Nce(s,a,i),c=new o_(s,l,o),u=new o_(a,l,o);i.iterGaps(function(d,h,f){return Oce(c,d,u,h,f,r)}),i.empty&&0==i.length&&Oce(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=Nce(o,s),l=new o_(o,a,0).goto(i),c=new o_(s,a,0).goto(i);;){if(l.to!=c.to||!B4(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new o_(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Gm,o=Re(n instanceof P4?[n]:i?function TKe(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(L4);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Go.empty=new Go([],[],null,-1),Go.empty.nextLayer=Go.empty;var Gm=function(){function t(){ke(this,t),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 Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new DKe(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,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.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=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Go.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Go.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function Nce(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{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(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)$4(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)$4(this.heap,o);(this.to-n||this.value.endSide-e)<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 n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),$4(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Fce(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function $4(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var o_=function(){function t(n,e,i){ke(this,t),this.minPoint=i,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=R4.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){fS(this.active,n),fS(this.activeTo,n),fS(this.activeRank,n),this.minActive=jce(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&fS(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Oce(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&B4(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!B4(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function B4(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function jce(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Pl(t,r)}return!0===i?-1:t.length}for(var Pce=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),H4=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Lce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},pp=function(){function t(n,e){ke(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==bn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Lce[Pce]||1;return Lce[Pce]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[H4]||new EKe(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),mS=null,EKe=function(){function t(n){if(ke(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(mS)return n.adoptedStyleSheets=[mS.sheet].concat(n.adoptedStyleSheets),n[H4]=mS;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),mS=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[H4]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Rce=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),AKe=typeof navigator<"u"&&/Mac/.test(navigator.platform),MKe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),IKe=AKe||Rce&&+Rce[1]<57,Ha=0;Ha<10;Ha++)mp[48+Ha]=mp[96+Ha]=String(Ha);for(Ha=1;Ha<=24;Ha++)mp[Ha+111]="F"+Ha;for(Ha=65;Ha<=90;Ha++)mp[Ha]=String.fromCharCode(Ha+32),a_[Ha]=String.fromCharCode(Ha);for(var z4 in mp)a_.hasOwnProperty(z4)||(a_[z4]=mp[z4]);function gS(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function D0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function vS(t,n){if(!n.anchorNode)return!1;try{return D0(t,n.anchorNode)}catch{return!1}}function l_(t){return 3==t.nodeType?E0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function yS(t,n,e,i){return!!e&&($ce(t,n,e,i,-1)||$ce(t,n,e,i,1))}function bS(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function $ce(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:c_(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=bS(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?c_(t):0}}}function c_(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Bce={left:0,right:0,top:0,bottom:0};function U4(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function NKe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Vce,FKe=function(){function t(){ke(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),T0=null;function Hce(t){if(t.setActive)return t.setActive();if(T0)return t.focus(T0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==T0?{get preventScroll(){return T0={preventScroll:!0},!0}}:void 0),!T0){T0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Vce||(Vce=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function A0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function zce(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ke(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,bS(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,bS(n)+1,e)}}]),t}(),G4=[],ws=function(){function t(){ke(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{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(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=Uce(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=Uce(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==c_(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G4;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function Uce(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ws.prototype.breakAfter=0;var Gce=function(){function t(n,e,i){ke(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function Wce(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:Qce||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:_S,ie_version:Xce?W4.documentMode||6:X4?+X4[1]:q4?+q4[1]:0,gecko:Yce,gecko_version:Yce?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Y4,chrome_version:Y4?+Y4[1]:0,ios:Qce,android:/Android\b/.test(Tc.userAgent),webkit:Jce,safari:Kce,webkit_version:Jce?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=W4.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},u_=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return J4(this.dom,i,r)}}]),e}(),Wm=function(t){wt(e,ws);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ke(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(zce(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),pr(qi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}}]),e}();function J4(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?U4(l,s<0):l||null}var K4=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:U4(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){pr(qi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),Zce=function(t){wt(e,K4);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Q4(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?eue(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Q4(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return J4(a,l,c)}):J4(a,i,r)}},{key:"destroy",value:function(){var i;pr(qi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Q4(t,n,e,i,r,o){if(e instanceof Wm){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ws.get(s);if(!a)return o(t,n);var l=D0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return fo.empty}}]),e}();function tue(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof Wm&&r.length&&(i=r[r.length-1])instanceof Wm&&i.mark.eq(n.mark)?nue(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function iue(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new rue(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new d_(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=oue(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new d_(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new ij(i)}},{key:"set",value:function(i){return Go.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();yi.none=Go.empty;var rue=function(t){wt(e,yi);var n=Ct(e);function e(i){var r;ke(this,e);var o=oue(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&tj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();rue.prototype.point=!1;var ij=function(t){wt(e,yi);var n=Ct(e);function e(i){return ke(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&tj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();ij.prototype.mapMode=Ll.TrackBefore,ij.prototype.point=!0;var d_=function(t){wt(e,yi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return ke(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ll.TrackBefore:Ll.TrackAfter:Ll.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();function oue(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function rj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}d_.prototype.point=!0;var od=function(t){wt(e,ws);var n=Ct(e);function e(){var i;return ke(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),qce(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){tj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){nue(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=ej(r,this.attrs||{})),o&&(this.attrs=ej({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(zce(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&&(nj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),pr(qi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ws.get(s)instanceof Wm;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ws.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof u_})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof u_)||/[^ -~]/.test(s.text))return null;var a=l_(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return _o.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),oj=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(xS(new Z4(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(xS(new u_(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof d_){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof d_)if(i.block){var l=i.type;l!=_o.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new oj(i.widget||new sue("div"),a,l))}else{var c=K4.create(i.widget||new sue("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(xS(new Z4(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(xS(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);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=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Go.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function xS(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new Wm(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var sue=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),aue=Qn.define(),lue=Qn.define(),cue=Qn.define(),uue=Qn.define(),sj=Qn.define(),due=Qn.define(),hue=Qn.define(),fue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),pue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),mue=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ke(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),gue=hr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(uue);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var wS=Qn.define({combine:function(t){return!t.length||t[0]}}),PKe=0,h_=Qn.define(),ka=function(){function t(n,e,i,r){ke(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(PKe++,n,i.eventHandlers,function(a){var l=[h_.of(a)];return s&&l.push(f_.of(function(c){var u=c.plugin(a);return u?s(u):yi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),aj=function(){function t(n){ke(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),vue=Qn.define(),lj=Qn.define(),f_=Qn.define(),yue=Qn.define(),bue=Qn.define(),p_=Qn.define(),M0=function(){function t(n,e,i,r){ke(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),_ue=function(){function t(n,e,i){ke(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new M0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{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(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),us=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(us||(us={})),cj=us.LTR,LKe=us.RTL;function xue(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),ds=[];function Due(t){return[new I0(0,t,0)]}var Tue="";function HKe(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=I0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Pl(t.text,s,u);if(Tue=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return en.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ws.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Aue(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Mue=Se(function t(n,e){ke(this,t),this.node=n,this.offset=e,this.pos=-1}),Iue=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).view=i,r.compositionDeco=yi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new M0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=yi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Fue(a);if(!c)return yi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Eue([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=jKe.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,_=v.off,C=o.findPos(l,-1);Wce(this,C.i,C.off,y,_,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function zKe(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&yS(l.node,l.offset,d.anchorNode,d.anchorOffset)&&yS(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function qKe(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=gS(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function GKe(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=gS(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||vS(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ws.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=_o.WidgetBefore&&a.type!=_o.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==_o.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==us.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?l_(g):[];if(v.length){var y=v[v.length-1],_=u?y.right-m.left:m.right-y.left;_>c&&(c=_,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?us.RTL:us.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=l_(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new Gce(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(yi.replace({widget:new Nue(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return yi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(f_).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(bue).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,S,M,$,G,R,z,U){for(var q=C.ownerDocument,re=q.defaultView||window,L=C;L;)if(1==L.nodeType){var X=void 0,Z=L==q.body;if(Z)X=NKe(re);else{if(L.scrollHeight<=L.clientHeight&&L.scrollWidth<=L.clientWidth){L=L.assignedSlot||L.parentNode;continue}var H=L.getBoundingClientRect();X={left:H.left,right:H.left+L.clientWidth,top:H.top,bottom:H.top+L.clientHeight}}var he=0,E=0;if("nearest"==G)S.top0&&S.bottom>X.bottom+E&&(E=S.bottom-X.bottom+E+z)):S.bottom>X.bottom&&(E=S.bottom-X.bottom+z,M<0&&S.top-E0&&S.right>X.right+he&&(he=S.right-X.right+he+R)):S.right>X.right&&(he=S.right-X.right+R,M<0&&S.left0&&e<=0)n=c_(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var WKe=function(){function t(){ke(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){rj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){rj(n,e,this.changes)}}]),t}();function XKe(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function YKe(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function hj(t,n){return t.topn.top+1}function jue(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function fj(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=l_(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&hj(c,m)?c=Pue(c,m.bottom):u&&hj(u,m)&&(u=jue(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var _=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Lue(i,_,e):d&&"false"!=i.contentEditable?fj(i,_,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Lue(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&E0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Rue(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=_o.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:$ue(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,_=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,_=C.offset)}else if(m.caretRangeFromPoint){var S=m.caretRangeFromPoint(c,u);S&&(_=S.startOffset,(!t.contentDOM.contains(y=S.startContainer)||Zn.safari&&function JKe(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return E0(t,i-1,i).getBoundingClientRect().left>e}(y,_,c)||Zn.chrome&&function KKe(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():E0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,_,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var M=od.find(t.docView,p);if(!M)return d>r.top+r.height/2?r.to:r.from;var $=fj(M.dom,c,u);y=$.node,_=$.offset}var G=t.docView.nearest(y);if(!G)return null;if(G.isWidget){var R=G.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+V4(s,o,t.state.tabSize)}function Bue(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=HKe(r,o,s,a,e),u=Tue;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=en.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function pj(t,n,e){for(var i=t.state.facet(yue).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?en.cursor(a,1):en.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var ZKe=function(){function t(n){var e=this;ke(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=la[s];n.contentDOM.addEventListener(s,function(l){zue(n,l)&&i(a,l)},mj[s]),e.registeredEvents.push(s)};for(var o in la)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(la.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){zue(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,A0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Vue=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],eQe="dthko",Hue=[16,17,18,20,91,92,224,225];function CS(t){return.7*t+8}var tQe=function(){function t(n,e,i,r){ke(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Fo.allowMultipleSelections)&&(a=e,(l=n.state.facet(aue)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(lue);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=gS(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Zue(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-CS(o.left-n.clientX):n.clientX>=o.right&&(i=CS(n.clientX-o.right)),n.clientY<=o.top?r=-CS(o.top-n.clientY):n.clientY>=o.bottom&&(r=CS(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.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:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function zue(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ws.get(i))&&e.ignoreEvent(n))return!1;return!0}var la=Object.create(null),mj=Object.create(null),Uue=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function Gue(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=gj&&i.selection.ranges.every(function(c){return c.empty})&&gj==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:en.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:en.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function Wue(t,n,e,i){if(1==i)return en.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return en.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Pl(h.text,f,!1):m=Pl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Pl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(cue));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=Yue(s=t,a=n),c=Zue(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=Yue(s,d),m=Wue(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=Wue(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(_){return _.eq(m)})?function(_,C){for(var S=0;;S++)if(_.ranges[S].eq(C))return en.create(_.ranges.slice(0,S).concat(_.ranges.slice(S+1)),_.mainIndex==S?0:_.mainIndex-(_.mainIndex>S?1:0))}(u,m):f?u.addRange(m):en.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new tQe(t,n,i,o)),o&&t.observer.ignore(function(){return Hce(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var que=function(t,n){return t>=n.top&&t<=n.bottom},Xue=function(t,n,e){return que(n,e)&&t>=e.left&&t<=e.right};function nQe(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&Xue(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&Xue(e,i,a)?1:s&&que(i,s)?-1:1}function Yue(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:nQe(t,e,n.clientX,n.clientY)}}var iQe=Zn.ie&&Zn.ie_version<=11,Jue=null,Kue=0,Que=0;function Zue(t){if(!iQe)return t.detail;var n=Jue,e=Que;return Jue=t,Que=Date.now(),Kue=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Kue+1)%3:1}function ede(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}la.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},la.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&ede(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(_){g.e(_)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){gj=o?i:null;var s=Uue?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var tde=fp.define();function nde(t,n){var e,i=[],r=Re(t.facet(hue));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:tde.of(!0)}):null}function ide(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=nde(t.state,n);e?t.dispatch(e):t.update([])}},10)}la.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ide(t)},la.blur=function(t){t.observer.clearSelectionRange(),ide(t)},la.compositionstart=la.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},la.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},la.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},la.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Vue.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var rde=["pre-wrap","normal","pre-line","break-spaces"],rQe=function(){function t(n){ke(this,t),this.lineWrapping=n,this.doc=fo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return rde.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ke(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Wo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Wo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),fh=function(t){wt(e,ode);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i,r,_o.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof N0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof N0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),N0=function(t){wt(e,sd);var n=Ct(e);function e(i){return ke(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new qm(f.from,f.length,m,p,_o.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new qm(v.from,v.length,o+u*g,u,_o.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Wo.ByHeight)return this.blockAt(i,o,s,a);if(r==Wo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new qm(c,l.to-c,0,0,_o.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new qm(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,_o.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new qm(m.from,m.length,p,v,_o.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new fh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),sQe=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Wo.ByPosNoHeight?Wo.ByPosNoHeight:Wo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Wo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&sde(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function sde(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof N0&&(i=t[n+1])instanceof N0&&t.splice(n-1,3,new N0(e.length+1+i.length))}var aQe=function(){function t(n,e){ke(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof fh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new fh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new fh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new N0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof fh)return n;var e=new fh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=_o.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=_o.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof fh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function dQe(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var vj=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return yi.replace({widget:new hQe(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new kS(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?lde:new pQe(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:m_(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(f_).filter(function(c){return"function"!=typeof c});var o=M0.extendWithRanges(n.changedRanges,function lQe(t,n,e){var i=new cQe;return Go.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(pue)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?us.RTL:us.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?dQe:uQe)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var _=n.docView.measureTextSize(),C=_.lineHeight,S=_.charWidth;(s=C>0&&r.refresh(o,C,S,v/S,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var M,$=Re(this.viewports);try{for($.s();!(M=$.n()).done;){var G=M.value,R=G.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(G);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,fo.empty,this.heightOracle,[new M0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oQe(G.from,R))}}catch(U){$.e(U)}finally{$.f()}r.heightChanged&&(c|=2)}var z=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return z&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.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(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new kS(r.lineAt(this.visibleTop-1e3*i,Wo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Wo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Wo.ByPos,o,0,0);l=new kS(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Wo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Wo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=us.LTR&&!r)return[];var l,c=[],u=function q(re,L,X,Z){if(!(L-rere&&F=X.from&&oe.to<=X.to&&Math.abs(oe.from-re)fe})});if(!Y){if(L=L})){var V=e.moveToLineBoundary(en.cursor(L),!1,!0).head;V>re&&(L=V)}Y=new vj(re,L,i.gapSize(X,re,L,Z))}c.push(Y)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||m_(this.heightMap.lineAt(n,Wo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return m_(this.heightMap.lineAt(this.scaler.fromDOM(n),Wo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return m_(this.heightMap.blockAt(this.scaler.fromDOM(n),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}}]),t}(),kS=Se(function t(n,e){ke(this,t),this.from=n,this.to=e});function fQe(t,n,e){var i=[],r=t,o=0;return Go.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function DS(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var lde={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},pQe=function(){function t(n,e,i){ke(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Wo.ByPos,n,0,0).top,p=e.lineAt(h,Wo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),bj=pp.newName(),cde=pp.newName(),ude=pp.newName(),dde={"&light":"."+cde,"&dark":"."+ude};function _j(t,n,e){return new pp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var mQe=_j("."+bj,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .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-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',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"}},dde),gQe=Se(function t(n,e,i,r){ke(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,_=m.focusOffset;return g&&(p.push(new Mue(g,v)),y==g&&_==v||p.push(new Mue(y,_))),p}(n),c=new Eue(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?en.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!D0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!D0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=en.single(h,d)}});function hde(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&Z>0&&R.charCodeAt(X-1)==z.charCodeAt(Z-1);)X--,Z--;return"end"==q&&(U-=X+Math.max(0,L-Math.min(X,Z))-L),X=X?L-U:0)+(Z-X),X=L):Z=Z?L-U:0)+(X-Z),Z=L),{from:L,toA:X,toB:Z}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:fo.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(wS)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&A0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&A0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&A0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(due).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),_=Fue(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,S=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var z=R.to-C,U=z-y.length;if(R.to-R.from!=S||t.state.sliceDoc(U,z)!=y||_&&R.to>=_.from&&R.from<=_.to)return{range:R};var q=d.changes({from:U,to:z,insert:e.insert}),re=R.to-r.to;return{changes:q,range:v?en.range(Math.max(0,v.anchor+re),Math.max(0,v.head+re)):R.map(q)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var M="input.type";return t.composing&&(M+=".compose",t.inputState.compositionFirstChange&&(M+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:M}),!0}if(i&&!i.main.eq(r)){var $=!1,G="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&($=!0),G=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:$,userEvent:G}),!0}return!1}var vQe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xj=Zn.ie&&Zn.ie_version<=11,yQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.active=!1,this.selectionRange=new FKe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),xj&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.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 i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(wS)?i.root.activeElement==this.dom:vS(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&yS(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(yS(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||gS(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=vS(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&vS(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gQe(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=hde(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=fde(e,n.previousSibling||n.target.previousSibling,-1),r=fde(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function fde(t,n,e){for(;n;){var i=ws.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function OKe(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new ade(e.state||Fo.create(e)),this.plugins=this.state.facet(h_).map(function(s){return new aj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new yQe(this),this.inputState=new ZKe(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Iue(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Ql?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(tde)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=nde(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Fo.phrases)!=this.state.facet(Fo.phrases))return this.setState(a);(i=_ue.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var _=y.state.selection.main;m=new mue(_.empty?_:en.cursor(_.head,_.head>_.anchor?-1:1))}var C,S=Re(y.effects);try{for(S.s();!(C=S.n()).done;){var M=C.value;M.is(gue)&&(m=M.value)}}catch(R){S.e(R)}finally{S.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=mde.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(p_)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(TS)!=i.state.facet(TS)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var $,G=Re(this.state.facet(sj));try{for(G.s();!($=G.n()).done;)(0,$.value)(i)}catch(R){G.e(R)}finally{G.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!hde(e,p)&&f.force&&A0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){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=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new ade(n),this.plugins=n.facet(h_).map(function(a){return new aj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Iue(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(h_),i=n.state.facet(h_);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new aj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!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&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(z){return Ec(n.state,z),pde}}),g=_ue.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var _=0;_1||S<-1)&&(this.scrollDOM.scrollTop+=S,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var M,$=Re(this.state.facet(sj));try{for($.s();!(M=$.n()).done;)(0,M.value)(i)}catch(R){$.e(R)}finally{$.f()}}}}},{key:"themeClasses",get:function(){return bj+" "+(this.state.facet(yj)?ude:cde)+" "+this.state.facet(TS)}},{key:"updateAttrs",value:function(){var n=this,e=gde(this,vue,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(wS)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),gde(this,lj,i);var r=this.observer.ignore(function(){var o=nj(n.contentDOM,n.contentAttrs,i),s=nj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(p_),pp.mount(this.root,this.styleModules.concat(mQe).reverse())}},{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(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==us.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return en.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return en.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return pj(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return en.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var _=u+(v+y)*c,C=Rue(r,{x:g,y:_},!1,c);if(_h.bottom||(c<0?Cl))return en.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Rue(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return U4(i,o[I0.find(o,n-r.from,-1,e)].dir==us.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(fue)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>bQe)return Due(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==cj?1:2,d=l==cj?2:1;if(!a||1==u&&!VKe.test(a))return Due(c);for(var h=0,f=u,p=u;h=0;re-=3)if(hh[re+1]==-G){var L=hh[re+2],X=2&L?u:4&L?1&L?d:u:0;X&&(ds[z]=ds[hh[re]]=X),U=re;break}}else{if(189==hh.length)break;hh[U++]=z,hh[U++]=$,hh[U++]=q}else if(2==(R=ds[z])||1==R){var Z=R==u;q=Z?0:1;for(var H=U-3;H>=0;H-=3){var he=hh[H+2];if(2&he)break;if(Z)hh[H+2]|=2;else{if(4&he)break;hh[H+2]|=4}}}for(var E=0;ENe;){for(var ze=tt,ot=2!=ds[--tt];tt>Ne&&ot==(2!=ds[tt-1]);)tt--;oe.push(new I0(tt,ze,ot?2:1))}else oe.push(new I0(Ne,fe,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){Hce(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gue.of(new mue("number"==typeof n?en.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ka.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=pp.newName(),r=[TS.of(i),p_.of(_j(".".concat(i),n))];return e&&e.dark&&r.push(yj.of(!0)),r}},{key:"baseTheme",value:function(n){return k0.lowest(p_.of(_j("."+bj,n,dde)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ws.get(i)||ws.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=p_,Wn.inputHandler=due,Wn.focusChangeEffect=hue,Wn.perLineTextDirection=fue,Wn.exceptionSink=uue,Wn.updateListener=sj,Wn.editable=wS,Wn.mouseSelectionStyle=cue,Wn.dragMovesSelection=lue,Wn.clickAddsSelectionRange=aue,Wn.decorations=f_,Wn.atomicRanges=yue,Wn.scrollMargins=bue,Wn.darkTheme=yj,Wn.contentAttributes=lj,Wn.editorAttributes=vue,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=hr.define();var bQe=4096,pde={},mde=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:us.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&ej(s,e)}return e}var _Qe=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function ES(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var wQe=k0.default(Wn.domEventHandlers({keydown:function(t,n){return bde(yde(n.state),t,n,"editor")}})),AS=Qn.define({enables:wQe}),vde=new WeakMap;function yde(t){var n=t.facet(AS),e=vde.get(n);return e||vde.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_Qe,s=Object.create(null),a=Object.create(null),l=function(M,$){var G=a[M];if(null==G)a[M]=$;else if(G!=$)throw new Error("Key binding "+M+" is used both as a regular binding and as a multi-stroke prefix")},c=function(M,$,G,R){for(var z,U,q=s[M]||(s[M]=Object.create(null)),re=$.split(/ (?!$)/).map(function(he){return function xQe(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==us.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=_de(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=wde(t,i),f=wde(t,r),p=h.type==_o.Text?h:null,m=f.type==_o.Text?f:null;if(t.lineWrapping&&(p&&(p=xde(t,i,p)),m&&(m=xde(t,r,m))),p&&m&&p.from==m.from)return C(S(e.from,e.to,p));var g=p?S(e.from,null,p):M(h,!1),v=m?S(null,e.to,m):M(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(_(u,g.bottom,d,v.top)):g.bottomX&&he.from=N)break;Ne>E&&re(Math.max(fe,E),null==$&&fe<=X,Math.min(Ne,N),null==G&&Ne>=Z,oe.dir)}}catch(xe){V.e(xe)}finally{V.f()}if((E=Y.to+1)>=N)break}}}catch(xe){H.e(xe)}finally{H.f()}return 0==q.length&&re(X,null==$,Z,null==G,t.textDirection),{top:z,bottom:U,horizontal:q}}function M($,G){var R=a.top+(G?$.top:$.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function _de(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==us.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function xde(t,n,e){var i=en.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:_o.Text}}function wde(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==_o.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var kQe=function(){function t(n,e){ke(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(MS)!=n.state.facet(MS)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(MS);e0&&void 0!==arguments[0]?arguments[0]:{}),DQe,TQe,EQe,pue.of(!0)]}function Sde(t){return t.startState.facet(g_)!=t.state.facet(g_)}var DQe=Cde({above:!0,markers:function(t){var n,e=t.state,i=e.facet(g_),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||kde:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:en.cursor(s.head,s.head>s.anchor?-1:1),d=Re(wj.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Sde(t);return e&&Dde(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Dde(n.state,t)},class:"cm-cursorLayer"});function Dde(t,n){n.style.animationDuration=t.facet(g_).cursorBlinkRate+"ms"}var TQe=Cde({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:wj.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Sde(t)},class:"cm-selectionLayer"}),Tde={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kde&&(Tde[".cm-line"].caretColor="transparent !important");var EQe=k0.highest(Wn.theme(Tde)),Ede=hr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),v_=Va.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Ede)?i.value:e},t)}}),AQe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(v_);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(v_)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(v_),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(v_)!=n&&this.view.dispatch({effects:Ede.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Ade(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var MQe=function(){function t(n){ke(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new Gm,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(_){m.e(_)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Ade(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),Cj=null!=/x/.unicode?"gu":"g",IQe=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",Cj),NQe={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"},kj=null,IS=Qn.define({combine:function(t){var n=su(t,{render:null,specialChars:IQe,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==kj&&typeof document<"u"&&document.body){var i=document.body.style;kj=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return kj||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,Cj)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,Cj)),n}});function FQe(){return[IS.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Mde||(Mde=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=yi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(IS)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new MQe({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Ba(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=s_(l.text,c,o-l.from);return yi.replace({widget:new PQe((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=yi.replace({widget:new jQe(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(IS);n.startState.facet(IS)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Mde=null,jQe=function(t){wt(e,gp);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(NQe[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),PQe=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),LQe=yi.line({class:"cm-activeLine"}),RQe=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(LQe.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return yi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Ide(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):s_(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function BQe(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function $Qe(t,n){var e=Ide(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Ide(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(en.range(y.from+m,y.to+g))}else for(var _=Math.min(u.col,d.col),C=Math.max(u.col,d.col),S=h;S<=f;S++){var M=c.doc.line(S),$=V4(M.text,_,c.tabSize,!0);if($<0)p.push(en.cursor(M.to));else{var G=V4(M.text,C,c.tabSize);p.push(en.range(M.from+$,M.from+G))}}return p}(t.state,e,a);return l.length?en.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var VQe={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},HQe={style:"cursor: crosshair"};function zQe(){var n=Un(VQe[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ka.fromClass(function(){function o(s){ke(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?HQe:null})]}var Nde=function(){function t(n,e,i){ke(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(Sj);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(Sj).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Fde.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||WQe,v=this.view.textDirection==us.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),_=!!a.above;!a.strictSide&&(_?u.top-(d.bottom-d.top)-g.yr.bottom)&&_==r.bottom-u.bottom>u.top-r.top&&(_=!_);var C=(_?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topS&&(S=_?R.top-m-2-f:R.bottom+f+2)}}catch(z){G.e(z)}finally{G.f()}}"absolute"==this.position?(c.style.top=S-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=S+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:S,right:M,bottom:S+m}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(n.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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),GQe=Wn.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"}}}),WQe={x:0,y:0},NS=Qn.define({enables:[Ode,GQe]}),FS=Qn.define(),qQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Nde(n,FS,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),XQe=NS.compute([FS],function(t){var n=t.facet(FS).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,si(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,si(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:qQe.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),YQe=function(){function t(n,e,i,r,o){ke(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==us.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=hr.define(),i=Va.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ll.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(QQe)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return FS.from(r)}});return[i,ka.define(function(r){return new YQe(r,t,i,e,n.hoverTime||300)}),XQe]}var QQe=hr.define(),Pde=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function y_(t,n){var e=t.plugin(Lde),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Lde=ka.fromClass(function(){function t(n){ke(this,t),this.input=n.state.facet(b_),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Pde);this.top=new OS(n,!0,e.topContainer),this.bottom=new OS(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Pde);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new OS(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new OS(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(b_);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),zde=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Vde(e.markers(n)),e.initialSpacer&&(this.spacer=new Ude(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Vde(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Go.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),Ude=function(){function t(n,e,i,r){ke(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Bde(),iZe]}function Gde(t){for(var n=9;ni&&(i=s,e.push(oZe.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Go.of(e)}),aZe=0,Aj=Se(function t(n,e){ke(this,t),this.from=n,this.to=e}),gr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.id=aZe++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=au.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();gr.closedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.openedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.group=new gr({deserialize:function(t){return t.split(" ")}}),gr.contextHash=new gr({perNode:!0}),gr.lookAhead=new gr({perNode:!0}),gr.mounted=new gr({perNode:!0});var lZe=Object.create(null),au=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.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(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(gr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):lZe,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(gr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();au.none=new au("",Object.create(null),0,8);var za,cZe=function(){function t(n){ke(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=PS.get(this)||this.topNode,r=new $S(i);return r.moveTo(n,e),PS.set(this,r._tree),r}},{key:"topNode",get:function(){return new w_(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(PS.get(this)||this.topNode,n,e,!1);return PS.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(Wde.get(this)||this.topNode,n,e,!0);return Wde.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|za.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:Nj(au.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(au.none,i,r,o)})}}],[{key:"build",value:function(n){return function hZe(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new uZe(e,e.length):e,d=i.types,h=0,f=0;function p(S,M,$,G,R){for(var z=u.id,U=u.start,q=u.end,re=u.size,L=f;re<0;){if(u.next(),-1==re)return $.push(a[z]),void G.push(U-S);if(-3==re)return void(h=z);if(-4==re)return void(f=z);throw new RangeError("Unrecognized record size: ".concat(re))}var Z,H,ot,he=d[z],E=U-S;if(q-U<=o&&(H=function(ot,B){var ne=u.fork(),ie=0,Ie=0,Ye=0,Le=ne.end-o,_t={size:0,start:0,skip:0};e:for(var At=ne.pos-ot;ne.pos>At;){var _n=ne.size;if(ne.id==B&&_n>=0)_t.size=ie,_t.start=Ie,_t.skip=Ye,Ye+=4,ie+=4,ne.next();else{var ci=ne.pos-_n;if(_n<0||ci=c?4:0,Ni=ne.start;for(ne.next();ne.pos>ci;){if(ne.size<0){if(-3!=ne.size)break e;on+=4}else ne.id>=c&&(on+=4);ne.next()}Ie=Ni,ie+=_n,Ye+=on}}return(B<0||ie==ot)&&(_t.size=ie,_t.start=Ie,_t.skip=Ye),_t.size>4?_t:void 0}(u.pos-M,R))){for(var N=new Uint16Array(H.size-H.skip),F=u.pos-H.size,Y=N.length;u.pos>F;)Y=v(H.start,N,Y);Z=new x_(N,q-H.start,i),E=H.start-S}else{var V=u.pos-re;u.next();for(var oe=[],fe=[],Ne=z>=c?z:-1,xe=0,tt=q;u.pos>V;)Ne>=0&&u.id==Ne&&u.size>=0?(u.end<=tt-o&&(m(oe,fe,U,xe,u.end,tt,Ne,L),xe=oe.length,tt=u.end),u.next()):p(U,V,oe,fe,Ne);if(Ne>=0&&xe>0&&xe-1&&xe>0){var ze=(ot=he,function(B,ne,ie){var Ie,Ye,Le=0,_t=B.length-1;if(_t>=0&&(Ie=B[_t])instanceof Ua){if(!_t&&Ie.type==ot&&Ie.length==ie)return Ie;(Ye=Ie.prop(gr.lookAhead))&&(Le=ne[_t]+Ie.length+Ye)}return g(ot,B,ne,ie,Le)});Z=Nj(he,oe,fe,0,oe.length,0,q-U,ze,ze)}else Z=g(he,oe,fe,q-U,L-q)}$.push(Z),G.push(E)}function m(S,M,$,G,R,z,U,q){for(var re=[],L=[];S.length>G;)re.push(S.pop()),L.push(M.pop()+$-R);S.push(g(i.types[U],re,L,z-R,q-z)),M.push(R-$)}function g(S,M,$,G){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0;if(h){var U=[gr.contextHash,h];z=z?[U].concat(z):[U]}if(R>25){var q=[gr.lookAhead,R];z=z?[q].concat(z):[q]}return new Ua(S,M,$,G,z)}function v(S,M,$){var G=u.id,R=u.start,z=u.end,U=u.size;if(u.next(),U>=0&&G4)for(var re=u.pos-(U-4);u.pos>re;)$=v(S,M,$);M[--$]=q,M[--$]=z-S,M[--$]=R-S,M[--$]=G}else-3==U?h=G:-4==U&&(f=G);return $}for(var y=[],_=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,_,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?_[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),_.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(au.none,[],[],0);var uZe=function(){function t(n,e){ke(this,t),this.buffer=n,this.index=e}return Se(t,[{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 t(this.buffer,this.index)}}]),t}(),x_=function(){function t(n,e,i){ke(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return au.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function Xde(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function O0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(qde(r,i,h,h+d.length))if(d instanceof x_){if(o&za.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new Mj(new dZe(s,d,n,h),null,f)}else if(o&za.IncludeAnonymous||!d.type.isAnonymous||Ij(d)){var p=void 0;if(!(o&za.IgnoreMounts)&&d.props&&(p=d.prop(gr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&za.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&za.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._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(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&za.IgnoreOverlays)&&(i=this._tree.prop(gr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}();function LS(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function RS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var dZe=Se(function t(n,e,i,r){ke(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),Mj=function(){function t(n,e,i){ke(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(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(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&za.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);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(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}(),$S=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ke(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof w_)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof w_?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);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(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&za.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&za.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&za.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&za.IncludeAnonymous||u instanceof x_||!u.type.isAnonymous||Ij(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return RS(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function Ij(t){return t.children.some(function(n){return n instanceof x_||!n.type.isAnonymous||Ij(n)})}var Yde=new WeakMap;function BS(t,n){if(!t.isAnonymous||n instanceof x_||n.type!=t)return 1;var e=Yde.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=BS(t,o)}}catch(s){r.e(s)}finally{r.f()}Yde.set(n,e)}return e}function Nj(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;$+=G}if(C==S+1){if($>d){var R=m[S];p(R.children,R.positions,0,R.children.length,g[S]+_);continue}h.push(m[S])}else h.push(Nj(t,m,g,S,C,M,g[C-1]+m[C-1].length-M,null,l));f.push(M+_-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var VS=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ke(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Kde.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),mZe=0,Kde=function(){function t(){ke(this,t),this.instances=[],this.id=mZe++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,_){return y==v[_]});var g,v});if(i)return i;var r,o=[],s=new yp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=Qde(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function Qde(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new gZe(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return ehe.add(n)}var ehe=new gr,gZe=function(){function t(n,e,i,r){ke(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new bZe(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var Fj,bZe=function(){function t(n,e,i){ke(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function($){return!$.scope||$.scope(s)}));for(var c=r,u=s.prop(ehe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=vZe(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(gr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function($){return!$.scope||$.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var _=v=C)&&n.nextSibling()););if(!_||C>i)break;(y=_.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,_.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),kn=yp.define,HS=kn(),bp=kn(),nhe=kn(bp),ihe=kn(bp),_p=kn(),zS=kn(_p),Oj=kn(_p),mh=kn(),Xm=kn(mh),gh=kn(),vh=kn(),jj=kn(),C_=kn(jj),US=kn(),fn={comment:HS,lineComment:kn(HS),blockComment:kn(HS),docComment:kn(HS),name:bp,variableName:kn(bp),typeName:nhe,tagName:kn(nhe),propertyName:ihe,attributeName:kn(ihe),className:kn(bp),labelName:kn(bp),namespace:kn(bp),macroName:kn(bp),literal:_p,string:zS,docString:kn(zS),character:kn(zS),attributeValue:kn(zS),number:Oj,integer:kn(Oj),float:kn(Oj),bool:kn(_p),regexp:kn(_p),escape:kn(_p),color:kn(_p),url:kn(_p),keyword:gh,self:kn(gh),null:kn(gh),atom:kn(gh),unit:kn(gh),modifier:kn(gh),operatorKeyword:kn(gh),controlKeyword:kn(gh),definitionKeyword:kn(gh),moduleKeyword:kn(gh),operator:vh,derefOperator:kn(vh),arithmeticOperator:kn(vh),logicOperator:kn(vh),bitwiseOperator:kn(vh),compareOperator:kn(vh),updateOperator:kn(vh),definitionOperator:kn(vh),typeOperator:kn(vh),controlOperator:kn(vh),punctuation:jj,separator:kn(jj),bracket:C_,angleBracket:kn(C_),squareBracket:kn(C_),paren:kn(C_),brace:kn(C_),content:mh,heading:Xm,heading1:kn(Xm),heading2:kn(Xm),heading3:kn(Xm),heading4:kn(Xm),heading5:kn(Xm),heading6:kn(Xm),contentSeparator:kn(mh),list:kn(mh),quote:kn(mh),emphasis:kn(mh),strong:kn(mh),link:kn(mh),monospace:kn(mh),strikethrough:kn(mh),inserted:kn(),deleted:kn(),changed:kn(),invalid:kn(),meta:US,documentMeta:kn(US),annotation:kn(US),processingInstruction:kn(US),definition:yp.defineModifier(),constant:yp.defineModifier(),function:yp.defineModifier(),standard:yp.defineModifier(),local:yp.defineModifier(),special:yp.defineModifier()};the([{tag:fn.link,class:"tok-link"},{tag:fn.heading,class:"tok-heading"},{tag:fn.emphasis,class:"tok-emphasis"},{tag:fn.strong,class:"tok-strong"},{tag:fn.keyword,class:"tok-keyword"},{tag:fn.atom,class:"tok-atom"},{tag:fn.bool,class:"tok-bool"},{tag:fn.url,class:"tok-url"},{tag:fn.labelName,class:"tok-labelName"},{tag:fn.inserted,class:"tok-inserted"},{tag:fn.deleted,class:"tok-deleted"},{tag:fn.literal,class:"tok-literal"},{tag:fn.string,class:"tok-string"},{tag:fn.number,class:"tok-number"},{tag:[fn.regexp,fn.escape,fn.special(fn.string)],class:"tok-string2"},{tag:fn.variableName,class:"tok-variableName"},{tag:fn.local(fn.variableName),class:"tok-variableName tok-local"},{tag:fn.definition(fn.variableName),class:"tok-variableName tok-definition"},{tag:fn.special(fn.variableName),class:"tok-variableName2"},{tag:fn.definition(fn.propertyName),class:"tok-propertyName tok-definition"},{tag:fn.typeName,class:"tok-typeName"},{tag:fn.namespace,class:"tok-namespace"},{tag:fn.className,class:"tok-className"},{tag:fn.macroName,class:"tok-macroName"},{tag:fn.propertyName,class:"tok-propertyName"},{tag:fn.operator,class:"tok-operator"},{tag:fn.comment,class:"tok-comment"},{tag:fn.meta,class:"tok-meta"},{tag:fn.invalid,class:"tok-invalid"},{tag:fn.punctuation,class:"tok-punctuation"}]);var j0=new gr,_Ze=new gr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ke(this,t),this.data=n,this.name=r,Fo.prototype.hasOwnProperty("tree")||Object.defineProperty(Fo.prototype,"tree",{get:function(){return hl(this)}}),this.parser=e,this.extension=[xp.of(this),Fo.languageData.of(function(o,s,a){var l=rhe(o,s,a),c=l.type.prop(j0);if(!c)return[];var u=o.facet(c),d=l.type.prop(_Ze);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return rhe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(j0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(xp);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(j0)!=e.data){var l=s.prop(gr.mounted);if(l){if(l.tree.prop(j0)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),k_=null,CZe=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ke(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new wZe(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(VS.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=k_;k_=this;try{return n()}finally{k_=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=ohe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=VS.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=ohe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,Jde);var i=Ct(r);function r(){return ke(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=k_;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(au.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return k_}}]),t}();function ohe(t,n,e){return VS.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var Pj=function(){function t(n){ke(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=CZe.create(n.facet(xp).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Va.define({create:Pj.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(xp)!=n.state.facet(xp)?Pj.init(n.state):t.apply(n)}});var she=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(she=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var Lj=typeof navigator<"u"&&null!==(Fj=navigator.scheduling)&&void 0!==Fj&&Fj.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,kZe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=she(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return Lj&&Lj()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new Pj(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),xp=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,kZe,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),SZe=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ke(this,t),this.language=n,this.support=e,this.extension=[n,e]}),DZe=Qn.define(),GS=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function P0(t){var n=t.facet(GS);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function S_(t,n){var e="",i=t.tabSize,r=t.facet(GS)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ke(this,t),this.state=n,this.options=e,this.unit=P0(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return s_(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),ahe=new gr;function TZe(t){var n=t.type.prop(ahe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(gr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),_=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,S=g.state.doc.lineAt(y.from),M=null==C||C<=S.from?S.to:Math.min(S.to,C),$=y.to;;){var G=v.childAfter($);if(!G||G==_)return null;if(!G.type.isSkipped)return G.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var IZe=Qn.define(),uhe=new gr;function qS(t,n,e){var i,r=Re(t.facet(IZe));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=hl(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function dhe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var XS=hr.define({map:dhe}),D_=hr.define({map:dhe});function hhe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Ym=Va.define({create:function(){return yi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(XS)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[vhe.range(a.value.from,a.value.to)]}):a.is(D_)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function fhe(t,n){return t.field(Ym,!1)?n:n.concat(hr.appendConfig.of(ghe()))}function phe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var NZe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(hhe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=qS(t.state,i.from,i.to);if(r)return t.dispatch({effects:fhe(t.state,[XS.of(r),phe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Ym,!1))return!1;var n,e=[],i=Re(hhe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=YS(t.state,r.from,r.to);o&&e.push(D_.of(o),phe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},OZe),t),e=new $j(n,!0),i=new $j(n,!1),r=ka.fromClass(function(){function s(a){ke(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(xp)!=a.state.facet(xp)||a.startState.field(Ym,!1)!=a.state.field(Ym,!1)||hl(a.startState)!=hl(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new Gm,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=YS(a.state,d.from,d.to)?i:qS(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,$de({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Go.empty},initialSpacer:function(){return new $j(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=YS(s.state,a.from,a.to);if(c)return s.dispatch({effects:D_.of(c)}),!0;var u=qS(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:XS.of(u)}),!0)}})}),ghe()]}var PZe=Wn.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"}}),Bj=function(){function t(n,e){var i;function r(a){var l=pp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ke(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(j0)==s.data}:s?function(a){return a==s}:void 0,this.style=the(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new pp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),Vj=Qn.define(),yhe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function Hj(t){var n=t.facet(Vj);return n.length?n:t.facet(yhe)}function bhe(t,n){var e,i=[RZe];return t instanceof Bj&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?yhe.of(t):e?Vj.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):Vj.of(t)),i}var LZe=function(){function t(n){ke(this,t),this.markCache=Object.create(null),this.tree=hl(n.state),this.decorations=this.buildDeco(n,Hj(n.state))}return Se(t,[{key:"update",value:function(n){var e=hl(n.state),i=Hj(n.state),r=i!=Hj(n.startState);e.length0&&yh(n.state,s.head-1,1,r)||r.afterCursor&&(yh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),GZe]}var qZe=new gr;function zj(t,n,e){var i=t.prop(n<0?gr.openedBy:gr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function Uj(t){var n=t.type.prop(qZe);return n?n(t.node):t}function yh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=hl(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=zj(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return XZe(0,0,e,l,u,c,o)}}return function YZe(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function XZe(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(whe.push(t),console.warn(n))}function eet(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||fn[o];s?"function"==typeof s?i?i=s(i):Wj(o,"Modifier ".concat(o," used at start of tag")):i?Wj(o,"Tag ".concat(o," used as modifier")):i=s:Wj(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=au.define({id:xhe.length,name:a,props:[Zde(ql({},a,i))]});return xhe.push(l),l.id}function qj(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var tet=qj(function oet(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=Xj(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var re,L=[],X=Re(r);try{for(X.s();!(re=X.n()).done;){var Z=re.value,H=Z.line,he=Z.comment;if(he>=0){var N=H.from+he,F=N+Z.token.length;" "==H.text[F-H.from]&&F++,L.push({from:N,to:F})}}}catch(Y){X.e(Y)}finally{X.f()}return{changes:L}}return null},0),net=qj(She,0),iet=qj(function(t,n){return She(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function Xj(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function She(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return Xj(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function ret(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?Kj:"historyRedo"==n.inputType?KS:null;return!!i&&(n.preventDefault(),i(e))}})]}function JS(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(Jj,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var Kj=JS(0,!1),KS=JS(1,!1),uet=JS(0,!0),det=JS(1,!0);function The(t){return function(n){var e=n.field(Jj,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var het=The(0),fet=The(1),df=function(){function t(n,e,i,r,o){ke(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&C0.fromJSON(n.mapped),n.startSelection&&en.fromJSON(n.startSelection),n.selectionsAfter.map(en.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=lu,o=Re(n.startState.facet(aet));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,lu)}},{key:"selection",value:function(n){return new t(void 0,lu,void 0,void 0,n)}}]),t}();function QS(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Ehe(t,n){return t.length?n.length?t.concat(n):t:n}var lu=[];function Ahe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),QS(t,t.length-1,1e9,e.setSelAfter(i)))}return[df.selection([n])]}function pet(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Qj(t,n){if(!t.length)return t;for(var e=t.length,i=lu;e;){var r=met(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[df.selection(i)]:lu}function met(t,n,e){var i=Ehe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):lu,e);if(!t.changes)return df.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new df(r,hr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var get=/^(input\.type|delete)($|\.)/,T_=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ke(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||get.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?QS(s,s.length-1,r.minDepth,new df(n.changes.compose(a.changes),Ehe(n.effects,a.effects),a.mapped,a.startSelection,lu)):QS(s,s.length,r.minDepth,n),lu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:lu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function eD(t,n,e){for(var i=hl(t).resolveInner(n.head),r=e?gr.closedBy:gr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;yet(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?yh(t,i.from,1):yh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,en.cursor(l,e?-1:1)}function Ohe(t,n){return ld(t,function(e){if(!e.empty)return ZS(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var jhe=function(t){return Ohe(t,!1)},Phe=function(t){return Ohe(t,!0)};function Lhe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=nD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=nD(t,s,!1),a=nD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:en.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function nD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var efe=function(t,n){return tD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function ofe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(iD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(en.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(en.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:en.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function sfe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(iD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var bet=afe(!1),_et=afe(!0);function afe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=hl(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(gr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new WS(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=Rj(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:en.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var lfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){r.push({from:i.from,insert:n.facet(GS)})}),{userEvent:"input.indent"})),!0)},cfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=s_(o,n.tabSize),a=0,l=S_(n,Math.max(0,s-P0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:rfe}].concat(xet.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Cet=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return eD(t.state,n,!fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,!fl(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return eD(t.state,n,fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,fl(t))})}},{key:"Alt-ArrowUp",run:function(t){return ofe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return sfe(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return ofe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return sfe(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=en.create([i.main]):i.main.empty||(r=en.create([en.cursor(i.main.head)])),!!r&&(e(bh(n,r)),!0)}},{key:"Mod-Enter",run:_et},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=iD(n).map(function(r){return en.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:en.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=L0(n.selection,function(r){for(var o,s=hl(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return en.range(s.to,s.from)});return e(bh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:cfe},{key:"Mod-]",run:lfe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new WS(n,{overrideIndentation:function(s){return i[s]??-1}}),o=tP(n,function(s,a,l){var c=Rj(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=S_(n,c);(u!=d||l.from0?o--:s0&&yh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ke(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(dfe(a))}:dfe,this.query=this.normalize(e)}return Se(t,[{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 Ba(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=S4(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=Sc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ke(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=hfe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new mfe(n,e,i,r,o);this.re=new RegExp(e,nP+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=rD(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=rD(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return iP.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=rD(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pfe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function rD(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function rP(t){var n=Oo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Un(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:oD.of(!1),selection:en.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Oo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:oD.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Oo("label",t.state.phrase("Go to line"),": ",n)," ",Oo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(ffe.prototype[Symbol.iterator]=mfe.prototype[Symbol.iterator]=function(){return this});var oD=hr.define(),gfe=Va.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(oD)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n?rP:null})}}),Det=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Tet={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vfe=Qn.define({combine:function(t){return su(t,Tet,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Eet=yi.mark({class:"cm-selectionMatch"}),Aet=yi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yfe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==cs.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==cs.Word)}var Met=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(vfe),i=n.state,r=i.selection;if(r.ranges.length>1)return yi.none;var o,y,_,C,S,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return yi.none;var l=i.wordAt(s.head);if(!l)return yi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return yi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!yfe(a=i.charCategorizer(s.head),i,s.from,s.to)||(S=s.to,(y=a)((_=i).sliceDoc(C=s.from,C+1))!=cs.Word||y(_.sliceDoc(S-1,S))!=cs.Word))return yi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return yi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new R0(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||yfe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Aet.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Eet.range(g,v)),d.length>e.maxMatches))return yi.none}}catch(y){h.e(y)}finally{h.f()}return yi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Iet=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),sD=Qn.define({combine:function(t){return su(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Vet(n)}})}});function Net(t){return t?[sD.of(t),hP]:hP}var bfe=function(){function t(n){ke(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,nP),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Oet(this):new Fet(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Fo.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?B0(this,r,e,i):$0(this,r,e,i)}}]),t}(),_fe=Se(function t(n){ke(this,t),this.spec=n});function $0(t,n,e,i){return new R0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=$0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function B0(t,n,e,i){return new ffe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(aD(a.input,a.index))!=cs.Word||r(lD(a.input,a.index))!=cs.Word)&&(r(lD(a.input,a.index+a[0].length))!=cs.Word||r(aD(a.input,a.index+a[0].length))!=cs.Word)}):void 0},e,i);var r}function aD(t,n){return t.slice(Pl(t,n,!1),n)}function lD(t,n){return t.slice(n,Pl(t,n))}var Oet=function(t){wt(e,_fe);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=B0(this.spec,i,o,i.doc.length).next();return s.done&&(s=B0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=B0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=B0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),E_=hr.define(),oP=hr.define(),Cp=Va.define({create:function(t){return new sP(lP(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(E_)?t=new sP(r.value.create(),t.panel):r.is(oP)&&(t=new sP(t.query,r.value?aP:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n.panel})}}),sP=Se(function t(n,e){ke(this,t),this.query=n,this.panel=e}),jet=yi.mark({class:"cm-searchMatch"}),Pet=yi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Let=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Cp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Cp);(e!=n.startState.field(Cp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return yi.none;for(var i=this.view,r=new Gm,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Pet:jet)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function A_(t){return function(n){var e=n.state.field(Cp,!1);return e&&e.query.spec.valid?t(n,e):cP(n)}}var cD=A_(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:dP(t,r),userEvent:"select.search"}),!0)}),uD=A_(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:dP(t,o),userEvent:"select.search"}),!0)}),Ret=A_(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:en.create(e.map(function(i){return en.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),xfe=A_(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(dP(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),$et=A_(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function aP(t){return t.state.facet(sD).createPanel(t)}function lP(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(sD);return new bfe({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var cP=function(t){var n=t.state.field(Cp,!1);if(n&&n.panel){var e=y_(t,aP);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=lP(t.state,n.query.spec);r.valid&&t.dispatch({effects:E_.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[oP.of(!0),n?E_.of(lP(t.state,n.query.spec)):hr.appendConfig.of(hP)]});return!0},uP=function(t){var n=t.state.field(Cp,!1);if(!n||!n.panel)return!1;var e=y_(t,aP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:oP.of(!1)}),!0},Bet=[{key:"Mod-f",run:cP,scope:"editor search-panel"},{key:"F3",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:uP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new R0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(en.range(c.value.from,c.value.to))}return e(n.update({selection:en.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=y_(t,rP);if(!n){var e=[oD.of(!0)];null==t.state.field(gfe,!1)&&e.push(hr.appendConfig.of([gfe,Det])),t.dispatch({effects:e}),n=y_(t,rP)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=en.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||en.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var _=s.wordAt(y.value.from);if(!_||_.from!=y.value.from||_.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new R0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new R0(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===bn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(en.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Vet=function(){function t(n){var e=this;ke(this,t),this.view=n;var i=this.query=n.state.field(Cp).query.spec;function r(o,s,a){return Oo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Oo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Oo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Oo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Oo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Oo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Oo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return cD(n)},[Ac(n,"next")]),r("prev",function(){return uD(n)},[Ac(n,"previous")]),r("select",function(){return Ret(n)},[Ac(n,"all")]),Oo("label",null,[this.caseField,Ac(n,"match case")]),Oo("label",null,[this.reField,Ac(n,"regexp")]),Oo("label",null,[this.wordField,Ac(n,"by word")])].concat(si(n.state.readOnly?[]:[Oo("br"),this.replaceField,r("replace",function(){return xfe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return $et(n)},[Ac(n,"replace all")])]),[Oo("button",{name:"close",onclick:function(){return uP(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new bfe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:E_.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return bde(yde(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?uD:cD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),xfe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(E_)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(sD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var dD=/[\s\.,:;?!]/;function dP(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!dD.test(l[c+1])&&dD.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!dD.test(l[u-1])&&dD.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Het=Wn.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"}}),hP=[Cp,k0.lowest(Let),Het],wfe=function(){function t(n,e,i){ke(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=hl(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Sfe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Cfe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var kfe=Se(function t(n,e,i){ke(this,t),this.completion=n,this.source=e,this.match=i});function kp(t){return t.selection.main.head}function Sfe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Dfe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:en.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:en.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var Tfe=new WeakMap;function Uet(t){if(!Array.isArray(t))return t;var n=Tfe.get(t);return n||Tfe.set(t,n=function zet(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Un(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(z=S4(R))!=z.toLowerCase()?1:z!=z.toUpperCase()?2:0;(!M||1==U&&C||0==G&&0!=U)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=M:s.length&&(S=!1)),G=U,M+=Sc(R)}return m==c&&0==s[0]&&S?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,_]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,_]:m==c?this.result((g?-200:0)-100-700+(S?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?Sc(Ba(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_h=Qn.define({combine:function(t){return su(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Efe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Wet=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_h);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,si(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,_))),C.className="cm-completionMatchedText",g=_}return g=this.range.to)&&(this.range=Efe(i.options.length,i.selected,this.view.state.facet(_h).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Mfe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,_=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=[1e9-m++];if(_){var $,G=Re(_(S));try{for(G.s();!($=G.n()).done;)M.push($.value)}catch(F){G.e(F)}finally{G.f()}}p.push(new kfe(S,v,M))}}catch(F){C.e(F)}finally{C.f()}}else{var z,U=new Get(h.sliceDoc(v.from,v.to)),q=void 0,re=Re(v.result.options);try{for(re.s();!(z=re.n()).done;){var L=z.value;(q=U.match(L.label))&&(null!=L.boost&&(q[0]+=L.boost),p.push(new kfe(L,v,q)))}}catch(F){re.e(F)}finally{re.f()}}}}catch(F){g.e(F)}finally{g.f()}var X,Z=[],H=null,he=h.facet(_h).compareCompletions,E=Re(p.sort(function(F,Y){return Y.match[0]-F.match[0]||he(F.completion,Y.completion)}));try{for(E.s();!(X=E.n()).done;){var N=X.value;!H||H.label!=N.completion.label||H.detail!=N.completion.detail||null!=H.type&&null!=N.completion.type&&H.type!=N.completion.type||H.apply!=N.completion.apply?Z.push(N):Afe(N.completion)>Afe(H)&&(Z[Z.length-1]=N),H=N.completion}}catch(F){E.e(F)}finally{E.f()}return Z}(n,e);if(!s.length)return null;var a,l=e.facet(_h).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var Jet=[];function fP(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var Jm=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ke(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=fP(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(pP))r=new t(r.source,1,a.value?kp(n.state):-1);else if(a.is(hD))r=new t(r.source,0);else if(a.is(Ife)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(kp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),Ket=function(t){wt(e,Jm);var n=Ct(e);function e(i,r,o,s,a){var l;return ke(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=kp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&kp(i.startState)==this.from)return new Jm(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Sfe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new wfe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:kp(i.state)):new Jm(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new Jm(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),pP=hr.define(),hD=hr.define(),Ife=hr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),Nfe=hr.define(),uu=Va.define({create:function(){return Xet.start()},update:function(t,n){return t.update(n)},provide:function(t){return[NS.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function fD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(uu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function KQe(t,n){var e=t.plugin(Ode);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:Nfe.of(a)}),!0}}var Qet=Se(function t(n,e){ke(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),Zet=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(uu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(uu);if(n.selectionSet||n.docChanged||n.startState.field(uu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!fP(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,si(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==fP(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(uu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=kp(i),o=new wfe(i,r,n.explicitPos==r),s=new Qet(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:hD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_h),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new Ket(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:kp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(uu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new Jm(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),pD={brackets:["(","[","{","'",'"'],before:")]}:;>"},Km=hr.define({map:function(t,n){return n.mapPos(t,-1,Ll.TrackAfter)??void 0}}),mP=hr.define({map:function(t,n){return n.mapPos(t)}}),gP=new(function(t){wt(e,Um);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e)}());gP.startSide=1,gP.endSide=-1;var Ffe=Va.define({create:function(){return Go.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Go.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(Km)?t=t.update({add:[gP.range(a.value,a.value+1)]}):a.is(mP)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Ofe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return S4(t<128?t:t+1)}function jfe(t,n){return t.languageDataAt("closeBrackets",n)[0]||pD}var ttt="object"==(typeof navigator>"u"?"undefined":bn(navigator))&&/Android\b/.test(navigator.userAgent),ntt=Wn.inputHandler.of(function(t,n,e,i){if((ttt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==Sc(Ba(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=jfe(s,s.selection.main.head),u=c.brackets||pD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Ofe(Ba(h,0));if(a==h)return f==h?stt(s,h,u.indexOf(h+h+h)>-1):rtt(s,h,f,c.before||pD.before);if(a==f&&Pfe(s,s.selection.main.from))return ott(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),itt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=jfe(n,n.selection.main.head).brackets||pD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=Sc(Ba(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&mD(n.doc,s.head)==Ofe(Ba(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:en.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Pfe(t,n){var e=!1;return t.field(Ffe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function mD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,Sc(Ba(e,0)))}function rtt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Km.of(s.to+n.length),range:en.range(s.anchor+n.length,s.head+n.length)};var a=mD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Km.of(s.head+n.length),range:en.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function ott(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&mD(t.doc,o.head)==e?en.cursor(o.head+e.length):i=o});return i?null:t.update({selection:en.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return mP.of(o.from)})})}function stt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Km.of(o.to+n.length),range:en.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=mD(t.doc,s);if(a==n){if(Lfe(t,s))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(Pfe(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:en.cursor(s+n.length*(l?3:1)),effects:mP.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Lfe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=cs.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=cs.Word&&!function(u,d,h){for(var f=hl(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lfe(t,n){var e=hl(t).resolveInner(n+1);return e.parent&&e.from==n}function att(){return[uu,_h.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Zet,ltt,ett]}var Rfe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(uu,!1)&&(t.dispatch({effects:pP.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(uu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:hD.of(null)}),0))}},{key:"ArrowDown",run:fD(!0)},{key:"ArrowUp",run:fD(!1)},{key:"PageDown",run:fD(!0,"page")},{key:"PageUp",run:fD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(uu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Dfe(t,n.open.options[n.open.selected]),0))}}],ltt=k0.highest(AS.computeN([_h],function(t){return t.facet(_h).defaultKeymap?[Rfe]:[]})),ctt=Se(function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.diagnostic=i}),M_=function(){function t(n,e,i){ke(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Qm).markerFilter;o&&(r=o(r));var s=yi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?yi.widget({widget:new ptt(a),diagnostic:a}).range(a.from):yi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,V0(s))}}]),t}();function V0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new ctt(r,o,a.diagnostic),!1}),i}function $fe(t,n){return!(!t.effects.some(function(e){return e.is(gD)})&&!t.changes.touchesRange(n.pos))}function Bfe(t,n){return t.field(Mc,!1)?n:n.concat(hr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?yi.set([utt.range(r.from,r.to)]):yi.none}),JQe(dtt,{hideOn:$fe}),mtt]))}var gD=hr.define(),vP=hr.define(),Vfe=hr.define(),Mc=Va.define({create:function(){return new M_(yi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=V0(e,t.selected.diagnostic,r)||V0(e,null,r)}t=new M_(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(gD)?t=M_.init(a.value,t.panel,n.state):a.is(vP)?t=new M_(t.diagnostics,a.value?qfe.open:null,t.selected):a.is(Vfe)&&(t=new M_(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[b_.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),utt=yi.mark({class:"cm-lintRange cm-lintRange-active"});function dtt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=Ufe(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=V0(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Vfe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function vD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function yP(t){return vD(''),'width="6" height="3"')}var mtt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:yP("#d11")},".cm-lintRange-warning":{backgroundImage:yP("orange")},".cm-lintRange-info":{backgroundImage:yP("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gtt=function(t){wt(e,ph);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(yD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:bP.of({pos:f.from,above:!1,create:function(){return{dom:Hfe(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var _=m.getBoundingClientRect();if(!(y.clientX>_.left-10&&y.clientX<_.right+10&&y.clientY>_.top-10&&y.clientY<_.bottom+10)){for(var C=y.target;C;C=C.parentNode)if(1==C.nodeType&&C.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",v),p.state.field(Yfe)&&p.dispatch({effects:bP.of(null)})}})}var d=a.state.facet(yD).hoverTime,h=setTimeout(u,d);l.onmouseout=function(){clearTimeout(h),l.onmouseout=l.onmousemove=null},l.onmousemove=function(){clearTimeout(h),h=setTimeout(u,d)}}(i,r,o)}),r}}]),e}();function vtt(t,n){var e,i=Object.create(null),r=Re(n);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t.lineAt(o.from);(i[s.from]||(i[s.from]=[])).push(o)}}catch(c){r.e(c)}finally{r.f()}var a=[];for(var l in i)a.push(new gtt(i[l]).range(+l));return Go.of(a,!0)}var ytt=$de({class:"cm-gutter-lint",markers:function(t){return t.state.field(Xfe)}}),Xfe=Va.define({create:function(){return Go.empty},update:function(t,n){t=t.map(n.changes);var e,i=n.state.facet(yD).markerFilter,r=Re(n.effects);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.is(gD)){var s=o.value;i&&(s=i(s||[])),t=vtt(n.state.doc,s.slice(0))}}}catch(a){r.e(a)}finally{r.f()}return t}}),bP=hr.define(),Yfe=Va.define({create:function(){return null},update:function(t,n){return t&&n.docChanged&&(t=$fe(n,t)?null:Object.assign(Object.assign({},t),{pos:n.changes.mapPos(t.pos)})),n.effects.reduce(function(e,i){return i.is(bP)?i.value:e},t)},provide:function(t){return NS.from(t)}}),btt=Wn.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:vD('')},".cm-lint-marker-warning":{content:vD('')},".cm-lint-marker-error":{content:vD('')}}),yD=Qn.define({combine:function(t){return su(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function _tt(){return[yD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Xfe,ytt,btt,Yfe]}var Jfe,xtt=function(){return[rZe(),sZe,FQe(),cet(),jZe(),SQe(),[v_,AQe],Fo.allowMultipleSelections.of(!0),Fo.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=Rj(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=S_(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),bhe($Ze,{fallback:!0}),WZe(),[ntt,Ffe],att(),BQe(),zQe(),RQe,(n=[Iet,Met],n),AS.of([].concat(itt,si(Cet),Bet,vet,NZe,Rfe,htt))];var n}(),wtt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ke(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%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(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ctt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!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 n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Kfe(r,r.start):null,0,null)}}]),t}(),Kfe=Se(function t(n,e){ke(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Jfe||(Jfe={}));var Ctt=function(){function t(n){ke(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),ktt=function(){function t(n,e,i){ke(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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 t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),bD=Se(function t(){ke(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),Qfe=new bD,Stt=function(){function t(n,e){ke(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qfe,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=Qfe,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),_D=function(){function t(n,e){ke(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function xD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}_D.prototype.contextual=_D.prototype.fallback=_D.prototype.extend=!1;var Zfe,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),_P=null;function epe(t,n,e){var i=t.cursor(za.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Zfe||(Zfe={}));var tpe,Dtt=function(){function t(n,e){ke(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?epe(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?epe(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Ttt=function(){function t(n,e){ke(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new bD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new bD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new bD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Dtt(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,_=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=S.p.stoppedAt;(S.pos==S.p.stream.end||null!=M&&S.pos>M)&&S.p.parser.stateFlag(S.state,2)&&(!_||_.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(gr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(_):i.push(_)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return npe(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),npe(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],_=-v;_>0;_--)d(p[g++],m,y);g++}}}}catch(M){f.e(M)}finally{f.f()}}o.nodeSet=new cZe(s.map(function(M,$){return au.define({name:$>=o.minRepeatTerm?void 0:M,id:$,props:c[$],top:l.indexOf($)>-1,error:0==$,skipped:i.skippedNodes&&i.skippedNodes.indexOf($)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,si(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=xD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var S=0;S2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=hf(this.data,o+2)}if(r==hf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=hf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=ipe(this.data,this.tokenPrecTable,r);return o<0||ipe(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&ape(t);return{c:function(){n=be("div"),r&&r.c(),e=it(),o&&o.c(),i=it(),s&&s.c(),P(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),de(n,e),o&&o.m(n,null),de(n,i),s&&s.m(n,null)},p:function(a,l){var c=Un(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=ope(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=spe(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=ape(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:Lt,o:Lt,d:function(a){a&&je(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ptt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Ltt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ptt,jtt,ys,{editorState:3},Ott),r}return Se(e)}(),xP=Bj.define([{tag:fn.propertyName,color:"var(--jse-key-color)"},{tag:fn.number,color:"var(--jse-value-color-number)"},{tag:fn.bool,color:"var(--jse-value-color-boolean)"},{tag:fn.string,color:"var(--jse-value-color-string)"},{tag:fn.keyword,color:"var(--jse-value-color-null)"}]),Rtt=bhe(xP),$tt=xP.style;function wP(t){return t.doc.lineAt(t.selection.main.head)}function lpe(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=lpe(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=lpe(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=wP(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,_=g.from;_<=y;){var C=f.doc.lineAt(_);p.has(C)||p.add(C),_=C.to+1}}catch(S){m.e(S)}finally{m.f()}return p}(this.view,n),o=new Btt(r,n,this.unitWidth),s=n.facet(wD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Htt(c,this.unitWidth,s);i.add(l.from,l.from,yi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Utt(){return[wD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Vtt,ka.fromClass(ztt,{decorations:function(n){return n.decorations}})]}function Gtt(t){pi(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function CP(t){var n=t.slice();return n[93]=0===n[10].length,n}function cpe(t){var n,e;return n=new hKe({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wtt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function qtt(t){var n,e,i,r,o,s=t[92]&&upe(t),a=!t[92]&&dpe(t);return{c:function(){n=be("div"),e=it(),s&&s.c(),i=it(),a&&a.c(),r=_r(),P(n,"class","jse-contents svelte-1yqirn0"),Mt(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Mt(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&Q(s,1)):((s=upe(l)).c(),Q(s,1),s.m(i.parentNode,i)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),l[92]?a&&($t(),ce(a,1,1,function(){a=null}),Bt()):a?(a.p(l,c),1152&c[0]&&Q(a,1)):((a=dpe(l)).c(),Q(a,1),a.m(r.parentNode,r))},i:function(l){o||(Q(s),Q(a),o=!0)},o:function(l){ce(s),ce(a),o=!1},d:function(l){l&&je(n),t[50](null),l&&je(e),s&&s.d(l),l&&je(i),a&&a.d(l),l&&je(r)}}}function upe(t){var n,e,i,r,o,s=oh(t[10]||"",2e4)+"";return n=new nd({props:{icon:$m,type:"error",message:"The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=tn(s),P(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){ft(n,a,l),Pe(a,e,l),Pe(a,i,l),de(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=oh(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(Q(n.$$.fragment,a),o=!0)},o:function(a){ce(n.$$.fragment,a),o=!1},d:function(a){pt(n,a),a&&je(e),a&&je(i)}}}function dpe(t){var n,e,i,r,o,s=!t[13]&&t[8]&&hoe(t[10]),a=t[2]&&hpe(t),l=t[13]&&fpe(t),c=s&&ppe(t);return r=new l4({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=it(),l&&l.c(),e=it(),c&&c.c(),i=it(),mt(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),ft(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&Q(a,1)):((a=hpe(u)).c(),Q(a,1),a.m(n.parentNode,n)):a&&($t(),ce(a,1,1,function(){a=null}),Bt()),u[13]?l?(l.p(u,d),8192&d[0]&&Q(l,1)):((l=fpe(u)).c(),Q(l,1),l.m(e.parentNode,e)):l&&($t(),ce(l,1,1,function(){l=null}),Bt()),9472&d[0]&&(s=!u[13]&&u[8]&&hoe(u[10])),s?c?(c.p(u,d),9472&d[0]&&Q(c,1)):((c=ppe(u)).c(),Q(c,1),c.m(i.parentNode,i)):c&&($t(),ce(c,1,1,function(){c=null}),Bt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!0)},o:function(u){ce(a),ce(l),ce(c),ce(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&je(n),l&&l.d(u),u&&je(e),c&&c.d(u),u&&je(i),pt(r,u)}}}function hpe(t){var n,e;return n=new Ltt({props:{editorState:t[6]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fpe(t){var n,e;return n=new nd({props:{type:"error",icon:$m,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ppe(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Xtt(t){var n,e,i,r,o,s=t[1]&&cpe(CP(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[qtt,Wtt][i](c(t,i)),{c:function(){n=be("div"),s&&s.c(),e=it(),r.c(),P(n,"class","jse-text-mode svelte-1yqirn0"),Mt(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),de(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(CP(u),d),2&d[0]&&Q(s,1)):((s=cpe(CP(u))).c(),Q(s,1),s.m(n,e)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),r.p(c(u,i),d),(!o||2&d[0])&&Mt(n,"no-main-menu",!u[1])},i:function(u){o||(Q(s),Q(r),o=!0)},o:function(u){ce(s),ce(r),o=!1},d:function(u){u&&je(n),s&&s.d(),l[i].d(),t[52](null)}}}function mpe(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function Ytt(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,_=n.onChange,C=n.onChangeMode,S=n.onError,M=n.onFocus,$=n.onBlur,G=n.onRenderMenu,R=n.onSortModal,z=n.onTransformModal,U=wa("jsoneditor:TextMode"),q={key:"Mod-i",run:ie,shift:Ie,preventDefault:!0},re=typeof window>"u";U("isSSR:",re);var L=!1,X=!0,Z=[],H=new hp,he=new hp,E=new hp,N=new hp,F=new hp,Y=new hp,V=h,oe=Fk(V,f,g),fe=m;Wc(Zi(vn().mark(function gt(){return vn().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!re){On.next=2;break}return On.abrupt("return");case 2:try{s=ci({target:o,initialText:jo(oe,L)?"":i.escapeValue(oe),readOnly:c,indentation:f})}catch(ai){console.error(ai)}case 3:case"end":return On.stop()}},gt)}))),Hu(function(){s&&(U("Destroy CodeMirror editor"),s.destroy())});var Ne=!1,xe=!1,tt=ep(),ze=ep();function ot(){s&&(U("focus"),s.focus())}var B=!1;function ne(gt){U("patch",gt);var On=g.parse(oe),ai=Yu(On,gt),bi=NQ(On,gt);return Fr({text:g.stringify(ai,null,f)}),{json:ai,previousJson:On,undo:bi,redo:gt}}function ie(){if(U("format"),c)return!1;try{var gt=g.parse(oe);return Fr({text:g.stringify(gt,null,f)}),e(8,X=!0),!0}catch(On){S(On)}return!1}function Ie(){if(U("compact"),c)return!1;try{var gt=g.parse(oe);return Fr({text:g.stringify(gt)}),e(8,X=!1),!0}catch(On){S(On)}return!1}function Ye(){if(U("repair"),!c)try{Fr({text:Yd(oe)}),e(49,Fn="valid"),e(13,xt=null)}catch(gt){S(gt)}}function Le(gt){var On=gt.id,ai=gt.rootPath,bi=gt.onTransform,Er=gt.onClose;try{var qr=g.parse(oe);B=!0,z({id:On||ze,json:qr,rootPath:ai||[],onTransform:function(ao){bi?bi({operations:ao,json:qr,transformedJson:Yu(qr,ao)}):(U("onTransform",ao),ne(ao))},onClose:function(){B=!1,ot(),Er&&Er()}})}catch(ao){S(ao)}}function _t(gt,On){U("setSelection",{anchor:gt,head:On}),s&&s.dispatch(s.state.update({selection:{anchor:gt,head:On},scrollIntoView:!0}))}function At(gt,On){if(1===On.state.selection.ranges.length){var ai=On.state.selection.ranges[0],bi=oe.slice(ai.from,ai.to);if("{"===bi||"["===bi){var Er=O2.parse(oe),qr=Object.keys(Er.pointers).find(function(Js){var vr;return(null===(vr=Er.pointers[Js].value)||void 0===vr?void 0:vr.pos)===ai.from}),ao=Er.pointers[qr];qr&&ao&&ao.value&&ao.valueEnd&&(U("pointer found, selecting inner contents of path:",qr,ao),_t(ao.value.pos+1,ao.valueEnd.pos-1))}}}function _n(){return function(gt){return Qm.of({source:gt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ui,{delay:300})}function ci(gt){var On=gt.target,ai=gt.initialText,bi=gt.readOnly,Er=gt.indentation;U("Create CodeMirror editor",{readOnly:bi,indentation:Er});var qr=Fo.create({doc:ai,extensions:[AS.of([ket,q]),H.of(_n()),_tt(),xtt,Rtt,Utt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:At}),Wn.updateListener.of(function(ao){e(6,l=ao.state),ao.docChanged&&Ai()}),new SZe(Ftt),Net({top:!0}),E.of(Fo.readOnly.of(bi)),he.of(Wn.editable.of(!bi)),F.of(Fo.tabSize.of(p)),N.of(wr(Er)),Y.of(Wn.theme({},{dark:on()})),Wn.lineWrapping]});return s=new Wn({state:qr,parent:On})}function on(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Ni(gt){var On=gt.path,ai=gt.message,bi=function(Er,qr){try{var ao=O2.parse(Er),Js=ln(qr),vr=ao.pointers[Js];if(vr)return{path:qr,line:vr.key?vr.key.line:vr.value?vr.value.line:0,column:vr.key?vr.key.column:vr.value?vr.value.column:0,from:vr.key?vr.key.pos:vr.value?vr.value.pos:0,to:vr.keyEnd?vr.keyEnd.pos:vr.valueEnd?vr.valueEnd.pos:0}}catch(Ks){console.error(Ks)}return null}(i.escapeValue(oe),On);return{path:On,line:bi.line,column:bi.column,from:bi.from,to:bi.to,message:ai,severity:Xd.warning,actions:[]}}function pn(gt,On){var Er=gt.position;return{path:[],line:gt.line,column:gt.column,from:Er,to:Er,severity:Xd.error,message:gt.message,actions:On&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function Fr(gt){var On=arguments.length>1&&void 0!==arguments[1]&&arguments[1],ai=Fk(gt,f,g),bi=!or(gt,V),Er=V;V=gt,e(10,oe=ai),U("setCodeMirrorContent",{isChanged:bi,forceUpdate:On}),s&&(bi||On)&&(jo(oe,L)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}}),Or(),bi&&Wr(V,Er))}function $r(){if(s){var gt=s?i.unescapeValue(s.state.doc.toString()):"",On=gt!==oe;if(U("onChangeCodeMirrorValue",{isChanged:On}),On){var ai=V;e(10,oe=gt),V={text:oe},Or(),Wr(V,ai)}}}function wr(gt){return GS.of("number"==typeof gt?" ".repeat(gt):gt)}function Or(){e(11,Ne=het(s.state)>0),e(12,xe=fet(s.state)>0),U({canUndo:Ne,canRedo:xe})}a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(a)},hasFocus:function(){return B&&document.hasFocus()||jk(a)},onFocus:M,onBlur:$});var Ai=Gv($r,300);function Wr(gt,On){_&&_(gt,On,{contentErrors:Fi(),patchResult:null})}function jo(gt,On){return!!gt&>.length>10485760&&!On}var Fn="valid",xt=null;function ui(){if(jo(oe,L))return[];var gt=Fi();return Dae(gt)?[mpe(pn(gt.parseError,gt.isRepairable))]:function Jqe(t){return Io(t)&&Array.isArray(t.validationErrors)}(gt)?gt.validationErrors.map(Ni).map(mpe):[]}function Fi(){U("validate:start"),Ai.flush();var gt=Cr(i.escapeValue(oe),v,g,y);return Dae(gt)?(e(49,Fn=gt.isRepairable?"repairable":"invalid"),e(13,xt=gt.parseError),e(9,Z=[])):(e(49,Fn="valid"),e(13,xt=null),e(9,Z=gt?.validationErrors||[])),U("validate:end"),gt}var Cr=Zb(Oqe);function xo(){xt&&function(gt){U("select parse error",gt);var On=pn(gt,!1);_t(On.from,On.to),ot()}(xt)}var Qo={icon:xWe,text:"Show me",title:"Move to the parse error location",onClick:xo};return t.$$set=function(gt){"readOnly"in gt&&e(0,c=gt.readOnly),"mainMenuBar"in gt&&e(1,u=gt.mainMenuBar),"statusBar"in gt&&e(2,d=gt.statusBar),"externalContent"in gt&&e(29,h=gt.externalContent),"indentation"in gt&&e(30,f=gt.indentation),"tabSize"in gt&&e(31,p=gt.tabSize),"escapeUnicodeCharacters"in gt&&e(32,m=gt.escapeUnicodeCharacters),"parser"in gt&&e(33,g=gt.parser),"validator"in gt&&e(34,v=gt.validator),"validationParser"in gt&&e(35,y=gt.validationParser),"onChange"in gt&&e(36,_=gt.onChange),"onChangeMode"in gt&&e(37,C=gt.onChangeMode),"onError"in gt&&e(38,S=gt.onError),"onFocus"in gt&&e(39,M=gt.onFocus),"onBlur"in gt&&e(40,$=gt.onBlur),"onRenderMenu"in gt&&e(3,G=gt.onRenderMenu),"onSortModal"in gt&&e(41,R=gt.onSortModal),"onTransformModal"in gt&&e(42,z=gt.onTransformModal)},t.$$.update=function(){var gt;2&t.$$.dirty[1]&&(i=TO({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&Fr(h),8&t.$$.dirty[1]&&(U("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(_n())})),1073741824&t.$$.dirty[0]&&(gt=f,s&&(U("updateIndentation",gt),s.dispatch({effects:N.reconfigure(wr(gt))}))),1&t.$$.dirty[1]&&function(gt){s&&(U("updateTabSize",gt),s.dispatch({effects:F.reconfigure(Fo.tabSize.of(gt))}))}(p),1&t.$$.dirty[0]&&function(gt){s&&(U("updateReadOnly",gt),s.dispatch({effects:[E.reconfigure(Fo.readOnly.of(gt)),he.reconfigure(Wn.editable.of(!gt))]}))}(c),131074&t.$$.dirty[1]&&fe!==m&&(e(48,fe=m),U("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Fn||c?[Qo]:[{icon:zk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},Qo])},[c,u,d,G,o,a,l,L,X,Z,oe,Ne,xe,xt,r,re,ie,Ie,function(){var gt;if(!c)try{var On=g.parse(oe);B=!0,R({id:tt,json:On,rootPath:[],onSort:(gt=Zi(vn().mark(function ai(bi){var Er;return vn().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:U("onSort",Er=bi.operations),ne(Er);case 3:case"end":return qr.stop()}},ai)})),function(ai){return gt.apply(this,arguments)}),onClose:function(){B=!1,ot()}})}catch(ai){S(ai)}},function(){c||Le({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?uP(s):cP(s))},function(){c||s&&(Kj(s),ot())},function(){c||s&&(KS(s),ot())},function(){e(7,L=!0),Fr(h,!0)},function(){C(Jo.tree)},function(){$r()},function(gt){U("select validation error",gt);var On=Ni(gt);_t(On.from,On.to),ot()},jo,xo,h,f,p,m,g,v,y,_,C,S,M,$,R,z,ot,ne,Le,function(){U("refresh"),Xl().then(function(){if(s){var gt=on();U("updateTheme",{dark:gt}),s.dispatch({effects:[Y.reconfigure(Wn.theme({},{dark:gt}))]})}})},Fi,fe,Fn,function(gt){Vi[gt?"unshift":"push"](function(){e(4,o=gt)})},function(){return e(8,X=!1)},function(gt){Vi[gt?"unshift":"push"](function(){e(5,a=gt)})}]}var Jtt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ytt,Xtt,Ei,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Gtt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function Ktt(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Qtt(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:bse,title:xN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var Ztt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Qtt,Ktt,Ei,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function gpe(t,n,e){var i=t.slice();return i[9]=n[e],i}function vpe(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],_=Xi(v);_.length>0&&!Xc(m,_);)y.unshift({op:"add",path:ln(_),value:{}}),_=Xi(_);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&ip(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var nnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,tnt,ent,Ei,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function int(t){pi(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function rnt(t){var n,e,i,r,o=oh(t[2].stringify(t[1]),50)+"";return{c:function(){n=be("button"),e=tn(o),P(n,"type","button"),P(n,"class","jse-inline-value svelte-l28mqd"),Mt(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),de(n,e),i||(r=Ft(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Un(a,1)[0];6&l&&o!==(o=oh(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&Mt(n,"jse-selected",s[3])},i:Lt,o:Lt,d:function(s){s&&je(n),i=!1,r()}}}function ont(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=oo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var snt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ont,rnt,Ei,{path:0,value:1,parser:2,isSelected:3,onEdit:4},int),r}return Se(e)}();function ant(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function ype(t){var n,e,i,r;return e=new sr({props:{data:t[1]===qc.asc?ru:yse}}),{c:function(){n=be("span"),mt(e.$$.fragment),P(n,"class","jse-column-sort-icon svelte-h4fort"),P(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),ft(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===qc.asc?ru:yse),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&P(n,"title",i)},i:function(o){r||(Q(e.$$.fragment,o),r=!0)},o:function(o){ce(e.$$.fragment,o),r=!1},d:function(o){o&&je(n),pt(e)}}}function lnt(t){var n,e,i,r,o,s,a,l,c=oh(t[3],50)+"",u=void 0!==t[1]&&ype(t);return{c:function(){n=be("button"),e=be("span"),i=tn(c),r=it(),u&&u.c(),P(e,"class","jse-column-name"),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Mt(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),de(n,e),de(e,i),de(n,r),u&&u.m(n,null),s=!0,a||(l=Ft(n,"click",t[4]),a=!0)},p:function(d,h){var f=Un(h,1)[0];(!s||8&f)&&c!==(c=oh(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&Q(u,1)):((u=ype(d)).c(),Q(u,1),u.m(n,null)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&P(n,"title",o),(!s||1&f)&&Mt(n,"jse-readonly",d[0])},i:function(d){s||(Q(u),s=!0)},o:function(d){ce(u),s=!1},d:function(d){d&&je(n),u&&u.d(),a=!1,l()}}}function cnt(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Hi(s)?"values":tu(Kl(s))),96&t.$$.dirty&&e(1,r=or(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=H7e[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===qc.asc?qc.desc:qc.asc})},s,a,c]}var CD,kD,unt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cnt,lnt,Ei,{path:5,sortedColumn:6,readOnly:0,onSort:7},ant),r}return Se(e)}();function bpe(t,n){return CD||(kD=new WeakMap,CD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=kD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),kD.set(t,n),CD.observe(t),{destroy:function(){kD.delete(t),CD.unobserve(t)}}}function dnt(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,_=n.onEditValue,C=n.onEditRow,S=n.onToggleEnforceString,M=n.onCut,$=n.onCopy,G=n.onPaste,R=n.onRemove,z=n.onDuplicateRow,U=n.onInsertBeforeRow,q=n.onInsertAfterRow,re=n.onRemoveRow;function L(){y(),_()}function X(){y(),C()}function Z(){y(),S()}function H(){y(),M(!0)}function he(){y(),M(!1)}function E(){y(),$(!0)}function N(){y(),$(!1)}function F(){y(),G()}function Y(){y(),R()}function V(){y(),z()}function oe(){y(),U()}function fe(){y(),q()}function Ne(){y(),re()}return t.$$set=function(xe){"json"in xe&&e(2,p=xe.json),"documentState"in xe&&e(3,m=xe.documentState),"parser"in xe&&e(4,g=xe.parser),"showTip"in xe&&e(0,v=xe.showTip),"onCloseContextMenu"in xe&&e(5,y=xe.onCloseContextMenu),"onEditValue"in xe&&e(6,_=xe.onEditValue),"onEditRow"in xe&&e(7,C=xe.onEditRow),"onToggleEnforceString"in xe&&e(8,S=xe.onToggleEnforceString),"onCut"in xe&&e(9,M=xe.onCut),"onCopy"in xe&&e(10,$=xe.onCopy),"onPaste"in xe&&e(11,G=xe.onPaste),"onRemove"in xe&&e(12,R=xe.onRemove),"onDuplicateRow"in xe&&e(13,z=xe.onDuplicateRow),"onInsertBeforeRow"in xe&&e(14,U=xe.onInsertBeforeRow),"onInsertAfterRow"in xe&&e(15,q=xe.onInsertAfterRow),"onRemoveRow"in xe&&e(16,re=xe.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Hi(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Nr(i)||xs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Nr(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&zb(i)&&!s&&Array.isArray(Sn(p,Xi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&zb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!Ho(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Io(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Ho(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&lf(a,m.enforceStringMap,ln(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:L,icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:L,disabled:!c},{type:"button",icon:h?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Z,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:he,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:N,disabled:!l}]},{type:"button",onClick:F,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:Y,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:X,icon:h0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:wse,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:oe,icon:f0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:fe,icon:f0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Ne,icon:XO,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,_,C,S,M,$,G,R,z,U,q,re,o,l,u,h,c,i,a,d,r,s]}var fnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,hnt,dnt,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function pnt(t){pi(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function _pe(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function mnt(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&je(n),i&&je(e)}}}function gnt(t){var n;return{c:function(){n=tn("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,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function xpe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=tu(Kl(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=be("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=be("span"),a=tn("("),l=tn(m),c=it(),u=tn(g),d=tn(")"),P(s,"class","jse-nested-array-count svelte-1te5h1h"),P(n,"type","button"),P(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,_){Pe(y,n,_),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(s,u),de(s,d),h||(f=Ft(n,"click",v),h=!0)},p:function(y,_){t=y,64&_&&qn(e,t[6]),8&_&&p!==(p=tu(Kl(t[12]))+"")&&qn(r,p),9&_&&m!==(m=t[13]+"")&&qn(l,m),9&_&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&je(n),h=!1,f()}}}function vnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(G,R){return G[4]?gnt:mnt}for(var _=y(t),C=_(t),S=t[3],M=[],$=0;$1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Mo(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Hi(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Mo(l)?"An object":oo(l)?"An empty array":"A ".concat(VN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Jo.tree)}]}var bnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ynt,vnt,Ei,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},pnt),r}return Se(e)}();function _nt(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function xnt(t){var n,e,i,r,o,s;return e=new sr({props:{data:TWe}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=Ft(n,"click",t[3]),o=!0)},p:function(a,l){var c=Un(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&P(n,"title",i)},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,s()}}}function wnt(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Cnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,wnt,xnt,Ei,{count:0,maxSampleCount:1,onRefresh:2},_nt),r}return Se(e)}();function knt(t){pi(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function wpe(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Cpe(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function kpe(t,n,e){var i=t.slice();return i[125]=n[e],i}function Spe(t){var n,e;return n=new Ztt({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Snt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Dnt(t){var n,e,i,r,o,s,a,l,c,u=[Ant,Ent,Tnt],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-hs49xj"),P(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),de(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Ft(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[71](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function Tnt(t){var n,e;return n=new bnt({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Ent(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[35]}]}}),i=new tce({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function Ant(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R=!Hi(null===(n=t[21])||void 0===n?void 0:n.root),z=R&&Dpe(t),U=t[9],q=[],re=0;re"u";a("isSSR:",m);var g,v,y,_,C,S,M=n.readOnly,$=n.externalContent,G=n.mainMenuBar,R=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,U=n.flattenColumns,q=n.parser,re=n.parseMemoizeOne,L=n.validator,X=n.validationParser,Z=n.indentation,H=n.onChange,he=n.onChangeMode,E=n.onRenderValue,N=n.onRenderMenu,F=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(v)},hasFocus:function(){return ot&&document.hasFocus()||jk(v)},onFocus:function(){F&&F()},onBlur:function(){Y&&Y()}});var Ne,xe=void 0,tt=1e4,ze=[],ot=!1,B={},ne=600,ie=0;function Ie(Ee){a("updateSelection",Ee);var St="function"==typeof Ee?Ee(Le.selection):Ee;or(St,Le.selection)||e(10,Le=Ze(Ze({},Le),{},{selection:St}))}function Ye(Ee){void 0!==Le.selection&&void 0!==Ee&&(Le.selection&&Xc(Ee,Le.selection.anchorPath)&&Xc(Ee,Le.selection.focusPath)||(a("clearing selection: path does not exist anymore",Le.selection),e(10,Le=Ze(Ze({},Le),{},{selection:s0(Ee,Le)}))))}var At,Le=Lk(),_t=!1,_n=fae({onChange:function(Ee){e(19,ci=Ee)}}),ci=_n.getState();function Ni(Ee){var St=Ee.previousJson,Ht=Ee.previousState,sn=Ee.previousText,hn=Ee.previousTextIsRepaired;void 0===St&&void 0===sn||(void 0!==C?_n.add(void 0!==St?{undo:{patch:[{op:"replace",path:"",value:St}],state:ul(Ht),json:void 0,text:sn,textIsRepaired:hn},redo:{patch:[{op:"replace",path:"",value:C}],state:ul(Le),json:void 0,text:S,textIsRepaired:_t}}:{undo:{patch:void 0,json:void 0,text:sn,state:ul(Ht),textIsRepaired:hn},redo:{patch:void 0,json:C,state:ul(Le),text:S,textIsRepaired:_t}}):void 0!==St&&_n.add({undo:{patch:void 0,json:St,state:ul(Ht),text:sn,textIsRepaired:hn},redo:{patch:void 0,json:void 0,text:S,textIsRepaired:_t,state:ul(Le)}}))}var pn=[],Fr=Zb(pae);function $r(Ee,St,Ht,sn){g0(function(){var hn;try{hn=Fr(Ee,St,Ht,sn)}catch(ri){hn=[{path:[],message:"Failed to validate: "+ri.message,severity:Xd.warning}]}or(hn,pn)||(a("validationErrors changed:",hn),e(11,pn=hn))},function(hn){return a("validationErrors updated in ".concat(hn," ms"))})}function wr(){return a("validate"),xe?{parseError:xe,isRepairable:!1}:($r(C,L,q,X),Hi(pn)?null:{validationErrors:pn})}function Or(Ee,St){if(a("patch",Ee,St),void 0===C)throw new Error("Cannot apply patch: no JSON");var Ht={json:C},sn=C,hn=Le,ri=_t,Oi=ose(C,Ee),Bn=$oe(C,Le,Ee).json,ei=function MJe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=ou(Xu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return or(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ze(Ze({},t),{},{sortedColumn:void 0}):t}(Le,Ee,ze),Yn="function"==typeof St?St(Bn,ei):void 0;e(7,C=Yn&&void 0!==Yn.json?Yn.json:Bn);var br=Yn&&void 0!==Yn.state?Yn.state:ei;e(10,Le=br),e(15,S=void 0),e(18,_t=!1),e(17,Ne=void 0),_n.add({undo:{patch:Oi,json:void 0,text:void 0,state:ul(hn),textIsRepaired:ri},redo:{patch:Ee,json:void 0,state:ul(br),text:void 0,textIsRepaired:_t}});var Ar={json:C,previousJson:sn,undo:Oi,redo:Ee};return Wr(Ht,Ar),Ar}function Ai(Ee,St){if(!M)return Or(Ee,St)}function Wr(Ee,St){(void 0!==Ee.json||void 0!==Ee?.text)&&(void 0!==S?H({text:S,json:void 0},Ee,{contentErrors:wr(),patchResult:St}):void 0!==C&&H({text:void 0,json:C},Ee,{contentErrors:wr(),patchResult:St}))}function jo(Ee){a("handleFind",Ee)}function Fn(Ee){a("pasted json as text",Ee),e(17,Ne=Ee)}function xt(Ee){var St=parseInt(Ee[0]),Ht=[String(St+1)].concat(si(Ee.slice(1)));return Xc(C,Ht)?mr(Ht,!1):mr(Ee,!1)}function ui(){_&&(_.focus(),_.select())}function Fi(){Le.selection||Ie(function(){if(oo(C)&&!Hi(C)&&!Hi(ze))return mr(["0"].concat(si(ze[0])),!1)}())}function Cr(Ee){var St=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ht=b4(Ee,ze,B,18),sn=Ht-ie,hn=gt(Ee);a("scrollTo",{path:Ee,top:Ht,scrollTop:ie,elem:hn});var ri=y.getBoundingClientRect();if(hn&&!St){var Oi=hn.getBoundingClientRect();if(Oi.bottom>ri.top&&Oi.topHt.right&&e(13,y.scrollLeft+=sn.right-Ht.right,y),sn.left(Bn=ie+ri.height-18)&&e(13,y.scrollTop+=hn-Bn,y),sn0&&void 0!==Ht[0])||Ht[0],void 0!==C){sn.next=3;break}return sn.abrupt("return");case 3:return sn.next=5,Kle({json:C,documentState:Le,indentation:St?Z:void 0,parser:q});case 5:case"end":return sn.stop()}},Ee)})),Xa.apply(this,arguments)}function Ic(){Zle({json:C,text:S,documentState:Le,keepSelection:!0,readOnly:M,onChange:H,onPatch:Ai})}function we(){!function IJe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&c0(e.selection)){var s=ou(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;jl("duplicate row",{rowIndex:a});var c=[String(a)];o(nse(n,[c]),function(u,d){var h=mr(zm({rowIndex:a0?a-1:void 0,h=void 0!==d?mr(zm({rowIndex:d,columnIndex:l},i),!1):void 0;return jl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ze(Ze({},u),{},{selection:h})}})}}({json:C,documentState:Le,columns:ze,readOnly:M,onPatch:Ai})}function Ue(){return(Ue=Zi(vn().mark(function Ee(St){return vn().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ece({char:St,selectInside:!1,refJsonEditor:v,json:C,documentState:Le,readOnly:M,parser:q,onPatch:Ai,onReplaceJson:Dn,onSelect:Ie});case 2:case"end":return Ht.stop()}},Ee)}))).apply(this,arguments)}function Dn(Ee,St){var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t,Bn=nu(C,Le,[],sh),ei="function"==typeof St?St(Ee,Bn):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Ee),e(10,Le=ei&&void 0!==ei.state?ei.state:Bn),e(15,S=void 0),e(18,_t=!1),Ye(C),Ni({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function ii(Ee,St){a("handleChangeText");var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t;try{e(7,C=re(Ee)),e(10,Le=nu(C,Le,[],sh)),e(15,S=void 0),e(18,_t=!1)}catch{try{e(7,C=re(Yd(Ee))),e(10,Le=nu(C,Le,[],sh)),e(15,S=Ee),e(18,_t=!0)}catch{e(7,C=void 0),e(10,Le=Lk({json:C,expand:sh})),e(15,S=Ee),e(18,_t=!1)}}if("function"==typeof St){var Bn=St(C,Le);e(7,C=Bn&&Bn.json?Bn.json:C),e(10,Le=Bn&&Bn.state?Bn.state:Le)}Ye(C),Ni({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function hi(Ee){var Ht=Ee.rootPath,sn=Ee.onTransform,hn=Ee.onClose;M||void 0===C||(ot=!0,oe({id:Ee.id||p,json:C,rootPath:Ht||[],onTransform:sn?function(ri){sn({operations:ri,json:C,transformedJson:Yu(C,ri)})}:function(ri){a("onTransform",Ht,ri),Ai(ri)},onClose:function(){ot=!1,ui(),hn&&hn()}}))}function di(Ee){a("openJSONEditorModal",{path:Ee}),ot=!0,fe({content:{json:Sn(C,Ee)},path:Ee,onPatch:At.onPatch,onClose:function(){ot=!1,ui()}})}function kr(Ee,St){l(jae,{text:Ee,onParse:Ik,onRepair:soe,onApply:St},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ui()}})}function Qr(){if(!M&&_n.getState().canUndo){var Ee=_n.undo();if(Ee){var St={json:C,text:S};e(7,C=Ee.undo.patch?Yu(C,Ee.undo.patch):Ee.undo.json),e(10,Le=Ee.undo.state),e(15,S=Ee.undo.text),e(18,_t=Ee.undo.textIsRepaired),a("undo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.undo.patch,undo:Ee.redo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function gi(){if(!M&&_n.getState().canRedo){var Ee=_n.redo();if(Ee){var St={json:C,text:S};e(7,C=Ee.redo.patch?Yu(C,Ee.redo.patch):Ee.redo.json),e(10,Le=Ee.redo.state),e(15,S=Ee.redo.text),e(18,_t=Ee.redo.textIsRepaired),a("redo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.redo.patch,undo:Ee.undo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function yr(Ee,St){e(68,B[St]=Ee.getBoundingClientRect().height,B)}return t.$$set=function(Ee){"readOnly"in Ee&&e(0,M=Ee.readOnly),"externalContent"in Ee&&e(47,$=Ee.externalContent),"mainMenuBar"in Ee&&e(1,G=Ee.mainMenuBar),"escapeControlCharacters"in Ee&&e(48,R=Ee.escapeControlCharacters),"escapeUnicodeCharacters"in Ee&&e(49,z=Ee.escapeUnicodeCharacters),"flattenColumns"in Ee&&e(50,U=Ee.flattenColumns),"parser"in Ee&&e(2,q=Ee.parser),"parseMemoizeOne"in Ee&&e(51,re=Ee.parseMemoizeOne),"validator"in Ee&&e(52,L=Ee.validator),"validationParser"in Ee&&e(53,X=Ee.validationParser),"indentation"in Ee&&e(3,Z=Ee.indentation),"onChange"in Ee&&e(54,H=Ee.onChange),"onChangeMode"in Ee&&e(4,he=Ee.onChangeMode),"onRenderValue"in Ee&&e(55,E=Ee.onRenderValue),"onRenderMenu"in Ee&&e(5,N=Ee.onRenderMenu),"onFocus"in Ee&&e(56,F=Ee.onFocus),"onBlur"in Ee&&e(57,Y=Ee.onBlur),"onSortModal"in Ee&&e(58,V=Ee.onSortModal),"onTransformModal"in Ee&&e(59,oe=Ee.onTransformModal),"onJSONEditorModal"in Ee&&e(60,fe=Ee.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=TO({escapeControlCharacters:R,escapeUnicodeCharacters:z})),65536&t.$$.dirty[1]&&function on(Ee){var St=C,Ht=Qv(Ee)?Ee.text!==S:!or(St,Ee.json);if(a("update external content",{isChanged:Ht}),Ht){var sn={json:C,text:S},hn=C,ri=Le,Oi=S,Bn=_t;if(Qv(Ee))try{e(7,C=re(Ee.text)),e(15,S=Ee.text),e(18,_t=!1),e(16,xe=void 0)}catch(ei){try{e(7,C=re(Yd(Ee.text))),e(15,S=Ee.text),e(18,_t=!0),e(16,xe=void 0)}catch{e(7,C=void 0),e(15,S=$.text),e(18,_t=!1),e(16,xe=Nk(S,ei.message||ei.toString()))}}else e(7,C=Ee.json),e(15,S=void 0),e(18,_t=!1),e(16,xe=void 0);Ye(C),Le.sortedColumn&&e(10,Le=Ze(Ze({},Le),{},{sortedColumn:void 0})),Ni({previousJson:hn,previousState:ri,previousText:Oi,previousTextIsRepaired:Bn}),Wr(sn,null)}}($),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,ze=oo(C)?function(Ee,St){var Ht,sn=new Set(St.map(ln)),hn=new Set(Ee.map(ln)),ri=Re(sn);try{for(ri.s();!(Ht=ri.n()).done;){var Oi=Ht.value;hn.has(Oi)||sn.delete(Oi)}}catch(br){ri.e(br)}finally{ri.f()}var Bn,ei=Re(hn);try{for(ei.s();!(Bn=ei.n()).done;){var Yn=Bn.value;sn.has(Yn)||sn.add(Yn)}}catch(br){ei.e(br)}finally{ei.f()}return si(sn).map(Xu)}(function(Ee,St){var Ht=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,sn={};Array.isArray(Ee)&&function LUe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rtt),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Ee,St,Ht,sn,hn){for(var ri=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Oi=oo(Ht)?Ht.length:0,Bn=function TJe(t,n){var e=Object.values(t);return Hi(e)?n:e.reduce(function(r,o){return r+o})/e.length}(sn,hn),ei=Ee-ri,Yn=St+2*ri,br=function(gd){return sn[gd]||hn},Ar=0,Po=0;Po0&&(Po-=br(--Ar));for(var ca=Ar,md=0;md0?mr(zm({rowIndex:br.rowIndex,columnIndex:Po-1},ei),!1):Yn;Ie(Ht),Qo(Ht.focusPath)}if("ArrowRight"===St&&(Ee.preventDefault(),Fi(),Le.selection)){var sn=function(ei,Yn){var br=ou(Yn.focusPath,ei),Po=br.columnIndex;return Po0?mr(zm({rowIndex:Ar-1,columnIndex:br.columnIndex},ei),!1):Yn}(ze,Le.selection);Ie(hn),Qo(hn.focusPath)}if("ArrowDown"===St&&(Ee.preventDefault(),Fi(),Le.selection)){var ri=function(ei,Yn,br){var Ar=ou(br.focusPath,Yn),Po=Ar.rowIndex;return Po1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Rpe({props:{mode:Ln(t[18]).mode,content:Ln(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:dh,onBlur:dh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&$pe(t),S=t[18].length>1&&Bpe(t);function M(R,z){return R[0]?Vnt:Hnt}var $=M(t),G=$(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).innerHTML='
    Path
    ',s=it(),a=be("input"),l=it(),(c=be("div")).innerHTML='
    Contents
    ',u=it(),d=be("div"),mt(h.$$.fragment),f=it(),p=be("div"),C&&C.c(),m=it(),S&&S.c(),g=it(),G.c(),P(o,"class","jse-label svelte-1hibiw3"),P(a,"class","jse-path svelte-1hibiw3"),P(a,"type","text"),a.readOnly=!0,P(a,"title","Selected path"),a.value=t[21],P(c,"class","jse-label svelte-1hibiw3"),P(d,"class","jse-modal-inline-editor svelte-1hibiw3"),P(p,"class","jse-actions svelte-1hibiw3"),P(r,"class","jse-modal-contents svelte-1hibiw3"),P(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(r,l),de(r,c),de(r,u),de(r,d),ft(h,d,null),de(r,f),de(r,p),C&&C.m(p,null),de(p,m),S&&S.m(p,null),de(p,g),G.m(p,null),v=!0,y||(_=_a(iS.call(null,n,t[23])),y=!0)},p:function(R,z){var U={};262144&z[0]&&(U.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(U),(!v||2097152&z[0]&&a.value!==R[21])&&(a.value=R[21]);var q={};262144&z[0]&&(q.mode=Ln(R[18]).mode),262144&z[0]&&(q.content=Ln(R[18]).content),1&z[0]&&(q.readOnly=R[0]),2&z[0]&&(q.indentation=R[1]),4&z[0]&&(q.tabSize=R[2]),32&z[0]&&(q.statusBar=R[5]),8&z[0]&&(q.mainMenuBar=R[3]),16&z[0]&&(q.navigationBar=R[4]),64&z[0]&&(q.escapeControlCharacters=R[6]),128&z[0]&&(q.escapeUnicodeCharacters=R[7]),256&z[0]&&(q.flattenColumns=R[8]),512&z[0]&&(q.parser=R[9]),1048576&z[0]&&(q.parseMemoizeOne=R[20]),1024&z[0]&&(q.validator=R[10]),2048&z[0]&&(q.validationParser=R[11]),4096&z[0]&&(q.pathParser=R[12]),8192&z[0]&&(q.onRenderValue=R[13]),16384&z[0]&&(q.onClassName=R[14]),32768&z[0]&&(q.onRenderMenu=R[15]),65536&z[0]&&(q.onSortModal=R[16]),131072&z[0]&&(q.onTransformModal=R[17]),h.$set(q),R[19]?C?C.p(R,z):((C=$pe(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?S?(S.p(R,z),262144&z[0]&&Q(S,1)):((S=Bpe(R)).c(),Q(S,1),S.m(p,g)):S&&($t(),ce(S,1,1,function(){S=null}),Bt()),$===($=M(R))&&G?G.p(R,z):(G.d(1),(G=$(R))&&(G.c(),G.m(p,null)))},i:function(R){v||(Q(e.$$.fragment,R),Q(h.$$.fragment,R),Q(S),v=!0)},o:function(R){ce(e.$$.fragment,R),ce(h.$$.fragment,R),ce(S),v=!1},d:function(R){R&&je(n),pt(e),pt(h),C&&C.d(),S&&S.d(),G.d(),y=!1,_()}}}function Vpe(t){t.focus()}function Unt(t,n,e){var i,r,o,s=wa("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,_=n.parser,C=n.validator,S=n.validationParser,M=n.pathParser,$=n.onRenderValue,G=n.onClassName,R=n.onRenderMenu,z=n.onSortModal,U=n.onTransformModal,q=xa("simple-modal").close,re=[{mode:X(a),content:a,relativePath:l}],L=void 0;function X(H){return DO(H)&&oo(H.json)?Jo.table:Jo.tree}function Z(H){s("handleChange",H);var he=Ze(Ze({},Ln(re)),{},{content:H});e(18,re=[].concat(si(Xi(re)),[he]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,_=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,S=H.validationParser),"pathParser"in H&&e(12,M=H.pathParser),"onRenderValue"in H&&e(13,$=H.onRenderValue),"onClassName"in H&&e(14,G=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,z=H.onSortModal),"onTransformModal"in H&&e(17,U=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=re.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Hi(i)?"(whole document)":tu(Kl(i))),512&t.$$.dirty[0]&&e(20,o=Zb(_.parse))},[u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,re,L,o,r,function(){if(s("handleApply"),!u)try{e(19,L=void 0);var H=[{op:"replace",path:ln(Ln(re).relativePath),value:loe(Ln(re).content,_).json}];if(re.length>1){var he={json:Yu(loe(re[re.length-2].content,_).json,H)};e(18,re=Xi(re)),Z(he)}else c(H),q()}catch(E){e(19,L=E.toString())}},function(){s("handleClose"),re.length>1?(e(18,re=Xi(re)),e(19,L=void 0)):q()},Z,function(H){s("handleChangeMode",H);var he=Ze(Ze({},Ln(re)),{},{mode:H});e(18,re=[].concat(si(Xi(re)),[he]))},function(H){e(19,L=H.toString()),console.error(H)},function(H){var he=H.content,E=H.path;s("handleJSONEditorModal",{content:he,path:E});var N={mode:X(he),content:he,relativePath:E};e(18,re=[].concat(si(re),[N]))},a,l,c,i]}var Gnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Unt,znt,Ei,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Bnt,[-1,-1]),r}return Se(e)}();function Wnt(t,n,e){var i=xa("simple-modal");return[i.open,i.close]}var qnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wnt,null,Ei,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Xnt(t){pi(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function Hpe(t){var n,e;return n=new Rpe({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){mt(n.$$.fragment)},m:function(r,o){ft(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(Q(n.$$.fragment,r),e=!0)},o:function(r){ce(n.$$.fragment,r),e=!1},d:function(r){t[56](null),pt(n,r)}}}function Ynt(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new qnt({props:l}),Vi.push(function(){return Uu(n,"open",a)});var c=Hpe(t);return{c:function(){mt(n.$$.fragment),i=it(),r=be("div"),c.c(),P(r,"class","jse-main svelte-sxaskb"),Mt(r,"jse-focus",t[20])},m:function(u,d){ft(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],zu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ei(s,s=u[19])?($t(),ce(c,1,1,Lt),Bt(),(c=Hpe(u)).c(),Q(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Mt(r,"jse-focus",u[20])},i:function(u){o||(Q(n.$$.fragment,u),Q(c),o=!0)},o:function(u){ce(n.$$.fragment,u),ce(c),o=!1},d:function(u){pt(n,u),u&&je(i),u&&je(r),c.d(u)}}}function Jnt(t){var n,e;return n=new CQ({props:{closeOnEsc:!1,$$slots:{default:[Ynt]},$$scope:{ctx:t}}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Knt(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},kQ,{closeOnEsc:!1}],o={$$slots:{default:[Jnt]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ke(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return ke(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(RW||(RW=Ae([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)($W||($W=Ae(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return ke(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ze(Ze({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var _=this._scope[m]||(this._scope[m]=[]),C=_.length;return _[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(BW||(BW=Ae(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(_){var C=d[_];if(!C)return"continue";var S=p[_]=p[_]||new Map;C.forEach(function(M){if(!S.has(M)){S.set(M,n.Started);var $=h(M);if($){var G=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(VW||(VW=Ae(["",""," "," = ",";",""])),g,G,M,$,f.opts._n)}else{if(!($=m?.(M)))throw new i(M);g=(0,e._)(HW||(HW=Ae(["","","",""])),g,$,f.opts._n)}S.set(M,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(eme)),eme}function xr(){return Zpe||(Zpe=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=DD(),e=tme(),i=DD();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=tme();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function F(){ke(this,F)}return Se(F,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(Y,V){return this}}]),F}(),s=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).varKind=oe,xe.name=fe,xe.rhs=Ne,xe}return Se(V,[{key:"render",value:function(oe){var Ne=oe._n,xe=oe.es5?e.varKinds.var:this.varKind,tt=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(xe," ").concat(this.name).concat(tt,";")+Ne}},{key:"optimizeNames",value:function(oe,fe){if(oe[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,oe,fe)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).lhs=oe,xe.rhs=fe,xe.sideEffects=Ne,xe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+fe}},{key:"optimizeNames",value:function(oe,fe){if(!(this.lhs instanceof n.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,oe,fe),this}},{key:"names",get:function(){return re(this.lhs instanceof n.Name?{}:Ze({},this.lhs.names),this.rhs)}}]),V}(o),l=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this,oe,Ne,xe)).op=fe,tt}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+fe}}]),V}(a),c=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.label,":")+fe}}]),V}(o),u=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n,Ne=this.label?" ".concat(this.label):"";return"break".concat(Ne,";")+fe}}]),V}(o),d=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"throw ".concat(this.error,";")+fe}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).code=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.code,";")+fe}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(oe,fe){return this.code=L(this.code,oe,fe),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(F){wt(V,F);var Y=Ct(V);function V(){var oe,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ke(this,V),(oe=Y.call(this)).nodes=fe,oe}return Se(V,[{key:"render",value:function(oe){return this.nodes.reduce(function(fe,Ne){return fe+Ne.render(oe)},"")}},{key:"optimizeNodes",value:function(){for(var oe=this.nodes,fe=oe.length;fe--;){var Ne=oe[fe].optimizeNodes();Array.isArray(Ne)?oe.splice.apply(oe,[fe,1].concat(si(Ne))):Ne?oe[fe]=Ne:oe.splice(fe,1)}return oe.length>0?this:void 0}},{key:"optimizeNames",value:function(oe,fe){for(var Ne=this.nodes,xe=Ne.length;xe--;){var tt=Ne[xe];tt.optimizeNames(oe,fe)||(X(oe,tt.names),Ne.splice(xe,1))}return Ne.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(oe,fe){return q(oe,fe.names)},{})}}]),V}(o),p=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"{"+oe._n+pr(qi(V.prototype),"render",this).call(this,oe)+"}"+oe._n}}]),V}(f),m=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(f),g=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe){var Ne;return ke(this,V),(Ne=Y.call(this,fe)).condition=oe,Ne}return Se(V,[{key:"render",value:function(oe){var fe="if(".concat(this.condition,")")+pr(qi(V.prototype),"render",this).call(this,oe);return this.else&&(fe+="else "+this.else.render(oe)),fe}},{key:"optimizeNodes",value:function(){pr(qi(V.prototype),"optimizeNodes",this).call(this);var oe=this.condition;if(!0===oe)return this.nodes;var fe=this.else;if(fe){var Ne=fe.optimizeNodes();fe=this.else=Array.isArray(Ne)?new g(Ne):Ne}return fe?!1===oe?fe instanceof V?fe:fe.nodes:this.nodes.length?this:new V(Z(oe),fe instanceof V?[fe]:fe.nodes):!1!==oe&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(oe,fe){var Ne;if(this.else=null===(Ne=this.else)||void 0===Ne?void 0:Ne.optimizeNames(oe,fe),pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe)||this.else)return this.condition=L(this.condition,oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return re(oe,this.condition),this.else&&q(oe,this.else.names),oe}}]),V}(p);v.kind="if";var y=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);y.kind="for";var _=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).iteration=oe,fe}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.iteration,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iteration=L(this.iteration,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this)).varKind=oe,tt.name=fe,tt.from=Ne,tt.to=xe,tt}return Se(V,[{key:"render",value:function(oe){var Ne=this.name,xe=this.from,tt=this.to;return"for(".concat(oe.es5?e.varKinds.var:this.varKind," ").concat(Ne,"=").concat(xe,"; ").concat(Ne,"<").concat(tt,"; ").concat(Ne,"++)")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"names",get:function(){var oe=re(pr(qi(V.prototype),"names",this),this.from);return re(oe,this.to)}}]),V}(y),S=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this)).loop=oe,tt.varKind=fe,tt.name=Ne,tt.iterable=xe,tt}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iterable=L(this.iterable,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),M=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).name=oe,xe.args=fe,xe.async=Ne,xe}return Se(V,[{key:"render",value:function(oe){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);M.kind="func";var $=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"return "+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(f);$.kind="return";var G=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){var fe="try"+pr(qi(V.prototype),"render",this).call(this,oe);return this.catch&&(fe+=this.catch.render(oe)),this.finally&&(fe+=this.finally.render(oe)),fe}},{key:"optimizeNodes",value:function(){var oe,fe;return pr(qi(V.prototype),"optimizeNodes",this).call(this),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(fe=this.finally)||void 0===fe||fe.optimizeNodes(),this}},{key:"optimizeNames",value:function(oe,fe){var Ne,xe;return pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe),null===(Ne=this.catch)||void 0===Ne||Ne.optimizeNames(oe,fe),null===(xe=this.finally)||void 0===xe||xe.optimizeNames(oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return this.catch&&q(oe,this.catch.names),this.finally&&q(oe,this.finally.names),oe}}]),V}(p),R=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){return"catch(".concat(this.error,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);R.kind="catch";var z=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"finally"+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);z.kind="finally";var U=function(){function F(Y){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ke(this,F),this._values={},this._blockStarts=[],this._constants={},this.opts=Ze(Ze({},V),{},{_n:V.lines?"\n":""}),this._extScope=Y,this._scope=new e.Scope({parent:Y}),this._nodes=[new m]}return Se(F,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(Y){return this._scope.name(Y)}},{key:"scopeName",value:function(Y){return this._extScope.name(Y)}},{key:"scopeValue",value:function(Y,V){var oe=this._extScope.value(Y,V);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}},{key:"getScopeValue",value:function(Y,V){return this._extScope.getValue(Y,V)}},{key:"scopeRefs",value:function(Y){return this._extScope.scopeRefs(Y,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(Y,V,oe,fe){var Ne=this._scope.toName(V);return void 0!==oe&&fe&&(this._constants[Ne.str]=oe),this._leafNode(new s(Y,Ne,oe)),Ne}},{key:"const",value:function(Y,V,oe){return this._def(e.varKinds.const,Y,V,oe)}},{key:"let",value:function(Y,V,oe){return this._def(e.varKinds.let,Y,V,oe)}},{key:"var",value:function(Y,V,oe){return this._def(e.varKinds.var,Y,V,oe)}},{key:"assign",value:function(Y,V,oe){return this._leafNode(new a(Y,V,oe))}},{key:"add",value:function(Y,V){return this._leafNode(new l(Y,t.operators.ADD,V))}},{key:"code",value:function(Y){return"function"==typeof Y?Y():Y!==n.nil&&this._leafNode(new h(Y)),this}},{key:"object",value:function(){for(var Y=["{"],V=arguments.length,oe=new Array(V),fe=0;fe1&&Y.push(","),Y.push(ze),(ze!==ot||this.opts.es5)&&(Y.push(":"),(0,n.addCodeArg)(Y,ot))}return Y.push("}"),new n._Code(Y)}},{key:"if",value:function(Y,V,oe){if(this._blockNode(new v(Y)),V&&oe)this.code(V).else().code(oe).endIf();else if(V)this.code(V).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(Y){return this._elseNode(new v(Y))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(Y,V){return this._blockNode(Y),V&&this.code(V).endFor(),this}},{key:"for",value:function(Y,V){return this._for(new _(Y),V)}},{key:"forRange",value:function(Y,V,oe,fe){var Ne=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,xe=this._scope.toName(Y);return this._for(new C(Ne,xe,V,oe),function(){return fe(xe)})}},{key:"forOf",value:function(Y,V,oe){var fe=this,Ne=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,xe=this._scope.toName(Y);if(this.opts.es5){var tt=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(zW||(zW=Ae(["",".length"])),tt),function(ze){fe.var(xe,(0,n._)(UW||(UW=Ae(["","[","]"])),tt,ze)),oe(xe)})}return this._for(new S("of",Ne,xe,V),function(){return oe(xe)})}},{key:"forIn",value:function(Y,V,oe){var fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(Y,(0,n._)(GW||(GW=Ae(["Object.keys(",")"])),V),oe);var Ne=this._scope.toName(Y);return this._for(new S("in",fe,Ne,V),function(){return oe(Ne)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(Y){return this._leafNode(new c(Y))}},{key:"break",value:function(Y){return this._leafNode(new u(Y))}},{key:"return",value:function(Y){var V=new $;if(this._blockNode(V),this.code(Y),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}},{key:"try",value:function(Y,V,oe){if(!V&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');var fe=new G;if(this._blockNode(fe),this.code(Y),V){var Ne=this.name("e");this._currNode=fe.catch=new R(Ne),V(Ne)}return oe&&(this._currNode=fe.finally=new z,this.code(oe)),this._endBlockNode(R,z)}},{key:"throw",value:function(Y){return this._leafNode(new d(Y))}},{key:"block",value:function(Y,V){return this._blockStarts.push(this._nodes.length),Y&&this.code(Y).endBlock(V),this}},{key:"endBlock",value:function(Y){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var oe=this._nodes.length-V;if(oe<0||void 0!==Y&&oe!==Y)throw new Error("CodeGen: wrong number of nodes: ".concat(oe," vs ").concat(Y," expected"));return this._nodes.length=V,this}},{key:"func",value:function(Y){var fe=arguments.length>3?arguments[3]:void 0;return this._blockNode(new M(Y,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),fe&&this.code(fe).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(M)}},{key:"optimize",value:function(){for(var Y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(Y){return this._currNode.nodes.push(Y),this}},{key:"_blockNode",value:function(Y){this._currNode.nodes.push(Y),this._nodes.push(Y)}},{key:"_endBlockNode",value:function(Y,V){var oe=this._currNode;if(oe instanceof Y||V&&oe instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(Y.kind,"/").concat(V.kind):Y.kind,'"'))}},{key:"_elseNode",value:function(Y){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=Y,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var Y=this._nodes;return Y[Y.length-1]},set:function(Y){var V=this._nodes;V[V.length-1]=Y}}]),F}();function q(F,Y){for(var V in Y)F[V]=(F[V]||0)+(Y[V]||0);return F}function re(F,Y){return Y instanceof n._CodeOrName?q(F,Y.names):F}function L(F,Y,V){return F instanceof n.Name?oe(F):(fe=F)instanceof n._Code&&fe._items.some(function(Ne){return Ne instanceof n.Name&&1===Y[Ne.str]&&void 0!==V[Ne.str]})?new n._Code(F._items.reduce(function(fe,Ne){return Ne instanceof n.Name&&(Ne=oe(Ne)),Ne instanceof n._Code?fe.push.apply(fe,si(Ne._items)):fe.push(Ne),fe},[])):F;var fe;function oe(fe){var Ne=V[fe.str];return void 0===Ne||1!==Y[fe.str]?fe:(delete Y[fe.str],Ne)}}function X(F,Y){for(var V in Y)F[V]=(F[V]||0)-(Y[V]||0)}function Z(F){return"boolean"==typeof F||"number"==typeof F||null===F?!F:(0,n._)(WW||(WW=Ae(["!",""])),N(F))}t.CodeGen=U,t.not=Z;var H=E(t.operators.AND);t.and=function(){for(var F=arguments.length,Y=new Array(F),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,_,C,S){var M=void 0===C?_:C instanceof n.Name?(_ instanceof n.Name?p(y,_,C):m(y,_,C),C):_ instanceof n.Name?(m(y,C,_),_):g(_,C);return S!==n.Name||M instanceof n.Name?M:v(y,M)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(aq||(aq=Ae(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(lq||(lq=Ae(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(YW||(YW=Ae(["",""])),p)}return(0,n._)(JW||(JW=Ae(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(KW||(KW=Ae([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(QW||(QW=Ae([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(ZW||(ZW=Ae([""," || {}"])),m)).code((0,n._)(eq||(eq=Ae(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(tq||(tq=Ae([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(nq||(nq=Ae([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Ze(Ze({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(iq||(iq=Ae([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(rq||(rq=Ae([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(oq||(oq=Ae([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(sq||(sq=Ae([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?cq||(cq=Ae(['"[" + ',' + "]"'])):uq||(uq=Ae(['"[\'" + ',' + "\']"'])):g?dq||(dq=Ae(['"/" + ',""])):hq||(hq=Ae(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Hr);var nme,ime,rme,TD={};function Sp(){if(nme)return TD;nme=1,Object.defineProperty(TD,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return TD.default=n,TD}function ED(){return ime||(ime=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Hr,i=Sp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(Dq||(Dq=Ae([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(Tq||(Tq=Ae(["[","]"])),f))},(0,n._)(Eq||(Eq=Ae(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(Aq||(Aq=Ae(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(Mq||(Mq=Ae(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(Iq||(Iq=Ae(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(fq||(fq=Ae(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(pq||(pq=Ae(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(mq||(mq=Ae(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,_=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,_):o(m,(0,n._)(gq||(gq=Ae(["[","]"])),_))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(vq||(vq=Ae([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(yq||(yq=Ae(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(_){h.const(y,(0,n._)(bq||(bq=Ae(["","[","]"])),i.default.vErrors,_)),h.if((0,n._)(_q||(_q=Ae(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(xq||(xq=Ae(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(wq||(wq=Ae(["",".schemaPath"])),y),(0,n.str)(Cq||(Cq=Ae(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(kq||(kq=Ae(["",".schema"])),y),p),h.assign((0,n._)(Sq||(Sq=Ae(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(Nq||(Nq=Ae(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,_=d.it,C=_.opts,S=_.propertyName,M=_.topSchemaRef,$=_.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(Pq||(Pq=Ae(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(Lq||(Lq=Ae(["","",""])),M,$)],[i.default.data,v]),S&&f.push([s.propertyName,S])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(Fq||(Fq=Ae(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(Oq||(Oq=Ae(["","/",""])),p,f);return m&&(g=(0,n.str)(jq||(jq=Ae(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(Ype)),Ype}var I_={},tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.getRules=tg.isJSONType=void 0;var ait=new Set(["string","number","integer","boolean","null","object","array"]);tg.isJSONType=function(t){return"string"==typeof t&&ait.has(t)},tg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ze(Ze({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var ome,pf={};function sme(){if(ome)return pf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return ome=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.shouldUseRule=pf.shouldUseGroup=pf.schemaHasRulesForType=void 0,pf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},pf.shouldUseGroup=t,pf.shouldUseRule=n,pf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=tg,i=sme(),r=ED(),o=xr(),s=Hr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var M,m=f.gen,g=f.data,v=f.opts,y=(M=v.coerceTypes)?p.filter(function($){return l.has($)||"array"===M&&"array"===$}):[],_=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(_){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(S,M,$){var G=S.gen,R=S.data,z=S.opts,U=G.let("dataType",(0,o._)($q||($q=Ae(["typeof ",""])),R)),q=G.let("coerced",(0,o._)(Bq||(Bq=Ae(["undefined"]))));"array"===z.coerceTypes&&G.if((0,o._)(Vq||(Vq=Ae([""," == 'object' && Array.isArray(",") && ",".length == 1"])),U,R,R),function(){return G.assign(R,(0,o._)(Hq||(Hq=Ae(["","[0]"])),R)).assign(U,(0,o._)(zq||(zq=Ae(["typeof ",""])),R)).if(u(M,R,z.strictNumbers),function(){return G.assign(q,R)})}),G.if((0,o._)(Uq||(Uq=Ae([""," !== undefined"])),q));var re,L=Re($);try{for(L.s();!(re=L.n()).done;){var X=re.value;(l.has(X)||"array"===X&&"array"===z.coerceTypes)&&Z(X)}}catch(H){L.e(H)}finally{L.f()}function Z(H){switch(H){case"string":return void G.elseIf((0,o._)(Wq||(Wq=Ae(["",' == "number" || ',' == "boolean"'])),U,U)).assign(q,(0,o._)(qq||(qq=Ae(['"" + ',""])),R)).elseIf((0,o._)(Xq||(Xq=Ae([""," === null"])),R)).assign(q,(0,o._)(Yq||(Yq=Ae(['""']))));case"number":return void G.elseIf((0,o._)(Jq||(Jq=Ae(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),U,R,U,R,R,R)).assign(q,(0,o._)(Kq||(Kq=Ae(["+",""])),R));case"integer":return void G.elseIf((0,o._)(Qq||(Qq=Ae(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),U,R,U,R,R,R,R)).assign(q,(0,o._)(Zq||(Zq=Ae(["+",""])),R));case"boolean":return void G.elseIf((0,o._)(eX||(eX=Ae(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(q,!1).elseIf((0,o._)(tX||(tX=Ae(["",' === "true" || '," === 1"])),R,R)).assign(q,!0);case"null":return G.elseIf((0,o._)(nX||(nX=Ae(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void G.assign(q,null);case"array":G.elseIf((0,o._)(iX||(iX=Ae(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),U,U,U,R)).assign(q,(0,o._)(rX||(rX=Ae(["[","]"])),R))}}G.else(),h(S),G.endIf(),G.if((0,o._)(Gq||(Gq=Ae([""," !== undefined"])),q),function(){var H,he,E,N,F;G.assign(R,q),he=q,N=(H=S).parentData,F=H.parentDataProperty,(E=H.gen).if((0,o._)(oX||(oX=Ae([""," !== undefined"])),N),function(){return E.assign((0,o._)(sX||(sX=Ae(["","[","]"])),N,F),he)})})}(f,p,y):h(f)})}return _};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(aX||(aX=Ae([""," "," null"])),p,y);case"array":g=(0,o._)(lX||(lX=Ae(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(cX||(cX=Ae([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=_((0,o._)(uX||(uX=Ae(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=_();break;default:return(0,o._)(dX||(dX=Ae(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function _(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(hX||(hX=Ae(["typeof ",' == "number"'])),p),C,m?(0,o._)(fX||(fX=Ae(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var _=(0,o._)(pX||(pX=Ae(["typeof ",' != "object"'])),p);v=y.null?_:(0,o._)(mX||(mX=Ae(["!"," || ",""])),p,_),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(gX||(gX=Ae(["{type: ","}"])),p):(0,o._)(vX||(vX=Ae(["{type: ","}"])),m)}};function h(f){var m,g,v,y,_,p=(g=(m=f).gen,v=m.data,_=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:_,schemaValue:_,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(I_);var ame,lme,cme,N_={},ud={},po={};function dd(){if(lme)return po;lme=1,Object.defineProperty(po,"__esModule",{value:!0}),po.validateUnion=po.validateArray=po.usePattern=po.callValidateCode=po.schemaProperties=po.allSchemaProperties=po.noPropertyInData=po.propertyInData=po.isOwnProperty=po.hasPropFunc=po.reportMissingProp=po.checkMissingProp=po.checkReportMissingProp=void 0;var t=xr(),n=Hr,e=Sp(),i=Hr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(kX||(kX=Ae(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(SX||(SX=Ae(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(EX||(EX=Ae(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}po.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(wX||(wX=Ae(["",""])),u)},!0),c.error()})},po.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,si(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(CX||(CX=Ae([""," = ",""])),d,m))})))},po.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},po.hasPropFunc=r,po.isOwnProperty=o,po.propertyInData=function(c,u,d,h){var f=(0,t._)(DX||(DX=Ae(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(TX||(TX=Ae([""," && ",""])),f,o(c,u,d)):f},po.noPropertyInData=s,po.allSchemaProperties=a,po.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},po.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,_=m.errorPath,C=c.it,S=h?(0,t._)(AX||(AX=Ae(["",", ",", ","",""])),f,p,v,y):p,M=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,_)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&M.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var $=(0,t._)(MX||(MX=Ae(["",", ",""])),S,g.object.apply(g,M));return d!==t.nil?(0,t._)(IX||(IX=Ae(["",".call(",", ",")"])),u,d,$):(0,t._)(NX||(NX=Ae(["","(",")"])),u,$)};var l=(0,t._)(FX||(FX=Ae(["new RegExp"])));return po.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(OX||(OX=Ae(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},po.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(jX||(jX=Ae(["",".length"])),d));u.forRange("i",0,y,function(_){c.subschema({keyword:h,dataProp:_,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},po.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(PX||(PX=Ae([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},po}var ume,mf={},Ga={},dme=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==bn(n)&&"object"==bn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},kP={},cit={get exports(){return kP},set exports(t){kP=t}},Dp=cit.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),AD(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function AD(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==bn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Dp.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!SP(t):!!n&&hme(t)<=n)};var pit=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function SP(t){for(var n in t){if(pit.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(SP)||"object"==bn(e)&&SP(e))return!0}return!1}function hme(t){var n=0;for(var e in t)if("$ref"===e||(n++,!fit.has(e)&&("object"==bn(t[e])&&(0,uit.eachItem)(t[e],function(i){return n+=hme(i)}),n===1/0)))return 1/0;return n}function fme(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=z0(n));var i=t.parse(n);return pme(t,i)}function pme(t,n){return t.serialize(n).split("#")[0]+"#"}Ga.getFullPath=fme,Ga._getFullPath=pme;var mit=/#\/?$/;function z0(t){return t?t.replace(mit,""):""}Ga.normalizeId=z0,Ga.resolveUrl=function(t,n,e){return e=z0(e),t.resolve(n,e)};var mme,git=/^[a-z_][-a-z0-9._]*$/i;function MD(){if(mme)return ff;mme=1,Object.defineProperty(ff,"__esModule",{value:!0}),ff.getData=ff.KeywordCxt=ff.validateFunctionCode=void 0;var t=function(){if(rme)return eg;rme=1,Object.defineProperty(eg,"__esModule",{value:!0}),eg.boolOrEmptySchema=eg.topBoolOrEmptySchema=void 0;var L=ED(),X=xr(),Z=Sp(),H={message:"boolean schema is false"};function he(E,N){(0,L.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,N)}return eg.topBoolOrEmptySchema=function(E){var N=E.gen,F=E.schema,Y=E.validateName;!1===F?he(E,!1):"object"==bn(F)&&!0===F.$async?N.return(Z.default.data):(N.assign((0,X._)(Rq||(Rq=Ae(["",".errors"])),Y),null),N.return(!0))},eg.boolOrEmptySchema=function(E,N){var F=E.gen;!1===E.schema?(F.var(N,!1),he(E)):F.var(N,!0)},eg}(),n=I_,e=sme(),i=I_,r=function(){if(ame)return N_;ame=1,Object.defineProperty(N_,"__esModule",{value:!0}),N_.assignDefaults=void 0;var L=xr(),X=Hr;function Z(H,he,E){var N=H.gen,F=H.compositeRule,Y=H.data,V=H.opts;if(void 0!==E){var oe=(0,L._)(yX||(yX=Ae(["","",""])),Y,(0,L.getProperty)(he));if(F)(0,X.checkStrictMode)(H,"default is ignored for: ".concat(oe));else{var fe=(0,L._)(bX||(bX=Ae([""," === undefined"])),oe);"empty"===V.useDefaults&&(fe=(0,L._)(_X||(_X=Ae([""," || "," === null || ",' === ""'])),fe,oe,oe)),N.if(fe,(0,L._)(xX||(xX=Ae([""," = ",""])),oe,(0,L.stringify)(E)))}}}return N_.assignDefaults=function(H,he){var E=H.schema,N=E.properties,F=E.items;if("object"===he&&N)for(var Y in N)Z(H,Y,N[Y].default);else"array"===he&&Array.isArray(F)&&F.forEach(function(V,oe){return Z(H,oe,V.default)})},N_}(),o=function lit(){if(cme)return ud;cme=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Sp(),e=dd(),i=ED();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(zX||(zX=Ae(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,S){if(S.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(VX||(VX=Ae(["await "]))):t.nil,S=p.opts.passContext?n.default.this:n.default.self,M=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(HX||(HX=Ae(["","",""])),C,(0,e.callValidateCode)(s,g,S,M)),a.modifying)}function _(C){var S;c.if((0,t.not)(null!==(S=a.valid)&&void 0!==S?S:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),_(function(){return s.error()});else{var C=a.async?(M=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(LX||(LX=Ae(["await "]))))},function($){return c.assign(v,!1).if((0,t._)(RX||(RX=Ae([""," instanceof ",""])),$,p.ValidationError),function(){return c.assign(M,(0,t._)($X||($X=Ae(["",".errors"])),$))},function(){return c.throw($)})}),M):(S=(0,t._)(BX||(BX=Ae(["",".errors"])),g),c.assign(S,null),y(t.nil),S);a.modifying&&r(s),_(function(){return function(M,$){var G=M.gen;G.if((0,t._)(UX||(UX=Ae(["Array.isArray(",")"])),$),function(){G.assign(n.default.vErrors,(0,t._)(GX||(GX=Ae([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,$,n.default.vErrors,$)).assign(n.default.errors,(0,t._)(WX||(WX=Ae(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(M)},function(){return M.error()})}(s,C)})}var M,S}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==bn(s)&&!Array.isArray(s):bn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(ume)return mf;ume=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.extendSubschemaMode=mf.extendSubschemaData=mf.getSubschema=void 0;var L=xr(),X=Hr;return mf.getSubschema=function(Z,H){var he=H.keyword,E=H.schemaProp,N=H.schema,F=H.schemaPath,Y=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==he&&void 0!==N)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==he){var oe=Z.schema[he];return void 0===E?{schema:oe,schemaPath:(0,L._)(qX||(qX=Ae(["","",""])),Z.schemaPath,(0,L.getProperty)(he)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he)}:{schema:oe[E],schemaPath:(0,L._)(XX||(XX=Ae(["","","",""])),Z.schemaPath,(0,L.getProperty)(he),(0,L.getProperty)(E)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he,"/").concat((0,X.escapeFragment)(E))}}if(void 0!==N){if(void 0===F||void 0===Y||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:N,schemaPath:F,topSchemaRef:V,errSchemaPath:Y}}throw new Error('either "keyword" or "schema" must be passed')},mf.extendSubschemaData=function(Z,H,he){var E=he.dataProp,N=he.dataPropType,F=he.data,Y=he.dataTypes,V=he.propertyName;if(void 0!==F&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var oe=H.gen;if(void 0!==E){var fe=H.errorPath,Ne=H.dataPathArr,xe=H.opts;tt(oe.let("data",(0,L._)(YX||(YX=Ae(["","",""])),H.data,(0,L.getProperty)(E)),!0)),Z.errorPath=(0,L.str)(JX||(JX=Ae(["","",""])),fe,(0,X.getErrorPath)(E,N,xe.jsPropertySyntax)),Z.parentDataProperty=(0,L._)(KX||(KX=Ae(["",""])),E),Z.dataPathArr=[].concat(si(Ne),[Z.parentDataProperty])}function tt(ze){Z.data=ze,Z.dataLevel=H.dataLevel+1,Z.dataTypes=[],H.definedProperties=new Set,Z.parentData=H.data,Z.dataNames=[].concat(si(H.dataNames),[ze])}void 0!==F&&(tt(F instanceof L.Name?F:oe.let("data",F,!0)),void 0!==V&&(Z.propertyName=V)),Y&&(Z.dataTypes=Y)},mf.extendSubschemaMode=function(Z,H){var he=H.jtdDiscriminator,E=H.jtdMetadata,N=H.compositeRule,F=H.createErrors,Y=H.allErrors;void 0!==N&&(Z.compositeRule=N),void 0!==F&&(Z.createErrors=F),void 0!==Y&&(Z.allErrors=Y),Z.jtdDiscriminator=he,Z.jtdMetadata=E},mf}(),a=xr(),l=Sp(),c=Ga,u=Hr,d=ED();function h(L,X){var F,Z=L.gen,H=L.validateName,he=L.schema,E=L.schemaEnv,N=L.opts;N.code.es5?Z.func(H,(0,a._)(QX||(QX=Ae(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var F,Y;Z.code((0,a._)(ZX||(ZX=Ae(['"use strict"; ',""])),f(he,N))),Y=N,(F=Z).if(l.default.valCxt,function(){F.var(l.default.instancePath,(0,a._)(iY||(iY=Ae(["",".",""])),l.default.valCxt,l.default.instancePath)),F.var(l.default.parentData,(0,a._)(rY||(rY=Ae(["",".",""])),l.default.valCxt,l.default.parentData)),F.var(l.default.parentDataProperty,(0,a._)(oY||(oY=Ae(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),F.var(l.default.rootData,(0,a._)(sY||(sY=Ae(["",".",""])),l.default.valCxt,l.default.rootData)),Y.dynamicRef&&F.var(l.default.dynamicAnchors,(0,a._)(aY||(aY=Ae(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){F.var(l.default.instancePath,(0,a._)(lY||(lY=Ae(['""'])))),F.var(l.default.parentData,(0,a._)(cY||(cY=Ae(["undefined"])))),F.var(l.default.parentDataProperty,(0,a._)(uY||(uY=Ae(["undefined"])))),F.var(l.default.rootData,l.default.data),Y.dynamicRef&&F.var(l.default.dynamicAnchors,(0,a._)(dY||(dY=Ae(["{}"]))))}),Z.code(X)}):Z.func(H,(0,a._)(eY||(eY=Ae(["",", ",""])),l.default.data,(F=N,(0,a._)(tY||(tY=Ae(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,F.dynamicRef?(0,a._)(nY||(nY=Ae([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return Z.code(f(he,N)).code(X)})}function f(L,X){var Z="object"==bn(L)&&L[X.schemaId];return Z&&(X.code.source||X.code.process)?(0,a._)(bY||(bY=Ae(["/*# sourceURL="," */"])),Z):a.nil}function m(L){var X=L.schema,Z=L.self;if("boolean"==typeof X)return!X;for(var H in X)if(Z.RULES.all[H])return!0;return!1}function g(L){return"boolean"!=typeof L.schema}function v(L){var X,Z,H,E;(0,u.checkUnknownRules)(L),H=(X=L).errSchemaPath,E=X.self,(Z=X.schema).$ref&&X.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(Z,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(L,X){if(L.opts.jtd)return C(L,[],!1,X);var Z=(0,n.getSchemaTypes)(L.schema);C(L,Z,!(0,n.coerceAndCheckDataType)(L,Z),X)}function _(L){var X=L.gen,Z=L.schemaEnv,he=L.errSchemaPath,E=L.opts,N=L.schema.$comment;if(!0===E.$comment)X.code((0,a._)(xY||(xY=Ae(["",".logger.log(",")"])),l.default.self,N));else if("function"==typeof E.$comment){var F=(0,a.str)(wY||(wY=Ae(["","/$comment"])),he),Y=X.scopeValue("root",{ref:Z.root});X.code((0,a._)(CY||(CY=Ae(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,N,F,Y))}}function C(L,X,Z,H){var fe,Ne,xe,tt,he=L.gen,E=L.schema,N=L.data,F=L.allErrors,Y=L.opts,V=L.self.RULES;function oe(fe){(0,e.shouldUseGroup)(E,fe)&&(fe.type?(he.if((0,i.checkDataType)(fe.type,N,Y.strictNumbers)),S(L,fe),1===X.length&&X[0]===fe.type&&Z&&(he.else(),(0,i.reportTypeError)(L)),he.endIf()):S(L,fe),F||he.if((0,a._)(MY||(MY=Ae([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(Y.jtd||(Ne=X,(fe=L).schemaEnv.meta||!fe.opts.strictTypes||(function(xe,tt){if(tt.length){if(!xe.dataTypes.length)return void(xe.dataTypes=tt);tt.forEach(function(ze){$(xe.dataTypes,ze)||G(xe,'type "'.concat(ze,'" not allowed by context "').concat(xe.dataTypes.join(","),'"'))}),function(ze,ot){var B,ne=[],ie=Re(ze.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Ie=B.value;$(ot,Ie)?ne.push(Ie):ot.includes("integer")&&"number"===Ie&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}ze.dataTypes=ne}(xe,tt)}}(fe,Ne),fe.opts.allowUnionTypes||(xe=fe,(tt=Ne).length>1&&(2!==tt.length||!tt.includes("null"))&&G(xe,"use allowUnionTypes to allow union type keyword")),function(xe,tt){var ze=xe.self.RULES.all;for(var ot in ze){var B=ze[ot];if("object"==bn(B)&&(0,e.shouldUseRule)(xe.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return M(tt,ie)})&&G(xe,'missing type "'.concat(ne.join(","),'" for keyword "').concat(ot,'"'))}}}(fe,fe.dataTypes))),he.block(function(){var fe,Ne=Re(V.rules);try{for(Ne.s();!(fe=Ne.n()).done;)oe(fe.value)}catch(xe){Ne.e(xe)}finally{Ne.f()}oe(V.post)})):he.block(function(){return z(L,"$ref",V.all.$ref.definition)})}function S(L,X){var Z=L.gen,H=L.schema;L.opts.useDefaults&&(0,r.assignDefaults)(L,X.type),Z.block(function(){var he,E=Re(X.rules);try{for(E.s();!(he=E.n()).done;){var N=he.value;(0,e.shouldUseRule)(H,N)&&z(L,N.keyword,N.definition,X.type)}}catch(F){E.e(F)}finally{E.f()}})}function M(L,X){return L.includes(X)||"number"===X&&L.includes("integer")}function $(L,X){return L.includes(X)||"integer"===X&&L.includes("number")}function G(L,X){X+=' at "'.concat(L.schemaEnv.baseId+L.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(L,X,L.opts.strictTypes)}ff.validateFunctionCode=function(L){var X,Z,H,he;g(L)&&(v(L),m(L))?(Z=(X=L).schema,H=X.opts,he=X.gen,h(X,function(){var E,F;H.$comment&&Z.$comment&&_(X),F=(E=X).opts,void 0!==E.schema.default&&F.useDefaults&&F.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),he.let(l.default.vErrors,null),he.let(l.default.errors,0),H.unevaluated&&function(E){var N=E.gen,F=E.validateName;E.evaluated=N.const("evaluated",(0,a._)(hY||(hY=Ae(["",".evaluated"])),F)),N.if((0,a._)(fY||(fY=Ae(["",".dynamicProps"])),E.evaluated),function(){return N.assign((0,a._)(pY||(pY=Ae(["",".props"])),E.evaluated),(0,a._)(mY||(mY=Ae(["undefined"]))))}),N.if((0,a._)(gY||(gY=Ae(["",".dynamicItems"])),E.evaluated),function(){return N.assign((0,a._)(vY||(vY=Ae(["",".items"])),E.evaluated),(0,a._)(yY||(yY=Ae(["undefined"]))))})}(X),y(X),function(E){var fe,Ne,xe,tt,ze,N=E.gen,Y=E.validateName,V=E.ValidationError,oe=E.opts;E.schemaEnv.$async?N.if((0,a._)(kY||(kY=Ae([""," === 0"])),l.default.errors),function(){return N.return(l.default.data)},function(){return N.throw((0,a._)(SY||(SY=Ae(["new ","(",")"])),V,l.default.vErrors))}):(N.assign((0,a._)(DY||(DY=Ae(["",".errors"])),Y),l.default.vErrors),oe.unevaluated&&(Ne=(fe=E).gen,xe=fe.evaluated,ze=fe.items,(tt=fe.props)instanceof a.Name&&Ne.assign((0,a._)(EY||(EY=Ae(["",".props"])),xe),tt),ze instanceof a.Name&&Ne.assign((0,a._)(AY||(AY=Ae(["",".items"])),xe),ze)),N.return((0,a._)(TY||(TY=Ae([""," === 0"])),l.default.errors)))}(X)})):h(L,function(){return(0,t.topBoolOrEmptySchema)(L)})};var R=function(){function L(X,Z,H){if(ke(this,L),(0,o.validateKeywordUsage)(X,Z,H),this.gen=X.gen,this.allErrors=X.allErrors,this.keyword=H,this.data=X.data,this.schema=X.schema[H],this.$data=Z.$data&&X.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(X,this.schema,H,this.$data),this.schemaType=Z.schemaType,this.parentSchema=X.schema,this.params={},this.it=X,this.def=Z,this.$data)this.schemaCode=X.gen.const("vSchema",re(this.$data,X));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,Z.schemaType,Z.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(Z.schemaType)));("code"in Z?Z.trackErrors:!1!==Z.errors)&&(this.errsCount=X.gen.const("_errs",l.default.errors))}return Se(L,[{key:"result",value:function(X,Z,H){this.failResult((0,a.not)(X),Z,H)}},{key:"failResult",value:function(X,Z,H){this.gen.if(X),H?H():this.error(),Z?(this.gen.else(),Z(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(X,Z){this.failResult((0,a.not)(X),void 0,Z)}},{key:"fail",value:function(X){if(void 0===X)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(X),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(X){if(!this.$data)return this.fail(X);var Z=this.schemaCode;this.fail((0,a._)(IY||(IY=Ae([""," !== undefined && (",")"])),Z,(0,a.or)(this.invalid$data(),X)))}},{key:"error",value:function(X,Z,H){if(Z)return this.setParams(Z),this._error(X,H),void this.setParams({});this._error(X,H)}},{key:"_error",value:function(X,Z){(X?d.reportExtraError:d.reportError)(this,this.def.error,Z)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(X){this.allErrors||this.gen.if(X)}},{key:"setParams",value:function(X,Z){Z?Object.assign(this.params,X):this.params=X}},{key:"block$data",value:function(X,Z){var H=this,he=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(X,he),Z()})}},{key:"check$data",value:function(){var X=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,Z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,he=this.schemaCode,E=this.schemaType,N=this.def;H.if((0,a.or)((0,a._)(NY||(NY=Ae([""," === undefined"])),he),Z)),X!==a.nil&&H.assign(X,!0),(E.length||N.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),X!==a.nil&&H.assign(X,!1)),H.else()}}},{key:"invalid$data",value:function(){var X=this.gen,Z=this.schemaCode,H=this.schemaType,he=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(Z instanceof a.Name))throw new Error("ajv implementation error");var N=Array.isArray(H)?H:[H];return(0,a._)(FY||(FY=Ae(["",""])),(0,i.checkDataTypes)(N,Z,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(he.validateSchema){var N=X.scopeValue("validate$data",{ref:he.validateSchema});return(0,a._)(OY||(OY=Ae(["!","(",")"])),N,Z)}return a.nil}())}},{key:"subschema",value:function(X,Z){var H=(0,s.getSubschema)(this.it,X);(0,s.extendSubschemaData)(H,this.it,X),(0,s.extendSubschemaMode)(H,X);var he=Ze(Ze(Ze({},this.it),H),{},{items:void 0,props:void 0});return function p(L,X){g(L)&&(v(L),m(L))?function(Z,H){var F,Y,E=Z.gen;Z.opts.$comment&&Z.schema.$comment&&_(Z),(Y=(F=Z).schema[F.opts.schemaId])&&(F.baseId=(0,c.resolveUrl)(F.opts.uriResolver,F.baseId,Y)),function(F){if(F.schema.$async&&!F.schemaEnv.$async)throw new Error("async schema in sync schema")}(Z);var N=E.const("_errs",l.default.errors);y(Z,N),E.var(H,(0,a._)(_Y||(_Y=Ae([""," === ",""])),N,l.default.errors))}(L,X):(0,t.boolOrEmptySchema)(L,X)}(he,Z),he}},{key:"mergeEvaluated",value:function(X,Z){var H=this.it,he=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==X.props&&(H.props=u.mergeEvaluated.props(he,X.props,H.props,Z)),!0!==H.items&&void 0!==X.items&&(H.items=u.mergeEvaluated.items(he,X.items,H.items,Z)))}},{key:"mergeValidEvaluated",value:function(X,Z){var H=this,he=this.it;if(he.opts.unevaluated&&(!0!==he.props||!0!==he.items))return this.gen.if(Z,function(){return H.mergeEvaluated(X,a.Name)}),!0}}]),L}();function z(L,X,Z,H){var he=new R(L,Z,X);"code"in Z?Z.code(he,H):he.$data&&Z.validate?(0,o.funcKeywordCode)(he,Z):"macro"in Z?(0,o.macroKeywordCode)(he,Z):(Z.compile||Z.validate)&&(0,o.funcKeywordCode)(he,Z)}ff.KeywordCxt=R;var U=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(L,X){var Z,H,he=X.dataLevel,E=X.dataNames,N=X.dataPathArr;if(""===L)return l.default.rootData;if("/"===L[0]){if(!U.test(L))throw new Error("Invalid JSON-pointer: ".concat(L));Z=L,H=l.default.rootData}else{var F=q.exec(L);if(!F)throw new Error("Invalid JSON-pointer: ".concat(L));var Y=+F[1];if("#"===(Z=F[2])){if(Y>=he)throw new Error(xe("property/index",Y));return N[he-Y]}if(Y>he)throw new Error(xe("data",Y));if(H=E[he-Y],!Z)return H}var V,oe=H,fe=Re(Z.split("/"));try{for(fe.s();!(V=fe.n()).done;){var Ne=V.value;Ne&&(H=(0,a._)(jY||(jY=Ae(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Ne))),oe=(0,a._)(PY||(PY=Ae([""," && ",""])),oe,H))}}catch(tt){fe.e(tt)}finally{fe.f()}return oe;function xe(tt,ze){return"Cannot access ".concat(tt," ").concat(ze," levels up, current level is ").concat(he)}}return ff.getData=re,ff}Ga.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=z0(t[r]||n),a={"":s},l=fme(o,s,!1),c={},u=new Set;return hit(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=_.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function _(S){if(S=z0(y?(0,this.opts.uriResolver.resolve)(y,S):S),u.has(S))throw h(S);u.add(S);var $=this.refs[S];return"string"==typeof $&&($=this.refs[$]),"object"==bn($)?d(f,$.schema,S):S!==z0(v)&&("#"===S[0]?(d(f,c[S],S),c[S]=f):this.refs[S]=v),S}function C(S){if("string"==typeof S){if(!git.test(S))throw new Error('invalid anchor "'.concat(S,'"'));_.call(this,"#".concat(S))}}}),c;function d(f,p,m){if(void 0!==p&&!dit(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var gme,ID={};function DP(){if(gme)return ID;gme=1,Object.defineProperty(ID,"__esModule",{value:!0});var t=function(n){wt(i,lb(Error));var e=Ct(i);function i(r){var o;return ke(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return ID.default=t,ID}var vme,ND={};function TP(){if(vme)return ND;vme=1,Object.defineProperty(ND,"__esModule",{value:!0});var t=Ga,n=function(e){wt(r,lb(Error));var i=Ct(r);function r(o,s,a,l){var c;return ke(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return ND.default=n,ND}var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.resolveSchema=Zl.getCompilingSchema=Zl.resolveRef=Zl.compileSchema=Zl.SchemaEnv=void 0;var hd=xr(),vit=DP(),ng=Sp(),fd=Ga,yme=Hr,yit=MD(),FD=Se(function t(n){var e,i;ke(this,t),this.refs={},this.dynamicAnchors={},"object"==bn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function EP(t){var n=bme.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:vit.default,code:(0,hd._)(LY||(LY=Ae(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:ng.default.data,parentData:ng.default.parentData,parentDataProperty:ng.default.parentDataProperty,dataNames:[ng.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(RY||(RY=Ae(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,yit.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(ng.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(ng.default.self),"".concat(ng.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function bit(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:EP.call(this,t)}function bme(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function _it(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||OD.call(this,t,n)}function OD(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return AP.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=OD.call(this,t,s);return"object"!==bn(a?.schema)?void 0:AP.call(this,e,a)}if("object"===bn(s?.schema)){if(s.validate||EP.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new FD({schema:l,schemaId:c,root:t,baseId:r})}return AP.call(this,e,s)}}Zl.SchemaEnv=FD,Zl.compileSchema=EP,Zl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=_it.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new FD({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=bit.call(this,o):void 0},Zl.getCompilingSchema=bme,Zl.resolveSchema=OD;var xit=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function AP(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,yme.unescapeFragment)(c)];if(void 0===u)return;var d="object"===bn(r=u)&&r[this.opts.schemaId];!xit.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,yme.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=OD.call(this,o,h)}return(a=a||new FD({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var wit={$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},MP={},_me={};(function(t){function n(){for(var we=arguments.length,He=Array(we),qe=0;qe1){He[0]=He[0].slice(0,-1);for(var ut=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,U=String.fromCharCode;function q(we){throw new RangeError(G[we])}function L(we,He){var qe=we.split("@"),ut="";return qe.length>1&&(ut=qe[0]+"@",we=qe[1]),ut+function re(we,He){for(var qe=[],ut=we.length;ut--;)qe[ut]=He(we[ut]);return qe}((we=we.replace($,".")).split("."),He).join(".")}function X(we){for(var He=[],qe=0,ut=we.length;qe=55296&&Ue<=56319&&qe>1,we+=z(we/He);we>455;ut+=f)we=z(we/35);return z(ut+36*we/(we+38))},N=function(we){var He=[],qe=we.length,ut=0,Ue=128,Dn=72,ii=we.lastIndexOf("-");ii<0&&(ii=0);for(var hi=0;hi=128&&q("not-basic"),He.push(we.charCodeAt(hi));for(var di=ii>0?ii+1:0;di=qe&&q("invalid-input");var yr=H(we.charCodeAt(di++));(yr>=f||yr>z((h-ut)/Qr))&&q("overflow"),ut+=yr*Qr;var Ee=gi<=Dn?1:gi>=Dn+26?26:gi-Dn;if(yrz(h/St)&&q("overflow"),Qr*=St}var Ht=He.length+1;Dn=E(ut-kr,Ht,0==kr),z(ut/Ht)>h-Ue&&q("overflow"),Ue+=z(ut/Ht),ut%=Ht,He.splice(ut++,0,Ue)}return String.fromCodePoint.apply(String,He)},F=function(we){var He=[],qe=(we=X(we)).length,ut=128,Ue=0,Dn=72,ii=!0,hi=!1,di=void 0;try{for(var kr,Qr=we[Symbol.iterator]();!(ii=(kr=Qr.next()).done);ii=!0){var gi=kr.value;gi<128&&He.push(U(gi))}}catch(vd){hi=!0,di=vd}finally{try{!ii&&Qr.return&&Qr.return()}finally{if(hi)throw di}}var yr=He.length,Ee=yr;for(yr&&He.push("-");Ee=ut&&Bnz((h-Ue)/ei)&&q("overflow"),Ue+=(St-ut)*ei,ut=St;var Yn=!0,br=!1,Ar=void 0;try{for(var Po,ca=we[Symbol.iterator]();!(Yn=(Po=ca.next()).done);Yn=!0){var md=Po.value;if(mdh&&q("overflow"),md==ut){for(var hu=Ue,ua=f;;ua+=f){var Rl=ua<=Dn?1:ua>=Dn+26?26:ua-Dn;if(hu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function xe(we){for(var He="",qe=0,ut=we.length;qe=194&&Ue<224){if(ut-qe>=6){var Dn=parseInt(we.substr(qe+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&Dn)}else He+=we.substr(qe,6);qe+=6}else if(Ue>=224){if(ut-qe>=9){var ii=parseInt(we.substr(qe+4,2),16),hi=parseInt(we.substr(qe+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ii)<<6|63&hi)}else He+=we.substr(qe,9);qe+=9}else He+=we.substr(qe,3),qe+=3}return He}function tt(we,He){function qe(ut){var Ue=xe(ut);return Ue.match(He.UNRESERVED)?Ue:ut}return we.scheme&&(we.scheme=String(we.scheme).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==we.userinfo&&(we.userinfo=String(we.userinfo).replace(He.PCT_ENCODED,qe).replace(He.NOT_USERINFO,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.host&&(we.host=String(we.host).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_HOST,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.path&&(we.path=String(we.path).replace(He.PCT_ENCODED,qe).replace(we.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.query&&(we.query=String(we.query).replace(He.PCT_ENCODED,qe).replace(He.NOT_QUERY,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.fragment&&(we.fragment=String(we.fragment).replace(He.PCT_ENCODED,qe).replace(He.NOT_FRAGMENT,Ne).replace(He.PCT_ENCODED,r)),we}function ze(we){return we.replace(/^0*(.*)/,"$1")||"0"}function ot(we,He){var qe=we.match(He.IPV4ADDRESS)||[],ut=u(qe,2)[1];return ut?ut.split(".").map(ze).join("."):we}function B(we,He){var qe=we.match(He.IPV6ADDRESS)||[],ut=u(qe,3),Ue=ut[1],Dn=ut[2];if(Ue){for(var ii=Ue.toLowerCase().split("::").reverse(),hi=u(ii,2),di=hi[0],kr=hi[1],Qr=kr?kr.split(":").map(ze):[],gi=di.split(":").map(ze),yr=He.IPV4ADDRESS.test(gi[gi.length-1]),Ee=yr?7:8,St=gi.length-Ee,Ht=Array(Ee),sn=0;sn1){var Oi=Ht.slice(0,hn.index),Bn=Ht.slice(hn.index+hn.length);ri=Oi.join(":")+"::"+Bn.join(":")}else ri=Ht.join(":");return Dn&&(ri+="%"+Dn),ri}return we}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Ie(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe={},ut=!1!==He.iri?c:l;"suffix"===He.reference&&(we=(He.scheme?He.scheme+":":"")+"//"+we);var Ue=we.match(ne);if(Ue){ie?(qe.scheme=Ue[1],qe.userinfo=Ue[3],qe.host=Ue[4],qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=Ue[7],qe.fragment=Ue[8],isNaN(qe.port)&&(qe.port=Ue[5])):(qe.scheme=Ue[1]||void 0,qe.userinfo=-1!==we.indexOf("@")?Ue[3]:void 0,qe.host=-1!==we.indexOf("//")?Ue[4]:void 0,qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=-1!==we.indexOf("?")?Ue[7]:void 0,qe.fragment=-1!==we.indexOf("#")?Ue[8]:void 0,isNaN(qe.port)&&(qe.port=we.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),qe.host&&(qe.host=B(ot(qe.host,ut),ut)),qe.reference=void 0!==qe.scheme||void 0!==qe.userinfo||void 0!==qe.host||void 0!==qe.port||qe.path||void 0!==qe.query?void 0===qe.scheme?"relative":void 0===qe.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==qe.reference&&(qe.error=qe.error||"URI is not a "+He.reference+" reference.");var Dn=fe[(He.scheme||qe.scheme||"").toLowerCase()];if(He.unicodeSupport||Dn&&Dn.unicodeSupport)tt(qe,ut);else{if(qe.host&&(He.domainHost||Dn&&Dn.domainHost))try{qe.host=oe.toASCII(qe.host.replace(ut.PCT_ENCODED,xe).toLowerCase())}catch(ii){qe.error=qe.error||"Host's domain name can not be converted to ASCII via punycode: "+ii}tt(qe,l)}Dn&&Dn.parse&&Dn.parse(qe,He)}else qe.error=qe.error||"URI can not be parsed.";return qe}var Le=/^\.\.?\//,_t=/^\/\.(\/|$)/,At=/^\/\.\.(\/|$)/,_n=/^\/?(?:.|\n)*?(?=\/|$)/;function ci(we){for(var He=[];we.length;)if(we.match(Le))we=we.replace(Le,"");else if(we.match(_t))we=we.replace(_t,"/");else if(we.match(At))we=we.replace(At,"/"),He.pop();else if("."===we||".."===we)we="";else{var qe=we.match(_n);if(!qe)throw new Error("Unexpected dot segment condition");var ut=qe[0];we=we.slice(ut.length),He.push(ut)}return He.join("")}function on(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe=He.iri?c:l,ut=[],Ue=fe[(He.scheme||we.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(we,He),we.host&&!qe.IPV6ADDRESS.test(we.host)&&(He.domainHost||Ue&&Ue.domainHost))try{we.host=He.iri?oe.toUnicode(we.host):oe.toASCII(we.host.replace(qe.PCT_ENCODED,xe).toLowerCase())}catch(hi){we.error=we.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+hi}tt(we,qe),"suffix"!==He.reference&&we.scheme&&(ut.push(we.scheme),ut.push(":"));var Dn=function Ye(we,He){var qe=!1!==He.iri?c:l,ut=[];return void 0!==we.userinfo&&(ut.push(we.userinfo),ut.push("@")),void 0!==we.host&&ut.push(B(ot(String(we.host),qe),qe).replace(qe.IPV6ADDRESS,function(Ue,Dn,ii){return"["+Dn+(ii?"%25"+ii:"")+"]"})),"number"!=typeof we.port&&"string"!=typeof we.port||(ut.push(":"),ut.push(String(we.port))),ut.length?ut.join(""):void 0}(we,He);if(void 0!==Dn&&("suffix"!==He.reference&&ut.push("//"),ut.push(Dn),we.path&&"/"!==we.path.charAt(0)&&ut.push("/")),void 0!==we.path){var ii=we.path;He.absolutePath||Ue&&Ue.absolutePath||(ii=ci(ii)),void 0===Dn&&(ii=ii.replace(/^\/\//,"/%2F")),ut.push(ii)}return void 0!==we.query&&(ut.push("?"),ut.push(we.query)),void 0!==we.fragment&&(ut.push("#"),ut.push(we.fragment)),ut.join("")}function Ni(we,He){var qe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ut={};return arguments[3]||(we=Ie(on(we,qe),qe),He=Ie(on(He,qe),qe)),!(qe=qe||{}).tolerant&&He.scheme?(ut.scheme=He.scheme,ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(He.path?("/"===He.path.charAt(0)?ut.path=ci(He.path):(ut.path=void 0===we.userinfo&&void 0===we.host&&void 0===we.port||we.path?we.path?we.path.slice(0,we.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,ut.path=ci(ut.path)),ut.query=He.query):(ut.path=we.path,ut.query=void 0!==He.query?He.query:we.query),ut.userinfo=we.userinfo,ut.host=we.host,ut.port=we.port),ut.scheme=we.scheme),ut.fragment=He.fragment,ut}function Or(we,He){return we&&we.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,xe)}var Ai={scheme:"http",domainHost:!0,parse:function(we,He){return we.host||(we.error=we.error||"HTTP URIs must have a host."),we},serialize:function(we,He){var qe="https"===String(we.scheme).toLowerCase();return we.port!==(qe?443:80)&&""!==we.port||(we.port=void 0),we.path||(we.path="/"),we}},Wr={scheme:"https",domainHost:Ai.domainHost,parse:Ai.parse,serialize:Ai.serialize};function jo(we){return"boolean"==typeof we.secure?we.secure:"wss"===String(we.scheme).toLowerCase()}var Fn={scheme:"ws",domainHost:!0,parse:function(we,He){var qe=we;return qe.secure=jo(qe),qe.resourceName=(qe.path||"/")+(qe.query?"?"+qe.query:""),qe.path=void 0,qe.query=void 0,qe},serialize:function(we,He){if(we.port!==(jo(we)?443:80)&&""!==we.port||(we.port=void 0),"boolean"==typeof we.secure&&(we.scheme=we.secure?"wss":"ws",we.secure=void 0),we.resourceName){var qe=we.resourceName.split("?"),ut=u(qe,2),Ue=ut[0],Dn=ut[1];we.path=Ue&&"/"!==Ue?Ue:void 0,we.query=Dn,we.resourceName=void 0}return we.fragment=void 0,we}},xt={scheme:"wss",domainHost:Fn.domainHost,parse:Fn.parse,serialize:Fn.serialize},ui={},Fi="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",xo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),gt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ai=new RegExp(Fi,"g"),bi=new RegExp(xo,"g"),Er=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',gt),"g"),qr=new RegExp(n("[^]",Fi,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ao=qr;function Js(we){var He=xe(we);return He.match(ai)?He:we}var vr={scheme:"mailto",parse:function(we,He){var qe=we,ut=qe.to=qe.path?qe.path.split(","):[];if(qe.path=void 0,qe.query){for(var Ue=!1,Dn={},ii=qe.query.split("&"),hi=0,di=ii.length;hi 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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=function(){function E(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts=Ze(Ze({},N),function y(E){var N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne,ie,Ie,Ye,Le,_t,At,_n,ci,on,Ni,pn,Fr,$r=E.strict,wr=null===(N=E.code)||void 0===N?void 0:N.optimize,Or=!0===wr||void 0===wr?1:wr||0,Ai=null!==(Y=null===(F=E.code)||void 0===F?void 0:F.regExp)&&void 0!==Y?Y:f,Wr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(fe=null!==(oe=E.strictSchema)&&void 0!==oe?oe:$r)||void 0===fe||fe,strictNumbers:null===(xe=null!==(Ne=E.strictNumbers)&&void 0!==Ne?Ne:$r)||void 0===xe||xe,strictTypes:null!==(ze=null!==(tt=E.strictTypes)&&void 0!==tt?tt:$r)&&void 0!==ze?ze:"log",strictTuples:null!==(B=null!==(ot=E.strictTuples)&&void 0!==ot?ot:$r)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:$r)&&void 0!==ie&&ie,code:E.code?Ze(Ze({},E.code),{},{optimize:Or,regExp:Ai}):{optimize:Or,regExp:Ai},loopRequired:null!==(Ie=E.loopRequired)&&void 0!==Ie?Ie:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(Le=E.meta)||void 0===Le||Le,messages:null===(_t=E.messages)||void 0===_t||_t,inlineRefs:null===(At=E.inlineRefs)||void 0===At||At,schemaId:null!==(_n=E.schemaId)&&void 0!==_n?_n:"$id",addUsedSchema:null===(ci=E.addUsedSchema)||void 0===ci||ci,validateSchema:null===(on=E.validateSchema)||void 0===on||on,validateFormats:null===(Ni=E.validateFormats)||void 0===Ni||Ni,unicodeRegExp:null===(pn=E.unicodeRegExp)||void 0===pn||pn,int32range:null===(Fr=E.int32range)||void 0===Fr||Fr,uriResolver:Wr}}(N));var F=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:F.es5,lines:F.lines}),this.logger=function U(E){if(!1===E)return z;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")}(N.logger);var oe=N.validateFormats;N.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,N,"NOT SUPPORTED"),C.call(this,v,N,"DEPRECATED","warn"),this._metaOpts=R.call(this),N.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&G.call(this,N.keywords),"object"==bn(N.meta)&&this.addMetaSchema(N.meta),M.call(this),N.validateFormats=oe}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var N=this.opts,F=N.$data,Y=N.meta,V=N.schemaId,oe=d;"id"===V&&((oe=Ze({},d)).id=oe.$id,delete oe.$id),Y&&F&&this.addMetaSchema(oe,oe[V],!1)}},{key:"defaultMeta",value:function(){var N=this.opts,F=N.meta,Y=N.schemaId;return this.opts.defaultMeta="object"==bn(F)?F[Y]||F:void 0}},{key:"validate",value:function(N,F){var Y;if("string"==typeof N){if(!(Y=this.getSchema(N)))throw new Error('no schema with key or ref "'.concat(N,'"'))}else Y=this.compile(N);var V=Y(F);return"$async"in Y||(this.errors=Y.errors),V}},{key:"compile",value:function(N,F){var Y=this._addSchema(N,F);return Y.validate||this._compileSchemaEnv(Y)}},{key:"compileAsync",value:function(N,F){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var Y=this.opts.loadSchema;return V.call(this,N,F);function V(Ie,Ye){return oe.apply(this,arguments)}function oe(){return(oe=Zi(vn().mark(function Ie(Ye,Le){var _t;return vn().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,fe.call(this,Ye.$schema);case 2:return _t=this._addSchema(Ye,Le),At.abrupt("return",_t.validate||xe.call(this,_t));case 4:case"end":return At.stop()}},Ie,this)}))).apply(this,arguments)}function fe(Ie){return Ne.apply(this,arguments)}function Ne(){return(Ne=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!Ye||this.getSchema(Ye)){Le.next=3;break}return Le.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return Le.stop()}},Ie,this)}))).apply(this,arguments)}function xe(Ie){return tt.apply(this,arguments)}function tt(){return(tt=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.prev=0,Le.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(Le.prev=4,Le.t0=Le.catch(0),Le.t0 instanceof r.default){Le.next=8;break}throw Le.t0;case 8:return ze.call(this,Le.t0),Le.next=11,ot.call(this,Le.t0.missingSchema);case 11:return Le.abrupt("return",xe.call(this,Ye));case 12:case"end":return Le.stop()}},Ie,this,[[0,4]])}))).apply(this,arguments)}function ze(Ie){var Ye=Ie.missingSchema,Le=Ie.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(Le," cannot be resolved"))}function ot(Ie){return B.apply(this,arguments)}function B(){return(B=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,ne.call(this,Ye);case 2:if(Le=_t.sent,this.refs[Ye]){_t.next=6;break}return _t.next=6,fe.call(this,Le.$schema);case 6:this.refs[Ye]||this.addSchema(Le,Ye,F);case 7:case"end":return _t.stop()}},Ie,this)}))).apply(this,arguments)}function ne(Ie){return ie.apply(this,arguments)}function ie(){return(ie=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(!(Le=this._loading[Ye])){_t.next=3;break}return _t.abrupt("return",Le);case 3:return _t.prev=3,_t.next=6,this._loading[Ye]=Y(Ye);case 6:return _t.abrupt("return",_t.sent);case 7:return _t.prev=7,delete this._loading[Ye],_t.finish(7);case 10:case"end":return _t.stop()}},Ie,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(N,F,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(N)){var fe,Ne=Re(N);try{for(Ne.s();!(fe=Ne.n()).done;)this.addSchema(fe.value,void 0,Y,oe)}catch(ze){Ne.e(ze)}finally{Ne.f()}return this}if("object"===bn(N)){var tt=this.opts.schemaId;if(void 0!==(V=N[tt])&&"string"!=typeof V)throw new Error("schema ".concat(tt," must be string"))}return F=(0,l.normalizeId)(F||V),this._checkUnique(F),this.schemas[F]=this._addSchema(N,Y,F,oe,!0),this}},{key:"addMetaSchema",value:function(N,F){return this.addSchema(N,F,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(N,F){if("boolean"==typeof N)return!0;var Y;if(void 0!==(Y=N.$schema)&&"string"!=typeof Y)throw new Error("$schema must be a string");if(!(Y=Y||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(Y,N);if(!V&&F){var oe="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(oe);this.logger.error(oe)}return V}},{key:"getSchema",value:function(N){for(var F;"string"==typeof(F=S.call(this,N));)N=F;if(void 0===F){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(F=s.resolveSchema.call(this,V,N)))return;this.refs[N]=F}return F.validate||this._compileSchemaEnv(F)}},{key:"removeSchema",value:function(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(bn(N)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var F=S.call(this,N);return"object"==bn(F)&&this._cache.delete(F.schema),delete this.schemas[N],delete this.refs[N],this;case"object":this._cache.delete(N);var V=N[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(N){var F,Y=Re(N);try{for(Y.s();!(F=Y.n()).done;)this.addKeyword(F.value)}catch(oe){Y.e(oe)}finally{Y.f()}return this}},{key:"addKeyword",value:function(N,F){var Y,V=this;if("string"==typeof N)Y=N,"object"==bn(F)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=Y);else{if("object"!=bn(N)||void 0!==F)throw new Error("invalid addKeywords parameters");if(Y=(F=N).keyword,Array.isArray(Y)&&!Y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(re.call(this,Y,F),!F)return(0,u.eachItem)(Y,function(fe){return L.call(V,fe)}),this;Z.call(this,F);var oe=Ze(Ze({},F),{},{type:(0,c.getJSONTypes)(F.type),schemaType:(0,c.getJSONTypes)(F.schemaType)});return(0,u.eachItem)(Y,0===oe.type.length?function(fe){return L.call(V,fe,oe)}:function(fe){return oe.type.forEach(function(Ne){return L.call(V,fe,oe,Ne)})}),this}},{key:"getKeyword",value:function(N){var F=this.RULES.all[N];return"object"==bn(F)?F.definition:!!F}},{key:"removeKeyword",value:function(N){var F=this.RULES;delete F.keywords[N],delete F.all[N];var Y,V=Re(F.rules);try{for(V.s();!(Y=V.n()).done;){var oe=Y.value,fe=oe.rules.findIndex(function(Ne){return Ne.keyword===N});fe>=0&&oe.rules.splice(fe,1)}}catch(Ne){V.e(Ne)}finally{V.f()}return this}},{key:"addFormat",value:function(N,F){return"string"==typeof F&&(F=new RegExp(F)),this.formats[N]=F,this}},{key:"errorsText",value:function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,F=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Y=F.separator,V=void 0===Y?", ":Y,oe=F.dataVar,fe=void 0===oe?"data":oe;return N&&0!==N.length?N.map(function(Ne){return"".concat(fe).concat(Ne.instancePath," ").concat(Ne.message)}).reduce(function(Ne,xe){return Ne+V+xe}):"No errors"}},{key:"$dataMetaSchema",value:function(N,F){var Y=this.RULES.all;N=JSON.parse(JSON.stringify(N));var V,oe=Re(F);try{for(oe.s();!(V=oe.n()).done;){var fe,Ne=V.value.split("/").slice(1),xe=N,tt=Re(Ne);try{for(tt.s();!(fe=tt.n()).done;)xe=xe[fe.value]}catch(ie){tt.e(ie)}finally{tt.f()}for(var ze in Y){var ot=Y[ze];if("object"==bn(ot)){var ne=xe[ze];ot.definition.$data&&ne&&(xe[ze]=he(ne))}}}}catch(ie){oe.e(ie)}finally{oe.f()}return N}},{key:"_removeAllSchemas",value:function(N,F){for(var Y in N){var V=N[Y];F&&!F.test(Y)||("string"==typeof V?delete N[Y]:V&&!V.meta&&(this._cache.delete(V.schema),delete N[Y]))}}},{key:"_addSchema",value:function(N,F,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Ne=this.opts.schemaId;if("object"==bn(N))V=N[Ne];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof N)throw new Error("schema must be object or boolean")}var xe=this._cache.get(N);if(void 0!==xe)return xe;Y=(0,l.normalizeId)(V||Y);var tt=l.getSchemaRefs.call(this,N,Y);return xe=new s.SchemaEnv({schema:N,schemaId:Ne,meta:F,baseId:Y,localRefs:tt}),this._cache.set(xe.schema,xe),fe&&!Y.startsWith("#")&&(Y&&this._checkUnique(Y),this.refs[Y]=xe),oe&&this.validateSchema(N,!0),xe}},{key:"_checkUnique",value:function(N){if(this.schemas[N]||this.refs[N])throw new Error('schema with key or id "'.concat(N,'" already exists'))}},{key:"_compileSchemaEnv",value:function(N){if(N.meta?this._compileMetaSchema(N):s.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}},{key:"_compileMetaSchema",value:function(N){var F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,N)}finally{this.opts=F}}}]),E}();function C(E,N,F){var Y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var oe=V;oe in N&&this.logger[Y]("".concat(F,": option ").concat(V,". ").concat(E[oe]))}}function S(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function M(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var N in E)this.addSchema(E[N],N)}function $(){for(var E in this.opts.formats){var N=this.opts.formats[E];N&&this.addFormat(E,N)}}function G(E){if(Array.isArray(E))this.addVocabulary(E);else for(var N in this.logger.warn("keywords option as map is deprecated, pass array"),E){var F=E[N];F.keyword||(F.keyword=N),this.addKeyword(F)}}function R(){var E,N=Ze({},this.opts),F=Re(p);try{for(F.s();!(E=F.n()).done;)delete N[E.value]}catch(Y){F.e(Y)}finally{F.f()}return N}t.default=_,_.ValidationError=i.default,_.MissingRefError=r.default;var z={log:function(){},warn:function(){},error:function(){}},q=/^[a-z_$][a-z0-9_$:-]*$/i;function re(E,N){var F=this.RULES;if((0,u.eachItem)(E,function(Y){if(F.keywords[Y])throw new Error("Keyword ".concat(Y," is already defined"));if(!q.test(Y))throw new Error("Keyword ".concat(Y," has invalid name"))}),N&&N.$data&&!("code"in N)&&!("validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function L(E,N,F){var Y,V=this,oe=N?.post;if(F&&oe)throw new Error('keyword with "post" flag cannot have "type"');var fe=this.RULES,Ne=oe?fe.post:fe.rules.find(function(tt){return tt.type===F});if(Ne||fe.rules.push(Ne={type:F,rules:[]}),fe.keywords[E]=!0,N){var xe={keyword:E,definition:Ze(Ze({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)})};N.before?X.call(this,Ne,xe,N.before):Ne.rules.push(xe),fe.all[E]=xe,null===(Y=N.implements)||void 0===Y||Y.forEach(function(tt){return V.addKeyword(tt)})}}function X(E,N,F){var Y=E.rules.findIndex(function(V){return V.keyword===F});Y>=0?E.rules.splice(Y,0,N):(E.rules.push(N),this.logger.warn("rule ".concat(F," is not defined")))}function Z(E){var N=E.metaSchema;void 0!==N&&(E.$data&&this.opts.$data&&(N=he(N)),E.validateSchema=this.compile(N,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(E){return{anyOf:[E,H]}}}(Xpe);var IP={},NP={},FP={};Object.defineProperty(FP,"__esModule",{value:!0}),FP.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.callRef=ig.getValidate=void 0;var kit=TP(),wme=dd(),ec=xr(),U0=Sp(),Cme=Zl,jD=Hr,Sit={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return PD(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return PD(t,(0,ec._)($Y||($Y=Ae(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Cme.resolveRef.call(l,c,r,e);if(void 0===p)throw new kit.default(i.opts.uriResolver,r,e);return p instanceof Cme.SchemaEnv?(g=kme(t,m=p),void PD(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,ec.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:ec.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function kme(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,ec._)(BY||(BY=Ae(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function PD(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?U0.default.this:ec.nil;function c(d){var h=(0,ec._)(zY||(zY=Ae(["",".errors"])),d);r.assign(U0.default.vErrors,(0,ec._)(UY||(UY=Ae([""," === null ? "," : ",".concat(",")"])),U0.default.vErrors,h,U0.default.vErrors,h)),r.assign(U0.default.errors,(0,ec._)(GY||(GY=Ae(["",".length"])),U0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=jD.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,ec._)(WY||(WY=Ae(["",".evaluated.props"])),d));o.props=jD.mergeEvaluated.props(r,p,o.props,ec.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=jD.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,ec._)(qY||(qY=Ae(["",".evaluated.items"])),d));o.items=jD.mergeEvaluated.items(r,m,o.items,ec.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,ec._)(VY||(VY=Ae(["await ",""])),(0,wme.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,ec._)(HY||(HY=Ae(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,wme.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}ig.getValidate=kme,ig.callRef=PD,ig.default=Sit,Object.defineProperty(NP,"__esModule",{value:!0}),NP.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",FP.default,ig.default];var OP={},jP={};Object.defineProperty(jP,"__esModule",{value:!0});var LD=xr(),Tp=LD.operators,RD={maximum:{okStr:"<=",ok:Tp.LTE,fail:Tp.GT},minimum:{okStr:">=",ok:Tp.GTE,fail:Tp.LT},exclusiveMaximum:{okStr:"<",ok:Tp.LT,fail:Tp.GTE},exclusiveMinimum:{okStr:">",ok:Tp.GT,fail:Tp.LTE}},Eit={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD.str)(XY||(XY=Ae(["must be "," ",""])),RD[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD._)(YY||(YY=Ae(["{comparison: ",", limit: ","}"])),RD[n].okStr,e)}},Ait={keyword:Object.keys(RD),type:"number",schemaType:"number",$data:!0,error:Eit,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,LD._)(JY||(JY=Ae([""," "," "," || isNaN(",")"])),e,RD[n].fail,i,e))}};jP.default=Ait;var PP={};Object.defineProperty(PP,"__esModule",{value:!0});var F_=xr(),Mit={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,F_.str)(KY||(KY=Ae(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,F_._)(QY||(QY=Ae(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,F_._)(ZY||(ZY=Ae(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,F_._)(eJ||(eJ=Ae([""," !== parseInt(",")"])),o,o);t.fail$data((0,F_._)(tJ||(tJ=Ae(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};PP.default=Mit;var LP={},RP={};function Sme(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(P_.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,j_.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:_=v}),void n.forOf(_,i,function(){n.assign(C,(0,j_.propertyInData)(n,r,_,a.ownProperties)),n.if((0,P_.not)(C),function(){t.error(),n.break()})},P_.nil);var _,C}),t.ok(y)}else n.if((0,j_.checkMissingProp)(t,e,v)),(0,j_.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,$it.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,j_.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};VP.default=Bit;var HP={};Object.defineProperty(HP,"__esModule",{value:!0});var L_=xr(),Vit={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,L_.str)(gJ||(gJ=Ae(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,L_._)(vJ||(vJ=Ae(["{limit: ","}"])),n)}},Hit={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Vit,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?L_.operators.GT:L_.operators.LT;t.fail$data((0,L_._)(yJ||(yJ=Ae(["",".length "," ",""])),e,r,i))}};HP.default=Hit;var zP={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});var Dme=dme;Dme.code='require("ajv/dist/runtime/equal").default',R_.default=Dme,Object.defineProperty(zP,"__esModule",{value:!0});var UP=I_,Wa=xr(),zit=Hr,Uit=R_,Git={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa.str)(bJ||(bJ=Ae(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa._)(_J||(_J=Ae(["{i: ",", j: ","}"])),e,i)}},Wit={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Git,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,UP.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Wa._)(wJ||(wJ=Ae(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Wa._)(CJ||(CJ=Ae([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Wa._)(xJ||(xJ=Ae([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,UP.checkDataTypes)(c,p,a.opts.strictNumbers,UP.DataType.Wrong),g=n.const("indices",(0,Wa._)(kJ||(kJ=Ae(["{}"]))));n.for((0,Wa._)(SJ||(SJ=Ae([";","--;"])),h),function(){n.let(p,(0,Wa._)(DJ||(DJ=Ae(["","[","]"])),e,h)),n.if(m,(0,Wa._)(TJ||(TJ=Ae(["continue"])))),c.length>1&&n.if((0,Wa._)(EJ||(EJ=Ae(["typeof ",' == "string"'])),p),(0,Wa._)(AJ||(AJ=Ae(["",' += "_"'])),p)),n.if((0,Wa._)(MJ||(MJ=Ae(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Wa._)(IJ||(IJ=Ae(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Wa._)(NJ||(NJ=Ae(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,zit.useFunc)(n,Uit.default),m=n.name("outer");n.label(m).for((0,Wa._)(FJ||(FJ=Ae([";","--;"])),h),function(){return n.for((0,Wa._)(OJ||(OJ=Ae([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Wa._)(jJ||(jJ=Ae(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};zP.default=Wit;var GP={};Object.defineProperty(GP,"__esModule",{value:!0});var WP=xr(),qit=Hr,Xit=R_,Yit={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,WP._)(PJ||(PJ=Ae(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==bn(o)?t.fail$data((0,WP._)(LJ||(LJ=Ae(["!","(",", ",")"])),(0,qit.useFunc)(n,Xit.default),e,r)):t.fail((0,WP._)(RJ||(RJ=Ae([""," !== ",""])),o,e))}};GP.default=Yit;var qP={};Object.defineProperty(qP,"__esModule",{value:!0});var $_=xr(),Jit=Hr,Kit=R_,Qit={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,$_._)($J||($J=Ae(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,Jit.useFunc)(n,Kit.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,$_._)(BJ||(BJ=Ae(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=$_.or.apply(void 0,si(r.map(function(h,f){return p=d,"object"===bn(g=r[m=f])&&null!==g?(0,$_._)(VJ||(VJ=Ae(["","(",", ","[","])"])),u(),e,p,m):(0,$_._)(HJ||(HJ=Ae([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};qP.default=Qit,Object.defineProperty(OP,"__esModule",{value:!0}),OP.default=[jP.default,PP.default,LP.default,$P.default,BP.default,VP.default,HP.default,zP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},GP.default,qP.default];var XP={},G0={};Object.defineProperty(G0,"__esModule",{value:!0}),G0.validateAdditionalItems=void 0;var og=xr(),YP=Hr,crt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,og.str)(zJ||(zJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,og._)(UJ||(UJ=Ae(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?Tme(t,i):(0,YP.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function Tme(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,og._)(GJ||(GJ=Ae(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,og._)(WJ||(WJ=Ae([""," <= ",""])),a,n.length));else if("object"==bn(i)&&!(0,YP.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,og._)(qJ||(qJ=Ae([""," <= ",""])),a,n.length));e.if((0,og.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:YP.Type.Num},c),s.allErrors||e.if((0,og.not)(c),function(){return e.break()})});var c}),t.ok(l)}}G0.validateAdditionalItems=Tme,G0.default=crt;var JP={},W0={};Object.defineProperty(W0,"__esModule",{value:!0}),W0.validateTuple=void 0;var Eme=xr(),BD=Hr,urt=dd(),drt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Ame(t,"additionalItems",n);e.items=!0,(0,BD.alwaysValidSchema)(e,n)||t.ok((0,urt.validateArray)(t))}};function Ame(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,BD.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=BD.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Eme._)(XJ||(XJ=Ae(["",".length"])),o));e.forEach(function(d,h){(0,BD.alwaysValidSchema)(a,d)||(i.if((0,Eme._)(YJ||(YJ=Ae([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}W0.validateTuple=Ame,W0.default=drt,Object.defineProperty(JP,"__esModule",{value:!0});var hrt=W0,frt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,hrt.validateTuple)(t,"items")}};JP.default=frt;var KP={};Object.defineProperty(KP,"__esModule",{value:!0});var Mme=xr(),prt=Hr,mrt=dd(),grt=G0,vrt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Mme.str)(JJ||(JJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Mme._)(KJ||(KJ=Ae(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,prt.alwaysValidSchema)(i,n)||(r?(0,grt.validateAdditionalItems)(t,r):t.ok((0,mrt.validateArray)(t)))}};KP.default=vrt;var QP={};Object.defineProperty(QP,"__esModule",{value:!0});var du=xr(),VD=Hr,yrt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du.str)(QJ||(QJ=Ae(["must contain at least "," valid item(s)"])),e):(0,du.str)(ZJ||(ZJ=Ae(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du._)(eK||(eK=Ae(["{minContains: ","}"])),e):(0,du._)(tK||(tK=Ae(["{minContains: ",", maxContains: ","}"])),e,i)}},brt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:yrt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,du._)(nK||(nK=Ae(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,VD.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,VD.alwaysValidSchema)(a,r)){var d=(0,du._)(iK||(iK=Ae([""," >= ",""])),u,n);return void 0!==e&&(d=(0,du._)(rK||(rK=Ae([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,du._)(oK||(oK=Ae(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,VD.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,du._)(sK||(sK=Ae(["","++"])),v)),void(void 0===e?i.if((0,du._)(aK||(aK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,du._)(lK||(lK=Ae([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,du._)(cK||(cK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:VD.Type.Num,compositeRule:!0},m),g()})}}};QP.default=brt;var Ime={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Hr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(uK||(uK=Ae(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(dK||(dK=Ae(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Un(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,_=Re(g);try{for(_.s();!(y=_.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(S){_.e(S)}finally{_.f()}}):(c.if((0,n._)(hK||(hK=Ae([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Ime);var ZP={};Object.defineProperty(ZP,"__esModule",{value:!0});var Nme=xr(),_rt=Hr,xrt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,Nme._)(fK||(fK=Ae(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,_rt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,Nme.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};ZP.default=xrt;var HD={};Object.defineProperty(HD,"__esModule",{value:!0});var zD=dd(),pd=xr(),wrt=Sp(),UD=Hr,Crt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(pK||(pK=Ae(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,UD.alwaysValidSchema)(s,e)){var c=(0,zD.allSchemaProperties)(i.properties),u=(0,zD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,UD.schemaRefOrVal)(s,i.properties,"properties");g=(0,zD.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,si(c.map(function(y){return(0,pd._)(gK||(gK=Ae([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(si(u.map(function(y){return(0,pd._)(vK||(vK=Ae(["",".test(",")"])),(0,zD.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(mK||(mK=Ae([""," === ",""])),o,wrt.default.errors))}function d(p){n.code((0,pd._)(yK||(yK=Ae(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==bn(e)&&!(0,UD.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:UD.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};HD.default=Crt;var eL={};Object.defineProperty(eL,"__esModule",{value:!0});var krt=MD(),Fme=dd(),tL=Hr,Ome=HD,Srt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Ome.default.code(new krt.KeywordCxt(o,Ome.default,"additionalProperties"));var s,a=(0,Fme.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=tL.mergeEvaluated.props(n,(0,tL.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,tL.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Fme.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};eL.default=Srt;var nL={};Object.defineProperty(nL,"__esModule",{value:!0});var jme=dd(),GD=xr(),Pme=Hr,Lme=Hr,Drt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,jme.allSchemaProperties)(e),l=a.filter(function(p){return(0,Pme.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof GD.Name||(o.props=(0,Lme.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Pme.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,GD._)(bK||(bK=Ae(["",".test(",")"])),(0,jme.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Lme.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,GD._)(_K||(_K=Ae(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,GD.not)(u),function(){return n.break()})})})}}};nL.default=Drt;var iL={};Object.defineProperty(iL,"__esModule",{value:!0});var Trt=Hr,Ert={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Trt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};iL.default=Ert;var rL={};Object.defineProperty(rL,"__esModule",{value:!0});var Art={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};rL.default=Art;var oL={};Object.defineProperty(oL,"__esModule",{value:!0});var WD=xr(),Mrt=Hr,Irt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,WD._)(xK||(xK=Ae(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Mrt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,WD._)(wK||(wK=Ae([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,WD._)(CK||(CK=Ae(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,WD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};oL.default=Irt;var sL={};Object.defineProperty(sL,"__esModule",{value:!0});var Nrt=Hr,Frt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Nrt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};sL.default=Frt;var aL={};Object.defineProperty(aL,"__esModule",{value:!0});var qD=xr(),Rme=Hr,Ort={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,qD.str)(kK||(kK=Ae(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,qD._)(SK||(SK=Ae(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Rme.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=$me(i,"then"),o=$me(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,qD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,qD._)(DK||(DK=Ae(["",""])),d)):t.setParams({ifClause:d})}}}};function $me(t,n){var e=t.schema[n];return void 0!==e&&!(0,Rme.alwaysValidSchema)(t,e)}aL.default=Ort;var lL={};Object.defineProperty(lL,"__esModule",{value:!0});var jrt=Hr,Prt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,jrt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};lL.default=Prt,Object.defineProperty(XP,"__esModule",{value:!0});var Lrt=G0,Rrt=JP,$rt=W0,Brt=KP,Vrt=QP,Hrt=Ime,zrt=ZP,Urt=HD,Grt=eL,Wrt=nL,qrt=iL,Xrt=rL,Yrt=oL,Jrt=sL,Krt=aL,Qrt=lL;XP.default=function(){var n=[qrt.default,Xrt.default,Yrt.default,Jrt.default,Krt.default,Qrt.default,zrt.default,Urt.default,Hrt.default,Grt.default,Wrt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Rrt.default,Brt.default):n.push(Lrt.default,$rt.default),n.push(Vrt.default),n};var cL={},uL={};Object.defineProperty(uL,"__esModule",{value:!0});var js=xr(),Zrt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,js.str)(TK||(TK=Ae(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,js._)(EK||(EK=Ae(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,js._)(AK||(AK=Ae(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,js._)(MK||(MK=Ae(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,js._)(IK||(IK=Ae(["",'.type || "string"'])),f)).assign(m,(0,js._)(NK||(NK=Ae(["",".validate"])),f))},function(){return e.assign(p,(0,js._)(FK||(FK=Ae(['"string"'])))).assign(m,f)}),t.fail$data((0,js.or)(!1===l.strictSchema?js.nil:(0,js._)(OK||(OK=Ae([""," && !",""])),s,m),(g=u.$async?(0,js._)(jK||(jK=Ae(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,js._)(PK||(PK=Ae(["","(",")"])),m,i),v=(0,js._)(LK||(LK=Ae(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,js._)(RK||(RK=Ae([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Un(function(v){var y=v instanceof RegExp?(0,js.regexpCode)(v):l.code.formats?(0,js._)($K||($K=Ae(["","",""])),l.code.formats,(0,js.getProperty)(o)):void 0,_=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=bn(v)||v instanceof RegExp?["string",v,_]:[v.type||"string",v.validate,(0,js._)(BK||(BK=Ae(["",".validate"])),_)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==bn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,js._)(VK||(VK=Ae(["await ","(",")"])),g,i)}return(0,js._)("function"==typeof m?HK||(HK=Ae(["","(",")"])):zK||(zK=Ae(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};uL.default=Zrt,Object.defineProperty(cL,"__esModule",{value:!0}),cL.default=[uL.default];var q0={};Object.defineProperty(q0,"__esModule",{value:!0}),q0.contentVocabulary=q0.metadataVocabulary=void 0,q0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],q0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(IP,"__esModule",{value:!0});var iot=cL,Bme=q0,rot=[NP.default,OP.default,(0,XP.default)(),iot.default,Bme.metadataVocabulary,Bme.contentVocabulary];IP.default=rot;var dL={},Vme={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Vme),Object.defineProperty(dL,"__esModule",{value:!0});var X0=xr(),hL=Vme,Hme=Zl,oot=Hr,sot={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===hL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,X0._)(UK||(UK=Ae(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,X0._)(GK||(GK=Ae(["","",""])),e,(0,X0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,X0.Name),h}n.if((0,X0._)(WK||(WK=Ae(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",_="Expref",C="Pipe",$="EQ",G="GT",R="LT",z="GTE",U="LTE",q="NE",re="Flatten",L="Star",X="Filter",Z="Dot",he="Lbrace",E="Lbracket",N="Lparen",F="Literal",Y={".":Z,"*":L,",":p,":":m,"{":he,"}":g,"]":h,"(":N,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},oe={" ":!0,"\t":!0,"\n":!0};function fe(B){return B>="0"&&B<="9"||"-"===B}function Ne(){}Ne.prototype={tokenize:function(B){var ne,ie,Ie,Ye,Le=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),Le.push({type:u,value:ie,start:ne});else if(void 0!==Y[B[this._current]])Le.push({type:Y[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(fe(B[this._current]))Ie=this._consumeNumber(B),Le.push(Ie);else if("["===B[this._current])Ie=this._consumeLBracket(B),Le.push(Ie);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),Le.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),Le.push({type:F,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var _t=this._consumeLiteral(B);Le.push({type:F,value:_t,start:ne})}else if(void 0!==V[B[this._current]])Le.push(this._consumeOperator(B));else if(void 0!==oe[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,Le.push({type:"And",value:"&&",start:ne})):Le.push({type:_,value:"&",start:ne});else{if("|"!==B[this._current]){var At=new Error("Unknown character:"+B[this._current]);throw At.name="LexerError",At}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,Le.push({type:"Or",value:"||",start:ne})):Le.push({type:C,value:"|",start:ne})}return Le},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:z,value:">=",start:ne}):{type:G,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:$,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Ie=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var xe={};function tt(){}function ze(B){this.runtime=B}function ot(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}xe.EOF=0,xe.UnquotedIdentifier=0,xe.QuotedIdentifier=0,xe.Rbracket=0,xe.Rparen=0,xe.Comma=0,xe.Rbrace=0,xe.Number=0,xe.Current=0,xe.Expref=0,xe.Pipe=1,xe.Or=2,xe.And=3,xe.EQ=5,xe.GT=5,xe.LT=5,xe.GTE=5,xe.LTE=5,xe.NE=5,xe.Flatten=9,xe.Star=20,xe.Filter=21,xe.Dot=40,xe.Not=45,xe.Lbrace=50,xe.Lbracket=55,xe.Lparen=60,tt.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Ie=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Ie.name="ParserError",Ie}return ne},_loadTokens:function(B){var ne=(new Ne).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Ie=this._lookahead(0);B=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===he?(this._match(he),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(xe[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===X)ne=this.expression(B);else{if(this._lookahead(0)!==Z){var ie=this._lookaheadToken(0),Ie=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Ie.name="ParserError",Ie}this._match(Z),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Ie=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Ie.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Ie}}},ze.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Ie,Ye,Le,_t,At,_n,ci,on;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(At=ne[B.name])?null:At:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),on=1;on0)for(on=$r;onwr;on+=Or)Ye.push(ne[on]);return Ye;case"Projection":var Ai=this.visit(B.children[0],ne);if(!n(Ai))return null;for(ci=[],on=0;on_t;break;case z:Ye=Le>=_t;break;case R:Ye=Le<_t;break;case U:Ye=Le<=_t;break;default:throw new Error("Unknown comparator: "+B.name)}return Ye;case re:var ui=this.visit(B.children[0],ne);if(!n(ui))return null;var Fi=[];for(on=0;on=B&&(ne=ie<0?B-1:B),ne}},ot.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Ie,Ye,Le,_t;if(ie[ie.length-1].variadic){if(ne.length=0;Ie--)ie+=ne[Ie];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Ie=0;Ie=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Ie=B[0],Ye=B[1],Le=0;Le0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Ie0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Iepn?1:Ni_t&&(_t=ie,ne=Ye[At]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],Le=this.createKeyFunction(B[1],[s,a]),_t=1/0,At=0;At1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var dot=function(){function t(n,e,i,r){fL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=XD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=XD(p,4),_=m[3];void 0===_&&(_=1),o.rgba=[m[0],m[1],m[2],_]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return pL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return Gme(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return Gme(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.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=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,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=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=uot[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=XD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),hot=function(){function t(){fL(this,t),this._events=[]}return pL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function mL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function xh(t,n){return(n||document).querySelector(t)}function Wme(t){t.preventDefault(),t.stopPropagation()}function gL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&Wme(o),i(o))})}var qme=function(){function t(n){fL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new hot,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return pL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),gL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(Wme(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new dot(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=xh(".picker_hue",o),this._domSL=xh(".picker_sl",o),this._domA=xh(".picker_alpha",o),this._domEdit=xh(".picker_editor input",o),this._domSample=xh(".picker_sample",o),this._domOkay=xh(".picker_done button",o),this._domCancel=xh(".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 n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),mL(r,this._domH,function(l,c){return e._setHSLA(l)}),mL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&mL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),gL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),gL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=xh(".picker_selector",this._domH),d=xh(".picker_selector",l),h=xh(".picker_selector",c);_(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,_(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), 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",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function _(S,M,$){M.style.left=100*$+"%"}function C(S,M,$){M.style.top=100*$+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),vL=document.createElement("style");vL.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(vL),qme.StyleElement=vL;var fot=Object.freeze({__proto__:null,default:qme});const pot=["editor"];function mot(t,n){if(1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",39),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while modifying storage object: ",e.error,"")}}function got(t,n){1&t&&(b(0,"ngb-alert",40),ge(1,"img",41),b(2,"h6",39),I(3,"Storage object was modified successfully."),x()()),2&t&&k("dismissible",!1)}function vot(t,n){1&t&&(b(0,"span"),I(1,"Save as a copy"),x())}function yot(t,n){1&t&&I(0,"Save")}function bot(t,n){if(1&t&&(b(0,"button",42),J(1,vot,2,0,"span",43),J(2,yot,1,0,"ng-template",null,44,Ur),x()),2&t){const e=uo(3),i=j();k("disabled",i.updating),w(1),k("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const yL=function(){return["/storage"]},_ot=function(t){return{collection:t}},xot=function(t,n){return{collection:t,key:n}},wot=function(t,n,e){return{collection:t,key:n,user_id:e}},bL=function(t){return{"is-invalid":t}};let Cot=(()=>{class t{ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Do.required],keyname:["",Do.required],user_id:["",Do.required],permission_read:[0,Do.required],permission_write:[0,Do.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"object",void 0),K(this,"objectForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(pot,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Object"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),I(6,"Storage"),x(),b(7,"li",4)(8,"a",5),I(9),x()(),b(10,"li",4)(11,"a",5),I(12),x()(),b(13,"li",4)(14,"a",5),I(15),x()()()()(),J(16,mot,4,2,"ngb-alert",6),J(17,got,4,1,"ngb-alert",7),b(18,"form",8),ye("ngSubmit",function(){return i.updateObject()}),b(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),I(23,"Collection"),x()(),ge(24,"input",13),b(25,"div",14),I(26,"Collection is required"),x()(),b(27,"div",10)(28,"div",11)(29,"label",15),I(30,"Key"),x()(),ge(31,"input",16),b(32,"div",14),I(33,"Key is required"),x()()(),b(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),I(38,"User ID"),x()(),ge(39,"input",18),b(40,"div",14),I(41,"User ID is required"),x()(),b(42,"div",19)(43,"div",11)(44,"label",20),I(45,"Read Permission"),x()(),b(46,"div",21)(47,"label",22),ge(48,"input",23),I(49," No Read "),x(),b(50,"label",22),ge(51,"input",23),I(52," Owner Read "),x(),b(53,"label",22),ge(54,"input",23),I(55," Public Read "),x()()()(),b(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),I(60,"Version"),x()(),ge(61,"input",25),x(),b(62,"div",19)(63,"div",11)(64,"label",26),I(65,"Write Permission"),x()(),b(66,"div",27)(67,"label",22),ge(68,"input",23),I(69," No Write "),x(),b(70,"label",22),ge(71,"input",23),I(72," Owner Write "),x()()()(),b(73,"div",28)(74,"div",10)(75,"div",11)(76,"label",29),I(77,"Create Time"),x()(),ge(78,"input",30),x(),b(79,"div",10)(80,"div",11)(81,"label",31),I(82,"Update Time"),x()(),ge(83,"input",32),x()(),b(84,"div",33),ge(85,"div",34,35),x(),J(87,bot,4,3,"button",36),x()),2&e&&(w(8),k("routerLink",wl(32,yL))("queryParams",lr(33,_ot,i.object.collection)),w(1),Dt(i.object.collection),w(2),k("routerLink",wl(35,yL))("queryParams",Sr(36,xot,i.object.collection,i.object.key)),w(1),Dt(i.object.key),w(2),k("routerLink",wl(39,yL))("queryParams",Ug(40,wot,i.object.collection,i.object.key,i.object.user_id)),w(1),Dt(i.object.user_id),w(1),k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.objectForm),w(6),k("ngClass",lr(44,bL,i.f.collection.dirty&&i.f.collection.errors)),w(1),k("hidden",i.f.collection.disabled||i.f.collection.valid||i.f.collection.pristine),w(6),k("ngClass",lr(46,bL,i.f.keyname.dirty&&i.f.keyname.errors)),w(1),k("hidden",i.f.keyname.disabled||i.f.keyname.valid||i.f.keyname.pristine),w(7),k("ngClass",lr(48,bL,i.f.user_id.dirty&&i.f.user_id.errors)),w(1),k("hidden",i.f.user_id.disabled||i.f.user_id.valid||i.f.user_id.pristine),w(8),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(3),k("disabled",!i.updateAllowed())("value",2),w(7),k("value",i.object.version),w(7),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(7),k("value",i.object.create_time),w(5),k("value",i.object.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Nu,Rh,gn,To,AC,N3,IH,sl,Fa,rl,ol,Nf,fa,ja],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),kot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sot(t,n){if(1&t&&(b(0,"ngb-alert",18),ge(1,"img",19),b(2,"h6",20),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Dot(t,n){1&t&&(b(0,"th",21),I(1,"Remove"),x())}function Tot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Eot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Aot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Mot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Iot(t,n){if(1&t){const e=vt();b(0,"td",26)(1,"button",27),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLeaderboard(r,s,a))}),I(2,"Delete"),x()()}}function Not(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(2),x(),b(3,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(4),x(),b(5,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(6),x(),b(7,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(8),x(),J(9,Tot,2,0,"td",23),J(10,Eot,2,0,"td",23),J(11,Aot,2,0,"td",23),J(12,Mot,2,0,"td",23),J(13,Iot,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(i.orderString[e.sort_order]),w(2),Dt(i.operatorString[e.operator]),w(2),Dt(""===e.reset_schedule?"-":e.reset_schedule),w(1),k("ngIf",e.authoritative),w(1),k("ngIf",!e.authoritative),w(1),k("ngIf",e.tournament),w(1),k("ngIf",!e.tournament),w(1),k("ngIf",i.deleteAllowed())}}function Fot(t,n){1&t&&(b(0,"tr")(1,"td",28),I(2,"No leaderboards were found."),x()())}let Oot=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"authService",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"leaderboards",[]),K(this,"nextCursor",""),K(this,"leaderboardsCount",0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),this.route=e,this.router=i,this.authService=r,this.consoleService=o}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Xo),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),I(4,"Leaderboards"),x(),b(5,"h6",4),I(6),x()(),b(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return i.search(0)}),ge(10,"img",8),x(),b(11,"button",7),ye("click",function(){return i.search(1)}),ge(12,"img",9),x()()()()(),J(13,Sot,4,2,"ngb-alert",10),b(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),I(18,"Leaderboard ID"),x(),b(19,"th",13),I(20,"Sort Order"),x(),b(21,"th",13),I(22,"Operator"),x(),b(23,"th",13),I(24,"Reset Schedule"),x(),b(25,"th",14),I(26,"Authoritative"),x(),b(27,"th",14),I(28,"Tournament"),x(),J(29,Dot,2,0,"th",15),x()(),b(30,"tbody"),J(31,Not,14,9,"tr",16),J(32,Fot,3,0,"tr",17),x()()),2&e&&(w(6),xn("",i.leaderboardsCount," leaderboards found."),w(3),k("disabled",0===i.leaderboards.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(16),k("ngIf",i.deleteAllowed()),w(2),k("ngForOf",i.leaderboards),w(1),k("ngIf",0===i.leaderboards.length))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),jot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Pot(t,n){if(1&t&&(b(0,"ngb-alert",31),ge(1,"img",32),b(2,"h6",33),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying accounts: ",e.error,"")}}function Lot(t,n){1&t&&(b(0,"th",34),I(1,"Remove"),x())}function Rot(t,n){1&t&&(b(0,"tr")(1,"td",35),I(2,"No users found - change the filter criteria or add new user accounts."),x()())}function $ot(t,n){1&t&&ge(0,"td")}function Bot(t,n){if(1&t){const e=vt();b(0,"td",38)(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteAccount(r,s,a))}),I(2,"Delete"),x()()}}function Vot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(8),x(),J(9,$ot,1,0,"td",29),J(10,Bot,3,0,"td",37),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.username),w(2),Dt(e.display_name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Hot=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"accountsCount",0),K(this,"accounts",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"})},o=>{this.error=o})}deleteAccount(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Accounts"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"span",9),ye("click",function(){return i.f.filter.setValue(i.systemUserId)}),ge(12,"img",10),x()(),b(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return i.f.filter_type.setValue(0),i.search(0)}),I(16,"Search"),x(),b(17,"div",13),ge(18,"button",14),b(19,"div",15)(20,"button",16),ye("click",function(){return i.f.filter_type.setValue(1),i.search(0)}),I(21,"Tombstones"),x()()()()()()()(),b(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return i.search(0)}),ge(25,"img",20),x(),b(26,"button",19),ye("click",function(){return i.search(1)}),ge(27,"img",21),x()()()()(),J(28,Pot,4,2,"ngb-alert",22),b(29,"div",23)(30,"table",24)(31,"thead",25)(32,"tr")(33,"th",26),I(34,"User ID"),x(),b(35,"th"),I(36,"Username"),x(),b(37,"th"),I(38,"Display Name"),x(),b(39,"th",27),I(40,"Last Update"),x(),J(41,Lot,2,0,"th",28),x()(),b(42,"tbody"),J(43,Rot,3,0,"tr",29),J(44,Vot,11,6,"tr",30),x()()()),2&e&&(w(3),xn("",i.accountsCount," accounts found."),w(4),k("formGroup",i.searchForm),w(11),k("disabled",!i.f.filter.value||""===i.f.filter.value),w(6),k("disabled",0===i.accounts.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.accounts.length),w(1),k("ngForOf",i.accounts))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),zot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Uot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().exportAccount(r))}),ge(1,"img",16),I(2,"Export"),x()}}function Got(t,n){1&t&&(b(0,"span"),I(1,"Unban"),x())}function Wot(t,n){1&t&&(b(0,"span"),I(1,"Ban"),x())}function qot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().banUnbanAccount(r))}),ge(1,"img",17),J(2,Got,2,0,"span",18),J(3,Wot,2,0,"span",18),x()}if(2&t){const e=j();w(2),k("ngIf",e.account.disable_time),w(1),k("ngIf",!e.account.disable_time)}}function Xot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!1))}),ge(1,"img",20),I(2,"Delete"),x()}}function Yot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!0))}),ge(1,"img",21),I(2,"Recorded delete"),x()}}function Jot(t,n){if(1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const Kot=function(t,n){return["/accounts",t,n]};function Qot(t,n){if(1&t&&(b(0,"div"),ta(1,25),b(2,"a",26),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,Kot,i.account.user.id,e.path)),w(1),Dt(e.label)}}const Zot=function(){return["/accounts"]},est=function(){return["/storage"]},tst=function(t){return{user_id:t}};let nst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"account",void 0),K(this,"error",""),K(this,"views",[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rN.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Account"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Account"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,Uot,3,0,"button",7),J(12,qot,4,2,"button",7),J(13,Xot,3,0,"button",8),J(14,Yot,3,0,"button",8),x()(),J(15,Jot,4,2,"ngb-alert",9),b(16,"nav",10,11),J(18,Qot,4,6,"div",12),b(19,"div"),ta(20,13),b(21,"a",14),I(22," Storage "),x(),na(),x()(),ge(23,"router-outlet")),2&e&&(w(6),k("routerLink",wl(10,Zot)),w(3),Dt(i.account.user.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.banAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views),w(3),k("routerLink",wl(11,est))("queryParams",lr(12,tst,i.account.user.id)))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),ist=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const rst=["editor"];function ost(t,n){if(1&t&&(b(0,"ngb-alert",29),ge(1,"img",30),b(2,"h6",31),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function sst(t,n){1&t&&(b(0,"ngb-alert",32),ge(1,"img",33),b(2,"h6",31),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function ast(t,n){1&t&&(b(0,"button",34),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const lst=function(t){return{"is-invalid":t}};let cst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Do.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(rst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ost,4,2,"ngb-alert",0),J(1,sst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"User ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Username"),x()(),ge(13,"input",9),b(14,"div",10),I(15,"Username is required"),x()()(),b(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),I(20,"Display Name"),x()(),ge(21,"input",12),x(),b(22,"div",13)(23,"div",5)(24,"label",14),I(25,"Avatar URL"),x()(),ge(26,"input",15),x()(),b(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),I(31,"Location"),x()(),ge(32,"input",17),x(),b(33,"div",13)(34,"div",5)(35,"label",18),I(36,"Timezone"),x()(),ge(37,"input",19),x()(),b(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),I(42,"Create Time"),x()(),ge(43,"input",22),x(),b(44,"div",4)(45,"div",5)(46,"label",23),I(47,"Update Time"),x()(),ge(48,"input",24),x()(),b(49,"div",25),ge(50,"div",26,27),x(),J(52,ast,2,1,"button",28),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(6),k("value",i.account.user.id),w(5),k("ngClass",lr(9,lst,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(29),k("value",i.account.user.create_time),w(5),k("value",i.account.user.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Rh,gn,To,sl,Fa,rl,ol,Nf,fa,ja]})),t})();function ust(t,n){if(1&t&&(b(0,"ngb-alert",36),ge(1,"img",37),b(2,"h6",38),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function dst(t,n){1&t&&(b(0,"ngb-alert",39),ge(1,"img",40),b(2,"h6",38),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function hst(t,n){if(1&t&&(b(0,"option",41),I(1),x()),2&t){const e=n.$implicit,i=n.index;Fh("value",i),k("selected",0===i),w(1),Dt(e.id)}}function fst(t,n){1&t&&(b(0,"button",42),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}let pst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ust,4,2,"ngb-alert",0),J(1,dst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Device IDs"),x()(),b(8,"div",7)(9,"button",8),ye("click",function(){return i.copyDeviceIdToClipboard(i.f.selected_device_id_index.value)}),ge(10,"img",9),I(11," Copy "),x(),b(12,"select",10),J(13,hst,2,3,"option",11),x(),b(14,"div",12)(15,"button",13),ye("click",function(o){return i.unlinkDeviceId(o)}),I(16,"Unlink"),x()()()(),b(17,"div",4)(18,"div",5)(19,"label",14),I(20,"Custom ID"),x()(),b(21,"div",7),ge(22,"input",15),b(23,"div",12)(24,"button",13),ye("click",function(o){return i.unlinkCustomID(o)}),I(25,"Unlink"),x()()()()(),b(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),I(30,"Facebook ID"),x()(),b(31,"div",7),ge(32,"input",17),b(33,"div",12)(34,"button",13),ye("click",function(o){return i.unlinkFacebook(o)}),I(35,"Unlink"),x()()()(),b(36,"div",18)(37,"div",5)(38,"label",19),I(39,"FB Instant Game ID"),x()(),b(40,"div",7),ge(41,"input",20),b(42,"div",12)(43,"button",13),ye("click",function(o){return i.unlinkFacebookInstantGames(o)}),I(44,"Unlink"),x()()()()(),b(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),I(49,"Apple ID"),x()(),b(50,"div",7),ge(51,"input",22),b(52,"div",12)(53,"button",13),ye("click",function(o){return i.unlinkApple(o)}),I(54,"Unlink"),x()()()(),b(55,"div",18)(56,"div",5)(57,"label",23),I(58,"GameCenter ID"),x()(),b(59,"div",7),ge(60,"input",24),b(61,"div",12)(62,"button",13),ye("click",function(o){return i.unlinkGameCenter(o)}),I(63,"Unlink"),x()()()()(),b(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),I(68,"Google ID"),x()(),b(69,"div",7),ge(70,"input",26),b(71,"div",12)(72,"button",13),ye("click",function(o){return i.unlinkGoogle(o)}),I(73,"Unlink"),x()()()(),b(74,"div",4)(75,"div",5)(76,"label",27),I(77,"Steam ID"),x()(),b(78,"div",7),ge(79,"input",28),b(80,"div",12)(81,"button",13),ye("click",function(o){return i.unlinkSteam(o)}),I(82,"Unlink"),x()()()()(),b(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),I(87,"Email"),x(),ge(88,"br"),x(),ge(89,"input",30),x(),b(90,"div",4)(91,"div",5)(92,"label",31),I(93,"Password"),x()(),ge(94,"input",32),x()(),b(95,"div",33)(96,"div",4),ge(97,"div",5),b(98,"span",34),I(99),x()(),ge(100,"div",4),x(),J(101,fst,2,1,"button",35),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(11),k("ngForOf",i.account.devices),w(2),k("disabled",!i.updateAllowed()||0===i.account.devices.length),w(7),k("value",i.account.custom_id),w(2),k("disabled",!i.updateAllowed()||!i.account.custom_id||""===i.account.custom_id),w(8),k("value",i.account.user.facebook_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_id||""===i.account.user.facebook_id),w(7),k("value",i.account.user.facebook_instant_game_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_instant_game_id||""===i.account.user.facebook_instant_game_id),w(8),k("value",i.account.user.apple_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.apple_id||""===i.account.user.apple_id),w(7),k("value",i.account.user.gamecenter_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.gamecenter_id||""===i.account.user.gamecenter_id),w(8),k("value",i.account.user.google_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.google_id||""===i.account.user.google_id),w(7),k("value",i.account.user.steam_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.steam_id||""===i.account.user.steam_id),w(18),xn("Verification Status: ",null===i.account.verify_time?"Not Verified":"Verified",""),w(2),k("ngIf",i.updateAllowed()))},dependencies:[jn,gn,To,sl,xy,wy,Fa,ov,rl,ol,fa,ja],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})),t})();const mst=["editor"];function gst(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vst(t,n){1&t&&(b(0,"ngb-alert",27),ge(1,"img",28),b(2,"h6",26),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function yst(t,n){if(1&t){const e=vt();b(0,"button",29),ye("click",function(){return $e(e),Be(j().updateWallet())}),I(1,"Save"),x()}2&t&&k("disabled",j().updating)}function bst(t,n){1&t&&(b(0,"th",30),I(1,"Remove"),x())}function _st(t,n){1&t&&(b(0,"tr")(1,"td",31),I(2,"No wallet ledger items found."),x()())}function xst(t,n){1&t&&ge(0,"div",37)}function wst(t,n){1&t&&ge(0,"div",38)}function Cst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLedgerItem(r,s,a))}),I(2,"Delete"),x()()}}function kst(t,n){if(1&t&&(b(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Sst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=$e(e).index,s=j();return Be(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),J(3,xst,1,0,"div",33),J(4,wst,1,0,"div",34),x(),I(5),x(),b(6,"td",35)(7,"pre",36),I(8),x()(),b(9,"td"),I(10),x(),J(11,Cst,3,0,"td",22),x(),J(12,kst,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),k("ngIf",r.walletLedgerMetadataOpen[e]),w(1),xn(" ",i.id," "),w(3),Dt(i.changeset),w(2),Dt(i.update_time),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.walletLedgerMetadataOpen[e])}}let Dst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"walletLedger",[]),K(this,"walletLedgerMetadataOpen",[]),K(this,"updating",!1),K(this,"updated",!1),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"limit",100),K(this,"userID",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,gst,4,2,"ngb-alert",0),J(1,vst,4,1,"ngb-alert",1),b(2,"div",2),ge(3,"div",3,4),x(),J(5,yst,2,1,"button",5),ge(6,"hr",6),b(7,"div",7)(8,"div",8),ge(9,"div",9),b(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return i.loadData("")}),ge(13,"img",13),x(),b(14,"button",12),ye("click",function(){return i.loadData(i.prevCursor)}),ge(15,"img",14),x(),b(16,"button",12),ye("click",function(){return i.loadData(i.nextCursor)}),ge(17,"img",15),x()()()()(),b(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),I(23,"ID"),x(),b(24,"th"),I(25,"Changeset"),x(),b(26,"th",20),I(27,"Update Time"),x(),J(28,bst,2,0,"th",21),x()(),b(29,"tbody"),J(30,_st,3,0,"tr",22),J(31,Sst,13,7,"ng-template",23),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(4),k("ngIf",i.updateAllowed()),w(7),k("disabled",0===i.walletLedger.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(12),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.walletLedger.length),w(1),k("ngForOf",i.walletLedger))},dependencies:[jn,gn,To],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})),t})(),Tst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Est(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Ast(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Mst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No friends found."),x()())}function Ist(t,n){1&t&&(b(0,"span"),I(1,"Friend (0)"),x())}function Nst(t,n){1&t&&(b(0,"span"),I(1,"Invite Sent (1)"),x())}function Fst(t,n){1&t&&(b(0,"span"),I(1,"Invite Received (2)"),x())}function Ost(t,n){1&t&&(b(0,"span"),I(1,"Blocked (3)"),x())}function jst(t,n){if(1&t){const e=vt();b(0,"td",16)(1,"button",17),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteFriend(r,s,a))}),I(2,"Delete"),x()()}}function Pst(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),J(6,Ist,2,0,"span",8),J(7,Nst,2,0,"span",8),J(8,Fst,2,0,"span",8),J(9,Ost,2,0,"span",8),x(),b(10,"td"),I(11),x(),J(12,jst,3,0,"td",15),x()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Lst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"friends",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,Est,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"User ID"),x(),b(7,"th"),I(8,"Username"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Ast,2,0,"th",7),x()(),b(14,"tbody"),J(15,Mst,3,0,"tr",8),J(16,Pst,13,8,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.friends.length),w(1),k("ngForOf",i.friends))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Rst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function $st(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Bst(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Vst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No group membership found."),x()())}function Hst(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function zst(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function Ust(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function Gst(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function Wst(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function qst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",16),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function Xst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,Hst,2,0,"span",8),J(7,zst,2,0,"span",8),J(8,Ust,2,0,"span",8),J(9,Gst,2,0,"span",8),J(10,Wst,2,0,"span",8),x(),b(11,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,qst,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.group.id),w(2),Dt(e.group.name),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.group.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Yst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"groups",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,$st,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"Group ID"),x(),b(7,"th"),I(8,"Name"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Bst,2,0,"th",7),x()(),b(14,"tbody"),J(15,Vst,3,0,"tr",8),J(16,Xst,14,9,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Jst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Kst=["editor"];function Qst(t,n){if(1&t&&(b(0,"ngb-alert",34),ge(1,"img",35),b(2,"h6",36),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Zst(t,n){1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",36),I(3,"Group was modified successfully."),x()()),2&t&&k("dismissible",!1)}function eat(t,n){1&t&&(b(0,"button",39),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const tat=function(t){return["/accounts",t]},nat=function(t){return{"is-invalid":t}};let iat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"groupForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Do.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(Kst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,Qst,4,2,"ngb-alert",0),J(1,Zst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateGroup()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Group ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Creator ID"),x()(),b(13,"a",9),ge(14,"input",10),x()()(),b(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),I(19,"Name"),x()(),ge(20,"input",12),b(21,"div",13),I(22,"Name is required"),x()(),b(23,"div",4)(24,"div",5)(25,"label",14),I(26,"Description"),x()(),ge(27,"input",15),x()(),b(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),I(32,"Avatar URL"),x()(),ge(33,"input",18),x(),b(34,"div",4)(35,"div",5)(36,"label",19),I(37,"Language"),x()(),ge(38,"input",20),x()(),b(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),I(43,"Members"),x()(),ge(44,"input",21),x(),b(45,"div",16)(46,"div",5)(47,"label",22),I(48,"Max Count"),x()(),ge(49,"input",23),x()(),b(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),I(54,"Open"),x()(),ge(55,"input",24),x()(),b(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),I(60,"Create Time"),x()(),ge(61,"input",27),x(),b(62,"div",4)(63,"div",5)(64,"label",28),I(65,"Update Time"),x()(),ge(66,"input",29),x()(),b(67,"div",30),ge(68,"div",31,32),x(),J(70,eat,2,1,"button",33),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.groupForm),w(6),k("value",i.group.id),w(5),k("routerLink",lr(12,tat,i.group.creator_id)),w(1),k("value",i.group.creator_id),w(6),k("ngClass",lr(14,nat,i.f.name.dirty&&i.f.name.errors)),w(1),k("hidden",i.f.name.disabled||i.f.name.valid||i.f.name.pristine),w(23),k("value",i.group.edge_count),w(17),k("value",i.group.create_time),w(5),k("value",i.group.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Nu,Rh,gn,To,sl,Fa,aC,rl,ol,Nf,fa,ja]})),t})();function rat(t,n){if(1&t&&(b(0,"ngb-alert",13),ge(1,"img",14),b(2,"h6",15),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function oat(t,n){1&t&&(b(0,"span"),I(1,"Add by membership state"),x())}function sat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j(2);w(1),Dt(e.activeState)}}function aat(t,n){if(1&t){const e=vt();b(0,"button",20),ye("click",function(){const o=$e(e).$implicit;return Be(j(2).activeState=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function lat(t,n){if(1&t&&(b(0,"div",16)(1,"button",17),J(2,oat,2,0,"span",11),J(3,sat,2,1,"span",11),x(),b(4,"div",18),J(5,aat,2,1,"button",19),x()()),2&t){const e=j();w(2),k("ngIf",!e.activeState||""===e.activeState),w(1),k("ngIf",e.activeState&&""!==e.activeState),w(2),k("ngForOf",e.states)}}function cat(t,n){if(1&t){const e=vt();b(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ge(5,"input",26),b(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return $e(e),Be(j().add())}),I(9,"Add"),x()()()()()()()()}if(2&t){const e=j();w(3),k("formGroup",e.addForm)}}function uat(t,n){1&t&&(b(0,"th",30),I(1,"Demote"),x())}function dat(t,n){1&t&&(b(0,"th",30),I(1,"Promote"),x())}function hat(t,n){1&t&&(b(0,"th",31),I(1,"Remove"),x())}function fat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No group membership found."),x()())}function pat(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function mat(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function gat(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function vat(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function yat(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function bat(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().demoteGroupUser(r,s,a))}),at(),b(2,"svg",38),ge(3,"path",39),x()()()}}function _at(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().promoteGroupUser(r,s,a))}),at(),b(2,"svg",40),ge(3,"path",41),x()()()}}function xat(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function wat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,pat,2,0,"span",11),J(7,mat,2,0,"span",11),J(8,gat,2,0,"span",11),J(9,vat,2,0,"span",11),J(10,yat,2,0,"span",11),x(),b(11,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,bat,4,0,"td",34),J(14,_at,4,0,"td",34),J(15,xat,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.user.update_time),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed())}}let Cat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"members",[]),K(this,"activeState","Add Member"),K(this,"states",["Add Member","Join"]),K(this,"addForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,rat,4,2,"ngb-alert",0),J(1,lat,6,3,"div",1),J(2,cat,10,1,"div",2),b(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),I(8,"User ID"),x(),b(9,"th"),I(10,"Name"),x(),b(11,"th",7),I(12,"State"),x(),b(13,"th",8),I(14,"Update Time"),x(),J(15,uat,2,0,"th",9),J(16,dat,2,0,"th",9),J(17,hat,2,0,"th",10),x()(),b(18,"tbody"),J(19,fat,3,0,"tr",11),J(20,wat,16,11,"tr",12),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",!i.group.open&&i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(13),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(2),k("ngIf",0===i.members.length),w(1),k("ngForOf",i.members))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),kat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sat(t,n){if(1&t&&(b(0,"ngb-alert",28),ge(1,"img",29),b(2,"h6",30),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Dat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeType)}}function Tat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeType=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Eat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeNode)}}function Aat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeNode=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Mat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No realtime matches were found."),x()())}function Iat(t,n){1&t&&ge(0,"div",40)}function Nat(t,n){1&t&&ge(0,"div",41)}function Fat(t,n){if(1&t){const e=vt();b(0,"div",37),ye("click",function(){$e(e);const r=j(),o=r.index,s=r.$implicit,a=j();return a.getMatchState(o,s),Be(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),J(1,Iat,1,0,"div",38),J(2,Nat,1,0,"div",39),x()}if(2&t){const e=j().index,i=j();w(1),k("ngIf",!i.matchStatesOpen[e]),w(1),k("ngIf",i.matchStatesOpen[e])}}function Oat(t,n){1&t&&ge(0,"div",42)}function jat(t,n){1&t&&(b(0,"span"),I(1,"Yes"),x())}function Pat(t,n){1&t&&(b(0,"span"),I(1,"No"),x())}function Lat(t,n){1&t&&ge(0,"img",51)}function Rat(t,n){if(1&t&&(b(0,"div")(1,"small")(2,"b"),I(3,"Current Tick"),x()(),b(4,"pre",47)(5,"small"),I(6),x()(),b(7,"small")(8,"b"),I(9,"Match State"),x()(),b(10,"pre",47)(11,"small"),I(12),x()()()),2&t){const e=j(2).index,i=j();w(6),Dt(i.matchStates[e].tick),w(6),Dt(i.matchStates[e].state)}}function $at(t,n){1&t&&ge(0,"img",51)}function Bat(t,n){if(1&t&&(b(0,"pre",47)(1,"small"),I(2),x()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.getMatchPresencesString(i.matchStates[e].presences))}}function Vat(t,n){if(1&t&&(b(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),I(6,"Match Label"),x()(),b(7,"pre",47)(8,"small"),I(9),x()()(),b(10,"div",48),J(11,Lat,1,0,"img",49),J(12,Rat,13,2,"div",7),x(),b(13,"div",48)(14,"small")(15,"b"),I(16,"Match Presences"),x()(),J(17,$at,1,0,"img",49),J(18,Bat,3,1,"pre",50),x()()()()),2&t){const e=j(),i=e.$implicit,r=e.index,o=j();w(9),Dt(i.api_match.label),w(2),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r]),w(5),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r])}}function Hat(t,n){if(1&t&&(b(0,"tr")(1,"td"),J(2,Fat,3,2,"div",33),J(3,Oat,1,0,"div",34),I(4),x(),b(5,"td"),I(6),x(),b(7,"td",35),J(8,jat,2,0,"span",7),J(9,Pat,2,0,"span",7),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x()(),J(16,Vat,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=j();w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(1),xn(" ",i.api_match.match_id," "),w(2),Dt(i.api_match.size),w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(2),Dt(i.node),w(2),Dt(i.api_match.handler_name),w(2),Dt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),k("ngIf",r.matchStatesOpen[e])}}let zat=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"formBuilder",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"matches",[]),K(this,"matchStates",[]),K(this,"matchStatesOpen",[]),K(this,"updated",!1),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"activeType","All"),K(this,"types",["All","Authoritative","Relayed"]),K(this,"activeNode","All Nodes"),K(this,"nodes",["All Nodes"]),this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));let i=e.get("type");this.type=Number(i);let r=e.get("node");if(this.route.data.subscribe(o=>{console.log(o),o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1==this.type||2==this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,Xme(this.consoleService,e,0==e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Tl),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Active Matches"),x(),b(2,"h6",1),I(3),x(),J(4,Sat,4,2,"ngb-alert",2),b(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),J(9,Dat,2,1,"span",7),x(),b(10,"div",8),J(11,Tat,2,1,"button",9),x()()(),b(12,"div",10)(13,"button",11),ye("click",function(){return i.search()}),I(14,"Search"),x()()(),b(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return i.search()}),b(19,"div",16),ge(20,"input",17),x()(),b(21,"form",15),ye("ngSubmit",function(){return i.search()}),b(22,"div",16),ge(23,"input",17),x()(),b(24,"form",15),ye("ngSubmit",function(){return i.search()}),b(25,"div",16),ge(26,"input",18),b(27,"div",10)(28,"div",5)(29,"button",19),J(30,Eat,2,1,"span",7),x(),b(31,"div",8),J(32,Aat,2,1,"button",9),x()()()()()()()(),b(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),I(39,"Match ID"),x()(),b(40,"th",23),I(41,"Presence Count"),x(),b(42,"th",24),I(43,"Authoritative"),x(),b(44,"th",24),I(45,"Node"),x(),b(46,"th",25),I(47,"Handler Name"),x(),b(48,"th",26),I(49,"Tick Rate"),x()()(),b(50,"tbody"),J(51,Mat,3,0,"tr",7),J(52,Hat,17,10,"ng-template",27),x()()()),2&e&&(w(3),xn("",i.matches.length," running matches found."),w(1),k("ngIf",i.error),w(5),k("ngIf",i.activeType&&""!==i.activeType),w(2),k("ngForOf",i.types),w(7),k("hidden","All"!==i.activeType)("formGroup",i.searchForm1),w(3),k("hidden","Relayed"!==i.activeType)("formGroup",i.searchForm2),w(3),k("hidden","Authoritative"!==i.activeType)("formGroup",i.searchForm3),w(6),k("ngIf",i.activeNode&&""!==i.activeNode),w(2),k("ngForOf",i.nodes),w(6),Mn("pl-3",i.matches.length>0),w(13),k("ngIf",0===i.matches.length),w(1),k("ngForOf",i.matches))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),Uat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));return Xme(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Xme(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $n(null)}let Gat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Wat(t,n){if(1&t&&(b(0,"ngb-alert",25),ge(1,"img",26),b(2,"h6",27),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying groups: ",e.error,"")}}function qat(t,n){1&t&&(b(0,"th",28),I(1,"Remove"),x())}function Xat(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No groups found - change the filter criteria or add new user groups."),x()())}function Yat(t,n){1&t&&ge(0,"td")}function Jat(t,n){if(1&t){const e=vt();b(0,"td",32)(1,"button",33),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroup(r,s,a))}),I(2,"Delete"),x()()}}function Kat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(2),x(),b(3,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(4),x(),b(5,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(6),x(),J(7,Yat,1,0,"td",23),J(8,Jat,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Qat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"groupsCount",0),K(this,"groups",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Groups"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return i.search(0)}),I(13,"Search"),x()()()()()(),b(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return i.search(0)}),ge(17,"img",14),x(),b(18,"button",13),ye("click",function(){return i.search(1)}),ge(19,"img",15),x()()()()(),J(20,Wat,4,2,"ngb-alert",16),b(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),I(26,"Group ID"),x(),b(27,"th"),I(28,"Name"),x(),b(29,"th",21),I(30,"Last Update"),x(),J(31,qat,2,0,"th",22),x()(),b(32,"tbody"),J(33,Xat,3,0,"tr",23),J(34,Kat,9,5,"tr",24),x()()()),2&e&&(w(3),xn("",i.groupsCount," groups found."),w(4),k("formGroup",i.searchForm),w(9),k("disabled",0===i.groups.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(11),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Zat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function elt(t,n){if(1&t){const e=vt();b(0,"button",13),ye("click",function(r){return $e(e),Be(j().exportGroup(r))}),ge(1,"img",14),I(2,"Export"),x()}}function tlt(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().deleteGroup(r,!1))}),ge(1,"img",16),I(2,"Delete"),x()}}function nlt(t,n){if(1&t&&(b(0,"ngb-alert",17),ge(1,"img",18),b(2,"h6",19),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ilt=function(t,n){return["/groups",t,n]};function rlt(t,n){if(1&t&&(b(0,"div"),ta(1,20),b(2,"a",21),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ilt,i.group.id,e.path)),w(1),Dt(e.label)}}const olt=function(){return["/groups"]};let slt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"group",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Members",path:"members"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rN.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Group"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Group"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,elt,3,0,"button",7),J(12,tlt,3,0,"button",8),x()(),J(13,nlt,4,2,"ngb-alert",9),b(14,"nav",10,11),J(16,rlt,4,6,"div",12),x(),ge(17,"router-outlet")),2&e&&(w(6),k("routerLink",wl(6,olt)),w(3),Dt(i.group.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),alt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function llt(t,n){if(1&t){const e=vt();b(0,"button",12),ye("click",function(r){return $e(e),Be(j().deleteLeaderboard(r))}),ge(1,"img",13),I(2,"Delete Leaderboard"),x()}}function clt(t,n){if(1&t&&(b(0,"ngb-alert",14),ge(1,"img",15),b(2,"h6",16),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ult=function(t,n){return["/leaderboards",t,n]};function dlt(t,n){if(1&t&&(b(0,"div"),ta(1,17),b(2,"a",18),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ult,i.leaderboard.id,e.path)),w(1),Dt(e.label)}}const hlt=function(){return["/leaderboards"]};let flt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"leaderboard",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Records",path:"records"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Leaderboard"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Leaderboards"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,llt,3,0,"button",7),x()(),J(12,clt,4,2,"ngb-alert",8),b(13,"nav",9,10),J(15,dlt,4,6,"div",11),x(),ge(16,"router-outlet")),2&e&&(w(6),k("routerLink",wl(5,hlt)),w(3),Dt(i.leaderboard.id),w(2),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),plt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const mlt=["editor"];function glt(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vlt(t,n){if(1&t&&(b(0,"div",27)(1,"h6"),I(2,"Tournament"),x(),ge(3,"hr",28),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),I(8,"Title"),x()(),ge(9,"input",30),x(),b(10,"div",3)(11,"div",4)(12,"label",31),I(13,"Description"),x()(),ge(14,"input",32),x()(),b(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),I(19,"Category"),x()(),ge(20,"input",34),x(),b(21,"div",3)(22,"div",4)(23,"label",35),I(24,"Max Num Score"),x()(),ge(25,"input",36),x()(),b(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),I(30,"Size"),x()(),ge(31,"input",38),x(),b(32,"div",3)(33,"div",4)(34,"label",39),I(35,"Max Size"),x()(),ge(36,"input",40),x()(),b(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),I(41,"Duration"),x()(),ge(42,"input",42),x(),b(43,"div",3)(44,"div",4)(45,"label",43),I(46,"Join Required"),x()(),ge(47,"input",44),x()(),b(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),I(52,"Start Time"),x()(),ge(53,"input",46),x(),b(54,"div",3)(55,"div",4)(56,"label",47),I(57,"End Time"),x()(),ge(58,"input",48),x()(),b(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),I(63,"Start Active"),x()(),ge(64,"input",50),x(),b(65,"div",3)(66,"div",4)(67,"label",51),I(68,"End Active"),x()(),ge(69,"input",52),x()()()),2&t){const e=j();w(9),k("value",e.leaderboard.title),w(5),k("value",e.leaderboard.description),w(6),k("value",e.leaderboard.category),w(5),k("value",e.leaderboard.max_num_score),w(6),k("value",e.leaderboard.size),w(5),k("value",e.leaderboard.max_size),w(6),k("value",e.leaderboard.duration),w(5),k("value",e.leaderboard.join_required),w(6),k("value",e.leaderboard.start_time),w(5),k("value",e.leaderboard.end_time),w(6),k("value",e.leaderboard.start_active),w(5),k("value",e.leaderboard.end_active)}}let ylt=(()=>{class t{constructor(e){K(this,"route",void 0),K(this,"editor",void 0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),K(this,"jsonEditor",void 0),K(this,"leaderboard",void 0),K(this,"error",""),this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mlt,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(e,i){1&e&&(J(0,glt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),I(6,"ID"),x()(),ge(7,"input",6),x(),b(8,"div",3)(9,"div",4)(10,"label",7),I(11,"Authoritative"),x()(),ge(12,"input",8),x()(),b(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),I(17,"Sort Order"),x()(),ge(18,"input",10),x(),b(19,"div",3)(20,"div",4)(21,"label",11),I(22,"Operator"),x()(),ge(23,"input",12),x()(),b(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),I(28,"Reset Schedule"),x()(),ge(29,"input",14),x(),b(30,"div",3)(31,"div",4)(32,"label",15),I(33,"Create Time"),x()(),ge(34,"input",16),x()(),b(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),I(39,"Prev Reset"),x()(),ge(40,"input",18),x(),b(41,"div",3)(42,"div",4)(43,"label",15),I(44,"Next Reset"),x()(),ge(45,"input",19),x()()(),J(46,vlt,70,12,"div",20),b(47,"div",21),ge(48,"div",22,23),x()),2&e&&(k("ngIf",i.error),w(7),k("value",i.leaderboard.id),w(5),k("value",i.leaderboard.authoritative),w(6),k("value",i.orderString[i.leaderboard.sort_order]),w(5),k("value",i.operatorString[i.leaderboard.operator]),w(6),k("value",i.leaderboard.reset_schedule),w(5),k("value",i.leaderboard.create_time),w(6),k("value",i.leaderboard.prev_reset),w(5),k("value",i.leaderboard.next_reset),w(1),k("ngIf",i.leaderboard.tournament))},dependencies:[gn,To],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})();function blt(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function _lt(t,n){1&t&&(b(0,"th",22),I(1,"Remove"),x())}function xlt(t,n){1&t&&(b(0,"tr")(1,"td",23),I(2,"No records found."),x()())}function wlt(t,n){1&t&&ge(0,"div",28)}function Clt(t,n){1&t&&ge(0,"div",29)}function klt(t,n){if(1&t){const e=vt();b(0,"td",30)(1,"button",31),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteRecord(r,s,a))}),I(2,"Delete"),x()()}}function Slt(t,n){if(1&t&&(b(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Dlt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=$e(e).index,s=j();return Be(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),J(3,wlt,1,0,"div",25),J(4,Clt,1,0,"div",26),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x(),b(16,"td"),I(17),x(),J(18,klt,3,0,"td",27),x(),J(19,Slt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.recordsMetadataOpen[e]),w(1),k("ngIf",r.recordsMetadataOpen[e]),w(1),xn(" ",i.owner_id," "),w(2),Dt(i.username),w(2),Dt(i.score),w(2),Dt(i.subscore),w(2),Dt(i.rank),w(2),Dt(i.num_score),w(2),Dt(i.expiry_time?i.expiry_time:"-"),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.recordsMetadataOpen[e])}}let Tlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"leaderboard",void 0),K(this,"records",[]),K(this,"recordsMetadataOpen",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),this.route=e,this.consoleService=i,this.authService=r}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,blt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadRecords(0)}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadRecords(-1)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadRecords(1)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),I(17,"Owner ID"),x(),b(18,"th"),I(19,"Username"),x(),b(20,"th",14),I(21,"Score"),x(),b(22,"th",14),I(23,"Subscore"),x(),b(24,"th",14),I(25,"Rank"),x(),b(26,"th",14),I(27,"No. of scores"),x(),b(28,"th",15),I(29,"Expiry Time"),x(),J(30,_lt,2,0,"th",16),x()(),b(31,"tbody"),J(32,xlt,3,0,"tr",17),J(33,Dlt,20,11,"ng-template",18),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.records.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(20),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.records.length),w(1),k("ngForOf",i.records))},dependencies:[jn,gn,To]})),t})(),Elt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Alt=["editor"],Mlt=["editorResponse"];function Ilt(t,n){if(1&t&&(b(0,"ngb-alert",23),ge(1,"img",24),b(2,"h6",25),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error whilst making RPC call: ",e.error,"")}}function Nlt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Fh("value",e.method),w(1),Dt(e.method)}}function Flt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Fh("value",e.method),w(1),Dt(e.method)}}let Olt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"editorResponse",void 0),K(this,"jsonEditor",void 0),K(this,"jsonEditorResponse",void 0),K(this,"error",""),K(this,"rpcEndpoints",[]),K(this,"endpoints",[]),K(this,"endpointCallForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Do.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0}}),this.jsonEditorResponse=new Zm({target:this.editorResponse.nativeElement,props:{mode:Jo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return void(this.error=o)}const i={user_id:this.f.user_id.value,body:e};let r=null;r=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,i):this.consoleService.callApiEndpoint("",this.f.method.value,i),r.subscribe(o=>{if(o.error_message&&""!==o.error_message)this.jsonEditorResponse.set({json:o.error_message});else{e="";try{e=JSON.stringify(JSON.parse(o.body),null,2)}catch(s){return void(this.error=s)}this.jsonEditorResponse.set({text:e})}},o=>{this.jsonEditorResponse.set({text:""}),this.error=o})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditor){if(!e||""===e)return this.jsonEditor.set({text:""}),void this.jsonEditor.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditor.set({text:i}),this.jsonEditor.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}else console.log("problem?")}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&(io(Alt,5),io(Mlt,5)),2&e){let r;cn(r=un())&&(i.editor=r.first),cn(r=un())&&(i.editorResponse=r.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"API Explorer"),x(),J(2,Ilt,4,2,"ngb-alert",1),b(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return i.sendRequest()}),b(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),I(11,"Select Endpoint"),x(),J(12,Nlt,2,2,"option",10),b(13,"option",11),I(14,"----"),x(),J(15,Flt,2,2,"option",10),x()(),ge(16,"input",12),b(17,"div",13)(18,"button",14),I(19,"Send Request"),x()()()()()()(),b(20,"div",15)(21,"div",16)(22,"h5"),I(23,"Request Body"),x(),ge(24,"hr",17),b(25,"div",18),ge(26,"div",19,20),x()(),b(28,"div",21)(29,"h5"),I(30,"Response"),x(),ge(31,"hr",17),b(32,"div",18),ge(33,"div",19,22),x()()()),2&e&&(w(2),k("ngIf",i.error),w(4),k("formGroup",i.endpointCallForm),w(4),k("value",""),w(2),k("ngForOf",i.rpcEndpoints),w(3),k("ngForOf",i.endpoints),w(3),k("disabled",i.f.method.invalid))},dependencies:[jn,gn,To,sl,xy,wy,Fa,ov,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})),t})(),jlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Plt(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Llt(t,n){1&t&&ge(0,"div",23)}function Rlt(t,n){1&t&&ge(0,"div",24)}function $lt(t,n){if(1&t&&(b(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),I(6,"Provider Response"),x()()(),b(7,"div")(8,"pre",28)(9,"small"),I(10),x()()()()()()),2&t){const e=j().$implicit;w(10),Dt(e.provider_response)}}function Blt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=$e(e).index,s=j();return Be(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),J(3,Llt,1,0,"div",20),J(4,Rlt,1,0,"div",21),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x()(),J(14,$lt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.purchasesRowsOpen[e]),w(1),k("ngIf",r.purchasesRowsOpen[e]),w(1),xn(" ",i.product_id," "),w(2),Dt(i.transaction_id),w(2),Dt(r.getStoreText(i.store)),w(2),Dt(i.purchase_time),w(2),Dt(i.create_time),w(1),k("ngIf",r.purchasesRowsOpen[e])}}function Vlt(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No purchases were found."),x()())}let Hlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"purchases",[]),K(this,"purchasesRowsOpen",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.purchases=e[0].validated_purchases,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listPurchases("",this.userID,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-purchases"]],decls:29,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"]],template:function(e,i){1&e&&(J(0,Plt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Create Time"),x()()(),b(26,"tbody"),J(27,Blt,15,8,"ng-template",14),J(28,Vlt,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.purchases.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(17),k("ngForOf",i.purchases),w(1),k("ngIf",0===i.purchases.length))},dependencies:[jn,gn,To]})),t})(),zlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listPurchases("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Ult(t,n){1&t&&(b(0,"span"),I(1,"Filter by type"),x())}function Glt(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeFilter)}}function Wlt(t,n){if(1&t){const e=vt();b(0,"button",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeFilter=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function qlt(t,n){if(1&t&&(b(0,"h6"),I(1),x()),2&t){const e=j();w(1),xn("Showing results for chat room label: ",e.f1.label.value,"")}}const Xlt=function(t){return["/groups",t]};function Ylt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for group ID: "),b(2,"a",41),I(3),x()()),2&t){const e=j();w(2),k("routerLink",lr(2,Xlt,e.route.snapshot.queryParamMap.get("group_id"))),w(1),Dt(e.f2.group_id.value)}}const Yme=function(t){return["/accounts",t]};function Jlt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for user IDs: "),b(2,"a",41),I(3),x(),I(4,", "),b(5,"a",41),I(6),x()()),2&t){const e=j();w(2),k("routerLink",lr(4,Yme,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),Dt(e.f3.user_id_one.value),w(2),k("routerLink",lr(6,Yme,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),Dt(e.f3.user_id_two.value)}}function Klt(t,n){if(1&t&&(b(0,"ngb-alert",42),ge(1,"img",43),b(2,"h6",44),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying messages: ",e.error,"")}}function Qlt(t,n){1&t&&(b(0,"th",45),I(1,"Remove"),x())}function Zlt(t,n){if(1&t&&(b(0,"tr")(1,"td",46),I(2,"No messages found."),x()()),2&t){const e=j();w(1),ht("colspan",e.deleteAllowed()?6:5)}}function ect(t,n){1&t&&ge(0,"div",55)}function tct(t,n){1&t&&ge(0,"div",56)}function nct(t,n){1&t&&ge(0,"td")}function ict(t,n){if(1&t){const e=vt();b(0,"td",57)(1,"button",58),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteMessage(r,s,a))}),I(2,"Delete"),x()()}}function rct(t,n){if(1&t&&(b(0,"tr",59)(1,"td"),I(2),x()()),2&t){const e=j().$implicit,i=j();w(1),ht("colspan",i.deleteAllowed()?6:5),w(1),xn(" ",e.content," ")}}function oct(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td",47),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",48),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",49)(8,"div",50),ye("click",function(){const o=$e(e).index,s=j();return Be(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),J(9,ect,1,0,"div",51),J(10,tct,1,0,"div",52),x(),I(11),x(),b(12,"td"),I(13),x(),J(14,nct,1,0,"td",3),J(15,ict,3,0,"td",53),x(),J(16,rct,3,2,"tr",54)}if(2&t){const e=n.$implicit,i=n.index,r=j();w(2),Dt(e.code),w(2),Dt(e.sender_id),w(2),Dt(e.username),w(3),k("ngIf",!r.messageStatesOpen[i]),w(1),k("ngIf",r.messageStatesOpen[i]),w(1),xn(" ",e.content," "),w(2),Dt(e.create_time),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),k("ngIf",r.messageStatesOpen[i])}}function sct(t,n){if(1&t&&(b(0,"ngb-alert",60),ge(1,"img",43),b(2,"h6",44),I(3,"Failed to delete data."),x(),b(4,"p",61),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.deleteError)}}function act(t,n){if(1&t){const e=vt();b(0,"ngb-alert",62),ye("close",function(){return $e(e),Be(j().deleteSuccess=!1)}),ge(1,"img",63),b(2,"h6",44),I(3),x()()}if(2&t){const e=j();k("dismissible",!0),w(3),Ld("",e.total_deleted," messages ",e.total_deleted>0?"successfully":""," deleted.")}}const lct=function(t){return{"is-invalid":t}};function cct(t,n){if(1&t){const e=vt();b(0,"div",64)(1,"h5",65),I(2,"Delete messages"),x(),b(3,"button",66),ye("click",function(){return Be($e(e).$implicit.dismiss())}),b(4,"span",67),I(5,"\xd7"),x()()(),b(6,"div",68)(7,"div",69)(8,"form",70)(9,"div",71)(10,"p")(11,"b"),I(12,"Choose how many days to retain: "),x(),ge(13,"input",72),x()(),ge(14,"input",73),x()()(),b(15,"div",74)(16,"button",75),ye("click",function(){return Be($e(e).$implicit.dismiss())}),I(17,"Cancel"),x(),b(18,"button",76),ye("click",function(){return Be($e(e).$implicit.close())}),I(19,"DELETE"),x()()}if(2&t){const e=j();w(8),k("formGroup",e.confirmDeleteForm),w(6),k("ngClass",lr(3,lct,e.f.delete.touched&&e.f.delete.invalid)),w(4),k("disabled",e.f.delete.invalid)}}function uct(t,n){if(1&t){const e=vt();b(0,"button",76),ye("click",function(){$e(e);const r=j(),o=uo(68);return Be(r.openDeleteDataModal(o))}),I(1,"Delete messages"),x()}2&t&&k("disabled",j().deleting)}let dct=(()=>{class t{constructor(e,i,r,o,s,a){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"modalService",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"messages",[]),K(this,"nextCursor",""),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"confirmDeleteForm",void 0),K(this,"deleteError",""),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"total_deleted",0),K(this,"activeFilter",""),K(this,"filters",["Chat Room","Group Chat","Direct Chat"]),K(this,"messageStatesOpen",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])],days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");let i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2==this.type||3==this.type||4==this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}deleteData(){this.deleteError="",this.deleting=!0;let e=new Date;e.setDate(e.getDate()-this.f.days.value),this.consoleService.deleteChannelMessages("",e.toISOString(),null).subscribe(i=>{this.total_deleted=Number(i.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const r=this.route.snapshot.queryParamMap;let o=r.get("type"),s=r.get("label");s||(s="0");let a=r.get("group_id"),l=r.get("user_id_one"),c=r.get("user_id_two"),u=r.get("cursor");u||(u=""),o&&this.updateMessages(Number(o),s,a,l,c,u)},i=>{this.deleting=!1,this.deleteError=i})}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl),le(H3))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:70,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["confirmDelete",""],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],[1,"mt-2"],["type","number","value","30","min","0","formControlName","days",2,"width","80px"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Chat Messages"),x(),b(2,"div",1)(3,"button",2),J(4,Ult,2,0,"span",3),J(5,Glt,2,1,"span",3),x(),b(6,"div",4),J(7,Wlt,2,1,"button",5),x()(),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ge(13,"input",11),b(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return i.type=2,i.search(0)}),I(17,"Search"),x()()()()(),b(18,"form",9)(19,"div",10),ge(20,"input",15),b(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return i.type=3,i.search(0)}),I(24,"Search "),x()()()()(),b(25,"form",9)(26,"div",10),ge(27,"input",16),b(28,"div",12)(29,"span",17),ye("click",function(){return i.f3.user_id_one.setValue(i.systemUserId)}),ge(30,"img",18),x()(),ge(31,"input",19),b(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return i.type=4,i.search(0)}),I(35,"Search "),x()()()()()(),b(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return i.search(0)}),ge(39,"img",23),x(),b(40,"button",22),ye("click",function(){return i.search(1)}),ge(41,"img",24),x()()()()(),J(42,qlt,2,1,"h6",3),J(43,Ylt,4,4,"h6",3),J(44,Jlt,7,8,"h6",3),J(45,Klt,4,2,"ngb-alert",25),b(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),I(51,"Code"),x(),b(52,"th",30),I(53,"Sender ID"),x(),b(54,"th",31),I(55,"Username"),x(),b(56,"th"),I(57,"Content"),x(),b(58,"th",32),I(59,"Create Time"),x(),J(60,Qlt,2,0,"th",33),x()(),b(61,"tbody"),J(62,Zlt,3,1,"tr",3),J(63,oct,17,10,"ng-template",34),x()()(),J(64,sct,6,2,"ngb-alert",35),J(65,act,4,3,"ngb-alert",36),b(66,"div",37),J(67,cct,20,5,"ng-template",null,38,Ur),J(69,uct,2,1,"button",39),x()),2&e&&(w(4),k("ngIf",!i.activeFilter||""===i.activeFilter),w(1),k("ngIf",i.activeFilter&&""!==i.activeFilter),w(2),k("ngForOf",i.filters),w(4),k("hidden","Chat Room"!==i.activeFilter)("formGroup",i.searchForm1),w(7),k("hidden","Group Chat"!==i.activeFilter)("formGroup",i.searchForm2),w(7),k("hidden","Direct Chat"!==i.activeFilter)("formGroup",i.searchForm3),w(13),k("disabled",0===i.messages.length),w(2),k("disabled",""===i.nextCursor||null===i.nextCursor),w(2),k("ngIf",0!=i.messages.length&&""===i.error&&2==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&3==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&4==i.type),w(1),k("ngIf",i.error),w(15),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.messages.length),w(1),k("ngForOf",i.messages),w(1),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(4),k("ngIf",i.deleteMessagesAllowed()))},dependencies:[Nu,Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Fa,c3,rl,ol,p3,fa,ja],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})),t})(),hct=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));default:return $n(null)}}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function fct(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function pct(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),I(6),x(),b(7,"td"),I(8),x(),b(9,"td"),I(10),x(),b(11,"td"),I(12),x()()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.product_id),w(2),Dt(e.original_transaction_id),w(2),Dt(i.getStoreText(e.store)),w(2),Dt(e.purchase_time),w(2),Dt(e.expiry_time),w(2),Dt(e.create_time)}}function mct(t,n){1&t&&(b(0,"tr")(1,"td",19),I(2,"No purchases were found."),x()())}const gct=[{path:"",component:yFe,canActivate:[tMe],canActivateChild:[bFe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:rBe,resolve:[oBe]},{path:"config",component:OBe,resolve:[jBe]},{path:"users",component:BBe,resolve:[VBe]},{path:"modules",component:t7e,resolve:[n7e]},{path:"storage",component:d7e,resolve:[h7e,f7e],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Cot,resolve:[kot],pathMatch:"full"},{path:"leaderboards",component:Oot,resolve:[jot]},{path:"leaderboards/:id",component:flt,resolve:[plt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:ylt,resolve:[]},{path:"records",component:Tlt,resolve:[Elt]}]},{path:"matches",component:zat,resolve:[Uat,Gat]},{path:"groups",component:Qat,resolve:[Zat]},{path:"groups/:id",component:slt,resolve:[alt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:iat,resolve:[]},{path:"members",component:Cat,resolve:[kat],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Hot,resolve:[zot]},{path:"accounts/:id",component:nst,resolve:[ist],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:cst,resolve:[]},{path:"authentication",component:pst,resolve:[]},{path:"wallet",component:Dst,resolve:[Tst]},{path:"friends",component:Lst,resolve:[Rst]},{path:"groups",component:Yst,resolve:[Jst]},{path:"purchases",component:Hlt,resolve:[zlt]},{path:"subscriptions",component:(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"subscriptions",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.subscriptions=e[0].validated_subscriptions,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listSubscriptions("",this.userID,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-subscriptions"]],decls:31,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colspan","6",1,"text-muted"]],template:function(e,i){1&e&&(J(0,fct,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Original Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Expiry Time"),x(),b(26,"th",13),I(27,"Create Time"),x()()(),b(28,"tbody"),J(29,pct,13,6,"ng-template",14),J(30,mct,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.subscriptions.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(19),k("ngForOf",i.subscriptions),w(1),k("ngIf",0===i.subscriptions.length))},dependencies:[jn,gn,To]})),t})(),resolve:[(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listSubscriptions("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})()]}]},{path:"apiexplorer",component:Olt,resolve:[jlt]},{path:"chat",component:dct,resolve:[hct]}]},{path:"login",component:ZAe,canActivate:[eMe]},{path:"**",redirectTo:""}];let vct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t})),K(t,"\u0275inj",Ci({imports:[J9.forRoot(gct,{useHash:!0}),J9]})),t})(),yct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp]})),t})();new class kct extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Dct=1;const Tct=Promise.resolve(),YD={};function Jme(t){return t in YD&&(delete YD[t],!0)}const Kme={setImmediate(t){const n=Dct++;return YD[n]=!0,Tct.then(()=>Jme(n)&&t()),n},clearImmediate(t){Jme(t)}};new class Act extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=Kme.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(Kme.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const Cs={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};Cs[Cs.Tab]="Tab",Cs[Cs.Enter]="Enter",Cs[Cs.Esc]="Esc",Cs[Cs.Space]="Space",Cs[Cs.ArrowUp]="ArrowUp",Cs[Cs.ArrowDown]="ArrowDown",Cs[Cs.Backspace]="Backspace";const ige=new zn("ng-select-selection-model");class jut{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}const Put=function Out(){return new jut};let Lut=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:ige,useValue:Put}],imports:[Vs]}),t})(),Rut=(()=>{class t{constructor(e){K(this,"authenticationService",void 0),this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),$ut=(()=>{class t{constructor(e,i){K(this,"authenticationService",void 0),K(this,"router",void 0),this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ul(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),qp(r.error.message||r.statusText))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),But=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t,bootstrap:[yct]})),K(t,"\u0275inj",Ci({providers:[JAe,Iz,{provide:C3,useValue:{host:document.location.origin,timeout:15e3}},{provide:x3,useClass:Rut,multi:!0},{provide:x3,useClass:$ut,multi:!0}],imports:[pBe,vct,qA,SSe,qAe,cFe,L$e,SAe.forRoot({apiKey:"",debug:!1,loadOnInitialization:!1}),DSe,wAe,ZV,Lut]})),t})();g2e().bootstrapModule(But).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Tn)=>{"use strict";Tn.byteLength=function Ve(T){var O=et(T),Me=O[1];return 3*(O[0]+Me)/4-Me},Tn.toByteArray=function se(T){var O,wn,te=et(T),Me=te[0],Je=te[1],kt=new Oe(function ve(T,O,te){return 3*(O+te)/4-te}(0,Me,Je)),jt=0,Wt=Je>0?Me-4:Me;for(wn=0;wn>16&255,kt[jt++]=O>>8&255,kt[jt++]=255&O;return 2===Je&&(O=rt[T.charCodeAt(wn)]<<2|rt[T.charCodeAt(wn+1)]>>4,kt[jt++]=255&O),1===Je&&(O=rt[T.charCodeAt(wn)]<<10|rt[T.charCodeAt(wn+1)]<<4|rt[T.charCodeAt(wn+2)]>>2,kt[jt++]=O>>8&255,kt[jt++]=255&O),kt},Tn.fromByteArray=function D(T){for(var O,te=T.length,Me=te%3,Je=[],jt=0,Wt=te-Me;jtWt?Wt:jt+16383));return 1===Me?Je.push(De[(O=T[te-1])>>2]+De[O<<4&63]+"=="):2===Me&&Je.push(De[(O=(T[te-2]<<8)+T[te-1])>>10]+De[O>>4&63]+De[O<<2&63]+"="),Je.join("")};for(var De=[],rt=[],Oe=typeof Uint8Array<"u"?Uint8Array:Array,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=0,_e=dt.length;Ge<_e;++Ge)De[Ge]=dt[Ge],rt[dt.charCodeAt(Ge)]=Ge;function et(T){var O=T.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var te=T.indexOf("=");return-1===te&&(te=O),[te,te===O?0:4-te%4]}function ue(T){return De[T>>18&63]+De[T>>12&63]+De[T>>6&63]+De[63&T]}function ae(T,O,te){for(var Je=[],kt=O;kt{"use strict";var Oe=De(343),dt=De(461),Ge="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Tn.lW=ve,Tn.h2=50;var _e=2147483647;function Ve(Te){if(Te>_e)throw new RangeError('The value "'+Te+'" is invalid for option "size"');var W=new Uint8Array(Te);return Object.setPrototypeOf(W,ve.prototype),W}function ve(Te,W,ee){if("number"==typeof Te){if("string"==typeof W)throw new TypeError('The "string" argument must be of type string. Received type number');return D(Te)}return se(Te,W,ee)}function se(Te,W,ee){if("string"==typeof Te)return function T(Te,W){if(("string"!=typeof W||""===W)&&(W="utf8"),!ve.isEncoding(W))throw new TypeError("Unknown encoding: "+W);var ee=0|Wt(Te,W),Fe=Ve(ee),nt=Fe.write(Te,W);return nt!==ee&&(Fe=Fe.slice(0,nt)),Fe}(Te,W);if(ArrayBuffer.isView(Te))return function te(Te){if(da(Te,Uint8Array)){var W=new Uint8Array(Te);return Me(W.buffer,W.byteOffset,W.byteLength)}return O(Te)}(Te);if(null==Te)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te);if(da(Te,ArrayBuffer)||Te&&da(Te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(da(Te,SharedArrayBuffer)||Te&&da(Te.buffer,SharedArrayBuffer)))return Me(Te,W,ee);if("number"==typeof Te)throw new TypeError('The "value" argument must not be of type number. Received type number');var Fe=Te.valueOf&&Te.valueOf();if(null!=Fe&&Fe!==Te)return ve.from(Fe,W,ee);var nt=function Je(Te){if(ve.isBuffer(Te)){var W=0|kt(Te.length),ee=Ve(W);return 0===ee.length||Te.copy(ee,0,0,W),ee}return void 0!==Te.length?"number"!=typeof Te.length||co(Te.length)?Ve(0):O(Te):"Buffer"===Te.type&&Array.isArray(Te.data)?O(Te.data):void 0}(Te);if(nt)return nt;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Te[Symbol.toPrimitive])return ve.from(Te[Symbol.toPrimitive]("string"),W,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te)}function ue(Te){if("number"!=typeof Te)throw new TypeError('"size" argument must be of type number');if(Te<0)throw new RangeError('The value "'+Te+'" is invalid for option "size"')}function D(Te){return ue(Te),Ve(Te<0?0:0|kt(Te))}function O(Te){for(var W=Te.length<0?0:0|kt(Te.length),ee=Ve(W),Fe=0;Fe=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return 0|Te}function Wt(Te,W){if(ve.isBuffer(Te))return Te.length;if(ArrayBuffer.isView(Te)||da(Te,ArrayBuffer))return Te.byteLength;if("string"!=typeof Te)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Te);var ee=Te.length,Fe=arguments.length>2&&!0===arguments[2];if(!Fe&&0===ee)return 0;for(var nt=!1;;)switch(W){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return Fc(Te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return vu(Te).length;default:if(nt)return Fe?-1:Fc(Te).length;W=(""+W).toLowerCase(),nt=!0}}function wn(Te,W,ee){var Fe=!1;if((void 0===W||W<0)&&(W=0),W>this.length||((void 0===ee||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(W>>>=0))return"";for(Te||(Te="utf8");;)switch(Te){case"hex":return gu(this,W,ee);case"utf8":case"utf-8":return yn(this,W,ee);case"ascii":return Kn(this,W,ee);case"latin1":case"binary":return Nc(this,W,ee);case"base64":return Sa(this,W,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ro(this,W,ee);default:if(Fe)throw new TypeError("Unknown encoding: "+Te);Te=(Te+"").toLowerCase(),Fe=!0}}function rn(Te,W,ee){var Fe=Te[W];Te[W]=Te[ee],Te[ee]=Fe}function Mi(Te,W,ee,Fe,nt){if(0===Te.length)return-1;if("string"==typeof ee?(Fe=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),co(ee=+ee)&&(ee=nt?0:Te.length-1),ee<0&&(ee=Te.length+ee),ee>=Te.length){if(nt)return-1;ee=Te.length-1}else if(ee<0){if(!nt)return-1;ee=0}if("string"==typeof W&&(W=ve.from(W,Fe)),ve.isBuffer(W))return 0===W.length?-1:zr(Te,W,ee,Fe,nt);if("number"==typeof W)return W&=255,"function"==typeof Uint8Array.prototype.indexOf?nt?Uint8Array.prototype.indexOf.call(Te,W,ee):Uint8Array.prototype.lastIndexOf.call(Te,W,ee):zr(Te,[W],ee,Fe,nt);throw new TypeError("val must be string, number or Buffer")}function zr(Te,W,ee,Fe,nt){var st,zt=1,Qt=Te.length,nr=W.length;if(void 0!==Fe&&("ucs2"===(Fe=String(Fe).toLowerCase())||"ucs-2"===Fe||"utf16le"===Fe||"utf-16le"===Fe)){if(Te.length<2||W.length<2)return-1;zt=2,Qt/=2,nr/=2,ee/=2}function A(mn,pe){return 1===zt?mn[pe]:mn.readUInt16BE(pe*zt)}if(nt){var Tt=-1;for(st=ee;stQt&&(ee=Qt-nr),st=ee;st>=0;st--){for(var Ut=!0,Vt=0;Vtnt&&(Fe=nt):Fe=nt;var zt=W.length;Fe>zt/2&&(Fe=zt/2);for(var Qt=0;Qt>8,zt.push(ee%256),zt.push(Fe);return zt}(W,Te.length-ee),Te,ee,Fe)}function Sa(Te,W,ee){return Oe.fromByteArray(0===W&&ee===Te.length?Te:Te.slice(W,ee))}function yn(Te,W,ee){ee=Math.min(Te.length,ee);for(var Fe=[],nt=W;nt239?4:zt>223?3:zt>191?2:1;if(nt+nr<=ee)switch(nr){case 1:zt<128&&(Qt=zt);break;case 2:128==(192&(A=Te[nt+1]))&&(Ut=(31&zt)<<6|63&A)>127&&(Qt=Ut);break;case 3:st=Te[nt+2],128==(192&(A=Te[nt+1]))&&128==(192&st)&&(Ut=(15&zt)<<12|(63&A)<<6|63&st)>2047&&(Ut<55296||Ut>57343)&&(Qt=Ut);break;case 4:st=Te[nt+2],Tt=Te[nt+3],128==(192&(A=Te[nt+1]))&&128==(192&st)&&128==(192&Tt)&&(Ut=(15&zt)<<18|(63&A)<<12|(63&st)<<6|63&Tt)>65535&&Ut<1114112&&(Qt=Ut)}null===Qt?(Qt=65533,nr=1):Qt>65535&&(Fe.push((Qt-=65536)>>>10&1023|55296),Qt=56320|1023&Qt),Fe.push(Qt),nt+=nr}return function kd(Te){var W=Te.length;if(W<=Cd)return String.fromCharCode.apply(String,Te);for(var ee="",Fe=0;Fent.length?ve.from(Qt).copy(nt,zt):Uint8Array.prototype.set.call(nt,Qt,zt);else{if(!ve.isBuffer(Qt))throw new TypeError('"list" argument must be an Array of Buffers');Qt.copy(nt,zt)}zt+=Qt.length}return nt},ve.byteLength=Wt,ve.prototype._isBuffer=!0,ve.prototype.swap16=function(){var W=this.length;if(W%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ee=0;eeee&&(W+=" ... "),""},Ge&&(ve.prototype[Ge]=ve.prototype.inspect),ve.prototype.compare=function(W,ee,Fe,nt,zt){if(da(W,Uint8Array)&&(W=ve.from(W,W.offset,W.byteLength)),!ve.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(void 0===ee&&(ee=0),void 0===Fe&&(Fe=W?W.length:0),void 0===nt&&(nt=0),void 0===zt&&(zt=this.length),ee<0||Fe>W.length||nt<0||zt>this.length)throw new RangeError("out of range index");if(nt>=zt&&ee>=Fe)return 0;if(nt>=zt)return-1;if(ee>=Fe)return 1;if(this===W)return 0;for(var Qt=(zt>>>=0)-(nt>>>=0),nr=(Fe>>>=0)-(ee>>>=0),A=Math.min(Qt,nr),st=this.slice(nt,zt),Tt=W.slice(ee,Fe),Ut=0;Ut>>=0,isFinite(Fe)?(Fe>>>=0,void 0===nt&&(nt="utf8")):(nt=Fe,Fe=void 0)}var zt=this.length-ee;if((void 0===Fe||Fe>zt)&&(Fe=zt),W.length>0&&(Fe<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");nt||(nt="utf8");for(var Qt=!1;;)switch(nt){case"hex":return Xr(this,W,ee,Fe);case"utf8":case"utf-8":return hs(this,W,ee,Fe);case"ascii":case"latin1":case"binary":return Ya(this,W,ee,Fe);case"base64":return tr(this,W,ee,Fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mu(this,W,ee,Fe);default:if(Qt)throw new TypeError("Unknown encoding: "+nt);nt=(""+nt).toLowerCase(),Qt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(Te,W,ee){var Fe="";ee=Math.min(Te.length,ee);for(var nt=W;ntFe)&&(ee=Fe);for(var nt="",zt=W;ztee)throw new RangeError("Trying to access beyond buffer length")}function lo(Te,W,ee,Fe,nt,zt){if(!ve.isBuffer(Te))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>nt||WTe.length)throw new RangeError("Index out of range")}function Da(Te,W,ee,Fe,nt,zt){if(ee+Fe>Te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Zr(Te,W,ee,Fe,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,4),dt.write(Te,W,ee,Fe,23,4),ee+4}function pl(Te,W,ee,Fe,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,8),dt.write(Te,W,ee,Fe,52,8),ee+8}ve.prototype.slice=function(W,ee){var Fe=this.length;(W=~~W)<0?(W+=Fe)<0&&(W=0):W>Fe&&(W=Fe),(ee=void 0===ee?Fe:~~ee)<0?(ee+=Fe)<0&&(ee=0):ee>Fe&&(ee=Fe),ee>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W+--ee],zt=1;ee>0&&(zt*=256);)nt+=this[W+--ee]*zt;return nt},ve.prototype.readUint8=ve.prototype.readUInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),this[W]},ve.prototype.readUint16LE=ve.prototype.readUInt16LE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]|this[W+1]<<8},ve.prototype.readUint16BE=ve.prototype.readUInt16BE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]<<8|this[W+1]},ve.prototype.readUint32LE=ve.prototype.readUInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+16777216*this[W+3]},ve.prototype.readUint32BE=ve.prototype.readUInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),16777216*this[W]+(this[W+1]<<16|this[W+2]<<8|this[W+3])},ve.prototype.readIntLE=function(W,ee,Fe){W>>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt=(zt*=128)&&(nt-=Math.pow(2,8*ee)),nt},ve.prototype.readIntBE=function(W,ee,Fe){W>>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=ee,zt=1,Qt=this[W+--nt];nt>0&&(zt*=256);)Qt+=this[W+--nt]*zt;return Qt>=(zt*=128)&&(Qt-=Math.pow(2,8*ee)),Qt},ve.prototype.readInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),128&this[W]?-1*(255-this[W]+1):this[W]},ve.prototype.readInt16LE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Fe=this[W]|this[W+1]<<8;return 32768&Fe?4294901760|Fe:Fe},ve.prototype.readInt16BE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Fe=this[W+1]|this[W]<<8;return 32768&Fe?4294901760|Fe:Fe},ve.prototype.readInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},ve.prototype.readInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},ve.prototype.readFloatLE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!0,23,4)},ve.prototype.readFloatBE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!1,23,4)},ve.prototype.readDoubleLE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!0,52,8)},ve.prototype.readDoubleBE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!1,52,8)},ve.prototype.writeUintLE=ve.prototype.writeUIntLE=function(W,ee,Fe,nt){W=+W,ee>>>=0,Fe>>>=0,nt||lo(this,W,ee,Fe,Math.pow(2,8*Fe)-1,0);var Qt=1,nr=0;for(this[ee]=255&W;++nr>>=0,Fe>>>=0,nt||lo(this,W,ee,Fe,Math.pow(2,8*Fe)-1,0);var Qt=Fe-1,nr=1;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)this[ee+Qt]=W/nr&255;return ee+Fe},ve.prototype.writeUint8=ve.prototype.writeUInt8=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,1,255,0),this[ee]=255&W,ee+1},ve.prototype.writeUint16LE=ve.prototype.writeUInt16LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,65535,0),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeUint16BE=ve.prototype.writeUInt16BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,65535,0),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeUint32LE=ve.prototype.writeUInt32LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,4294967295,0),this[ee+3]=W>>>24,this[ee+2]=W>>>16,this[ee+1]=W>>>8,this[ee]=255&W,ee+4},ve.prototype.writeUint32BE=ve.prototype.writeUInt32BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,4294967295,0),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeIntLE=function(W,ee,Fe,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Fe-1);lo(this,W,ee,Fe,zt-1,-zt)}var Qt=0,nr=1,A=0;for(this[ee]=255&W;++Qt>0)-A&255;return ee+Fe},ve.prototype.writeIntBE=function(W,ee,Fe,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Fe-1);lo(this,W,ee,Fe,zt-1,-zt)}var Qt=Fe-1,nr=1,A=0;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)W<0&&0===A&&0!==this[ee+Qt+1]&&(A=1),this[ee+Qt]=(W/nr>>0)-A&255;return ee+Fe},ve.prototype.writeInt8=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,1,127,-128),W<0&&(W=255+W+1),this[ee]=255&W,ee+1},ve.prototype.writeInt16LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,32767,-32768),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeInt16BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,32767,-32768),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeInt32LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,2147483647,-2147483648),this[ee]=255&W,this[ee+1]=W>>>8,this[ee+2]=W>>>16,this[ee+3]=W>>>24,ee+4},ve.prototype.writeInt32BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeFloatLE=function(W,ee,Fe){return Zr(this,W,ee,!0,Fe)},ve.prototype.writeFloatBE=function(W,ee,Fe){return Zr(this,W,ee,!1,Fe)},ve.prototype.writeDoubleLE=function(W,ee,Fe){return pl(this,W,ee,!0,Fe)},ve.prototype.writeDoubleBE=function(W,ee,Fe){return pl(this,W,ee,!1,Fe)},ve.prototype.copy=function(W,ee,Fe,nt){if(!ve.isBuffer(W))throw new TypeError("argument should be a Buffer");if(Fe||(Fe=0),!nt&&0!==nt&&(nt=this.length),ee>=W.length&&(ee=W.length),ee||(ee=0),nt>0&&nt=this.length)throw new RangeError("Index out of range");if(nt<0)throw new RangeError("sourceEnd out of bounds");nt>this.length&&(nt=this.length),W.length-ee>>=0,Fe=void 0===Fe?this.length:Fe>>>0,W||(W=0),"number"==typeof W)for(Qt=ee;Qt55295&&ee<57344){if(!nt){if(ee>56319){(W-=3)>-1&&zt.push(239,191,189);continue}if(Qt+1===Fe){(W-=3)>-1&&zt.push(239,191,189);continue}nt=ee;continue}if(ee<56320){(W-=3)>-1&&zt.push(239,191,189),nt=ee;continue}ee=65536+(nt-55296<<10|ee-56320)}else nt&&(W-=3)>-1&&zt.push(239,191,189);if(nt=null,ee<128){if((W-=1)<0)break;zt.push(ee)}else if(ee<2048){if((W-=2)<0)break;zt.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((W-=3)<0)break;zt.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;zt.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return zt}function vu(Te){return Oe.toByteArray(function Sd(Te){if((Te=(Te=Te.split("=")[0]).trim().replace(nc,"")).length<2)return"";for(;Te.length%4!=0;)Te+="=";return Te}(Te))}function Ja(Te,W,ee,Fe){for(var nt=0;nt=W.length||nt>=Te.length);++nt)W[nt+ee]=Te[nt];return nt}function da(Te,W){return Te instanceof W||null!=Te&&null!=Te.constructor&&null!=Te.constructor.name&&Te.constructor.name===W.name}function co(Te){return Te!=Te}var ml=function(){for(var Te="0123456789abcdef",W=new Array(256),ee=0;ee<16;++ee)for(var Fe=16*ee,nt=0;nt<16;++nt)W[Fe+nt]=Te[ee]+Te[nt];return W}()},797:function(Yt){Yt.exports=function(Tn){var De={};function rt(Oe){if(De[Oe])return De[Oe].exports;var dt=De[Oe]={exports:{},id:Oe,loaded:!1};return Tn[Oe].call(dt.exports,dt,dt.exports,rt),dt.loaded=!0,dt.exports}return rt.m=Tn,rt.c=De,rt.p="",rt(0)}([function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(1),dt=rt(3),Ge=rt(8),_e=rt(15);function et(ae,D,T){var O=null,te=function(Mi,zr){T&&T(Mi,zr),O&&O.visit(Mi,zr)},Me="function"==typeof T?te:null,Je=!1;if(D){var kt="boolean"==typeof D.attachComment&&D.attachComment;((Je="boolean"==typeof D.comment&&D.comment)||kt)&&((O=new Oe.CommentHandler).attach=kt,D.comment=!0,Me=te)}var Wt,jt=!1;D&&"string"==typeof D.sourceType&&(jt="module"===D.sourceType),Wt=D&&"boolean"==typeof D.jsx&&D.jsx?new dt.JSXParser(ae,D,Me):new Ge.Parser(ae,D,Me);var rn=jt?Wt.parseModule():Wt.parseScript();return Je&&O&&(rn.comments=O.comments),Wt.config.tokens&&(rn.tokens=Wt.tokens),Wt.config.tolerant&&(rn.errors=Wt.errorHandler.errors),rn}De.parse=et,De.parseModule=function Ve(ae,D,T){var O=D||{};return O.sourceType="module",et(ae,O,T)},De.parseScript=function ve(ae,D,T){var O=D||{};return O.sourceType="script",et(ae,O,T)},De.tokenize=function se(ae,D,T){var te,O=new _e.Tokenizer(ae,D);te=[];try{for(;;){var Me=O.getNextToken();if(!Me)break;T&&(Me=T(Me)),te.push(Me)}}catch(Je){O.errorHandler.tolerate(Je)}return O.errorHandler.tolerant&&(te.errors=O.errors()),te};var ue=rt(2);De.Syntax=ue.Syntax,De.version="4.0.1"},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2),dt=function(){function Ge(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return Ge.prototype.insertInnerComments=function(_e,et){if(_e.type===Oe.Syntax.BlockStatement&&0===_e.body.length){for(var Ve=[],ve=this.leading.length-1;ve>=0;--ve){var se=this.leading[ve];et.end.offset>=se.start&&(Ve.unshift(se.comment),this.leading.splice(ve,1),this.trailing.splice(ve,1))}Ve.length&&(_e.innerComments=Ve)}},Ge.prototype.findTrailingComments=function(_e){var et=[];if(this.trailing.length>0){for(var Ve=this.trailing.length-1;Ve>=0;--Ve){var ve=this.trailing[Ve];ve.start>=_e.end.offset&&et.unshift(ve.comment)}return this.trailing.length=0,et}var se=this.stack[this.stack.length-1];if(se&&se.node.trailingComments){var ue=se.node.trailingComments[0];ue&&ue.range[0]>=_e.end.offset&&(et=se.node.trailingComments,delete se.node.trailingComments)}return et},Ge.prototype.findLeadingComments=function(_e){for(var Ve,et=[];this.stack.length>0&&(ve=this.stack[this.stack.length-1])&&ve.start>=_e.start.offset;)Ve=ve.node,this.stack.pop();if(Ve){for(var ue=(Ve.leadingComments?Ve.leadingComments.length:0)-1;ue>=0;--ue){var ae=Ve.leadingComments[ue];ae.range[1]<=_e.start.offset&&(et.unshift(ae),Ve.leadingComments.splice(ue,1))}return Ve.leadingComments&&0===Ve.leadingComments.length&&delete Ve.leadingComments,et}for(ue=this.leading.length-1;ue>=0;--ue){var ve;(ve=this.leading[ue]).start<=_e.start.offset&&(et.unshift(ve.comment),this.leading.splice(ue,1))}return et},Ge.prototype.visitNode=function(_e,et){if(!(_e.type===Oe.Syntax.Program&&_e.body.length>0)){this.insertInnerComments(_e,et);var Ve=this.findTrailingComments(et),ve=this.findLeadingComments(et);ve.length>0&&(_e.leadingComments=ve),Ve.length>0&&(_e.trailingComments=Ve),this.stack.push({node:_e,start:et.start.offset})}},Ge.prototype.visitComment=function(_e,et){var Ve="L"===_e.type[0]?"Line":"Block",ve={type:Ve,value:_e.value};if(_e.range&&(ve.range=_e.range),_e.loc&&(ve.loc=_e.loc),this.comments.push(ve),this.attach){var se={comment:{type:Ve,value:_e.value,range:[et.start.offset,et.end.offset]},start:et.start.offset};_e.loc&&(se.comment.loc=_e.loc),_e.type=Ve,this.leading.push(se),this.trailing.push(se)}},Ge.prototype.visit=function(_e,et){"LineComment"===_e.type||"BlockComment"===_e.type?this.visitComment(_e,et):this.attach&&this.visitNode(_e,et)},Ge}();De.CommentHandler=dt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Tn,De,rt){"use strict";var D,Oe=this&&this.__extends||(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,O){T.__proto__=O}||function(T,O){for(var te in O)O.hasOwnProperty(te)&&(T[te]=O[te])},function(T,O){function te(){this.constructor=T}D(T,O),T.prototype=null===O?Object.create(O):(te.prototype=O.prototype,new te)});Object.defineProperty(De,"__esModule",{value:!0});var dt=rt(4),Ge=rt(5),_e=rt(6),et=rt(7),Ve=rt(8),ve=rt(13),se=rt(14);function ue(D){var T;switch(D.type){case _e.JSXSyntax.JSXIdentifier:T=D.name;break;case _e.JSXSyntax.JSXNamespacedName:var te=D;T=ue(te.namespace)+":"+ue(te.name);break;case _e.JSXSyntax.JSXMemberExpression:var Me=D;T=ue(Me.object)+"."+ue(Me.property)}return T}ve.TokenName[100]="JSXIdentifier",ve.TokenName[101]="JSXText";var ae=function(D){function T(O,te,Me){return D.call(this,O,te,Me)||this}return Oe(T,D),T.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():D.prototype.parsePrimaryExpression.call(this)},T.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},T.prototype.finishJSX=function(){this.nextToken()},T.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},T.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.scanXHTMLEntity=function(O){for(var te="&",Me=!0,Je=!1,kt=!1,jt=!1;!this.scanner.eof()&&Me&&!Je;){var Wt=this.scanner.source[this.scanner.index];if(Wt===O)break;if(Je=";"===Wt,te+=Wt,++this.scanner.index,!Je)switch(te.length){case 2:kt="#"===Wt;break;case 3:kt&&(Me=(jt="x"===Wt)||dt.Character.isDecimalDigit(Wt.charCodeAt(0)),kt=kt&&!jt);break;default:Me=(Me=Me&&!(kt&&!dt.Character.isDecimalDigit(Wt.charCodeAt(0))))&&!(jt&&!dt.Character.isHexDigit(Wt.charCodeAt(0)))}}if(Me&&Je&&te.length>2){var wn=te.substr(1,te.length-2);kt&&wn.length>1?te=String.fromCharCode(parseInt(wn.substr(1),10)):jt&&wn.length>2?te=String.fromCharCode(parseInt("0"+wn.substr(1),16)):!kt&&!jt&&se.XHTMLEntities[wn]&&(te=se.XHTMLEntities[wn])}return te},T.prototype.lexJSX=function(){var O=this.scanner.source.charCodeAt(this.scanner.index);if(60===O||62===O||47===O||58===O||61===O||123===O||125===O)return{type:7,value:te=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===O||39===O){for(var Me=this.scanner.index,Je=this.scanner.source[this.scanner.index++],kt="";!this.scanner.eof()&&(jt=this.scanner.source[this.scanner.index++])!==Je;)kt+="&"===jt?this.scanXHTMLEntity(Je):jt;return{type:8,value:kt,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(46===O){var te,Wt=this.scanner.source.charCodeAt(this.scanner.index+1),wn=this.scanner.source.charCodeAt(this.scanner.index+2);return Me=this.scanner.index,this.scanner.index+=(te=46===Wt&&46===wn?"...":".").length,{type:7,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(96===O)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(dt.Character.isIdentifierStart(O)&&92!==O){for(Me=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var jt=this.scanner.source.charCodeAt(this.scanner.index);if(dt.Character.isIdentifierPart(jt)&&92!==jt)++this.scanner.index;else{if(45!==jt)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Me,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}return this.scanner.lex()},T.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var O=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(O)),O},T.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var O=this.scanner.index,te="";!this.scanner.eof();){var Me=this.scanner.source[this.scanner.index];if("{"===Me||"<"===Me)break;++this.scanner.index,te+=Me,dt.Character.isLineTerminator(Me.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Me&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:O,end:this.scanner.index};return te.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},T.prototype.peekJSXToken=function(){var O=this.scanner.saveState();this.scanner.scanComments();var te=this.lexJSX();return this.scanner.restoreState(O),te},T.prototype.expectJSX=function(O){var te=this.nextJSXToken();(7!==te.type||te.value!==O)&&this.throwUnexpectedToken(te)},T.prototype.matchJSX=function(O){var te=this.peekJSXToken();return 7===te.type&&te.value===O},T.prototype.parseJSXIdentifier=function(){var O=this.createJSXNode(),te=this.nextJSXToken();return 100!==te.type&&this.throwUnexpectedToken(te),this.finalize(O,new Ge.JSXIdentifier(te.value))},T.prototype.parseJSXElementName=function(){var O=this.createJSXNode(),te=this.parseJSXIdentifier();if(this.matchJSX(":")){var Me=te;this.expectJSX(":");var Je=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Me,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var kt=te;this.expectJSX(".");var jt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXMemberExpression(kt,jt))}return te},T.prototype.parseJSXAttributeName=function(){var te,O=this.createJSXNode(),Me=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Me;this.expectJSX(":");var kt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Je,kt))}else te=Me;return te},T.prototype.parseJSXStringLiteralAttribute=function(){var O=this.createJSXNode(),te=this.nextJSXToken();8!==te.type&&this.throwUnexpectedToken(te);var Me=this.getTokenRaw(te);return this.finalize(O,new et.Literal(te.value,Me))},T.prototype.parseJSXExpressionAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},T.prototype.parseJSXNameValueAttribute=function(){var O=this.createJSXNode(),te=this.parseJSXAttributeName(),Me=null;return this.matchJSX("=")&&(this.expectJSX("="),Me=this.parseJSXAttributeValue()),this.finalize(O,new Ge.JSXAttribute(te,Me))},T.prototype.parseJSXSpreadAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXSpreadAttribute(te))},T.prototype.parseJSXAttributes=function(){for(var O=[];!this.matchJSX("/")&&!this.matchJSX(">");){var te=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();O.push(te)}return O},T.prototype.parseJSXOpeningElement=function(){var O=this.createJSXNode();this.expectJSX("<");var te=this.parseJSXElementName(),Me=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(te,Je,Me))},T.prototype.parseJSXBoundaryElement=function(){var O=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var te=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(O,new Ge.JSXClosingElement(te))}var Me=this.parseJSXElementName(),Je=this.parseJSXAttributes(),kt=this.matchJSX("/");return kt&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(Me,kt,Je))},T.prototype.parseJSXEmptyExpression=function(){var O=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(O,new Ge.JSXEmptyExpression)},T.prototype.parseJSXExpressionContainer=function(){var te,O=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(te=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),te=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXChildren=function(){for(var O=[];!this.scanner.eof();){var te=this.createJSXChildNode(),Me=this.nextJSXText();if(Me.start0))break;jt=this.finalize(O.node,new Ge.JSXElement(O.opening,O.children,O.closing)),(O=te[te.length-1]).children.push(jt),te.pop()}}return O},T.prototype.parseJSXElement=function(){var O=this.createJSXNode(),te=this.parseJSXOpeningElement(),Me=[],Je=null;if(!te.selfClosing){var kt=this.parseComplexJSXElement({node:O,opening:te,closing:Je,children:Me});Me=kt.children,Je=kt.closing}return this.finalize(O,new Ge.JSXElement(te,Me,Je))},T.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var O=this.parseJSXElement();return this.finishJSX(),O},T.prototype.isStartOfExpression=function(){return D.prototype.isStartOfExpression.call(this)||this.match("<")},T}(Ve.Parser);De.JSXParser=ae},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};De.Character={fromCodePoint:function(Oe){return Oe<65536?String.fromCharCode(Oe):String.fromCharCode(55296+(Oe-65536>>10))+String.fromCharCode(56320+(Oe-65536&1023))},isWhiteSpace:function(Oe){return 32===Oe||9===Oe||11===Oe||12===Oe||160===Oe||Oe>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Oe)>=0},isLineTerminator:function(Oe){return 10===Oe||13===Oe||8232===Oe||8233===Oe},isIdentifierStart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||92===Oe||Oe>=128&&rt.NonAsciiIdentifierStart.test(De.Character.fromCodePoint(Oe))},isIdentifierPart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||Oe>=48&&Oe<=57||92===Oe||Oe>=128&&rt.NonAsciiIdentifierPart.test(De.Character.fromCodePoint(Oe))},isDecimalDigit:function(Oe){return Oe>=48&&Oe<=57},isHexDigit:function(Oe){return Oe>=48&&Oe<=57||Oe>=65&&Oe<=70||Oe>=97&&Oe<=102},isOctalDigit:function(Oe){return Oe>=48&&Oe<=55}}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(6);De.JSXClosingElement=function O(te){this.type=Oe.JSXSyntax.JSXClosingElement,this.name=te},De.JSXElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXElement,this.openingElement=te,this.children=Me,this.closingElement=Je},De.JSXEmptyExpression=function O(){this.type=Oe.JSXSyntax.JSXEmptyExpression},De.JSXExpressionContainer=function O(te){this.type=Oe.JSXSyntax.JSXExpressionContainer,this.expression=te},De.JSXIdentifier=function O(te){this.type=Oe.JSXSyntax.JSXIdentifier,this.name=te},De.JSXMemberExpression=function O(te,Me){this.type=Oe.JSXSyntax.JSXMemberExpression,this.object=te,this.property=Me},De.JSXAttribute=function O(te,Me){this.type=Oe.JSXSyntax.JSXAttribute,this.name=te,this.value=Me},De.JSXNamespacedName=function O(te,Me){this.type=Oe.JSXSyntax.JSXNamespacedName,this.namespace=te,this.name=Me},De.JSXOpeningElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXOpeningElement,this.name=te,this.selfClosing=Me,this.attributes=Je},De.JSXSpreadAttribute=function O(te){this.type=Oe.JSXSyntax.JSXSpreadAttribute,this.argument=te},De.JSXText=function O(te,Me){this.type=Oe.JSXSyntax.JSXText,this.value=te,this.raw=Me}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2);De.ArrayExpression=function We(Xe){this.type=Oe.Syntax.ArrayExpression,this.elements=Xe},De.ArrayPattern=function We(Xe){this.type=Oe.Syntax.ArrayPattern,this.elements=Xe},De.ArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!1},De.AssignmentExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.AssignmentExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.AssignmentPattern=function We(Xe,bt){this.type=Oe.Syntax.AssignmentPattern,this.left=Xe,this.right=bt},De.AsyncArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!0},De.AsyncFunctionDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AsyncFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AwaitExpression=function We(Xe){this.type=Oe.Syntax.AwaitExpression,this.argument=Xe},De.BinaryExpression=function We(Xe,bt,Cn){this.type="||"===Xe||"&&"===Xe?Oe.Syntax.LogicalExpression:Oe.Syntax.BinaryExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.BlockStatement=function We(Xe){this.type=Oe.Syntax.BlockStatement,this.body=Xe},De.BreakStatement=function We(Xe){this.type=Oe.Syntax.BreakStatement,this.label=Xe},De.CallExpression=function We(Xe,bt){this.type=Oe.Syntax.CallExpression,this.callee=Xe,this.arguments=bt},De.CatchClause=function We(Xe,bt){this.type=Oe.Syntax.CatchClause,this.param=Xe,this.body=bt},De.ClassBody=function We(Xe){this.type=Oe.Syntax.ClassBody,this.body=Xe},De.ClassDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassDeclaration,this.id=Xe,this.superClass=bt,this.body=Cn},De.ClassExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassExpression,this.id=Xe,this.superClass=bt,this.body=Cn},De.ComputedMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!0,this.object=Xe,this.property=bt},De.ConditionalExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ConditionalExpression,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ContinueStatement=function We(Xe){this.type=Oe.Syntax.ContinueStatement,this.label=Xe},De.DebuggerStatement=function We(){this.type=Oe.Syntax.DebuggerStatement},De.Directive=function We(Xe,bt){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe,this.directive=bt},De.DoWhileStatement=function We(Xe,bt){this.type=Oe.Syntax.DoWhileStatement,this.body=Xe,this.test=bt},De.EmptyStatement=function We(){this.type=Oe.Syntax.EmptyStatement},De.ExportAllDeclaration=function We(Xe){this.type=Oe.Syntax.ExportAllDeclaration,this.source=Xe},De.ExportDefaultDeclaration=function We(Xe){this.type=Oe.Syntax.ExportDefaultDeclaration,this.declaration=Xe},De.ExportNamedDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ExportNamedDeclaration,this.declaration=Xe,this.specifiers=bt,this.source=Cn},De.ExportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ExportSpecifier,this.exported=bt,this.local=Xe},De.ExpressionStatement=function We(Xe){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe},De.ForInStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForInStatement,this.left=Xe,this.right=bt,this.body=Cn,this.each=!1},De.ForOfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForOfStatement,this.left=Xe,this.right=bt,this.body=Cn},De.ForStatement=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.ForStatement,this.init=Xe,this.test=bt,this.update=Cn,this.body=jr},De.FunctionDeclaration=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.FunctionExpression=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.Identifier=function We(Xe){this.type=Oe.Syntax.Identifier,this.name=Xe},De.IfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.IfStatement,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ImportDeclaration=function We(Xe,bt){this.type=Oe.Syntax.ImportDeclaration,this.specifiers=Xe,this.source=bt},De.ImportDefaultSpecifier=function We(Xe){this.type=Oe.Syntax.ImportDefaultSpecifier,this.local=Xe},De.ImportNamespaceSpecifier=function We(Xe){this.type=Oe.Syntax.ImportNamespaceSpecifier,this.local=Xe},De.ImportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ImportSpecifier,this.local=Xe,this.imported=bt},De.LabeledStatement=function We(Xe,bt){this.type=Oe.Syntax.LabeledStatement,this.label=Xe,this.body=bt},De.Literal=function We(Xe,bt){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt},De.MetaProperty=function We(Xe,bt){this.type=Oe.Syntax.MetaProperty,this.meta=Xe,this.property=bt},De.MethodDefinition=function We(Xe,bt,Cn,jr,Y0){this.type=Oe.Syntax.MethodDefinition,this.key=Xe,this.computed=bt,this.value=Cn,this.kind=jr,this.static=Y0},De.Module=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="module"},De.NewExpression=function We(Xe,bt){this.type=Oe.Syntax.NewExpression,this.callee=Xe,this.arguments=bt},De.ObjectExpression=function We(Xe){this.type=Oe.Syntax.ObjectExpression,this.properties=Xe},De.ObjectPattern=function We(Xe){this.type=Oe.Syntax.ObjectPattern,this.properties=Xe},De.Property=function We(Xe,bt,Cn,jr,Y0,Gi){this.type=Oe.Syntax.Property,this.key=bt,this.computed=Cn,this.value=jr,this.kind=Xe,this.method=Y0,this.shorthand=Gi},De.RegexLiteral=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt,this.regex={pattern:Cn,flags:jr}},De.RestElement=function We(Xe){this.type=Oe.Syntax.RestElement,this.argument=Xe},De.ReturnStatement=function We(Xe){this.type=Oe.Syntax.ReturnStatement,this.argument=Xe},De.Script=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="script"},De.SequenceExpression=function We(Xe){this.type=Oe.Syntax.SequenceExpression,this.expressions=Xe},De.SpreadElement=function We(Xe){this.type=Oe.Syntax.SpreadElement,this.argument=Xe},De.StaticMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!1,this.object=Xe,this.property=bt},De.Super=function We(){this.type=Oe.Syntax.Super},De.SwitchCase=function We(Xe,bt){this.type=Oe.Syntax.SwitchCase,this.test=Xe,this.consequent=bt},De.SwitchStatement=function We(Xe,bt){this.type=Oe.Syntax.SwitchStatement,this.discriminant=Xe,this.cases=bt},De.TaggedTemplateExpression=function We(Xe,bt){this.type=Oe.Syntax.TaggedTemplateExpression,this.tag=Xe,this.quasi=bt},De.TemplateElement=function We(Xe,bt){this.type=Oe.Syntax.TemplateElement,this.value=Xe,this.tail=bt},De.TemplateLiteral=function We(Xe,bt){this.type=Oe.Syntax.TemplateLiteral,this.quasis=Xe,this.expressions=bt},De.ThisExpression=function We(){this.type=Oe.Syntax.ThisExpression},De.ThrowStatement=function We(Xe){this.type=Oe.Syntax.ThrowStatement,this.argument=Xe},De.TryStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.TryStatement,this.block=Xe,this.handler=bt,this.finalizer=Cn},De.UnaryExpression=function We(Xe,bt){this.type=Oe.Syntax.UnaryExpression,this.operator=Xe,this.argument=bt,this.prefix=!0},De.UpdateExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.UpdateExpression,this.operator=Xe,this.argument=bt,this.prefix=Cn},De.VariableDeclaration=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclaration,this.declarations=Xe,this.kind=bt},De.VariableDeclarator=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclarator,this.id=Xe,this.init=bt},De.WhileStatement=function We(Xe,bt){this.type=Oe.Syntax.WhileStatement,this.test=Xe,this.body=bt},De.WithStatement=function We(Xe,bt){this.type=Oe.Syntax.WithStatement,this.object=Xe,this.body=bt},De.YieldExpression=function We(Xe,bt){this.type=Oe.Syntax.YieldExpression,this.argument=Xe,this.delegate=bt}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(10),Ge=rt(11),_e=rt(7),et=rt(12),Ve=rt(2),ve=rt(13),se="ArrowParameterPlaceHolder",ue=function(){function ae(D,T,O){void 0===T&&(T={}),this.config={range:"boolean"==typeof T.range&&T.range,loc:"boolean"==typeof T.loc&&T.loc,source:null,tokens:"boolean"==typeof T.tokens&&T.tokens,comment:"boolean"==typeof T.comment&&T.comment,tolerant:"boolean"==typeof T.tolerant&&T.tolerant},this.config.loc&&T.source&&null!==T.source&&(this.config.source=String(T.source)),this.delegate=O,this.errorHandler=new dt.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new et.Scanner(D,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return ae.prototype.throwError=function(D){for(var T=[],O=1;O0&&this.delegate)for(var T=0;T>="===D||">>>="===D||"&="===D||"^="===D||"|="===D},ae.prototype.isolateCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=T,this.context.isAssignmentTarget=O,this.context.firstCoverInitializedNameError=te,Me},ae.prototype.inheritCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return this.context.isBindingElement=this.context.isBindingElement&&T,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&O,this.context.firstCoverInitializedNameError=te||this.context.firstCoverInitializedNameError,Me},ae.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},ae.prototype.parsePrimaryExpression=function(){var T,O,te,D=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),T=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(D,new _e.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(O.value,te));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal("true"===O.value,te));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(null,te));break;case 10:T=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,T=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":T=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":T=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,O=this.nextRegexToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.RegexLiteral(O.regex,te,O.pattern,O.flags));break;default:T=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?T=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?T=this.finalize(D,new _e.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?T=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),T=this.finalize(D,new _e.ThisExpression)):T=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:T=this.throwUnexpectedToken(this.nextToken())}return T},ae.prototype.parseSpreadElement=function(){var D=this.createNode();this.expect("...");var T=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(D,new _e.SpreadElement(T))},ae.prototype.parseArrayInitializer=function(){var D=this.createNode(),T=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),T.push(null);else if(this.match("...")){var O=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),T.push(O)}else T.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(D,new _e.ArrayExpression(T))},ae.prototype.parsePropertyMethod=function(D){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var T=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=D.simple;var te=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&D.firstRestricted&&this.tolerateUnexpectedToken(D.firstRestricted,D.message),this.context.strict&&D.stricted&&this.tolerateUnexpectedToken(D.stricted,D.message),this.context.strict=T,this.context.allowStrictDirective=O,te},ae.prototype.parsePropertyMethodFunction=function(){var T=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(T,new _e.FunctionExpression(null,te.params,Me,!1))},ae.prototype.parsePropertyMethodAsyncFunction=function(){var D=this.createNode(),T=this.context.allowYield,O=this.context.await;this.context.allowYield=!1,this.context.await=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=T,this.context.await=O,this.finalize(D,new _e.AsyncFunctionExpression(null,te.params,Me))},ae.prototype.parseObjectPropertyKey=function(){var O,D=this.createNode(),T=this.nextToken();switch(T.type){case 8:case 6:this.context.strict&&T.octal&&this.tolerateUnexpectedToken(T,Ge.Messages.StrictOctalLiteral);var te=this.getTokenRaw(T);O=this.finalize(D,new _e.Literal(T.value,te));break;case 3:case 1:case 5:case 4:O=this.finalize(D,new _e.Identifier(T.value));break;case 7:"["===T.value?(O=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):O=this.throwUnexpectedToken(T);break;default:O=this.throwUnexpectedToken(T)}return O},ae.prototype.isPropertyKey=function(D,T){return D.type===Ve.Syntax.Identifier&&D.name===T||D.type===Ve.Syntax.Literal&&D.value===T},ae.prototype.parseObjectProperty=function(D){var te,T=this.createNode(),O=this.lookahead,Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(3===O.type){var rn=O.value;this.nextToken(),kt=this.match("["),Me=(wn=!(this.hasLineTerminator||"async"!==rn||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(T,new _e.Identifier(rn))}else this.match("*")?this.nextToken():(kt=this.match("["),Me=this.parseObjectPropertyKey());var Mi=this.qualifiedPropertyName(this.lookahead);if(3===O.type&&!wn&&"get"===O.value&&Mi)te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===O.type&&!wn&&"set"===O.value&&Mi)te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===O.type&&"*"===O.value&&Mi)te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0;else if(Me||this.throwUnexpectedToken(this.lookahead),te="init",this.match(":")&&!wn)!kt&&this.isPropertyKey(Me,"__proto__")&&(D.value&&this.tolerateError(Ge.Messages.DuplicateProtoProperty),D.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0;else if(3===O.type)if(rn=this.finalize(T,new _e.Identifier(O.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Wt=!0;var zr=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(T,new _e.AssignmentPattern(rn,zr))}else Wt=!0,Je=rn;else this.throwUnexpectedToken(this.nextToken());return this.finalize(T,new _e.Property(te,Me,kt,Je,jt,Wt))},ae.prototype.parseObjectInitializer=function(){var D=this.createNode();this.expect("{");for(var T=[],O={value:!1};!this.match("}");)T.push(this.parseObjectProperty(O)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(D,new _e.ObjectExpression(T))},ae.prototype.parseTemplateHead=function(){Oe.assert(this.lookahead.head,"Template literal must start with a template head");var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateLiteral=function(){var D=this.createNode(),T=[],O=[],te=this.parseTemplateHead();for(O.push(te);!te.tail;)T.push(this.parseExpression()),te=this.parseTemplateElement(),O.push(te);return this.finalize(D,new _e.TemplateLiteral(O,T))},ae.prototype.reinterpretExpressionAsPattern=function(D){switch(D.type){case Ve.Syntax.Identifier:case Ve.Syntax.MemberExpression:case Ve.Syntax.RestElement:case Ve.Syntax.AssignmentPattern:break;case Ve.Syntax.SpreadElement:D.type=Ve.Syntax.RestElement,this.reinterpretExpressionAsPattern(D.argument);break;case Ve.Syntax.ArrayExpression:D.type=Ve.Syntax.ArrayPattern;for(var T=0;T")||this.expect("=>"),D={type:se,params:[],async:!1};else{var T=this.lookahead,O=[];if(this.match("..."))D=this.parseRestElement(O),this.expect(")"),this.match("=>")||this.expect("=>"),D={type:se,params:[D],async:!1};else{var te=!1;if(this.context.isBindingElement=!0,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Me=[];for(this.context.isAssignmentTarget=!1,Me.push(D);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(D.type===Ve.Syntax.Identifier&&"yield"===D.name&&(te=!0,D={type:se,params:[D],async:!1}),!te)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),D.type===Ve.Syntax.SequenceExpression)for(Je=0;Je")){for(var jt=0;jt0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Me=[D,this.lookahead],Je=T,kt=this.isolateCoverGrammar(this.parseExponentiationExpression),jt=[Je,O.value,kt],Wt=[te];!((te=this.binaryPrecedence(this.lookahead))<=0);){for(;jt.length>2&&te<=Wt[Wt.length-1];){kt=jt.pop();var wn=jt.pop();Wt.pop(),Je=jt.pop(),Me.pop();var rn=this.startNode(Me[Me.length-1]);jt.push(this.finalize(rn,new _e.BinaryExpression(wn,Je,kt)))}jt.push(this.nextToken().value),Wt.push(te),Me.push(this.lookahead),jt.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Mi=jt.length-1;T=jt[Mi];for(var zr=Me.pop();Mi>1;){var Xr=Me.pop();rn=this.startNode(Xr,zr&&zr.lineStart),T=this.finalize(rn,new _e.BinaryExpression(wn=jt[Mi-1],jt[Mi-2],T)),Mi-=2,zr=Xr}}return T},ae.prototype.parseConditionalExpression=function(){var D=this.lookahead,T=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var O=this.context.allowIn;this.context.allowIn=!0;var te=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=O,this.expect(":");var Me=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(D),new _e.ConditionalExpression(T,te,Me)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return T},ae.prototype.checkPatternParam=function(D,T){switch(T.type){case Ve.Syntax.Identifier:this.validateParam(D,T,T.name);break;case Ve.Syntax.RestElement:this.checkPatternParam(D,T.argument);break;case Ve.Syntax.AssignmentPattern:this.checkPatternParam(D,T.left);break;case Ve.Syntax.ArrayPattern:for(var O=0;O")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Me=D.async,Je=this.reinterpretAsCoverFormalsList(D);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var kt=this.context.strict,jt=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Wt=this.context.allowYield,wn=this.context.await;this.context.allowYield=!0,this.context.await=Me;var rn=this.startNode(T);this.expect("=>");var Mi=void 0;if(this.match("{")){var zr=this.context.allowIn;this.context.allowIn=!0,Mi=this.parseFunctionSourceElements(),this.context.allowIn=zr}else Mi=this.isolateCoverGrammar(this.parseAssignmentExpression);var Xr=Mi.type!==Ve.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),D=this.finalize(rn,Me?new _e.AsyncArrowFunctionExpression(Je.params,Mi,Xr):new _e.ArrowFunctionExpression(Je.params,Mi,Xr)),this.context.strict=kt,this.context.allowStrictDirective=jt,this.context.allowYield=Wt,this.context.await=wn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Ge.Messages.InvalidLHSInAssignment),this.context.strict&&D.type===Ve.Syntax.Identifier){var hs=D;this.scanner.isRestrictedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(D):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(O=this.nextToken()).value,tr=this.isolateCoverGrammar(this.parseAssignmentExpression);D=this.finalize(this.startNode(T),new _e.AssignmentExpression(Ya,D,tr)),this.context.firstCoverInitializedNameError=null}}return D},ae.prototype.parseExpression=function(){var D=this.lookahead,T=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var O=[];for(O.push(T);2!==this.lookahead.type&&this.match(",");)this.nextToken(),O.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(D),new _e.SequenceExpression(O))}return T},ae.prototype.parseStatementListItem=function(){var D;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalExportDeclaration),D=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalImportDeclaration),D=this.parseImportDeclaration();break;case"const":D=this.parseLexicalDeclaration({inFor:!1});break;case"function":D=this.parseFunctionDeclaration();break;case"class":D=this.parseClassDeclaration();break;case"let":D=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:D=this.parseStatement()}else D=this.parseStatement();return D},ae.prototype.parseBlock=function(){var D=this.createNode();this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseStatementListItem());return this.expect("}"),this.finalize(D,new _e.BlockStatement(T))},ae.prototype.parseLexicalBinding=function(D,T){var O=this.createNode(),Me=this.parsePattern([],D);this.context.strict&&Me.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(Me.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Je=null;return"const"===D?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Ge.Messages.DeclarationMissingInitializer,"const")):(!T.inFor&&Me.type!==Ve.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(O,new _e.VariableDeclarator(Me,Je))},ae.prototype.parseBindingList=function(D,T){for(var O=[this.parseLexicalBinding(D,T)];this.match(",");)this.nextToken(),O.push(this.parseLexicalBinding(D,T));return O},ae.prototype.isLexicalDeclaration=function(){var D=this.scanner.saveState();this.scanner.scanComments();var T=this.scanner.lex();return this.scanner.restoreState(D),3===T.type||7===T.type&&"["===T.value||7===T.type&&"{"===T.value||4===T.type&&"let"===T.value||4===T.type&&"yield"===T.value},ae.prototype.parseLexicalDeclaration=function(D){var T=this.createNode(),O=this.nextToken().value;Oe.assert("let"===O||"const"===O,"Lexical declaration must be either let or const");var te=this.parseBindingList(O,D);return this.consumeSemicolon(),this.finalize(T,new _e.VariableDeclaration(te,O))},ae.prototype.parseBindingRestElement=function(D,T){var O=this.createNode();this.expect("...");var te=this.parsePattern(D,T);return this.finalize(O,new _e.RestElement(te))},ae.prototype.parseArrayPattern=function(D,T){var O=this.createNode();this.expect("[");for(var te=[];!this.match("]");)if(this.match(","))this.nextToken(),te.push(null);else{if(this.match("...")){te.push(this.parseBindingRestElement(D,T));break}te.push(this.parsePatternWithDefault(D,T)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(O,new _e.ArrayPattern(te))},ae.prototype.parsePropertyPattern=function(D,T){var kt,jt,O=this.createNode(),te=!1,Me=!1;if(3===this.lookahead.type){var Wt=this.lookahead;kt=this.parseVariableIdentifier();var wn=this.finalize(O,new _e.Identifier(Wt.value));if(this.match("=")){D.push(Wt),Me=!0,this.nextToken();var rn=this.parseAssignmentExpression();jt=this.finalize(this.startNode(Wt),new _e.AssignmentPattern(wn,rn))}else this.match(":")?(this.expect(":"),jt=this.parsePatternWithDefault(D,T)):(D.push(Wt),Me=!0,jt=wn)}else te=this.match("["),kt=this.parseObjectPropertyKey(),this.expect(":"),jt=this.parsePatternWithDefault(D,T);return this.finalize(O,new _e.Property("init",kt,te,jt,!1,Me))},ae.prototype.parseObjectPattern=function(D,T){var O=this.createNode(),te=[];for(this.expect("{");!this.match("}");)te.push(this.parsePropertyPattern(D,T)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(O,new _e.ObjectPattern(te))},ae.prototype.parsePattern=function(D,T){var O;return this.match("[")?O=this.parseArrayPattern(D,T):this.match("{")?O=this.parseObjectPattern(D,T):(this.matchKeyword("let")&&("const"===T||"let"===T)&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.LetInLexicalBinding),D.push(this.lookahead),O=this.parseVariableIdentifier(T)),O},ae.prototype.parsePatternWithDefault=function(D,T){var O=this.lookahead,te=this.parsePattern(D,T);if(this.match("=")){this.nextToken();var Me=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Me,te=this.finalize(this.startNode(O),new _e.AssignmentPattern(te,Je))}return te},ae.prototype.parseVariableIdentifier=function(D){var T=this.createNode(),O=this.nextToken();return 4===O.type&&"yield"===O.value?this.context.strict?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(O):3!==O.type?this.context.strict&&4===O.type&&this.scanner.isStrictModeReservedWord(O.value)?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):(this.context.strict||"let"!==O.value||"var"!==D)&&this.throwUnexpectedToken(O):(this.context.isModule||this.context.await)&&3===O.type&&"await"===O.value&&this.tolerateUnexpectedToken(O),this.finalize(T,new _e.Identifier(O.value))},ae.prototype.parseVariableDeclaration=function(D){var T=this.createNode(),te=this.parsePattern([],"var");this.context.strict&&te.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(te.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Me=null;return this.match("=")?(this.nextToken(),Me=this.isolateCoverGrammar(this.parseAssignmentExpression)):te.type!==Ve.Syntax.Identifier&&!D.inFor&&this.expect("="),this.finalize(T,new _e.VariableDeclarator(te,Me))},ae.prototype.parseVariableDeclarationList=function(D){var T={inFor:D.inFor},O=[];for(O.push(this.parseVariableDeclaration(T));this.match(",");)this.nextToken(),O.push(this.parseVariableDeclaration(T));return O},ae.prototype.parseVariableStatement=function(){var D=this.createNode();this.expectKeyword("var");var T=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(D,new _e.VariableDeclaration(T,"var"))},ae.prototype.parseEmptyStatement=function(){var D=this.createNode();return this.expect(";"),this.finalize(D,new _e.EmptyStatement)},ae.prototype.parseExpressionStatement=function(){var D=this.createNode(),T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ExpressionStatement(T))},ae.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Ge.Messages.StrictFunction),this.parseStatement()},ae.prototype.parseIfStatement=function(){var T,D=this.createNode(),O=null;this.expectKeyword("if"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),O=this.parseIfClause())),this.finalize(D,new _e.IfStatement(te,T,O))},ae.prototype.parseDoWhileStatement=function(){var D=this.createNode();this.expectKeyword("do");var T=this.context.inIteration;this.context.inIteration=!0;var O=this.parseStatement();this.context.inIteration=T,this.expectKeyword("while"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(D,new _e.DoWhileStatement(O,te))},ae.prototype.parseWhileStatement=function(){var T,D=this.createNode();this.expectKeyword("while"),this.expect("(");var O=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var te=this.context.inIteration;this.context.inIteration=!0,T=this.parseStatement(),this.context.inIteration=te}return this.finalize(D,new _e.WhileStatement(O,T))},ae.prototype.parseForStatement=function(){var Me,Je,Xr,D=null,T=null,O=null,te=!0,kt=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){D=this.createNode(),this.nextToken();var jt=this.context.allowIn;this.context.allowIn=!1;var Wt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=jt,1===Wt.length&&this.matchKeyword("in")){var wn=Wt[0];wn.init&&(wn.id.type===Ve.Syntax.ArrayPattern||wn.id.type===Ve.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(Ge.Messages.ForInOfLoopInitializer,"for-in"),D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseExpression(),D=null}else 1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){D=this.createNode();var rn=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(jt=this.context.allowIn,this.context.allowIn=!1,Wt=this.parseBindingList(rn,{inFor:!0}),this.context.allowIn=jt,1===Wt.length&&null===Wt[0].init&&this.matchKeyword("in")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null):1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(this.consumeSemicolon(),D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)))):(D=this.finalize(D,new _e.Identifier(rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null)}else{var Mi=this.lookahead;if(jt=this.context.allowIn,this.context.allowIn=!1,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=jt,this.matchKeyword("in"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseExpression(),D=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1;else{if(this.match(",")){for(var zr=[D];this.match(",");)this.nextToken(),zr.push(this.isolateCoverGrammar(this.parseAssignmentExpression));D=this.finalize(this.startNode(Mi),new _e.SequenceExpression(zr))}this.expect(";")}}if(typeof Me>"u"&&(this.match(";")||(T=this.parseExpression()),this.expect(";"),this.match(")")||(O=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Xr=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var hs=this.context.inIteration;this.context.inIteration=!0,Xr=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=hs}return this.finalize(kt,typeof Me>"u"?new _e.ForStatement(D,T,O,Xr):te?new _e.ForInStatement(Me,Je,Xr):new _e.ForOfStatement(Me,Je,Xr))},ae.prototype.parseContinueStatement=function(){var D=this.createNode();this.expectKeyword("continue");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();T=O,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name)}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&this.throwError(Ge.Messages.IllegalContinue),this.finalize(D,new _e.ContinueStatement(T))},ae.prototype.parseBreakStatement=function(){var D=this.createNode();this.expectKeyword("break");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name),T=O}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(Ge.Messages.IllegalBreak),this.finalize(D,new _e.BreakStatement(T))},ae.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Ge.Messages.IllegalReturn);var D=this.createNode();this.expectKeyword("return");var O=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ReturnStatement(O))},ae.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Ge.Messages.StrictModeWith);var T,D=this.createNode();this.expectKeyword("with"),this.expect("(");var O=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseStatement()),this.finalize(D,new _e.WithStatement(O,T))},ae.prototype.parseSwitchCase=function(){var T,D=this.createNode();this.matchKeyword("default")?(this.nextToken(),T=null):(this.expectKeyword("case"),T=this.parseExpression()),this.expect(":");for(var O=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)O.push(this.parseStatementListItem());return this.finalize(D,new _e.SwitchCase(T,O))},ae.prototype.parseSwitchStatement=function(){var D=this.createNode();this.expectKeyword("switch"),this.expect("(");var T=this.parseExpression();this.expect(")");var O=this.context.inSwitch;this.context.inSwitch=!0;var te=[],Me=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Me&&this.throwError(Ge.Messages.MultipleDefaultsInSwitch),Me=!0),te.push(Je)}return this.expect("}"),this.context.inSwitch=O,this.finalize(D,new _e.SwitchStatement(T,te))},ae.prototype.parseLabelledStatement=function(){var O,D=this.createNode(),T=this.parseExpression();if(T.type===Ve.Syntax.Identifier&&this.match(":")){this.nextToken();var te=T,Me="$"+te.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Me)&&this.throwError(Ge.Messages.Redeclaration,"Label",te.name),this.context.labelSet[Me]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var kt=this.lookahead,jt=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(kt,Ge.Messages.StrictFunction):jt.generator&&this.tolerateUnexpectedToken(kt,Ge.Messages.GeneratorInLegacyContext),Je=jt}else Je=this.parseStatement();delete this.context.labelSet[Me],O=new _e.LabeledStatement(te,Je)}else this.consumeSemicolon(),O=new _e.ExpressionStatement(T);return this.finalize(D,O)},ae.prototype.parseThrowStatement=function(){var D=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Ge.Messages.NewlineAfterThrow);var T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ThrowStatement(T))},ae.prototype.parseCatchClause=function(){var D=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var T=[],O=this.parsePattern(T),te={},Me=0;Me0&&this.tolerateError(Ge.Messages.BadGetterArity);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseSetterMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();1!==te.params.length?this.tolerateError(Ge.Messages.BadSetterArity):te.params[0]instanceof _e.RestElement&&this.tolerateError(Ge.Messages.BadSetterRestParameter);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseGeneratorMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();this.context.allowYield=!1;var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,!0))},ae.prototype.isStartOfExpression=function(){var D=!0,T=this.lookahead.value;switch(this.lookahead.type){case 7:D="["===T||"("===T||"{"===T||"+"===T||"-"===T||"!"===T||"~"===T||"++"===T||"--"===T||"/"===T||"/="===T;break;case 4:D="class"===T||"delete"===T||"function"===T||"let"===T||"new"===T||"super"===T||"this"===T||"typeof"===T||"void"===T||"yield"===T}return D},ae.prototype.parseYieldExpression=function(){var D=this.createNode();this.expectKeyword("yield");var T=null,O=!1;if(!this.hasLineTerminator){var te=this.context.allowYield;this.context.allowYield=!1,(O=this.match("*"))?(this.nextToken(),T=this.parseAssignmentExpression()):this.isStartOfExpression()&&(T=this.parseAssignmentExpression()),this.context.allowYield=te}return this.finalize(D,new _e.YieldExpression(T,O))},ae.prototype.parseClassElement=function(D){var T=this.lookahead,O=this.createNode(),te="",Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(this.match("*"))this.nextToken();else if(kt=this.match("["),"static"===(Me=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(T=this.lookahead,Wt=!0,kt=this.match("["),this.match("*")?this.nextToken():Me=this.parseObjectPropertyKey()),3===T.type&&!this.hasLineTerminator&&"async"===T.value){var Mi=this.lookahead.value;":"!==Mi&&"("!==Mi&&"*"!==Mi&&(wn=!0,T=this.lookahead,Me=this.parseObjectPropertyKey(),3===T.type&&"constructor"===T.value&&this.tolerateUnexpectedToken(T,Ge.Messages.ConstructorIsAsync))}var zr=this.qualifiedPropertyName(this.lookahead);return 3===T.type?"get"===T.value&&zr?(te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===T.value&&zr&&(te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===T.type&&"*"===T.value&&zr&&(te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0),!te&&Me&&this.match("(")&&(te="init",Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0),te||this.throwUnexpectedToken(this.lookahead),"init"===te&&(te="method"),kt||(Wt&&this.isPropertyKey(Me,"prototype")&&this.throwUnexpectedToken(T,Ge.Messages.StaticPrototype),!Wt&&this.isPropertyKey(Me,"constructor")&&(("method"!==te||!jt||Je&&Je.generator)&&this.throwUnexpectedToken(T,Ge.Messages.ConstructorSpecialMethod),D.value?this.throwUnexpectedToken(T,Ge.Messages.DuplicateConstructor):D.value=!0,te="constructor")),this.finalize(O,new _e.MethodDefinition(Me,kt,Je,te,Wt))},ae.prototype.parseClassElementList=function(){var D=[],T={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():D.push(this.parseClassElement(T));return this.expect("}"),D},ae.prototype.parseClassBody=function(){var D=this.createNode(),T=this.parseClassElementList();return this.finalize(D,new _e.ClassBody(T))},ae.prototype.parseClassDeclaration=function(D){var T=this.createNode(),O=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var te=D&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Me=null;this.matchKeyword("extends")&&(this.nextToken(),Me=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=O,this.finalize(T,new _e.ClassDeclaration(te,Me,Je))},ae.prototype.parseClassExpression=function(){var D=this.createNode(),T=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var O=3===this.lookahead.type?this.parseVariableIdentifier():null,te=null;this.matchKeyword("extends")&&(this.nextToken(),te=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Me=this.parseClassBody();return this.context.strict=T,this.finalize(D,new _e.ClassExpression(O,te,Me))},ae.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Module(T))},ae.prototype.parseScript=function(){for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Script(T))},ae.prototype.parseModuleSpecifier=function(){var D=this.createNode();8!==this.lookahead.type&&this.throwError(Ge.Messages.InvalidModuleSpecifier);var T=this.nextToken(),O=this.getTokenRaw(T);return this.finalize(D,new _e.Literal(T.value,O))},ae.prototype.parseImportSpecifier=function(){var T,O,D=this.createNode();return 3===this.lookahead.type?(O=T=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseVariableIdentifier())):(O=T=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),O=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(D,new _e.ImportSpecifier(O,T))},ae.prototype.parseNamedImports=function(){this.expect("{");for(var D=[];!this.match("}");)D.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),D},ae.prototype.parseImportDefaultSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName();return this.finalize(D,new _e.ImportDefaultSpecifier(T))},ae.prototype.parseImportNamespaceSpecifier=function(){var D=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Ge.Messages.NoAsAfterImportNamespace),this.nextToken();var T=this.parseIdentifierName();return this.finalize(D,new _e.ImportNamespaceSpecifier(T))},ae.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalImportDeclaration);var D=this.createNode();this.expectKeyword("import");var T,O=[];return 8===this.lookahead.type||(this.match("{")?O=O.concat(this.parseNamedImports()):this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(O.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.match("{")?O=O.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),T=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(D,new _e.ImportDeclaration(O,T))},ae.prototype.parseExportSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName(),O=T;return this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseIdentifierName()),this.finalize(D,new _e.ExportSpecifier(T,O))},ae.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalExportDeclaration);var T,D=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var O=this.parseFunctionDeclaration(!0);T=this.finalize(D,new _e.ExportDefaultDeclaration(O))}else this.matchKeyword("class")?(O=this.parseClassDeclaration(!0),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):this.matchContextualKeyword("async")?(O=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):(this.matchContextualKeyword("from")&&this.throwError(Ge.Messages.UnexpectedToken,this.lookahead.value),O=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Me=this.parseModuleSpecifier();this.consumeSemicolon(),T=this.finalize(D,new _e.ExportAllDeclaration(Me))}else if(4===this.lookahead.type){switch(O=void 0,this.lookahead.value){case"let":case"const":O=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":O=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null))}else if(this.matchAsyncFunction())O=this.parseFunctionDeclaration(),T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null));else{var Je=[],kt=null,jt=!1;for(this.expect("{");!this.match("}");)jt=jt||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),kt=this.parseModuleSpecifier(),this.consumeSemicolon()):jt?this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),T=this.finalize(D,new _e.ExportNamedDeclaration(null,Je,kt))}return T},ae}();De.Parser=ue},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.assert=function rt(Oe,dt){if(!Oe)throw new Error("ASSERT: "+dt)}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt=function(){function Oe(){this.errors=[],this.tolerant=!1}return Oe.prototype.recordError=function(dt){this.errors.push(dt)},Oe.prototype.tolerate=function(dt){if(!this.tolerant)throw dt;this.recordError(dt)},Oe.prototype.constructError=function(dt,Ge){var _e=new Error(dt);try{throw _e}catch(et){Object.create&&Object.defineProperty&&(_e=Object.create(et),Object.defineProperty(_e,"column",{value:Ge}))}return _e},Oe.prototype.createError=function(dt,Ge,_e,et){var ve=this.constructError("Line "+Ge+": "+et,_e);return ve.index=dt,ve.lineNumber=Ge,ve.description=et,ve},Oe.prototype.throwError=function(dt,Ge,_e,et){throw this.createError(dt,Ge,_e,et)},Oe.prototype.tolerateError=function(dt,Ge,_e,et){var Ve=this.createError(dt,Ge,_e,et);if(!this.tolerant)throw Ve;this.recordError(Ve)},Oe}();De.ErrorHandler=rt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(4),Ge=rt(11);function _e(ve){return"0123456789abcdef".indexOf(ve.toLowerCase())}function et(ve){return"01234567".indexOf(ve)}var Ve=function(){function ve(se,ue){this.source=se,this.errorHandler=ue,this.trackComment=!1,this.isModule=!1,this.length=se.length,this.index=0,this.lineNumber=se.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ve.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ve.prototype.restoreState=function(se){this.index=se.index,this.lineNumber=se.lineNumber,this.lineStart=se.lineStart},ve.prototype.eof=function(){return this.index>=this.length},ve.prototype.throwUnexpectedToken=function(se){return void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.tolerateUnexpectedToken=function(se){void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.skipSingleLineComment=function(se){var ae,D,ue=[];for(this.trackComment&&(ue=[],ae=this.index-se,D={start:{line:this.lineNumber,column:this.index-this.lineStart-se},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(++this.index,dt.Character.isLineTerminator(T))return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart-1},ue.push({multiLine:!1,slice:[ae+se,this.index-1],range:[ae,this.index-1],loc:D})),13===T&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue}return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart},ue.push({multiLine:!1,slice:[ae+se,this.index],range:[ae,this.index],loc:D})),ue},ve.prototype.skipMultiLineComment=function(){var ue,ae,se=[];for(this.trackComment&&(se=[],ue=this.index-2,ae={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var D=this.source.charCodeAt(this.index);if(dt.Character.isLineTerminator(D))13===D&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===D){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index-2],range:[ue,this.index],loc:ae})),se;++this.index}else++this.index}return this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index],range:[ue,this.index],loc:ae})),this.tolerateUnexpectedToken(),se},ve.prototype.scanComments=function(){var se;this.trackComment&&(se=[]);for(var ue=0===this.index;!this.eof();){var ae=this.source.charCodeAt(this.index);if(dt.Character.isWhiteSpace(ae))++this.index;else if(dt.Character.isLineTerminator(ae))++this.index,13===ae&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue=!0;else if(47===ae)if(47===(ae=this.source.charCodeAt(this.index+1))){this.index+=2;var D=this.skipSingleLineComment(2);this.trackComment&&(se=se.concat(D)),ue=!0}else{if(42!==ae)break;this.index+=2,D=this.skipMultiLineComment(),this.trackComment&&(se=se.concat(D))}else if(ue&&45===ae){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,D=this.skipSingleLineComment(3),this.trackComment&&(se=se.concat(D))}else{if(60!==ae||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,D=this.skipSingleLineComment(4),this.trackComment&&(se=se.concat(D))}}return se},ve.prototype.isFutureReservedWord=function(se){switch(se){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ve.prototype.isStrictModeReservedWord=function(se){switch(se){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ve.prototype.isRestrictedWord=function(se){return"eval"===se||"arguments"===se},ve.prototype.isKeyword=function(se){switch(se.length){case 2:return"if"===se||"in"===se||"do"===se;case 3:return"var"===se||"for"===se||"new"===se||"try"===se||"let"===se;case 4:return"this"===se||"else"===se||"case"===se||"void"===se||"with"===se||"enum"===se;case 5:return"while"===se||"break"===se||"catch"===se||"throw"===se||"const"===se||"yield"===se||"class"===se||"super"===se;case 6:return"return"===se||"typeof"===se||"delete"===se||"switch"===se||"export"===se||"import"===se;case 7:return"default"===se||"finally"===se||"extends"===se;case 8:return"function"===se||"continue"===se||"debugger"===se;case 10:return"instanceof"===se;default:return!1}},ve.prototype.codePointAt=function(se){var ue=this.source.charCodeAt(se);if(ue>=55296&&ue<=56319){var ae=this.source.charCodeAt(se+1);ae>=56320&&ae<=57343&&(ue=1024*(ue-55296)+ae-56320+65536)}return ue},ve.prototype.scanHexEscape=function(se){for(var ue="u"===se?4:2,ae=0,D=0;D1114111||"}"!==se)&&this.throwUnexpectedToken(),dt.Character.fromCodePoint(ue)},ve.prototype.getIdentifier=function(){for(var se=this.index++;!this.eof();){var ue=this.source.charCodeAt(this.index);if(92===ue)return this.index=se,this.getComplexIdentifier();if(ue>=55296&&ue<57343)return this.index=se,this.getComplexIdentifier();if(!dt.Character.isIdentifierPart(ue))break;++this.index}return this.source.slice(se,this.index)},ve.prototype.getComplexIdentifier=function(){var ae,se=this.codePointAt(this.index),ue=dt.Character.fromCodePoint(se);for(this.index+=ue.length,92===se&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierStart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue=ae);!this.eof()&&(se=this.codePointAt(this.index),dt.Character.isIdentifierPart(se));)ue+=ae=dt.Character.fromCodePoint(se),this.index+=ae.length,92===se&&(ue=ue.substr(0,ue.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierPart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue+=ae);return ue},ve.prototype.octalToDecimal=function(se){var ue="0"!==se,ae=et(se);return!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ue=!0,ae=8*ae+et(this.source[this.index++]),"0123".indexOf(se)>=0&&!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ae=8*ae+et(this.source[this.index++]))),{code:ae,octal:ue}},ve.prototype.scanIdentifier=function(){var se,ue=this.index,ae=92===this.source.charCodeAt(ue)?this.getComplexIdentifier():this.getIdentifier();if(3!=(se=1===ae.length?3:this.isKeyword(ae)?4:"null"===ae?5:"true"===ae||"false"===ae?1:3)&&ue+ae.length!==this.index){var D=this.index;this.index=ue,this.tolerateUnexpectedToken(Ge.Messages.InvalidEscapedReservedWord),this.index=D}return{type:se,value:ae,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.scanPunctuator=function(){var se=this.index,ue=this.source[this.index];switch(ue){case"(":case"{":"{"===ue&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ue="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ue=this.source.substr(this.index,4))?this.index+=4:"==="===(ue=ue.substr(0,3))||"!=="===ue||">>>"===ue||"<<="===ue||">>="===ue||"**="===ue?this.index+=3:"&&"===(ue=ue.substr(0,2))||"||"===ue||"=="===ue||"!="===ue||"+="===ue||"-="===ue||"*="===ue||"/="===ue||"++"===ue||"--"===ue||"<<"===ue||">>"===ue||"&="===ue||"|="===ue||"^="===ue||"%="===ue||"<="===ue||">="===ue||"=>"===ue||"**"===ue?this.index+=2:"<>=!+-*%&|^/".indexOf(ue=this.source[this.index])>=0&&++this.index}return this.index===se&&this.throwUnexpectedToken(),{type:7,value:ue,lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanHexLiteral=function(se){for(var ue="";!this.eof()&&dt.Character.isHexDigit(this.source.charCodeAt(this.index));)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ue,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanBinaryLiteral=function(se){for(var ae,ue="";!this.eof()&&("0"===(ae=this.source[this.index])||"1"===ae);)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),this.eof()||(ae=this.source.charCodeAt(this.index),(dt.Character.isIdentifierStart(ae)||dt.Character.isDecimalDigit(ae))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ue,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanOctalLiteral=function(se,ue){var ae="",D=!1;for(dt.Character.isOctalDigit(se.charCodeAt(0))?(D=!0,ae="0"+this.source[this.index++]):++this.index;!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index));)ae+=this.source[this.index++];return!D&&0===ae.length&&this.throwUnexpectedToken(),(dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))||dt.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(ae,8),octal:D,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.isImplicitOctalLiteral=function(){for(var se=this.index+1;se=0&&(D=D.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(O,te,Me){var Je=parseInt(te||Me,16);return Je>1114111&&T.throwUnexpectedToken(Ge.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(D)}catch{this.throwUnexpectedToken(Ge.Messages.InvalidRegExp)}try{return new RegExp(se,ue)}catch{return null}},ve.prototype.scanRegExpBody=function(){var se=this.source[this.index];Oe.assert("/"===se,"Regular expression literal must start with a slash");for(var ue=this.source[this.index++],ae=!1,D=!1;!this.eof();)if(ue+=se=this.source[this.index++],"\\"===se)se=this.source[this.index++],dt.Character.isLineTerminator(se.charCodeAt(0))&&this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue+=se;else if(dt.Character.isLineTerminator(se.charCodeAt(0)))this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp);else if(ae)"]"===se&&(ae=!1);else{if("/"===se){D=!0;break}"["===se&&(ae=!0)}return D||this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue.substr(1,ue.length-2)},ve.prototype.scanRegExpFlags=function(){for(var ue="";!this.eof();){var ae=this.source[this.index];if(!dt.Character.isIdentifierPart(ae.charCodeAt(0)))break;if(++this.index,"\\"!==ae||this.eof())ue+=ae;else if("u"===(ae=this.source[this.index])){++this.index;var D=this.index,T=this.scanHexEscape("u");if(null!==T)for(ue+=T;D=55296&&se<57343&&dt.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ve}();De.Scanner=Ve},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.TokenName={},De.TokenName[1]="Boolean",De.TokenName[2]="",De.TokenName[3]="Identifier",De.TokenName[4]="Keyword",De.TokenName[5]="Null",De.TokenName[6]="Numeric",De.TokenName[7]="Punctuator",De.TokenName[8]="String",De.TokenName[9]="RegularExpression",De.TokenName[10]="Template"},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(10),dt=rt(12),Ge=rt(13),_e=function(){function Ve(){this.values=[],this.curly=this.paren=-1}return Ve.prototype.beforeFunctionExpression=function(ve){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ve)>=0},Ve.prototype.isRegexStart=function(){var ve=this.values[this.values.length-1],se=null!==ve;switch(ve){case"this":case"]":se=!1;break;case")":var ue=this.values[this.paren-1];se="if"===ue||"while"===ue||"for"===ue||"with"===ue;break;case"}":if(se=!1,"function"===this.values[this.curly-3])se=!!(ae=this.values[this.curly-4])&&!this.beforeFunctionExpression(ae);else if("function"===this.values[this.curly-4]){var ae;se=!(ae=this.values[this.curly-5])||!this.beforeFunctionExpression(ae)}}return se},Ve.prototype.push=function(ve){7===ve.type||4===ve.type?("{"===ve.value?this.curly=this.values.length:"("===ve.value&&(this.paren=this.values.length),this.values.push(ve.value)):this.values.push(null)},Ve}(),et=function(){function Ve(ve,se){this.errorHandler=new Oe.ErrorHandler,this.errorHandler.tolerant=!!se&&"boolean"==typeof se.tolerant&&se.tolerant,this.scanner=new dt.Scanner(ve,this.errorHandler),this.scanner.trackComment=!!se&&"boolean"==typeof se.comment&&se.comment,this.trackRange=!!se&&"boolean"==typeof se.range&&se.range,this.trackLoc=!!se&&"boolean"==typeof se.loc&&se.loc,this.buffer=[],this.reader=new _e}return Ve.prototype.errors=function(){return this.errorHandler.errors},Ve.prototype.getNextToken=function(){if(0===this.buffer.length){var ve=this.scanner.scanComments();if(this.scanner.trackComment)for(var se=0;se=ae.status}function et(ue){try{ue.dispatchEvent(new MouseEvent("click"))}catch{var ae=document.createEvent("MouseEvents");ae.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ue.dispatchEvent(ae)}}var Ve="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ve=Ve.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),se=Ve.saveAs||("object"!=typeof window||window!==Ve?function(){}:"download"in HTMLAnchorElement.prototype&&!ve?function(ue,ae,D){var T=Ve.URL||Ve.webkitURL,O=document.createElement("a");O.download=ae=ae||ue.name||"download",O.rel="noopener","string"==typeof ue?(O.href=ue,O.origin===location.origin?et(O):_e(O.href)?Ge(ue,ae,D):et(O,O.target="_blank")):(O.href=T.createObjectURL(ue),setTimeout(function(){T.revokeObjectURL(O.href)},4e4),setTimeout(function(){et(O)},0))}:"msSaveOrOpenBlob"in navigator?function(ue,ae,D){if(ae=ae||ue.name||"download","string"!=typeof ue)navigator.msSaveOrOpenBlob(function dt(ue,ae){return typeof ae>"u"?ae={autoBom:!1}:"object"!=typeof ae&&(console.warn("Deprecated: Expected third argument to be a object"),ae={autoBom:!ae}),ae.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ue.type)?new Blob(["\ufeff",ue],{type:ue.type}):ue}(ue,D),ae);else if(_e(ue))Ge(ue,ae,D);else{var T=document.createElement("a");T.href=ue,T.target="_blank",setTimeout(function(){et(T)})}}:function(ue,ae,D,T){if((T=T||open("","_blank"))&&(T.document.title=T.document.body.innerText="downloading..."),"string"==typeof ue)return Ge(ue,ae,D);var O="application/octet-stream"===ue.type,te=/constructor/i.test(Ve.HTMLElement)||Ve.safari,Me=/CriOS\/[\d]+/.test(navigator.userAgent);if((Me||O&&te||ve)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Wt=Je.result;Wt=Me?Wt:Wt.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=Wt:location=Wt,T=null},Je.readAsDataURL(ue)}else{var kt=Ve.URL||Ve.webkitURL,jt=kt.createObjectURL(ue);T?T.location=jt:location.href=jt,T=null,setTimeout(function(){kt.revokeObjectURL(jt)},4e4)}});Ve.saveAs=se.saveAs=se,Yt.exports=se})?De.apply(Tn,[]):De)&&(Yt.exports=Oe)},461:(Yt,Tn)=>{Tn.read=function(De,rt,Oe,dt,Ge){var _e,et,Ve=8*Ge-dt-1,ve=(1<>1,ue=-7,ae=Oe?Ge-1:0,D=Oe?-1:1,T=De[rt+ae];for(ae+=D,_e=T&(1<<-ue)-1,T>>=-ue,ue+=Ve;ue>0;_e=256*_e+De[rt+ae],ae+=D,ue-=8);for(et=_e&(1<<-ue)-1,_e>>=-ue,ue+=dt;ue>0;et=256*et+De[rt+ae],ae+=D,ue-=8);if(0===_e)_e=1-se;else{if(_e===ve)return et?NaN:1/0*(T?-1:1);et+=Math.pow(2,dt),_e-=se}return(T?-1:1)*et*Math.pow(2,_e-dt)},Tn.write=function(De,rt,Oe,dt,Ge,_e){var et,Ve,ve,se=8*_e-Ge-1,ue=(1<>1,D=23===Ge?Math.pow(2,-24)-Math.pow(2,-77):0,T=dt?0:_e-1,O=dt?1:-1,te=rt<0||0===rt&&1/rt<0?1:0;for(rt=Math.abs(rt),isNaN(rt)||rt===1/0?(Ve=isNaN(rt)?1:0,et=ue):(et=Math.floor(Math.log(rt)/Math.LN2),rt*(ve=Math.pow(2,-et))<1&&(et--,ve*=2),(rt+=et+ae>=1?D/ve:D*Math.pow(2,1-ae))*ve>=2&&(et++,ve/=2),et+ae>=ue?(Ve=0,et=ue):et+ae>=1?(Ve=(rt*ve-1)*Math.pow(2,Ge),et+=ae):(Ve=rt*Math.pow(2,ae-1)*Math.pow(2,Ge),et=0));Ge>=8;De[Oe+T]=255&Ve,T+=O,Ve/=256,Ge-=8);for(et=et<0;De[Oe+T]=255&et,T+=O,et/=256,se-=8);De[Oe+T-O]|=128*te}},870:(Yt,Tn,De)=>{"use strict";var rt=De(133);Yt.exports=rt},133:(Yt,Tn,De)=>{"use strict";var rt=De(840),Oe=De(34);function dt(Ge){return function(){throw new Error("Function "+Ge+" is deprecated and cannot be used.")}}Yt.exports.Type=De(647),Yt.exports.Schema=De(372),Yt.exports.FAILSAFE_SCHEMA=De(746),Yt.exports.JSON_SCHEMA=De(147),Yt.exports.CORE_SCHEMA=De(192),Yt.exports.DEFAULT_SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_FULL_SCHEMA=De(94),Yt.exports.load=rt.load,Yt.exports.loadAll=rt.loadAll,Yt.exports.safeLoad=rt.safeLoad,Yt.exports.safeLoadAll=rt.safeLoadAll,Yt.exports.dump=Oe.dump,Yt.exports.safeDump=Oe.safeDump,Yt.exports.YAMLException=De(314),Yt.exports.MINIMAL_SCHEMA=De(746),Yt.exports.SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_SCHEMA=De(94),Yt.exports.scan=dt("scan"),Yt.exports.parse=dt("parse"),Yt.exports.compose=dt("compose"),Yt.exports.addConstructor=dt("addConstructor")},997:Yt=>{"use strict";function Tn(_e){return typeof _e>"u"||null===_e}Yt.exports.isNothing=Tn,Yt.exports.isObject=function De(_e){return"object"==typeof _e&&null!==_e},Yt.exports.toArray=function rt(_e){return Array.isArray(_e)?_e:Tn(_e)?[]:[_e]},Yt.exports.repeat=function dt(_e,et){var ve,Ve="";for(ve=0;ve{"use strict";var rt=De(997),Oe=De(314),dt=De(94),Ge=De(31),_e=Object.prototype.toString,et=Object.prototype.hasOwnProperty,Ve=9,ve=10,se=13,ue=32,ae=33,D=34,T=35,O=37,te=38,Me=39,Je=42,kt=44,jt=45,Wt=58,wn=61,rn=62,Mi=63,zr=64,Xr=91,hs=93,Ya=96,tr=123,mu=124,Sa=125,yn={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(pe){var yt,Nt,Kt;if(yt=pe.toString(16).toUpperCase(),pe<=255)Nt="x",Kt=2;else if(pe<=65535)Nt="u",Kt=4;else{if(!(pe<=4294967295))throw new Oe("code point within a string may not be greater than 0xFFFFFFFF");Nt="U",Kt=8}return"\\"+Nt+rt.repeat("0",Kt-yt.length)+yt}function Nc(pe){this.schema=pe.schema||dt,this.indent=Math.max(1,pe.indent||2),this.noArrayIndent=pe.noArrayIndent||!1,this.skipInvalid=pe.skipInvalid||!1,this.flowLevel=rt.isNothing(pe.flowLevel)?-1:pe.flowLevel,this.styleMap=function kd(pe,yt){var Nt,Kt,Xt,Pt,dn,qt,We;if(null===yt)return{};for(Nt={},Xt=0,Pt=(Kt=Object.keys(yt)).length;Xt0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}else{for(Pt=0;PtKt&&" "!==pe[Cn+1],Cn=Pt);else if(!Da(dn))return Ja;qt=Pt>0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}Xe=Xe||bt&&Pt-Cn-1>Kt&&" "!==pe[Cn+1]}return We||Xe?Nt>9&&Sd(pe)?Ja:Xe?vu:Dd:jr&&!Xt(pe)?Fc:Oc}(yt,Kt||pe.flowLevel>-1&&Nt>=pe.flowLevel,pe.indent,Pt,function qt(We){return function Co(pe,yt){var Nt,Kt;for(Nt=0,Kt=pe.implicitTypes.length;Nt"+ml(yt,pe.indent)+Te(gu(function W(pe,yt){for(var Pt,dn,Nt=/(\n+)([^\n]*)/g,Kt=(Xe=void 0,Xe=pe.indexOf("\n"),Nt.lastIndex=Xe=-1!==Xe?Xe:pe.length,ee(pe.slice(0,Xe),yt)),Xt="\n"===pe[0]||" "===pe[0];dn=Nt.exec(pe);){var We=dn[2];Pt=" "===We[0],Kt+=dn[1]+(Xt||Pt||""===We?"":"\n")+ee(We,yt),Xt=Pt}var Xe;return Kt}(yt,Pt),Xt));case Ja:return'"'+function Fe(pe){for(var Nt,Kt,Xt,yt="",Pt=0;Pt=55296&&Nt<=56319&&(Kt=pe.charCodeAt(Pt+1))>=56320&&Kt<=57343?(yt+=Kn(1024*(Nt-55296)+Kt-56320+65536),Pt++):yt+=!(Xt=yn[Nt])&&Da(Nt)?pe[Pt]:Xt||Kn(Nt);return yt}(yt)+'"';default:throw new Oe("impossible error: invalid scalar style")}}()}function ml(pe,yt){var Nt=Sd(pe)?String(yt):"",Kt="\n"===pe[pe.length-1];return Nt+(!Kt||"\n"!==pe[pe.length-2]&&"\n"!==pe?Kt?"":"-":"+")+"\n"}function Te(pe){return"\n"===pe[pe.length-1]?pe.slice(0,-1):pe}function ee(pe,yt){if(""===pe||" "===pe[0])return pe;for(var Kt,Pt,Nt=/ [^ ]/g,Xt=0,dn=0,qt=0,We="";Kt=Nt.exec(pe);)(qt=Kt.index)-Xt>yt&&(We+="\n"+pe.slice(Xt,Pt=dn>Xt?dn:qt),Xt=Pt+1),dn=qt;return We+="\n",(We+=pe.length-Xt>yt&&dn>Xt?pe.slice(Xt,dn)+"\n"+pe.slice(dn+1):pe.slice(Xt)).slice(1)}function A(pe,yt,Nt){var Kt,Xt,Pt,dn,qt,We;for(Pt=0,dn=(Xt=Nt?pe.explicitTypes:pe.implicitTypes).length;Pt tag resolver accepts not "'+We+'" style');Kt=qt.represent[We](yt,We)}pe.dump=Kt}return!0}return!1}function st(pe,yt,Nt,Kt,Xt,Pt){pe.tag=null,pe.dump=Nt,A(pe,Nt,!1)||A(pe,Nt,!0);var dn=_e.call(pe.dump);Kt&&(Kt=pe.flowLevel<0||pe.flowLevel>yt);var We,Xe,qt="[object Object]"===dn||"[object Array]"===dn;if(qt&&(Xe=-1!==(We=pe.duplicates.indexOf(Nt))),(null!==pe.tag&&"?"!==pe.tag||Xe||2!==pe.indent&&yt>0)&&(Xt=!1),Xe&&pe.usedDuplicates[We])pe.dump="*ref_"+We;else{if(qt&&Xe&&!pe.usedDuplicates[We]&&(pe.usedDuplicates[We]=!0),"[object Object]"===dn)Kt&&0!==Object.keys(pe.dump).length?(function nr(pe,yt,Nt,Kt){var qt,We,Xe,bt,Cn,jr,Xt="",Pt=pe.tag,dn=Object.keys(Nt);if(!0===pe.sortKeys)dn.sort();else if("function"==typeof pe.sortKeys)dn.sort(pe.sortKeys);else if(pe.sortKeys)throw new Oe("sortKeys must be a boolean or a function");for(qt=0,We=dn.length;qt1024)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+="?":jr+="? "),jr+=pe.dump,Cn&&(jr+=Ro(pe,yt)),st(pe,yt+1,bt,!0,Cn)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+=":":jr+=": ",Xt+=jr+=pe.dump));pe.tag=Pt,pe.dump=Xt||"{}"}(pe,yt,pe.dump,Xt),Xe&&(pe.dump="&ref_"+We+pe.dump)):(function Qt(pe,yt,Nt){var dn,qt,We,Xe,bt,Kt="",Xt=pe.tag,Pt=Object.keys(Nt);for(dn=0,qt=Pt.length;dn1024&&(bt+="? "),bt+=pe.dump+(pe.condenseFlow?'"':"")+":"+(pe.condenseFlow?"":" "),st(pe,yt,Xe,!1,!1)&&(Kt+=bt+=pe.dump));pe.tag=Xt,pe.dump="{"+Kt+"}"}(pe,yt,pe.dump),Xe&&(pe.dump="&ref_"+We+" "+pe.dump));else if("[object Array]"===dn){var bt=pe.noArrayIndent&&yt>0?yt-1:yt;Kt&&0!==pe.dump.length?(function zt(pe,yt,Nt,Kt){var dn,qt,Xt="",Pt=pe.tag;for(dn=0,qt=Nt.length;dn "+pe.dump)}return!0}function Tt(pe,yt){var Xt,Pt,Nt=[],Kt=[];for(Ut(pe,Nt,Kt),Xt=0,Pt=Kt.length;Xt{"use strict";function Tn(De,rt){Error.call(this),this.name="YAMLException",this.reason=De,this.mark=rt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Tn.prototype=Object.create(Error.prototype)).constructor=Tn,Tn.prototype.toString=function(rt){var Oe=this.name+": ";return Oe+=this.reason||"(unknown reason)",!rt&&this.mark&&(Oe+=" "+this.mark.toString()),Oe},Yt.exports=Tn},840:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(48),Ge=De(31),_e=De(94),et=Object.prototype.hasOwnProperty,Ve=1,ve=2,se=3,ue=4,ae=1,D=2,T=3,O=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,te=/[\x85\u2028\u2029]/,Me=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,kt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jt(A){return Object.prototype.toString.call(A)}function Wt(A){return 10===A||13===A}function wn(A){return 9===A||32===A}function rn(A){return 9===A||32===A||10===A||13===A}function Mi(A){return 44===A||91===A||93===A||123===A||125===A}function zr(A){var st;return 48<=A&&A<=57?A-48:97<=(st=32|A)&&st<=102?st-97+10:-1}function Xr(A){return 120===A?2:117===A?4:85===A?8:0}function hs(A){return 48<=A&&A<=57?A-48:-1}function Ya(A){return 48===A?"\0":97===A?"\x07":98===A?"\b":116===A||9===A?"\t":110===A?"\n":118===A?"\v":102===A?"\f":114===A?"\r":101===A?"\x1b":32===A?" ":34===A?'"':47===A?"/":92===A?"\\":78===A?"\x85":95===A?"\xa0":76===A?"\u2028":80===A?"\u2029":""}function tr(A){return A<=65535?String.fromCharCode(A):String.fromCharCode(55296+(A-65536>>10),56320+(A-65536&1023))}for(var mu=new Array(256),Sa=new Array(256),yn=0;yn<256;yn++)mu[yn]=Ya(yn)?1:0,Sa[yn]=Ya(yn);function Cd(A,st){this.input=A,this.filename=st.filename||null,this.schema=st.schema||_e,this.onWarning=st.onWarning||null,this.legacy=st.legacy||!1,this.json=st.json||!1,this.listener=st.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=A.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function kd(A,st){return new Oe(st,new dt(A.filename,A.input,A.position,A.line,A.position-A.lineStart))}function Kn(A,st){throw kd(A,st)}function Nc(A,st){A.onWarning&&A.onWarning.call(null,kd(A,st))}var gu={YAML:function(st,Tt,Ut){var Vt,mn,pe;null!==st.version&&Kn(st,"duplication of %YAML directive"),1!==Ut.length&&Kn(st,"YAML directive accepts exactly one argument"),null===(Vt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(st,"ill-formed argument of the YAML directive"),mn=parseInt(Vt[1],10),pe=parseInt(Vt[2],10),1!==mn&&Kn(st,"unacceptable YAML version of the document"),st.version=Ut[0],st.checkLineBreaks=pe<2,1!==pe&&2!==pe&&Nc(st,"unsupported YAML version of the document")},TAG:function(st,Tt,Ut){var Vt,mn;2!==Ut.length&&Kn(st,"TAG directive accepts exactly two arguments"),mn=Ut[1],Je.test(Vt=Ut[0])||Kn(st,"ill-formed tag handle (first argument) of the TAG directive"),et.call(st.tagMap,Vt)&&Kn(st,'there is a previously declared suffix for "'+Vt+'" tag handle'),kt.test(mn)||Kn(st,"ill-formed tag prefix (second argument) of the TAG directive"),st.tagMap[Vt]=mn}};function Ro(A,st,Tt,Ut){var Vt,mn,pe,yt;if(st1&&(A.result+=rt.repeat("\n",st-1))}function Ja(A,st){var Tt,Nt,Ut=A.tag,Vt=A.anchor,mn=[],yt=!1;for(null!==A.anchor&&(A.anchorMap[A.anchor]=mn),Nt=A.input.charCodeAt(A.position);0!==Nt&&45===Nt&&rn(A.input.charCodeAt(A.position+1));)if(yt=!0,A.position++,Zr(A,!0,-1)&&A.lineIndent<=st)mn.push(null),Nt=A.input.charCodeAt(A.position);else if(Tt=A.line,W(A,st,se,!1,!0),mn.push(A.result),Zr(A,!0,-1),Nt=A.input.charCodeAt(A.position),(A.line===Tt||A.lineIndent>st)&&0!==Nt)Kn(A,"bad indentation of a sequence entry");else if(A.lineIndentst?Nt=1:A.lineIndent===st?Nt=0:A.lineIndentst?Nt=1:A.lineIndent===st?Nt=0:A.lineIndentst)&&(W(A,st,ue,!0,Vt)&&(We?dn=A.result:qt=A.result),We||(lo(A,Kt,Xt,Pt,dn,qt,mn,pe),Pt=dn=qt=null),Zr(A,!0,-1),bt=A.input.charCodeAt(A.position)),A.lineIndent>st&&0!==bt)Kn(A,"bad indentation of a mapping entry");else if(A.lineIndent=0))break;0===Xt?Kn(A,"bad explicit indentation width of a block scalar; it cannot be less than one"):pe?Kn(A,"repeat of an indentation width identifier"):(yt=st+Xt-1,pe=!0)}if(wn(Pt)){do{Pt=A.input.charCodeAt(++A.position)}while(wn(Pt));if(35===Pt)do{Pt=A.input.charCodeAt(++A.position)}while(!Wt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Da(A),A.lineIndent=0,Pt=A.input.charCodeAt(A.position);(!pe||A.lineIndentyt&&(yt=A.lineIndent),Wt(Pt))Nt++;else{if(A.lineIndent0){for(Vt=pe,mn=0;Vt>0;Vt--)(pe=zr(yt=A.input.charCodeAt(++A.position)))>=0?mn=(mn<<4)+pe:Kn(A,"expected hexadecimal character");A.result+=tr(mn),A.position++}else Kn(A,"unknown escape sequence");Tt=Ut=A.position}else Wt(yt)?(Ro(A,Tt,Ut,!0),nc(A,Zr(A,!1,st)),Tt=Ut=A.position):A.position===A.lineStart&&pl(A)?Kn(A,"unexpected end of the document within a double quoted scalar"):(A.position++,Ut=A.position)}Kn(A,"unexpected end of the stream within a double quoted scalar")}(A,We)?Xt=!0:function Te(A){var st,Tt,Ut;if(42!==(Ut=A.input.charCodeAt(A.position)))return!1;for(Ut=A.input.charCodeAt(++A.position),st=A.position;0!==Ut&&!rn(Ut)&&!Mi(Ut);)Ut=A.input.charCodeAt(++A.position);return A.position===st&&Kn(A,"name of an alias node must contain at least one character"),Tt=A.input.slice(st,A.position),A.anchorMap.hasOwnProperty(Tt)||Kn(A,'unidentified alias "'+Tt+'"'),A.result=A.anchorMap[Tt],Zr(A,!0,-1),!0}(A)?(Xt=!0,(null!==A.tag||null!==A.anchor)&&Kn(A,"alias node should not have any properties")):function Sd(A,st,Tt){var Vt,mn,pe,yt,Nt,Kt,Xt,qt,Pt=A.kind,dn=A.result;if(rn(qt=A.input.charCodeAt(A.position))||Mi(qt)||35===qt||38===qt||42===qt||33===qt||124===qt||62===qt||39===qt||34===qt||37===qt||64===qt||96===qt||(63===qt||45===qt)&&(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt)))return!1;for(A.kind="scalar",A.result="",mn=pe=A.position,yt=!1;0!==qt;){if(58===qt){if(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt))break}else if(35===qt){if(rn(A.input.charCodeAt(A.position-1)))break}else{if(A.position===A.lineStart&&pl(A)||Tt&&Mi(qt))break;if(Wt(qt)){if(Nt=A.line,Kt=A.lineStart,Xt=A.lineIndent,Zr(A,!1,-1),A.lineIndent>=st){yt=!0,qt=A.input.charCodeAt(A.position);continue}A.position=pe,A.line=Nt,A.lineStart=Kt,A.lineIndent=Xt;break}}yt&&(Ro(A,mn,pe,!1),nc(A,A.line-Nt),mn=pe=A.position,yt=!1),wn(qt)||(pe=A.position+1),qt=A.input.charCodeAt(++A.position)}return Ro(A,mn,pe,!1),!!A.result||(A.kind=Pt,A.result=dn,!1)}(A,We,Ve===Tt)&&(Xt=!0,null===A.tag&&(A.tag="?")),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):0===Nt&&(Xt=yt&&Ja(A,Xe))),null!==A.tag&&"!"!==A.tag)if("?"===A.tag){for(null!==A.result&&"scalar"!==A.kind&&Kn(A,'unacceptable node kind for ! tag; it should be "scalar", not "'+A.kind+'"'),Pt=0,dn=A.implicitTypes.length;Pt tag; it should be "'+qt.kind+'", not "'+A.kind+'"'),qt.resolve(A.result)?(A.result=qt.construct(A.result),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):Kn(A,"cannot resolve a node with !<"+A.tag+"> explicit tag")):Kn(A,"unknown tag !<"+A.tag+">");return null!==A.listener&&A.listener("close",A),null!==A.tag||null!==A.anchor||Xt}function ee(A){var Tt,Ut,Vt,pe,st=A.position,mn=!1;for(A.version=null,A.checkLineBreaks=A.legacy,A.tagMap={},A.anchorMap={};0!==(pe=A.input.charCodeAt(A.position))&&(Zr(A,!0,-1),pe=A.input.charCodeAt(A.position),!(A.lineIndent>0||37!==pe));){for(mn=!0,pe=A.input.charCodeAt(++A.position),Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);for(Vt=[],(Ut=A.input.slice(Tt,A.position)).length<1&&Kn(A,"directive name must not be less than one character in length");0!==pe;){for(;wn(pe);)pe=A.input.charCodeAt(++A.position);if(35===pe){do{pe=A.input.charCodeAt(++A.position)}while(0!==pe&&!Wt(pe));break}if(Wt(pe))break;for(Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);Vt.push(A.input.slice(Tt,A.position))}0!==pe&&Da(A),et.call(gu,Ut)?gu[Ut](A,Ut,Vt):Nc(A,'unknown document directive "'+Ut+'"')}Zr(A,!0,-1),0===A.lineIndent&&45===A.input.charCodeAt(A.position)&&45===A.input.charCodeAt(A.position+1)&&45===A.input.charCodeAt(A.position+2)?(A.position+=3,Zr(A,!0,-1)):mn&&Kn(A,"directives end mark is expected"),W(A,A.lineIndent-1,ue,!1,!0),Zr(A,!0,-1),A.checkLineBreaks&&te.test(A.input.slice(st,A.position))&&Nc(A,"non-ASCII line breaks are interpreted as content"),A.documents.push(A.result),A.position===A.lineStart&&pl(A)?46===A.input.charCodeAt(A.position)&&(A.position+=3,Zr(A,!0,-1)):A.position"u"&&(Tt=st,st=null);var Ut=Fe(A,Tt);if("function"!=typeof st)return Ut;for(var Vt=0,mn=Ut.length;Vt"u"&&(Tt=st,st=null),nt(A,st,rt.extend({schema:Ge},Tt))},Yt.exports.safeLoad=function nr(A,st){return zt(A,rt.extend({schema:Ge},st))}},48:(Yt,Tn,De)=>{"use strict";var rt=De(997);function Oe(dt,Ge,_e,et,Ve){this.name=dt,this.buffer=Ge,this.position=_e,this.line=et,this.column=Ve}Oe.prototype.getSnippet=function(Ge,_e){var et,Ve,ve,se,ue;if(!this.buffer)return null;for(Ge=Ge||4,_e=_e||75,et="",Ve=this.position;Ve>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(Ve-1));)if(this.position-(Ve-=1)>_e/2-1){et=" ... ",Ve+=5;break}for(ve="",se=this.position;se_e/2-1){ve=" ... ",se-=5;break}return ue=this.buffer.slice(Ve,se),rt.repeat(" ",Ge)+et+ue+ve+"\n"+rt.repeat(" ",Ge+this.position-Ve+et.length)+"^"},Oe.prototype.toString=function(Ge){var _e,et="";return this.name&&(et+='in "'+this.name+'" '),et+="at line "+(this.line+1)+", column "+(this.column+1),Ge||(_e=this.getSnippet())&&(et+=":\n"+_e),et},Yt.exports=Oe},372:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(647);function Ge(Ve,ve,se){var ue=[];return Ve.include.forEach(function(ae){se=Ge(ae,ve,se)}),Ve[ve].forEach(function(ae){se.forEach(function(D,T){D.tag===ae.tag&&D.kind===ae.kind&&ue.push(T)}),se.push(ae)}),se.filter(function(ae,D){return-1===ue.indexOf(D)})}function et(Ve){this.include=Ve.include||[],this.implicit=Ve.implicit||[],this.explicit=Ve.explicit||[],this.implicit.forEach(function(ve){if(ve.loadKind&&"scalar"!==ve.loadKind)throw new Oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ge(this,"implicit",[]),this.compiledExplicit=Ge(this,"explicit",[]),this.compiledTypeMap=function _e(){var ve,se,Ve={scalar:{},sequence:{},mapping:{},fallback:{}};function ue(ae){Ve[ae.kind][ae.tag]=Ve.fallback[ae.tag]=ae}for(ve=0,se=arguments.length;ve{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(147)]})},94:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=rt.DEFAULT=new rt({include:[De(31)],explicit:[De(771),De(632),De(716)]})},31:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(192)],implicit:[De(934),De(996)],explicit:[De(486),De(166),De(711),De(738)]})},746:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({explicit:[De(464),De(322),De(71)]})},147:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(746)],implicit:[De(568),De(911),De(877),De(615)]})},647:(Yt,Tn,De)=>{"use strict";var rt=De(314),Oe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dt=["scalar","sequence","mapping"];Yt.exports=function _e(et,Ve){if(Ve=Ve||{},Object.keys(Ve).forEach(function(ve){if(-1===Oe.indexOf(ve))throw new rt('Unknown option "'+ve+'" is met in definition of "'+et+'" YAML type.')}),this.tag=et,this.kind=Ve.kind||null,this.resolve=Ve.resolve||function(){return!0},this.construct=Ve.construct||function(ve){return ve},this.instanceOf=Ve.instanceOf||null,this.predicate=Ve.predicate||null,this.represent=Ve.represent||null,this.defaultStyle=Ve.defaultStyle||null,this.styleAliases=function Ge(et){var Ve={};return null!==et&&Object.keys(et).forEach(function(ve){et[ve].forEach(function(se){Ve[String(se)]=ve})}),Ve}(Ve.styleAliases||null),-1===dt.indexOf(this.kind))throw new rt('Unknown kind "'+this.kind+'" is specified for "'+et+'" YAML type.')}},486:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(172).lW}catch{}var dt=De(647),Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function _e(se){if(null===se)return!1;var ue,ae,D=0,T=se.length,O=Ge;for(ae=0;ae64)){if(ue<0)return!1;D+=6}return D%8==0},construct:function et(se){var ue,ae,D=se.replace(/[\r\n=]/g,""),T=D.length,O=Ge,te=0,Me=[];for(ue=0;ue>16&255),Me.push(te>>8&255),Me.push(255&te)),te=te<<6|O.indexOf(D.charAt(ue));return 0==(ae=T%4*6)?(Me.push(te>>16&255),Me.push(te>>8&255),Me.push(255&te)):18===ae?(Me.push(te>>10&255),Me.push(te>>2&255)):12===ae&&Me.push(te>>4&255),rt?rt.from?rt.from(Me):new rt(Me):Me},predicate:function ve(se){return rt&&rt.isBuffer(se)},represent:function Ve(se){var D,T,ue="",ae=0,O=se.length,te=Ge;for(D=0;D>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]),ae=(ae<<8)+se[D];return 0==(T=O%3)?(ue+=te[ae>>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]):2===T?(ue+=te[ae>>10&63],ue+=te[ae>>4&63],ue+=te[ae<<2&63],ue+=te[64]):1===T&&(ue+=te[ae>>2&63],ue+=te[ae<<4&63],ue+=te[64],ue+=te[64]),ue}})},911:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!1;var et=_e.length;return 4===et&&("true"===_e||"True"===_e||"TRUE"===_e)||5===et&&("false"===_e||"False"===_e||"FALSE"===_e)},construct:function dt(_e){return"true"===_e||"True"===_e||"TRUE"===_e},predicate:function Ge(_e){return"[object Boolean]"===Object.prototype.toString.call(_e)},represent:{lowercase:function(_e){return _e?"true":"false"},uppercase:function(_e){return _e?"TRUE":"FALSE"},camelcase:function(_e){return _e?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647),dt=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),et=/^[-+]?[0-9]+e/;Yt.exports=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:function Ge(se){return!(null===se||!dt.test(se)||"_"===se[se.length-1])},construct:function _e(se){var ue,ae,D,T;return ae="-"===(ue=se.replace(/_/g,"").toLowerCase())[0]?-1:1,T=[],"+-".indexOf(ue[0])>=0&&(ue=ue.slice(1)),".inf"===ue?1===ae?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ue?NaN:ue.indexOf(":")>=0?(ue.split(":").forEach(function(O){T.unshift(parseFloat(O,10))}),ue=0,D=1,T.forEach(function(O){ue+=O*D,D*=60}),ae*ue):ae*parseFloat(ue,10)},predicate:function ve(se){return"[object Number]"===Object.prototype.toString.call(se)&&(se%1!=0||rt.isNegativeZero(se))},represent:function Ve(se,ue){var ae;if(isNaN(se))switch(ue){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===se)switch(ue){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===se)switch(ue){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(rt.isNegativeZero(se))return"-0.0";return ae=se.toString(10),et.test(ae)?ae.replace("e",".e"):ae},defaultStyle:"lowercase"})},877:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647);function dt(se){return 48<=se&&se<=57||65<=se&&se<=70||97<=se&&se<=102}function Ge(se){return 48<=se&&se<=55}function _e(se){return 48<=se&&se<=57}Yt.exports=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:function et(se){if(null===se)return!1;var T,ue=se.length,ae=0,D=!1;if(!ue)return!1;if(("-"===(T=se[ae])||"+"===T)&&(T=se[++ae]),"0"===T){if(ae+1===ue)return!0;if("b"===(T=se[++ae])){for(ae++;ae=0?"0b"+se.toString(2):"-0b"+se.toString(2).slice(1)},octal:function(se){return se>=0?"0"+se.toString(8):"-0"+se.toString(8).slice(1)},decimal:function(se){return se.toString(10)},hexadecimal:function(se){return se>=0?"0x"+se.toString(16).toUpperCase():"-0x"+se.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(797)}catch{typeof window<"u"&&(rt=window.esprima)}var dt=De(647);Yt.exports=new dt("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function Ge(ve){if(null===ve)return!1;try{var ue=rt.parse("("+ve+")",{range:!0});return!("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)}catch{return!1}},construct:function _e(ve){var D,se="("+ve+")",ue=rt.parse(se,{range:!0}),ae=[];if("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)throw new Error("Failed to resolve function");return ue.body[0].expression.params.forEach(function(T){ae.push(T.name)}),D=ue.body[0].expression.body.range,new Function(ae,"BlockStatement"===ue.body[0].expression.body.type?se.slice(D[0]+1,D[1]-1):"return "+se.slice(D[0],D[1]))},predicate:function Ve(ve){return"[object Function]"===Object.prototype.toString.call(ve)},represent:function et(ve){return ve.toString()}})},632:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Oe(et){if(null===et||0===et.length)return!1;var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return!("/"===Ve[0]&&(ve&&(se=ve[1]),se.length>3||"/"!==Ve[Ve.length-se.length-1]))},construct:function dt(et){var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return"/"===Ve[0]&&(ve&&(se=ve[1]),Ve=Ve.slice(1,Ve.length-se.length-1)),new RegExp(Ve,se)},predicate:function _e(et){return"[object RegExp]"===Object.prototype.toString.call(et)},represent:function Ge(et){var Ve="/"+et.source+"/";return et.global&&(Ve+="g"),et.multiline&&(Ve+="m"),et.ignoreCase&&(Ve+="i"),Ve}})},771:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Oe(){return!0},construct:function dt(){},predicate:function _e(et){return typeof et>"u"},represent:function Ge(){return""}})},71:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Oe){return null!==Oe?Oe:{}}})},996:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Oe(dt){return"<<"===dt||null===dt}})},568:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!0;var et=_e.length;return 1===et&&"~"===_e||4===et&&("null"===_e||"Null"===_e||"NULL"===_e)},construct:function dt(){return null},predicate:function Ge(_e){return null===_e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function Ge(et){if(null===et)return!0;var ve,se,ue,ae,D,Ve=[],T=et;for(ve=0,se=T.length;ve{"use strict";var rt=De(647),Oe=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function dt(_e){if(null===_e)return!0;var et,Ve,ve,se,ue,ae=_e;for(ue=new Array(ae.length),et=0,Ve=ae.length;et{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Oe){return null!==Oe?Oe:[]}})},738:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty;Yt.exports=new rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function dt(_e){if(null===_e)return!0;var et,Ve=_e;for(et in Ve)if(Oe.call(Ve,et)&&null!==Ve[et])return!1;return!0},construct:function Ge(_e){return null!==_e?_e:{}}})},464:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Oe){return null!==Oe?Oe:""}})},934:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function Ge(Ve){return null!==Ve&&(null!==Oe.exec(Ve)||null!==dt.exec(Ve))},construct:function _e(Ve){var ve,se,ue,ae,D,T,O,jt,te=0,Me=null;if(null===(ve=Oe.exec(Ve))&&(ve=dt.exec(Ve)),null===ve)throw new Error("Date resolve error");if(se=+ve[1],ue=+ve[2]-1,ae=+ve[3],!ve[4])return new Date(Date.UTC(se,ue,ae));if(D=+ve[4],T=+ve[5],O=+ve[6],ve[7]){for(te=ve[7].slice(0,3);te.length<3;)te+="0";te=+te}return ve[9]&&(Me=6e4*(60*+ve[10]+ +(ve[11]||0)),"-"===ve[9]&&(Me=-Me)),jt=new Date(Date.UTC(se,ue,ae,D,T,O,te)),Me&&jt.setTime(jt.getTime()-Me),jt},instanceOf:Date,represent:function et(Ve){return Ve.toISOString()}})}},Yt=>{Yt(Yt.s=440)}]); \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/main.f133ecab0a8782e2.js b/console/ui/dist/prod-nt/static/main.f133ecab0a8782e2.js new file mode 100644 index 0000000000..380f358dc5 --- /dev/null +++ b/console/ui/dist/prod-nt/static/main.f133ecab0a8782e2.js @@ -0,0 +1 @@ +(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{440:(Yt,Tn,De)=>{"use strict";function rt(t){return"function"==typeof t}let Oe=!1;const dt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Oe&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Oe=t},get useDeprecatedSynchronousErrorHandling(){return Oe}};function Ge(t){setTimeout(()=>{throw t},0)}const _e={closed:!0,next(t){},error(t){if(dt.useDeprecatedSynchronousErrorHandling)throw t;Ge(t)},complete(){}},et=Array.isArray||(t=>t&&"number"==typeof t.length);function Ve(t){return null!==t&&"object"==typeof t}const se=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ue{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ue)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof se?e.errors:e),[])}ue.EMPTY=((t=new ue).closed=!0,t);const D="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class O extends ue{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_e;break;case 1:if(!n){this.destination=_e;break}if("object"==typeof n){n instanceof O?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new te(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new te(this,n,e,i)}}[D](){return this}static create(n,e,i){const r=new O(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class te extends O{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;rt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==_e&&(s=Object.create(e),rt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;dt.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=dt;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Ge(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Ge(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);dt.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),dt.useDeprecatedSynchronousErrorHandling)throw i;Ge(i)}}__tryOrSetError(n,e,i){if(!dt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return dt.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Ge(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const kt="function"==typeof Symbol&&Symbol.observable||"@@observable";function jt(t){return t}function wn(t){return 0===t.length?jt:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let rn=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof O)return t;if(t[D])return t[D]()}return t||n||e?new O(t,n,e):new O(_e)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||dt.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),dt.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){dt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Me(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof O?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Mi(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[kt](){return this}pipe(...e){return 0===e.length?this:wn(e)(this)}toPromise(e){return new(e=Mi(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Mi(t){if(t||(t=dt.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Xr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class hs extends ue{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends O{constructor(n){super(n),this.destination=n}}let tr=(()=>{class t extends rn{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[D](){return new Ya(this)}lift(e){const i=new mu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Xr;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mu(n,e),t})();class mu extends tr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ue.EMPTY}}function Sa(t){return t&&"function"==typeof t.schedule}function yn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new kd(n,this.project,this.thisArg))}}class kd extends O{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function pl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const nc=t=>{if(t&&"function"==typeof t[kt])return(t=>n=>{const e=t[kt]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Zr(t))return Kn(t);if(pl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ge),n))(t);if(t&&"function"==typeof t[Ro])return(t=>n=>{const e=t[Ro]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Ve(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Oc(t,n){return new rn(e=>{const i=new ue;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function co(t,n){return n?function da(t,n){if(null!=t){if(function vu(t){return t&&"function"==typeof t[kt]}(t))return function Sd(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>{const r=t[kt]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(pl(t))return function Fc(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Zr(t))return Oc(t,n);if(function Ja(t){return t&&"function"==typeof t[Ro]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new rn(e=>{const i=new ue;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Ro](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof rn?t:new rn(nc(t))}class ml extends O{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class W extends O{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Fe(t,n){if(!n.closed)return t instanceof rn?t.subscribe(n):nc(t)(n)}function nt(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(nt((r,o)=>co(t(r,o)).pipe(yn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new zt(t,e)))}class zt{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Qt(n,this.project,this.concurrent))}}class Qt extends W{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function A(t=Number.POSITIVE_INFINITY){return nt(jt,t)}function st(t,n){return n?Oc(t,n):new rn(Kn(t))}function Tt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Sa(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof rn?t[0]:A(n)(st(t,e))}function Ut(){return function(n){return n.lift(new Vt(n))}}class Vt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new mn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class mn extends O{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class pe extends rn{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ue,n.add(this.source.subscribe(new Nt(this.getSubject(),this))),n.closed&&(this._connection=null,n=ue.EMPTY)),n}refCount(){return Ut()(this)}}const yt=(()=>{const t=pe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Nt extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class dn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function qt(){return new tr}function We(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new dn(r,n));const o=Object.create(i,yt);return o.source=i,o.subjectFactory=r,o}}(qt)(t))}function Xe(t){for(let n in t)if(t[n]===Xe)return n;throw Error("Could not find renamed property on target object.")}function bt(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Cn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Cn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function jr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const Y0=Xe({__forward_ref__:Xe});function Gi(t){return t.__forward_ref__=Gi,t.toString=function(){return Cn(this())},t}function wi(t){return tT(t)?t():t}function tT(t){return"function"==typeof t&&t.hasOwnProperty(Y0)&&t.__forward_ref__===Gi}function nT(t){return t&&!!t.\u0275providers}const U_="https://g.co/ng/security#xss";class Ot extends Error{constructor(n,e){super(G_(n,e)),this.code=n}}function G_(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Ri(t){return"string"==typeof t?t:null==t?"":String(t)}function W_(t,n){throw new Ot(-201,!1)}function jc(t,n){null==t&&function to(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ci(t){return{providers:t.providers||[],imports:t.imports||[]}}function q_(t){return _L(t,X_)||_L(t,wL)}function _L(t,n){return t.hasOwnProperty(n)?t[n]:null}function xL(t){return t&&(t.hasOwnProperty(iT)||t.hasOwnProperty(hge))?t[iT]:null}const X_=Xe({\u0275prov:Xe}),iT=Xe({\u0275inj:Xe}),wL=Xe({ngInjectableDef:Xe}),hge=Xe({ngInjectorDef:Xe});var ki=(()=>((ki=ki||{})[ki.Default=0]="Default",ki[ki.Host=1]="Host",ki[ki.Self=2]="Self",ki[ki.SkipSelf=4]="SkipSelf",ki[ki.Optional=8]="Optional",ki))();let rT;function Pc(t){const n=rT;return rT=t,n}function CL(t,n,e){const i=q_(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ki.Optional?null:void 0!==n?n:void W_(Cn(t))}const $o=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),J0={},oT="__NG_DI_FLAG__",Y_="ngTempTokenPath",pge="ngTokenPath",mge=/\n/gm,gge="\u0275",kL="__source";let K0;function sg(t){const n=K0;return K0=t,n}function vge(t,n=ki.Default){if(void 0===K0)throw new Ot(-203,!1);return null===K0?CL(t,void 0,n):K0.get(t,n&ki.Optional?null:void 0,n)}function ct(t,n=ki.Default){return(function fge(){return rT}()||vge)(wi(t),n)}function ar(t,n=ki.Default){return ct(t,J_(n))}function J_(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function sT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),yu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(yu||(yu={})),yu))();const kh={},Yr=[],K_=Xe({\u0275cmp:Xe}),aT=Xe({\u0275dir:Xe}),lT=Xe({\u0275pipe:Xe}),DL=Xe({\u0275mod:Xe}),Sh=Xe({\u0275fac:Xe}),Z0=Xe({__NG_ELEMENT_ID__:Xe});let xge=0;function Rt(t){return vf(()=>{const e=!0===t.standalone,i={},r={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&t.dependencies||null,getStandaloneInjector:null,selectors:t.selectors||Yr,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||yu.Emulated,id:"c"+xge++,styles:t.styles||Yr,_:null,setInput:null,schemas:t.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=t.dependencies,s=t.features;return r.inputs=AL(t.inputs,i),r.outputs=AL(t.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(TL).filter(EL):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(vl).filter(EL):null,r})}function TL(t){return no(t)||Ka(t)}function EL(t){return null!==t}function Di(t){return vf(()=>({type:t.type,bootstrap:t.bootstrap||Yr,declarations:t.declarations||Yr,imports:t.imports||Yr,exports:t.exports||Yr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AL(t,n){if(null==t)return kh;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const Zt=Rt;function gl(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function no(t){return t[K_]||null}function Ka(t){return t[aT]||null}function vl(t){return t[lT]||null}function rc(t,n){const e=t[DL]||null;if(!e&&!0===n)throw new Error(`Type ${Cn(t)} does not have '\u0275mod' property.`);return e}const Dh=0,Rn=1,Ji=2,fs=3,bu=4,Ep=5,Qa=6,lg=7,ks=8,Q_=9,Z_=10,ir=11,cT=12,e1=13,ML=14,cg=15,Za=16,t1=17,ug=18,Ed=19,n1=20,IL=21,Bo=22,uT=1,NL=2,ex=7,tx=8,dg=9,yl=10;function oc(t){return Array.isArray(t)&&"object"==typeof t[uT]}function _u(t){return Array.isArray(t)&&!0===t[uT]}function dT(t){return 0!=(4&t.flags)}function i1(t){return t.componentOffset>-1}function nx(t){return 1==(1&t.flags)}function xu(t){return null!==t.template}function kge(t){return 0!=(256&t[Ji])}function Ap(t,n){return t.hasOwnProperty(Sh)?t[Sh]:null}class Tge{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Hn(){return jL}function jL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Age),Ege}function Ege(){const t=LL(this),n=t?.current;if(n){const e=t.previous;if(e===kh)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Age(t,n,e,i){const r=this.declaredInputs[e],o=LL(t)||function Mge(t,n){return t[PL]=n}(t,{previous:kh,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Tge(l&&l.currentValue,n,a===kh),t[i]=n}Hn.ngInherit=!0;const PL="__ngSimpleChanges__";function LL(t){return t[PL]||null}const Lc=function(t,n,e){},RL="svg";function Ta(t){for(;Array.isArray(t);)t=t[Dh];return t}function ix(t,n){return Ta(n[t])}function sc(t,n){return Ta(n[t.index])}function BL(t,n){return t.data[n]}function hg(t,n){return t[n]}function ac(t,n){const e=n[t];return oc(e)?e:e[Dh]}function rx(t){return 64==(64&t[Ji])}function yf(t,n){return null==n?null:t[n]}function VL(t){t[ug]=0}function fT(t,n){t[Ep]+=n;let e=t,i=t[fs];for(;null!==i&&(1===n&&1===e[Ep]||-1===n&&0===e[Ep]);)i[Ep]+=n,e=i,i=i[fs]}const $i={lFrame:KL(null),bindingsEnabled:!0};function zL(){return $i.bindingsEnabled}function Gt(){return $i.lFrame.lView}function Pr(){return $i.lFrame.tView}function $e(t){return $i.lFrame.contextLView=t,t[ks]}function Be(t){return $i.lFrame.contextLView=null,t}function Ea(){let t=UL();for(;null!==t&&64===t.type;)t=t.parent;return t}function UL(){return $i.lFrame.currentTNode}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function pT(){return $i.lFrame.isParent}function mT(){$i.lFrame.isParent=!1}function bl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function fg(){return $i.lFrame.bindingIndex++}function Eh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function zge(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,gT(n)}function gT(t){$i.lFrame.currentDirectiveIndex=t}function XL(){return $i.lFrame.currentQueryIndex}function yT(t){$i.lFrame.currentQueryIndex=t}function Gge(t){const n=t[Rn];return 2===n.type?n.declTNode:1===n.type?t[Qa]:null}function YL(t,n,e){if(e&ki.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ki.Host||(r=Gge(o),null===r||(o=o[cg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=JL();return i.currentTNode=n,i.lView=t,!0}function bT(t){const n=JL(),e=t[Rn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function JL(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?KL(t):n}function KL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function QL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const ZL=QL;function _T(){const t=QL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function _l(){return $i.lFrame.selectedIndex}function Mp(t){$i.lFrame.selectedIndex=t}function es(){const t=$i.lFrame;return BL(t.tView,t.selectedIndex)}function at(){$i.lFrame.currentNamespace=RL}function Ip(){!function Yge(){$i.lFrame.currentNamespace=null}()}function ox(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[ug]+=65536),(a>11>16&&(3&t[Ji])===n){t[Ji]+=2048,Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}else{Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}const pg=-1;class o1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function CT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[cg],e--;return i}let kT=!0;function ux(t){const n=kT;return kT=t,n}const oR=255,sR=5;let ive=0;const Md={};function dx(t,n){const e=aR(t,n);if(-1!==e)return e;const i=n[Rn];i.firstCreatePass&&(t.injectorIndex=n.length,ST(i.data,t),ST(n,null),ST(i.blueprint,null));const r=DT(t,n),o=t.injectorIndex;if(rR(r)){const s=lx(r),a=cx(r,n),l=a[Rn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function ST(t,n){t.push(0,0,0,0,0,0,0,0,n)}function aR(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function DT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=pR(r),null===i)return pg;if(e++,r=r[cg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return pg}function TT(t,n,e){!function rve(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Z0)&&(i=e[Z0]),null==i&&(i=e[Z0]=ive++);const r=i&oR;n.data[t+(r>>sR)]|=1<=0?n&oR:lve:n}(e);if("function"==typeof o){if(!YL(n,t,i))return i&ki.Host?lR(r,0,i):cR(n,e,i,r);try{const s=o(i);if(null!=s||i&ki.Optional)return s;W_()}finally{ZL()}}else if("number"==typeof o){let s=null,a=aR(t,n),l=pg,c=i&ki.Host?n[Za][Qa]:null;for((-1===a||i&ki.SkipSelf)&&(l=-1===a?DT(t,n):n[a+8],l!==pg&&fR(i,!1)?(s=n[Rn],a=lx(l),n=cx(l,n)):a=-1);-1!==a;){const u=n[Rn];if(hR(o,a,u.data)){const d=sve(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==pg&&fR(i,n[Rn].data[a+8]===c)&&hR(o,a,n)?(s=u,a=lx(l),n=cx(l,n)):a=-1}}return r}function sve(t,n,e,i,r,o){const s=n[Rn],a=s.data[t+8],u=hx(a,s,e,null==i?i1(a)&&kT:i!=s&&0!=(3&a.type),r&ki.Host&&o===a);return null!==u?Np(n,s,u,a):Md}function hx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xu(f)&&f.type===e)return l}return null}function Np(t,n,e,i){let r=t[e];const o=n.data;if(function Zge(t){return t instanceof o1}(r)){const s=r;s.resolving&&function rge(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Ot(-200,`Circular dependency in DI detected for ${t}${e}`)}(function eo(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ri(t)}(o[e]));const a=ux(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Pc(s.injectImpl):null;YL(t,i,ki.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function Kge(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=jL(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Pc(l),ux(a),s.resolving=!1,ZL()}}return r}function hR(t,n,e){return!!(e[n+(t>>sR)]&1<{const n=t.prototype.constructor,e=n[Sh]||ET(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Sh]||ET(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ET(t){return tT(t)?()=>{const n=ET(wi(t));return n&&n()}:Ap(t)}function pR(t){const n=t[Rn],e=n.type;return 2===e?n.declTNode:1===e?t[Qa]:null}function Ah(t){return function ove(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function AT(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(vg)?l[vg]:Object.defineProperty(l,vg,{value:[]})[vg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class zn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Fp(t,n){t.forEach(e=>Array.isArray(e)?Fp(e,n):n(e))}function gR(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function fx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function c1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function fve(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function IT(t,n){const e=_g(t,n);if(e>=0)return t[1|e]}function _g(t,n){return function vR(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Bl=Bl||{})[Bl.Important=1]="Important",Bl[Bl.DashCase=2]="DashCase",Bl))();const LT=new Map;let jve=0;const $T="__ngContext__";function el(t,n){oc(n)?(t[$T]=n[n1],function Lve(t){LT.set(t[n1],t)}(n)):t[$T]=n}let BT;function VT(t,n){return BT(t,n)}function m1(t){const n=t[fs];return _u(n)?n[fs]:n}function HT(t){return LR(t[e1])}function zT(t){return LR(t[bu])}function LR(t){for(;null!==t&&!_u(t);)t=t[bu];return t}function wg(t,n,e,i,r){if(null!=i){let o,s=!1;_u(i)?o=i:oc(i)&&(s=!0,i=i[Dh]);const a=Ta(i);0===t&&null!==e?null==r?zR(n,e,a):Op(n,e,a,r||null,!0):1===t&&null!==e?Op(n,e,a,r||null,!0):2===t?function JT(t,n,e){const i=vx(t,n);i&&function i0e(t,n,e,i){t.removeChild(n,e,i)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function s0e(t,n,e,i,r){const o=e[ex];o!==Ta(e)&&wg(n,t,i,o,r);for(let a=yl;a0&&(t[e-1][bu]=i[bu]);const o=fx(t,yl+n);!function Yve(t,n){g1(t,n,n[ir],2,null,null),n[Dh]=null,n[Qa]=null}(i[Rn],i);const s=o[Ed];null!==s&&s.detachView(o[Rn]),i[fs]=null,i[bu]=null,i[Ji]&=-65}return i}function BR(t,n){if(!(128&n[Ji])){const e=n[ir];e.destroyNode&&g1(t,n,e,3,null,null),function Qve(t){let n=t[e1];if(!n)return qT(t[Rn],t);for(;n;){let e=null;if(oc(n))e=n[e1];else{const i=n[yl];i&&(e=i)}if(!e){for(;n&&!n[bu]&&n!==t;)oc(n)&&qT(n[Rn],n),n=n[fs];null===n&&(n=t),oc(n)&&qT(n[Rn],n),e=n&&n[bu]}n=e}}(n)}}function qT(t,n){if(!(128&n[Ji])){n[Ji]&=-65,n[Ji]|=128,function n0e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===yu.None||o===yu.Emulated)return null}return sc(i,e)}}(t,n.parent,e)}function Op(t,n,e,i,r){t.insertBefore(n,e,i,r)}function zR(t,n,e){t.appendChild(n,e)}function UR(t,n,e,i,r){null!==i?Op(t,n,e,i,r):zR(t,n,e)}function vx(t,n){return t.parentNode(n)}function GR(t,n,e){return qR(t,n,e)}let XT,_x,ZT,xx,qR=function WR(t,n,e){return 40&t.type?sc(t,e):null};function yx(t,n,e,i){const r=VR(t,i,n),o=n[ir],a=GR(i.parent||n[Qa],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return _x}()?.createHTML(t)||t}function eE(){if(void 0===xx&&(xx=null,$o.trustedTypes))try{xx=$o.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xx}function e5(t){return eE()?.createHTML(t)||t}function n5(t){return eE()?.createScriptURL(t)||t}class jp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${U_})`}}class f0e extends jp{getTypeName(){return"HTML"}}class p0e extends jp{getTypeName(){return"Style"}}class m0e extends jp{getTypeName(){return"Script"}}class g0e extends jp{getTypeName(){return"URL"}}class v0e extends jp{getTypeName(){return"ResourceURL"}}function cc(t){return t instanceof jp?t.changingThisBreaksApplicationSecurity:t}function Id(t,n){const e=function y0e(t){return t instanceof jp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${U_})`)}return e===n}class k0e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Cg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S0e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Cg(n),e}}const T0e=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;function wx(t){return(t=String(t)).match(T0e)?t:"unsafe:"+t}function Mh(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function v1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const r5=Mh("area,br,col,hr,img,wbr"),o5=Mh("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),s5=Mh("rp,rt"),tE=v1(r5,v1(o5,Mh("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),v1(s5,Mh("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),v1(s5,o5)),nE=Mh("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),a5=v1(nE,Mh("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Mh("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),E0e=Mh("script,style,template");class A0e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!tE.hasOwnProperty(e))return this.sanitizedSomething=!0,!E0e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();tE.hasOwnProperty(e)&&!r5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(l5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const M0e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,I0e=/([^\#-~ |!])/g;function l5(t){return t.replace(/&/g,"&").replace(M0e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(I0e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Cx;function c5(t,n){let e=null;try{Cx=Cx||function i5(t){const n=new S0e(t);return function D0e(){try{return!!(new window.DOMParser).parseFromString(Cg(""),"text/html")}catch{return!1}}()?new k0e(n):n}(t);let i=n?String(n):"";e=Cx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Cx.getInertBodyElement(i)}while(i!==o);return Cg((new A0e).sanitizeChildren(iE(e)||e))}finally{if(e){const i=iE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function iE(t){return"content"in t&&function N0e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ko=(()=>((ko=ko||{})[ko.NONE=0]="NONE",ko[ko.HTML=1]="HTML",ko[ko.STYLE=2]="STYLE",ko[ko.SCRIPT=3]="SCRIPT",ko[ko.URL=4]="URL",ko[ko.RESOURCE_URL=5]="RESOURCE_URL",ko))();function kx(t){const n=b1();return n?e5(n.sanitize(ko.HTML,t)||""):Id(t,"HTML")?e5(cc(t)):c5(function ZR(){return void 0!==ZT?ZT:typeof document<"u"?document:void 0}(),Ri(t))}function y1(t){const n=b1();return n?n.sanitize(ko.URL,t)||"":Id(t,"URL")?cc(t):wx(Ri(t))}function u5(t){const n=b1();if(n)return n5(n.sanitize(ko.RESOURCE_URL,t)||"");if(Id(t,"ResourceURL"))return n5(cc(t));throw new Ot(904,!1)}function b1(){const t=Gt();return t&&t[cT]}const Sx=new zn("ENVIRONMENT_INITIALIZER"),Dx=new zn("INJECTOR",-1),h5=new zn("INJECTOR_DEF_TYPES");class f5{get(n,e=J0){if(e===J0){const i=new Error(`NullInjectorError: No provider for ${Cn(n)}!`);throw i.name="NullInjectorError",i}return e}}function $0e(...t){return{\u0275providers:p5(0,t),\u0275fromNgModule:!0}}function p5(t,...n){const e=[],i=new Set;let r;return Fp(n,o=>{const s=o;rE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&m5(r,e),e}function m5(t,n){for(let e=0;e{n.push(o)})}}function rE(t,n,e,i){if(!(t=wi(t)))return!1;let r=null,o=xL(t);const s=!o&&no(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)rE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Fp(o.imports,u=>{rE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&m5(c,n)}if(!a){const c=Ap(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Yr},{provide:h5,useValue:r,multi:!0},{provide:Sx,useValue:()=>ct(r),multi:!0})}const l=o.providers;null==l||a||oE(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function oE(t,n){for(let e of t)nT(e)&&(e=e.\u0275providers),Array.isArray(e)?oE(e,n):n(e)}const B0e=Xe({provide:String,useValue:Xe});function sE(t){return null!==t&&"object"==typeof t&&B0e in t}function Pp(t){return"function"==typeof t}const aE=new zn("Set Injector scope."),Tx={},H0e={};let lE;function Ex(){return void 0===lE&&(lE=new f5),lE}class Nd{}class y5 extends Nd{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,uE(n,s=>this.processProvider(s)),this.records.set(Dx,kg(void 0,this)),r.has("environment")&&this.records.set(Nd,kg(void 0,this));const o=this.records.get(aE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(h5.multi,Yr,ki.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=sg(this),i=Pc(void 0);try{return n()}finally{sg(e),Pc(i)}}get(n,e=J0,i=ki.Default){this.assertNotDestroyed(),i=J_(i);const r=sg(this),o=Pc(void 0);try{if(!(i&ki.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function q0e(t){return"function"==typeof t||"object"==typeof t&&t instanceof zn}(n)&&q_(n);a=l&&this.injectableDefInScope(l)?kg(cE(n),Tx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ki.Self?Ex():this.parent).get(n,e=i&ki.Optional&&e===J0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Y_]=s[Y_]||[]).unshift(Cn(n)),r)throw s;return function bge(t,n,e,i){const r=t[Y_];throw n[kL]&&r.unshift(n[kL]),t.message=function _ge(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==gge?t.slice(2):t;let r=Cn(n);if(Array.isArray(n))r=n.map(Cn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Cn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(mge,"\n ")}`}("\n"+t.message,r,e,i),t[pge]=r,t[Y_]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Pc(o),sg(r)}}resolveInjectorInitializers(){const n=sg(this),e=Pc(void 0);try{const i=this.get(Sx.multi,Yr,ki.Self);for(const r of i)r()}finally{sg(n),Pc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(Cn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ot(205,!1)}processProvider(n){let e=Pp(n=wi(n))?n:wi(n&&n.provide);const i=function U0e(t){return sE(t)?kg(void 0,t.useValue):kg(b5(t),Tx)}(n);if(Pp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=kg(void 0,Tx,!0),r.factory=()=>sT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Tx&&(e.value=H0e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function W0e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=wi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function cE(t){const n=q_(t),e=null!==n?n.factory:Ap(t);if(null!==e)return e;if(t instanceof zn)throw new Ot(204,!1);if(t instanceof Function)return function z0e(t){const n=t.length;if(n>0)throw c1(n,"?"),new Ot(204,!1);const e=function uge(t){const n=t&&(t[X_]||t[wL]);return n?(function dge(t){if(t.hasOwnProperty("name"))return t.name;(""+t).match(/^function\s*([^\s(]+)/)}(t),n):null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Ot(204,!1)}function b5(t,n,e){let i;if(Pp(t)){const r=wi(t);return Ap(r)||cE(r)}if(sE(t))i=()=>wi(t.useValue);else if(function v5(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...sT(t.deps||[]));else if(function g5(t){return!(!t||!t.useExisting)}(t))i=()=>ct(wi(t.useExisting));else{const r=wi(t&&(t.useClass||t.provide));if(!function G0e(t){return!!t.deps}(t))return Ap(r)||cE(r);i=()=>new r(...sT(t.deps))}return i}function kg(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function uE(t,n){for(const e of t)Array.isArray(e)?uE(e,n):e&&nT(e)?uE(e.\u0275providers,n):n(e)}class X0e{}class _5{}class J0e{resolveComponentFactory(n){throw function Y0e(t){const n=Error(`No component factory found for ${Cn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let $c=(()=>{class t{}return t.NULL=new J0e,t})();function K0e(){return Sg(Ea(),Gt())}function Sg(t,n){return new ti(sc(t,n))}let ti=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K0e,t})();function Q0e(t){return t instanceof ti?t.nativeElement:t}class Lp{}let Ss=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Z0e(){const t=Gt(),e=ac(Ea().index,t);return(oc(e)?e:t)[ir]}(),t})(),e1e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class _1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const t1e=new _1("15.2.2"),dE={},hE="ngOriginalError";function fE(t){return t[hE]}class Dg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&fE(n);for(;e&&fE(e);)e=fE(e);return e||null}}function w5(t){return t.ownerDocument.defaultView}function Ih(t){return t instanceof Function?t():t}function k5(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const S5="ng-template";function d1e(t,n,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==k5(f,c,0)||2&i&&c!==h){if(wu(i))return!1;s=!0}}}}else{if(!s&&!wu(i)&&!wu(l))return!1;if(s&&wu(l))continue;s=!1,i=l|1&i}}return wu(i)||s}function wu(t){return 0==(1&t)}function p1e(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!wu(s)&&(n+=E5(o,r),r=""),i=s,o=o||!wu(i);e++}return""!==r&&(n+=E5(o,r)),n}const Bi={};function w(t){A5(Pr(),Gt(),_l()+t,!1)}function A5(t,n,e,i){if(!i)if(3==(3&n[Ji])){const o=t.preOrderCheckHooks;null!==o&&sx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&ax(n,o,0,e)}Mp(e)}function F5(t,n=null,e=null,i){const r=O5(t,n,e,i);return r.resolveInjectorInitializers(),r}function O5(t,n=null,e=null,i,r=new Set){const o=[e||Yr,$0e(t)];return i=i||("object"==typeof t?void 0:Cn(t)),new y5(o,n||Ex(),i||null,r)}let Rs=(()=>{class t{static create(e,i){if(Array.isArray(e))return F5({name:""},i,e,"");{const r=e.name??"";return F5({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=J0,t.NULL=new f5,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>ct(Dx)}),t.__NG_ELEMENT_ID__=-1,t})();function le(t,n=ki.Default){const e=Gt();return null===e?ct(t,n):uR(Ea(),e,wi(t),n)}function H5(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iBo&&A5(t,n,Bo,!1),Lc(s?2:0,r),e(i,r)}finally{Mp(o),Lc(s?3:1,r)}}function _E(t,n,e){if(dT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,x1(t,e,r.hostVars,Bi),r)}function Fd(t,n,e,i,r,o){const s=sc(t,n);!function DE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Ri(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}(n[ir],s,o,t.value,e,i,r)}function oye(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&TE(e)}}function TE(t){for(let i=HT(t);null!==i;i=zT(i))for(let r=yl;r0&&TE(o)}const e=t[Rn].components;if(null!==e)for(let i=0;i0&&TE(r)}}function uye(t,n){const e=ac(n,t),i=e[Rn];(function dye(t,n){for(let e=n.length;e-1&&(WT(n,i),fx(e,i))}this._attachedToViewContainer=!1}BR(this._lView[Rn],this._lView)}onDestroy(n){G5(this._lView[Rn],this._lView,null,n)}markForCheck(){EE(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ji]&=-65}reattach(){this._lView[Ji]|=64}detectChanges(){Fx(this._lView[Rn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ot(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kve(t,n){g1(t,n,n[ir],2,null,null)}(this._lView[Rn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Ot(902,!1);this._appRef=n}}class hye extends w1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;Fx(n[Rn],n,n[ks],!1)}checkNoChanges(){}get context(){return null}}class n8 extends $c{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=no(n);return new C1(e,this.ngModule)}}function i8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pye{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=J_(i);const r=this.injector.get(n,dE,i);return r!==dE||e===dE?r:this.parentInjector.get(n,e,i)}}class C1 extends _5{get inputs(){return i8(this.componentDef.inputs)}get outputs(){return i8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _1e(t){return t.map(b1e).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Nd?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pye(n,o):n,a=s.get(Lp,null);if(null===a)throw new Ot(407,!1);const l=s.get(e1e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function U1e(t,n,e){return t.selectRootElement(n,e===yu.ShadowDom)}(c,i,this.componentDef.encapsulation):GT(c,u,function fye(t){const n=t.toLowerCase();return"svg"===n?RL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=CE(0,null,null,1,0,null,null,null,null,null),p=Mx(null,f,null,h,null,null,a,c,l,s,null);let m,g;bT(p);try{const v=this.componentDef;let y,_=null;v.findHostDirectiveDefs?(y=[],_=new Map,v.findHostDirectiveDefs(v,y,_),y.push(v)):y=[v];const C=function gye(t,n){const e=t[Rn],i=Bo;return t[i]=n,Ag(e,i,2,"#host",null)}(p,d),S=function vye(t,n,e,i,r,o,s,a){const l=r[Rn];!function yye(t,n,e,i){for(const r of t)n.mergedAttrs=s1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Ox(n,n.mergedAttrs,!0),null!==e&&QR(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mx(r,U5(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&SE(l,t,i.length-1),Nx(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=BL(f,Bo),d&&function _ye(t,n,e,i){if(i)CT(t,e,["ng-version",t1e.full]);else{const{attrs:r,classes:o}=function x1e(t){const n=[],e=[];let i=1,r=2;for(;i0&&KR(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function xye(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=s1(r.hostAttrs,e=s1(e,r.hostAttrs))}}(i)}function IE(t){return t===kh?{}:t===Yr?[]:t}function kye(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function Sye(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Dye(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function Px(t){return!!NE(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function NE(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Od(t,n,e){return t[n]=e}function tl(t,n,e){return!Object.is(t[n],e)&&(t[n]=e,!0)}function Rp(t,n,e,i){const r=tl(t,n,e);return tl(t,n+1,i)||r}function ht(t,n,e,i){const r=Gt();return tl(r,fg(),n)&&(Pr(),Fd(es(),r,t,n,e,i)),ht}function Ig(t,n,e,i){return tl(t,fg(),e)?n+Ri(e)+i:Bi}function Ng(t,n,e,i,r,o){const a=Rp(t,function Th(){return $i.lFrame.bindingIndex}(),e,r);return Eh(2),a?n+Ri(e)+i+Ri(r)+o:Bi}function J(t,n,e,i,r,o,s,a){const l=Gt(),c=Pr(),u=t+Bo,d=c.firstCreatePass?function Pye(t,n,e,i,r,o,s,a,l){const c=n.consts,u=Ag(n,t,4,s||null,yf(c,a));kE(n,e,u,yf(c,l)),ox(n,u);const d=u.tView=CE(2,u,i,r,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,c);return null!==n.queries&&(n.queries.template(n,u),d.queries=n.queries.embeddedTView(u)),u}(u,c,l,n,e,i,r,o,s):c.data[u];Ad(d,!1);const h=l[ir].createComment("");yx(c,l,h,d),el(h,l),Nx(l,l[u]=K5(h,l,h,d)),nx(d)&&xE(c,l,d),null!=s&&wE(l,d,a)}function uo(t){return hg(function Vge(){return $i.lFrame.contextLView}(),Bo+t)}function k(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!1),k}function FE(t,n,e,i,r){const s=r?"class":"style";ME(t,e,n.inputs[s],s,i)}function b(t,n,e,i){const r=Gt(),o=Pr(),s=Bo+t,a=r[ir],l=o.firstCreatePass?function Rye(t,n,e,i,r,o){const s=n.consts,l=Ag(n,t,2,i,yf(s,r));return kE(n,e,l,yf(s,o)),null!==l.attrs&&Ox(l,l.attrs,!1),null!==l.mergedAttrs&&Ox(l,l.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,l),l}(s,o,r,n,e,i):o.data[s],c=r[s]=GT(a,n,function Jge(){return $i.lFrame.currentNamespace}()),u=nx(l);return Ad(l,!0),QR(a,c,l),32!=(32&l.flags)&&yx(o,r,c,l),0===function Pge(){return $i.lFrame.elementDepthCount}()&&el(c,r),function Lge(){$i.lFrame.elementDepthCount++}(),u&&(xE(o,r,l),_E(o,l,r)),null!==i&&wE(r,l),b}function x(){let t=Ea();pT()?mT():(t=t.parent,Ad(t,!1));const n=t;!function Rge(){$i.lFrame.elementDepthCount--}();const e=Pr();return e.firstCreatePass&&(ox(e,t),dT(t)&&e.queries.elementEnd(t)),null!=n.classesWithoutHost&&function eve(t){return 0!=(8&t.flags)}(n)&&FE(e,n,Gt(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function tve(t){return 0!=(16&t.flags)}(n)&&FE(e,n,Gt(),n.stylesWithoutHost,!1),x}function ge(t,n,e,i){return b(t,n,e,i),x(),ge}function ta(t,n,e){const i=Gt(),r=Pr(),o=t+Bo,s=r.firstCreatePass?function $ye(t,n,e,i,r){const o=n.consts,s=yf(o,i),a=Ag(n,t,8,"ng-container",s);return null!==s&&Ox(a,s,!0),kE(n,e,a,yf(o,r)),null!==n.queries&&n.queries.elementStart(n,a),a}(o,r,i,n,e):r.data[o];Ad(s,!0);const a=i[o]=i[ir].createComment("");return yx(r,i,a,s),el(a,i),nx(s)&&(xE(r,i,s),_E(r,s,i)),null!=e&&wE(i,s),ta}function na(){let t=Ea();const n=Pr();return pT()?mT():(t=t.parent,Ad(t,!1)),n.firstCreatePass&&(ox(n,t),dT(t)&&n.queries.elementEnd(t)),na}function vt(){return Gt()}function S1(t){return!!t&&"function"==typeof t.then}const OE=function v8(t){return!!t&&"function"==typeof t.subscribe};function ye(t,n,e,i){const r=Gt(),o=Pr(),s=Ea();return function b8(t,n,e,i,r,o,s){const a=nx(i),c=t.firstCreatePass&&Z5(t),u=n[ks],d=Q5(n);let h=!0;if(3&i.type||s){const m=sc(i,n),g=s?s(m):m,v=d.length,y=s?C=>s(Ta(C[i.index])):i.index;let _=null;if(!s&&a&&(_=function Bye(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=x8(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=x8(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?ac(t.index,n):n);let l=_8(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=_8(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function j(t=1){return function Wge(t){return($i.lFrame.contextLView=function qge(t,n){for(;t>0;)n=n[cg],t--;return n}(t,$i.lFrame.contextLView))[ks]}(t)}function Vye(t,n){let e=null;const i=function m1e(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function jE(t){return 2|t}function Bp(t){return(131068&t)>>2}function PE(t,n){return-131069&t|n<<2}function LE(t){return 1|t}function M8(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?bf(o):Bp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];qye(t[a],n)&&(l=!0,t[a+1]=i?LE(u):jE(u)),a=i?bf(u):Bp(u)}l&&(t[e+1]=i?jE(o):LE(o))}function qye(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&_g(t,n)>=0}const ia={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function I8(t){return t.substring(ia.key,ia.keyEnd)}function N8(t,n){const e=ia.textEnd;return e===n?-1:(n=ia.keyEnd=function Kye(t,n,e){for(;n32;)n++;return n}(t,ia.key=n,e),$g(t,n,e))}function $g(t,n,e){for(;n=0;e=N8(n,e))lc(t,I8(n),!0)}function Du(t,n,e,i){const r=Gt(),o=Pr(),s=Eh(2);o.firstUpdatePass&&R8(o,t,s,i),n!==Bi&&tl(r,s,n)&&B8(o,o.data[_l()],r,r[ir],t,r[s+1]=function abe(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Cn(cc(t)))),t}(n,e),i,s)}function Tu(t,n,e,i){const r=Pr(),o=Eh(2);r.firstUpdatePass&&R8(r,null,o,i);const s=Gt();if(e!==Bi&&tl(s,o,e)){const a=r.data[_l()];if(H8(a,i)&&!L8(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=jr(l,e||"")),FE(r,a,s,e,i)}else!function sbe(t,n,e,i,r,o,s,a){r===Bi&&(r=Yr);let l=0,c=0,u=0=t.expandoStartIndex}function R8(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[_l()],s=L8(t,e);H8(o,i)&&null===n&&!s&&(n=!1),n=function tbe(t,n,e,i){const r=function vT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=D1(e=RE(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=RE(r,t,n,e,i),null===o){let l=function nbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Bp(i))return t[bf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=RE(null,t,n,l[1],i),l=D1(l,n.attrs,i),function ibe(t,n,e,i){t[bf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function rbe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=bf(t[a+1]);t[i+1]=$x(h,a),0!==h&&(t[h+1]=PE(t[h+1],i)),t[a+1]=function zye(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$x(a,0),0!==a&&(t[a+1]=PE(t[a+1],i)),a=i;else t[i+1]=$x(l,0),0===a?a=i:t[l+1]=PE(t[l+1],i),l=i;c&&(t[i+1]=jE(t[i+1])),M8(t,u,i,!0),M8(t,u,i,!1),function Wye(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&_g(o,n)>=0&&(e[i+1]=LE(e[i+1]))}(n,u,t,i,o),s=$x(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function RE(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?Yr:void 0);let f=d?IT(h,i):u===i?h:void 0;if(c&&!Bx(f)&&(f=IT(l,i)),Bx(f)&&(a=f,s))return a;const p=t[r+1];r=s?bf(p):Bp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=IT(l,i))}return a}function Bx(t){return void 0!==t}function H8(t,n){return 0!=(t.flags&(n?8:16))}function I(t,n=""){const e=Gt(),i=Pr(),r=t+Bo,o=i.firstCreatePass?Ag(i,r,1,n,null):i.data[r],s=e[r]=function UT(t,n){return t.createText(n)}(e[ir],n);yx(i,e,s,o),Ad(o,!1)}function Dt(t){return xn("",t,""),Dt}function xn(t,n,e){const i=Gt(),r=Ig(i,t,n,e);return r!==Bi&&Nh(i,_l(),r),xn}function Ld(t,n,e,i,r){const o=Gt(),s=Ng(o,t,n,e,i,r);return s!==Bi&&Nh(o,_l(),s),Ld}function dc(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!0),dc}const Vg="en-US";let u6=Vg;function VE(t,n,e,i,r){if(t=wi(t),Array.isArray(t))for(let o=0;o>20;if(Pp(t)||!t.multi){const f=new o1(l,r,le),p=zE(a,n,r?u:u+h,d);-1===p?(TT(dx(c,s),o,a),HE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=zE(a,n,u+h,d),p=zE(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){TT(dx(c,s),o,a);const v=function x_e(t,n,e,i,r){const o=new o1(t,e,le);return o.multi=[],o.index=n,o.componentProviders=0,O6(o,r,i&&!e),o}(r?__e:b_e,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),HE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else HE(o,t,f>-1?f:p,O6(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function HE(t,n,e,i){const r=Pp(n),o=function V0e(t){return!!t.useClass}(n);if(r||o){const l=(o?wi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function O6(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function zE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function y_e(t,n,e){const i=Pr();if(i.firstCreatePass){const r=xu(t);VE(e,i.data,i.blueprint,r,!0),VE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class zg{}class j6{}class P6 extends zg{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new n8(this);const i=rc(n);this._bootstrapComponents=Ih(i.bootstrap),this._r3Injector=O5(n,e,[{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],Cn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class GE extends j6{constructor(n){super(),this.moduleType=n}create(n){return new P6(this.moduleType,n)}}class C_e extends zg{constructor(n,e,i){super(),this.componentFactoryResolver=new n8(this),this.instance=null;const r=new y5([...n,{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],e||Ex(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gx(t,n,e=null){return new C_e(t,n,e).injector}let k_e=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=p5(0,e.type),r=i.length>0?Gx([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(ct(Nd))}),t})();function L6(t){t.getStandaloneInjector=n=>n.get(k_e).getOrCreateStandaloneInjector(t)}function wl(t,n,e){const i=bl()+t,r=Gt();return r[i]===Bi?Od(r,i,e?n.call(e):n()):function k1(t,n){return t[n]}(r,i)}function lr(t,n,e,i){return G6(Gt(),bl(),t,n,e,i)}function Sr(t,n,e,i,r){return function W6(t,n,e,i,r,o,s){const a=n+e;return Rp(t,a,r,o)?Od(t,a+2,s?i.call(s,r,o):i(r,o)):F1(t,a+2)}(Gt(),bl(),t,n,e,i,r)}function Ug(t,n,e,i,r,o){return function q6(t,n,e,i,r,o,s,a){const l=n+e;return function Lx(t,n,e,i,r){const o=Rp(t,n,e,i);return tl(t,n+2,r)||o}(t,l,r,o,s)?Od(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):F1(t,l+3)}(Gt(),bl(),t,n,e,i,r,o)}function F1(t,n){const e=t[n];return e===Bi?void 0:e}function G6(t,n,e,i,r,o){const s=n+e;return tl(t,s,r)?Od(t,s+1,o?i.call(o,r):i(r)):F1(t,s+1)}function XE(t,n,e){const i=t+Bo,r=Gt(),o=hg(r,i);return function O1(t,n){return t[Rn].data[n].pure}(r,i)?G6(r,bl(),n,o.transform,e,o):o.transform(e)}function YE(t){return n=>{setTimeout(t,void 0,n)}}const Ke=class z_e extends tr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=YE(o),r&&(r=YE(r)),s&&(s=YE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ue&&n.add(a),a}};function U_e(){return this._results[Symbol.iterator]()}class JE{get changes(){return this._changes||(this._changes=new Ke)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=JE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=U_e)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Rc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function dve(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=q_e,t})();const G_e=Si,W_e=class extends G_e{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[t1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),bE(i,r,n),new w1(r)}};function q_e(){return Wx(Ea(),Gt())}function Wx(t,n){return 4&t.type?new W_e(n,t,Sg(t,n)):null}let nl=(()=>{class t{}return t.__NG_ELEMENT_ID__=X_e,t})();function X_e(){return Q6(Ea(),Gt())}const Y_e=nl,J6=class extends Y_e{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Sg(this._hostTNode,this._hostLView)}get injector(){return new mg(this._hostTNode,this._hostLView)}get parentInjector(){const n=DT(this._hostTNode,this._hostLView);if(rR(n)){const e=cx(n,this._hostLView),i=lx(n);return new mg(e[Rn].data[i+8],e)}return new mg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=K6(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-yl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function l1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new C1(no(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Nd,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Rn];if(function jge(t){return _u(t[fs])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[fs],h=new J6(d,d[Qa],d[fs]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Zve(t,n,e,i){const r=yl+i,o=e.length;i>0&&(e[r-1][bu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=yl;d{class t{constructor(e){this.appInits=e,this.resolve=Xx,this.reject=Xx,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(ct(Yx,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const P1=new zn("AppId",{providedIn:"root",factory:function x$(){return`${lA()}${lA()}${lA()}`}});function lA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const w$=new zn("Platform Initializer"),L1=new zn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),C$=new zn("AnimationModuleType");let xxe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hc=new zn("LocaleId",{providedIn:"root",factory:()=>ar(hc,ki.Optional|ki.SkipSelf)||function wxe(){return typeof $localize<"u"&&$localize.locale||Vg}()});class kxe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let k$=(()=>{class t{compileModuleSync(e){return new GE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ih(rc(e).declarations).reduce((s,a)=>{const l=no(a);return l&&s.push(new C1(l)),s},[]);return new kxe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Txe=(()=>Promise.resolve(0))();function cA(t){typeof Zone>"u"?Txe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Wi{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ke(!1),this.onMicrotaskEmpty=new Ke(!1),this.onStable=new Ke(!1),this.onError=new Ke(!1),typeof Zone>"u")throw new Ot(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Exe(){let t=$o.requestAnimationFrame,n=$o.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function Ixe(t){const n=()=>{!function Mxe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call($o,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,dA(t),t.isCheckStableRunning=!0,uA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),dA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return T$(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),E$(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return T$(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),E$(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,dA(t),uA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Wi.isInAngularZone())throw new Ot(909,!1)}static assertNotInAngularZone(){if(Wi.isInAngularZone())throw new Ot(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Axe,Xx,Xx);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Axe={};function uA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function dA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function T$(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function E$(t){t._nesting--,uA(t)}class Nxe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ke,this.onMicrotaskEmpty=new Ke,this.onStable=new Ke,this.onError=new Ke}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const A$=new zn(""),Kx=new zn("");let pA,hA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,pA||(function Fxe(t){pA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Wi.assertNotInAngularZone(),cA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())cA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(fA),ct(Kx))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),fA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return pA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Oh=!1;let _f=null;const M$=new zn("AllowMultipleToken"),mA=new zn("PlatformDestroyListeners"),I$=new zn("appBootstrapListener");class N${constructor(n,e){this.name=n,this.token=e}}function O$(t,n,e=[]){const i=`Platform: ${n}`,r=new zn(i);return(o=[])=>{let s=gA();if(!s||s.injector.get(M$,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Pxe(t){if(_f&&!_f.get(M$,!1))throw new Ot(400,!1);_f=t;const n=t.get(P$);(function F$(t){const n=t.get(w$,null);n&&n.forEach(e=>e())})(t)}(function j$(t=[],n){return Rs.create({name:n,providers:[{provide:aE,useValue:"platform"},{provide:mA,useValue:new Set([()=>_f=null])},...t]})}(a,i))}return function Rxe(t){const n=gA();if(!n)throw new Ot(401,!1);return n}()}}function gA(){return _f?.get(P$)??null}let P$=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function R$(t,n){let e;return e="noop"===t?new Nxe:("zone.js"===t?void 0:t)||new Wi(n),e}(i?.ngZone,function L$(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Wi,useValue:r}];return r.run(()=>{const s=Rs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Dg,null);if(!l)throw new Ot(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qx(this._modules,a),c.unsubscribe()})}),function $$(t,n,e){try{const i=e();return S1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Jx);return c.runInitializers(),c.donePromise.then(()=>(function d6(t){jc(t,"Expected localeId to be defined"),"string"==typeof t&&(u6=t.toLowerCase().replace(/_/g,"-"))}(a.injector.get(hc,Vg)||Vg),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=B$({},i);return function Oxe(t,n,e){const i=new GE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Au);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Ot(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ot(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(mA,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function B$(t,n){return Array.isArray(n)?n.reduce(B$,t):{...t,...n}}let Au=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new rn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new rn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Wi.assertNotInAngularZone(),cA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Wi.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Tt(o,s.pipe(We()))}bootstrap(e,i){const r=e instanceof _5;if(!this._injector.get(Jx).done){!r&&function ag(t){const n=no(t)||Ka(t)||vl(t);return null!==n&&n.standalone}(e);throw new Ot(405,Oh)}let s;s=r?e:this._injector.get($c).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function jxe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(zg),c=s.create(Rs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(A$,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qx(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Ot(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(I$,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Ot(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(Nd),ct(Dg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qx(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let qo=(()=>{class t{}return t.__NG_ELEMENT_ID__=Bxe,t})();function Bxe(t){return function Vxe(t,n,e){if(i1(t)&&!e){const i=ac(t.index,n);return new w1(i,i)}return 47&t.type?new w1(n[Za],n):null}(Ea(),Gt(),16==(16&t))}class G${constructor(){}supports(n){return Px(n)}create(n){return new qxe(n)}}const Wxe=(t,n)=>n;class qxe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||Wxe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new Xxe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new W$),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new W$),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class Xxe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Yxe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class W${constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new Yxe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function q$(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kxe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Kxe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Y$(){return new tw([new G$])}let tw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Y$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:Y$}),t})();function J$(){return new R1([new X$])}let R1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||J$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:J$}),t})();const ewe=O$(null,"core",[]);let twe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(ct(Au))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();function qg(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}let xA=null;function jh(){return xA}class rwe{}const Ir=new zn("DocumentToken");let wA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function owe(){return ct(K$)}()},providedIn:"platform"}),t})();const swe=new zn("Location Initialized");let K$=(()=>{class t extends wA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return jh().getBaseHref(this._doc)}onPopState(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Q$()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Q$()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(){return function awe(){return new K$(ct(Ir))}()},providedIn:"platform"}),t})();function Q$(){return!!window.history.pushState}function CA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function Z$(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ph(t){return t&&"?"!==t[0]?"?"+t:t}let zp=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tB)},providedIn:"root"}),t})();const eB=new zn("appBaseHref");let tB=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ar(Ir).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return CA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ph(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),lwe=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=CA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),kA=(()=>{class t{constructor(e){this._subject=new Ke,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function dwe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(Z$(nB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ph(i))}normalize(e){return t.stripTrailingSlash(function uwe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,nB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ph,t.joinWithSlash=CA,t.stripTrailingSlash=Z$,t.\u0275fac=function(e){return new(e||t)(ct(zp))},t.\u0275prov=Et({token:t,factory:function(){return function cwe(){return new kA(ct(zp))}()},providedIn:"root"}),t})();function nB(t){return t.replace(/\/index.html$/,"")}function pB(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const jA=/\s+/,mB=[];let Rh=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=mB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(jA):mB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(jA):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(jA).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(le(tw),le(R1),le(ti),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class Gwe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let jn=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Gwe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),yB(a,r)}});for(let r=0,o=i.length;r{yB(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(tw))},t.\u0275dir=Zt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function yB(t,n){t.context.$implicit=n.item}let gn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new qwe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){bB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){bB("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class qwe{constructor(){this.$implicit=null,this.ngIf=null}}function bB(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Cn(n)}'.`)}class PA{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),_B=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new PA(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(dw,9))},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),wB=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Bl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(R1),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),kl=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(le(nl))},t.\u0275dir=Zt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Hn]}),t})(),Vs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const SB="browser";let _Ce=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new xCe(ct(Ir),window)}),t})();class xCe{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function wCe(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=TB(this.window.history)||TB(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function TB(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class EB{}class YCe extends rwe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class VA extends YCe{static makeCurrent(){!function iwe(t){xA||(xA=t)}(new VA)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function JCe(){return H1=H1||document.querySelector("base"),H1?H1.getAttribute("href"):null}();return null==e?null:function KCe(t){pw=pw||document.createElement("a"),pw.setAttribute("href",t);const n=pw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){H1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return pB(document.cookie,n)}}let pw,H1=null;const FB=new zn("TRANSITION_ID"),ZCe=[{provide:Yx,useFactory:function QCe(t,n,e){return()=>{e.get(Jx).donePromise.then(()=>{const i=jh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const mw=new zn("EventManagerPlugins");let gw=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),z1=(()=>{class t extends jB{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const HA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},zA=/%COMP%/g,RB=new zn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $B(t,n){return n.flat(100).map(e=>e.replace(zA,t))}function BB(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new UA(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof zB?r.applyToHost(e):r instanceof GA&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case yu.Emulated:o=new zB(s,a,i,this.appId,l);break;case yu.ShadowDom:return new l2e(s,a,e,i);default:o=new GA(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(ct(gw),ct(z1),ct(P1),ct(RB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class UA{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(HA[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(HB(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(HB(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=HA[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=HA[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Bl.DashCase|Bl.Important)?n.style.setProperty(e,i,r&Bl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Bl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,BB(i)):this.eventManager.addEventListener(n,e,BB(i))}}function HB(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class l2e extends UA{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$B(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class GA extends UA{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$B(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class zB extends GA{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function o2e(t){return"_ngcontent-%COMP%".replace(zA,t)}(s),this.hostAttr=function s2e(t){return"_nghost-%COMP%".replace(zA,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let c2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const UB=["alt","control","meta","shift"],u2e={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},d2e={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let h2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>jh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),UB.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=u2e[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),UB.forEach(s=>{s!==r&&(0,d2e[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const WB=[{provide:L1,useValue:SB},{provide:w$,useValue:function f2e(){VA.makeCurrent()},multi:!0},{provide:Ir,useFactory:function m2e(){return function h0e(t){ZT=t}(document),document},deps:[]}],g2e=O$(ewe,"browser",WB),qB=new zn(""),XB=[{provide:Kx,useClass:class e2e{addToWindow(n){$o.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},$o.getAllAngularTestabilities=()=>n.getAllTestabilities(),$o.getAllAngularRootElements=()=>n.getAllRootElements(),$o.frameworkStabilizers||($o.frameworkStabilizers=[]),$o.frameworkStabilizers.push(i=>{const r=$o.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?jh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:A$,useClass:hA,deps:[Wi,fA,Kx]},{provide:hA,useClass:hA,deps:[Wi,fA,Kx]}],YB=[{provide:aE,useValue:"root"},{provide:Dg,useFactory:function p2e(){return new Dg},deps:[]},{provide:mw,useClass:c2e,multi:!0,deps:[Ir,Wi,L1]},{provide:mw,useClass:h2e,multi:!0,deps:[Ir]},{provide:vw,useClass:vw,deps:[gw,z1,P1,RB]},{provide:Lp,useExisting:vw},{provide:jB,useExisting:z1},{provide:z1,useClass:z1,deps:[Ir]},{provide:gw,useClass:gw,deps:[mw,Wi]},{provide:EB,useClass:t2e,deps:[]},[]];let qA=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:P1,useValue:e.appId},{provide:FB,useExisting:P1},ZCe]}}}return t.\u0275fac=function(e){return new(e||t)(ct(qB,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[...YB,...XB],imports:[Vs,twe]}),t})(),JB=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function y2e(){return new JB(ct(Ir))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let ZB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):ct(e7),i},providedIn:"root"}),t})(),e7=(()=>{class t extends ZB{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case ko.NONE:return i;case ko.HTML:return Id(i,"HTML")?cc(i):c5(this._doc,String(i)).toString();case ko.STYLE:return Id(i,"Style")?cc(i):i;case ko.SCRIPT:if(Id(i,"Script"))return cc(i);throw new Error("unsafe value used in a script context");case ko.URL:return Id(i,"URL")?cc(i):wx(String(i));case ko.RESOURCE_URL:if(Id(i,"ResourceURL"))return cc(i);throw new Error(`unsafe value used in a resource URL context (see ${U_})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${U_})`)}}bypassSecurityTrustHtml(e){return function b0e(t){return new f0e(t)}(e)}bypassSecurityTrustStyle(e){return function _0e(t){return new p0e(t)}(e)}bypassSecurityTrustScript(e){return function x0e(t){return new m0e(t)}(e)}bypassSecurityTrustUrl(e){return function w0e(t){return new g0e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function C0e(t){return new v0e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function C2e(t){return new e7(t.get(Ir))}(ct(Rs)),i},providedIn:"root"}),t})();function U1(t){return(U1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function K(t,n,e){return(n=function S2e(t){var n=function k2e(t,n){if("object"!==U1(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==U1(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===U1(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}class t7{}class D2e{}const $h="*";function il(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ma(t,n=null){return{type:4,styles:n,timings:t}}function n7(t,n=null){return{type:2,steps:t,options:n}}function Dr(t){return{type:6,styles:t,offset:null}}function Ia(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i7(t){Promise.resolve().then(t)}class G1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YA="!";function o7(t){return new Ot(3e3,!1)}function ake(){return typeof window<"u"&&typeof window.document<"u"}function JA(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wf(t){switch(t.length){case 0:return new G1;case 1:return t[0];default:return new r7(t)}}function s7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case YA:v=r.get(m);break;case $h:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function Y2e(t){return new Ot(3502,!1)}();return a}function KA(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&QA(e,"start",t)));break;case"done":t.onDone(()=>i(e&&QA(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&QA(e,"destroy",t)))}}function QA(t,n,e){const o=ZA(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function ZA(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let eM=(t,n)=>!1,l7=(t,n,e)=>[],c7=null;function tM(t){const n=t.parentNode||t.host;return n===c7?null:n}(JA()||typeof Element<"u")&&(ake()?(c7=(()=>document.documentElement)(),eM=(t,n)=>{for(;n;){if(n===t)return!0;n=tM(n)}return!1}):eM=(t,n)=>t.contains(n),l7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let Up=null,u7=!1;const d7=eM,h7=l7;let f7=(()=>{class t{validateStyleProperty(e){return function cke(t){Up||(Up=function uke(){return typeof document<"u"?document.body:null}()||{},u7=!!Up.style&&"WebkitAppearance"in Up.style);let n=!0;return Up.style&&!function lke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in Up.style,!n&&u7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Up.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d7(e,i)}getParentElement(e){return tM(e)}query(e,i,r){return h7(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new G1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),nM=(()=>{class t{}return t.NOOP=new f7,t})();const dke=1e3,iM="ng-enter",yw="ng-leave",bw="ng-trigger",_w=".ng-trigger",m7="ng-animating",rM=".ng-animating";function Bh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:oM(parseFloat(n[1]),n[2])}function oM(t,n){return"s"===n?t*dke:t}function xw(t,n,e){return t.hasOwnProperty("duration")?t:function fke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o7()),{duration:0,delay:0,easing:""};r=oM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=oM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function T2e(){return new Ot(3100,!1)}()),a=!0),o<0&&(n.push(function E2e(){return new Ot(3101,!1)}()),a=!0),a&&n.splice(l,0,o7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function W1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function g7(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Cf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y7(t,n,e){return e?n+":"+e+";":""}function b7(t){let n="";for(let e=0;e{const o=aM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),JA()&&b7(t))}function Gp(t,n){t.style&&(n.forEach((e,i)=>{const r=aM(i);t.style[r]=""}),JA()&&b7(t))}function q1(t){return Array.isArray(t)?1==t.length?t[0]:n7(t):t}const sM=new RegExp("{{\\s*(.+?)\\s*}}","g");function _7(t){let n=[];if("string"==typeof t){let e;for(;e=sM.exec(t);)n.push(e[1]);sM.lastIndex=0}return n}function X1(t,n,e){const i=t.toString(),r=i.replace(sM,(o,s)=>{let a=n[s];return null==a&&(e.push(function M2e(t){return new Ot(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function ww(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gke=/-+([a-z0-9])/g;function aM(t){return t.replace(gke,(...n)=>n[1].toUpperCase())}function vke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function I2e(t){return new Ot(3004,!1)}()}}function x7(t,n){return window.getComputedStyle(t)[n]}const Sw="*";function Cke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function kke(t,n,e){if(":"==t[0]){const l=function Ske(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function U2e(t){return new Ot(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(w7(r,s));"<"==o[0]&&!(r==Sw&&s==Sw)&&n.push(w7(s,r))}(i,e,n)):e.push(t),e}const Dw=new Set(["true","1"]),Tw=new Set(["false","0"]);function w7(t,n){const e=Dw.has(t)||Tw.has(t),i=Dw.has(n)||Tw.has(n);return(r,o)=>{let s=t==Sw||t==r,a=n==Sw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Dw.has(t):Tw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Dw.has(n):Tw.has(n)),s&&a}}const Dke=new RegExp("s*:selfs*,?","g");function lM(t,n,e,i){return new Tke(t).build(n,e,i)}class Tke{constructor(n){this._driver=n}build(n,e,i){const r=new Mke(e);return this._resetContextStyleTimingState(r),pc(this,q1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function F2e(){return new Ot(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function O2e(){return new Ot(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{_7(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(ww(o.values()),e.errors.push(function j2e(t,n){return new Ot(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pc(this,q1(n.animation),e);return{type:1,matchers:Cke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Wp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pc(this,i,e)),options:Wp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Wp(n.options)}}visitAnimate(n,e){const i=function Nke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return cM(xw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=cM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=xw(e,n);return cM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Dr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Dr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$h?i.push(a):e.errors.push(new Ot(3002,!1)):i.push(g7(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function L2e(t,n,e,i,r){return new Ot(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function mke(t,n,e){const i=n.params||{},r=_7(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function A2e(t){return new Ot(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function R2e(){return new Ot(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let _=null!=y.offset?y.offset:function Ike(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=_&&(o++,C=y.offset=_),l=l||C<0||C>1,a=a||C0&&o{const _=h>0?y==f?1:h*y:s[y],C=_*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=_,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pc(this,q1(n.animation),e),options:Wp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:Wp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:Wp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Eke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Dke,"")),t=t.replace(/@\*/g,_w).replace(/@\w+/g,e=>_w+"-"+e.slice(1)).replace(/:animating/g,rM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fc(e.collectedStyles,e.currentQuerySelector,new Map);const a=pc(this,q1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:Wp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function H2e(){return new Ot(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:xw(n.timings,e.errors,!0);return{type:12,animation:pc(this,q1(n.animation),e),timings:i,options:null}}}class Mke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wp(t){return t?(t=W1(t)).params&&(t.params=function Ake(t){return t?W1(t):null}(t.params)):t={},t}function cM(t,n,e){return{duration:t,delay:n,easing:e}}function uM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ew{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jke=new RegExp(":enter","g"),Lke=new RegExp(":leave","g");function dM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Rke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Rke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ew;const d=new hM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[uM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bh(X1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bh(i.duration):null,a=null!=i.delay?Bh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Aw);const s=Bh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return xw(e.params?X1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Aw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Aw={};class hM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Aw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bh(i.duration)),null!=i.delay&&(r.delay=Bh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=X1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new hM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Aw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new $ke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jke,"."+this._enterClassName)).replace(Lke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function z2e(t){return new Ot(3014,!1)}()),a}}class Mw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$h),this._currentKeyframe.set(e,$h);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function Bke(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$h)}else Cf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=X1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$h),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Cf(a,new Map,this._backFill);c.forEach((u,d)=>{u===YA?n.add(d):u===$h&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?ww(n.values()):[],s=e.size?ww(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return uM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class $ke extends Mw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Cf(n[0]);l.set("offset",0),o.push(l);const c=Cf(n[0]);c.set("offset",S7(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Cf(n[d]);const f=h.get("offset");h.set("offset",S7((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return uM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function S7(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class fM{}const Vke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Hke extends fM{normalizePropertyName(n,e){return aM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(Vke.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function N2e(t,n){return new Ot(3005,!1)}())}return s+o}}function D7(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const pM={};class T7{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function zke(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||pM,p=this.buildStyles(i,a&&a.params||pM,d),m=l&&l.params||pM,g=this.buildStyles(r,m,d),v=new Set,y=new Map,_=new Map,C="void"===r,S={params:Uke(m,h),delay:this.ast.options?.delay},M=u?[]:dM(n,e,this.ast.animation,o,s,p,g,S,c,d);let $=0;if(M.forEach(R=>{$=Math.max(R.duration+R.delay,$)}),d.length)return D7(e,this._triggerName,i,r,C,p,g,[],[],y,_,$,d);M.forEach(R=>{const z=R.element,U=fc(y,z,new Set);R.preStyleProps.forEach(re=>U.add(re));const q=fc(_,z,new Set);R.postStyleProps.forEach(re=>q.add(re)),z!==e&&v.add(z)});const G=ww(v.values());return D7(e,this._triggerName,i,r,C,p,g,M,G,y,_,$)}}function Uke(t,n){const e=W1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class Gke{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=W1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=X1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class qke{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new Gke(r.style,r.options&&r.options.params||{},i))}),E7(this.states,"true","1"),E7(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new T7(n,r,this.states))}),this.fallbackTransition=function Xke(t,n,e){return new T7(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function E7(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const Yke=new Ew;class Jke{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=lM(this._driver,e,i,r);if(i.length)throw function J2e(t){return new Ot(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=dM(this._driver,e,o,iM,yw,new Map,new Map,i,Yke,r),s.forEach(u=>{const d=fc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function K2e(){return new Ot(3300,!1)}()),s=[]),r.length)throw function Q2e(t){return new Ot(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$h))})});const c=wf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function Z2e(t){return new Ot(3301,!1)}();return e}listen(n,e,i,r){const o=ZA(e,"","","");return KA(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const A7="ng-animate-queued",mM="ng-animate-disabled",tSe=[],M7={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},nSe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zc="__ng_removed";class gM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function sSe(t){return t??null}(i?n.value:n),i){const o=W1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Y1="void",vM=new gM(Y1);class iSe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Uc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function eke(t,n){return new Ot(3302,!1)}();if(null==i||0==i.length)throw function tke(t){return new Ot(3303,!1)}();if(!function aSe(t){return"start"==t||"done"==t}(i))throw function nke(t,n){return new Ot(3400,!1)}();const o=fc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fc(this._engine.statesByElement,n,new Map);return a.has(e)||(Uc(n,bw),Uc(n,bw+"-"+e),a.set(e,vM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function ike(t){return new Ot(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new yM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Uc(n,bw),Uc(n,bw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new gM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=vM),c.value!==Y1&&l.value===c.value){if(!function uSe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{Gp(n,g),Rd(n,v)})}return}const h=fc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Uc(n,A7),s.onStart(()=>{Xg(n,A7)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,_w,!0);i.forEach(r=>{if(r[zc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,Y1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&wf(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||vM,u=new gM(Y1),d=new yM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[zc];(!o||o===M7)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Uc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=ZA(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,KA(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class rSe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new iSe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Iw(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Iw(e))return;const o=e[zc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Uc(n,mM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Xg(n,mM))}removeNode(n,e,i,r){if(Iw(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[zc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Iw(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,_w,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,rM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return wf(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[zc];if(e&&e.setForRemoval){if(n[zc]=M7,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(mM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?wf(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function rke(t){return new Ot(3402,!1)}()}_flushAnimations(n,e){const i=new Ew,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Z=>{u.add(Z);const H=this.driver.query(Z,".ng-animate-queued",!0);for(let he=0;he{const he=iM+m++;p.set(H,he),Z.forEach(E=>Uc(E,he))});const g=[],v=new Set,y=new Set;for(let Z=0;Zv.add(E)):y.add(H))}const _=new Map,C=F7(h,Array.from(v));C.forEach((Z,H)=>{const he=yw+m++;_.set(H,he),Z.forEach(E=>Uc(E,he))}),n.push(()=>{f.forEach((Z,H)=>{const he=p.get(H);Z.forEach(E=>Xg(E,he))}),C.forEach((Z,H)=>{const he=_.get(H);Z.forEach(E=>Xg(E,he))}),g.forEach(Z=>{this.processLeaveNode(Z)})});const S=[],M=[];for(let Z=this._namespaceList.length-1;Z>=0;Z--)this._namespaceList[Z].drainQueuedTransitions(e).forEach(he=>{const E=he.player,N=he.element;if(S.push(E),this.collectedEnterElements.length){const xe=N[zc];if(xe&&xe.setForMove){if(xe.previousTriggersValues&&xe.previousTriggersValues.has(he.triggerName)){const tt=xe.previousTriggersValues.get(he.triggerName),ze=this.statesByElement.get(he.element);if(ze&&ze.has(he.triggerName)){const ot=ze.get(he.triggerName);ot.value=tt,ze.set(he.triggerName,ot)}}return void E.destroy()}}const F=!d||!this.driver.containsElement(d,N),Y=_.get(N),V=p.get(N),oe=this._buildInstruction(he,i,V,Y,F);if(oe.errors&&oe.errors.length)return void M.push(oe);if(F)return E.onStart(()=>Gp(N,oe.fromStyles)),E.onDestroy(()=>Rd(N,oe.toStyles)),void r.push(E);if(he.isFallbackTransition)return E.onStart(()=>Gp(N,oe.fromStyles)),E.onDestroy(()=>Rd(N,oe.toStyles)),void r.push(E);const fe=[];oe.timelines.forEach(xe=>{xe.stretchStartingKeyframe=!0,this.disabledNodes.has(xe.element)||fe.push(xe)}),oe.timelines=fe,i.append(N,oe.timelines),s.push({instruction:oe,player:E,element:N}),oe.queriedElements.forEach(xe=>fc(a,xe,[]).push(E)),oe.preStyleProps.forEach((xe,tt)=>{if(xe.size){let ze=l.get(tt);ze||l.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))}}),oe.postStyleProps.forEach((xe,tt)=>{let ze=c.get(tt);ze||c.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))})});if(M.length){const Z=[];M.forEach(H=>{Z.push(function oke(t,n){return new Ot(3505,!1)}())}),S.forEach(H=>H.destroy()),this.reportError(Z)}const $=new Map,G=new Map;s.forEach(Z=>{const H=Z.element;i.has(H)&&(G.set(H,H),this._beforeAnimationBuild(Z.player.namespaceId,Z.instruction,$))}),r.forEach(Z=>{const H=Z.element;this._getPreviousPlayers(H,!1,Z.namespaceId,Z.triggerName,null).forEach(E=>{fc($,H,[]).push(E),E.destroy()})});const R=g.filter(Z=>j7(Z,l,c)),z=new Map;N7(z,this.driver,y,c,$h).forEach(Z=>{j7(Z,l,c)&&R.push(Z)});const q=new Map;f.forEach((Z,H)=>{N7(q,this.driver,new Set(Z),l,YA)}),R.forEach(Z=>{const H=z.get(Z),he=q.get(Z);z.set(Z,new Map([...Array.from(H?.entries()??[]),...Array.from(he?.entries()??[])]))});const re=[],L=[],X={};s.forEach(Z=>{const{element:H,player:he,instruction:E}=Z;if(i.has(H)){if(u.has(H))return he.onDestroy(()=>Rd(H,E.toStyles)),he.disabled=!0,he.overrideTotalTime(E.totalTime),void r.push(he);let N=X;if(G.size>1){let Y=H;const V=[];for(;Y=Y.parentNode;){const oe=G.get(Y);if(oe){N=oe;break}V.push(Y)}V.forEach(oe=>G.set(oe,N))}const F=this._buildAnimation(he.namespaceId,E,$,o,q,z);if(he.setRealPlayer(F),N===X)re.push(he);else{const Y=this.playersByElement.get(N);Y&&Y.length&&(he.parentPlayer=wf(Y)),r.push(he)}}else Gp(H,E.fromStyles),he.onDestroy(()=>Rd(H,E.toStyles)),L.push(he),u.has(H)&&r.push(he)}),L.forEach(Z=>{const H=o.get(Z.element);if(H&&H.length){const he=wf(H);Z.setRealPlayer(he)}}),r.forEach(Z=>{Z.parentPlayer?Z.syncPlayerEvents(Z.parentPlayer):Z.destroy()});for(let Z=0;Z!F.destroyed);N.length?lSe(this,H,N):this.processLeaveNode(H)}return g.length=0,re.forEach(Z=>{this.players.push(Z),Z.onDone(()=>{Z.destroy();const H=this.players.indexOf(Z);this.players.splice(H,1)}),Z.play()}),re}elementContainsData(n,e){let i=!1;const r=e[zc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==Y1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Gp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[zc];if(g&&g.removedBeforeQueried)return new G1(p.duration,p.delay);const v=m!==l,y=function cSe(t){const n=[];return O7(t,n),n}((i.get(m)||tSe).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),_=o.get(m),C=s.get(m),S=s7(0,this._normalizer,0,p.keyframes,_,C),M=this._buildPlayer(p,S,y);if(p.subTimeline&&r&&d.add(m),v){const $=new yM(n,a,m);$.setRealPlayer(M),c.push($)}return M});c.forEach(p=>{fc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function oSe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Uc(p,m7));const f=wf(h);return f.onDestroy(()=>{u.forEach(p=>Xg(p,m7)),Rd(l,e.toStyles)}),d.forEach(p=>{fc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new G1(n.duration,n.delay)}}class yM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new G1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>KA(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Iw(t){return t&&1===t.nodeType}function I7(t,n){const e=t.style.display;return t.style.display=n??"none",e}function N7(t,n,e,i,r){const o=[];e.forEach(l=>o.push(I7(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[zc]=nSe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>I7(l,o[a++])),s}function F7(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Uc(t,n){t.classList?.add(n)}function Xg(t,n){t.classList?.remove(n)}function lSe(t,n,e){wf(e).onDone(()=>t.processLeaveNode(n))}function O7(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Nw{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new rSe(n,e,i),this._timelineEngine=new Jke(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=lM(this._driver,o,l,c);if(l.length)throw function X2e(t,n){return new Ot(3404,!1)}();a=function Wke(t,n,e){return new qke(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let hSe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Gp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gp(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bM(t){let n=null;return t.forEach((e,i)=>{(function fSe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class P7{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:x7(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class pSe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d7(n,e)}getParentElement(n){return tM(n)}query(n,e,i){return h7(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof P7);(function yke(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function pke(t){return t.length?t[0]instanceof Map?t:t.map(n=>g7(n)):[]}(e).map(f=>Cf(f));d=function bke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,x7(t,a)))}}return n}(n,d,c);const h=function dSe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=bM(n[0]),n.length>1&&(i=bM(n[n.length-1]))):n instanceof Map&&(e=bM(n)),e||i?new hSe(t,e,i):null}(n,d);return new P7(n,d,l,h)}}let mSe=(()=>{class t extends t7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:yu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n7(e):e;return L7(this._renderer,null,i,"register",[r]),new gSe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class gSe extends D2e{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new vSe(this._id,n,e||{},this._renderer)}}class vSe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L7(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L7(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const R7="@.disabled";let ySe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $7("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new bSe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Nw),ct(Wi))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class $7{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==R7?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class bSe extends $7{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==R7?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Se(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function xSe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wSe=(()=>{class t extends Nw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(nM),ct(fM),ct(Au))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const B7=[{provide:t7,useClass:mSe},{provide:fM,useFactory:function CSe(){return new Hke}},{provide:Nw,useClass:wSe},{provide:Lp,useFactory:function kSe(t,n,e){return new ySe(t,n,e)},deps:[vw,Nw,Wi]}],_M=[{provide:nM,useFactory:()=>new pSe},{provide:C$,useValue:"BrowserAnimations"},...B7],xM=[{provide:nM,useClass:f7},{provide:C$,useValue:"NoopAnimations"},...B7];let SSe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?xM:_M}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:_M,imports:[qA]}),t})(),DSe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:xM,imports:[qA]}),t})();function $n(...t){let n=t[t.length-1];return Sa(n)?(t.pop(),Oc(t,n)):st(t)}class Hs extends tr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Xr;return this._value}next(n){super.next(this._value=n)}}const Ow=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class wM extends O{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TSe extends O{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function CM(t,n,e,i,r=new TSe(t,e,i)){if(!r.closed)return n instanceof rn?n.subscribe(r):nc(n)(r)}const V7={};function jw(...t){let n,e;return Sa(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&et(t[0])&&(t=t[0]),st(t,e).lift(new ESe(n))}class ESe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new ASe(n,this.resultSelector))}}class ASe extends wM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V7),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lw(t){return t?function ISe(t){return new rn(n=>t.schedule(()=>n.complete()))}(t):Vh}function H7(t){return new rn(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?co(e):Lw()).subscribe(n)})}function qp(t,n){return new rn(n?e=>n.schedule(NSe,0,{error:t,subscriber:e}):e=>e.error(t))}function NSe({error:t,subscriber:n}){n.error(t)}function zl(t,n){return"function"==typeof n?e=>e.pipe(zl((i,r)=>co(t(i,r)).pipe(yn((o,s)=>n(i,o,r,s))))):e=>e.lift(new FSe(t))}class FSe{constructor(n){this.project=n}call(n,e){return e.subscribe(new OSe(n,this.project))}}class OSe extends W{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new ml(this),r=this.destination;r.add(i),this.innerSubscription=Fe(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const z7=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Sl(t){return n=>0===t?Lw():n.lift(new jSe(t))}class jSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new PSe(n,this.total))}}class PSe extends O{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ns(t,n){return function(i){return i.lift(new LSe(t,n))}}class LSe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new RSe(n,this.predicate,this.thisArg))}}class RSe extends O{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function Rw(t=null){return n=>n.lift(new $Se(t))}class $Se{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new BSe(n,this.defaultValue))}}class BSe extends O{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function U7(t=zSe){return n=>n.lift(new VSe(t))}class VSe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new HSe(n,this.errorFactory))}}class HSe extends O{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function zSe(){return new Ow}function kf(t,n){const e=arguments.length>=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,Sl(1),e?Rw(n):U7(()=>new Ow))}function Sf(t,n){return nt(t,n,1)}function Hh(){}function is(t,n,e){return function(r){return r.lift(new USe(t,n,e))}}class USe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new GSe(n,this.nextOrObserver,this.error,this.complete))}}class GSe extends O{constructor(n,e,i,r){super(n),this._tapNext=Hh,this._tapError=Hh,this._tapComplete=Hh,this._tapError=i||Hh,this._tapComplete=r||Hh,rt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hh,this._tapError=e.error||Hh,this._tapComplete=e.complete||Hh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ul(t){return function(e){const i=new WSe(t),r=e.lift(i);return i.caught=r}}class WSe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new qSe(n,this.selector,this.caught))}}class qSe extends W{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new ml(this);this.add(i);const r=Fe(e,i);r!==i&&this.add(r)}}}function G7(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new XSe(t,n,e))}}class XSe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YSe(n,this.accumulator,this.seed,this.hasSeed))}}class YSe extends O{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function kM(t){return function(e){return 0===t?Lw():e.lift(new JSe(t))}}class JSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new KSe(n,this.total))}}class KSe extends O{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,kM(1),e?Rw(n):U7(()=>new Ow))}class ZSe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new eDe(n,this.predicate,this.inclusive))}}class eDe extends O{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class nDe{constructor(n){this.value=n}call(n,e){return e.subscribe(new iDe(n,this.value))}}class iDe extends O{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function SM(t){return n=>n.lift(new rDe(t))}class rDe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new oDe(n,this.callback))}}class oDe extends O{constructor(n,e){super(n),this.add(new ue(e))}}const zi="primary",K1=Symbol("RouteTitle");class sDe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Yg(t){return new sDe(t)}function aDe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function X7(t){return Array.prototype.concat.apply([],t)}function Y7(t){return t.length>0?t[t.length-1]:null}function Na(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Df(t){return OE(t)?t:S1(t)?co(Promise.resolve(t)):$n(t)}const $w=!1,cDe={exact:function Q7(t,n,e){if(!Xp(t.segments,n.segments)||!Bw(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q7(t.children[i],n.children[i],e))return!1;return!0},subset:Z7},J7={exact:function uDe(t,n){return $d(t,n)},subset:function dDe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q7(t[e],n[e]))},ignored:()=>!0};function K7(t,n,e){return cDe[e.paths](t.root,n.root,e.matrixParams)&&J7[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z7(t,n,e){return e9(t,n,n.segments,e)}function e9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!Xp(r,e)||n.hasChildren()||!Bw(r,e,i))}if(t.segments.length===e.length){if(!Xp(t.segments,e)||!Bw(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z7(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(Xp(t.segments,r)&&Bw(t.segments,r,i)&&t.children[zi])&&e9(t.children[zi],n,o,i)}}function Bw(t,n,e){return n.every((i,r)=>J7[e](t[r].parameters,i.parameters))}class Tf{constructor(n=new fr([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return pDe.serialize(this)}}class fr{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Na(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Vw(this)}}class Q1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Yg(this.parameters)),this._parameterMap}toString(){return i9(this)}}function Xp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let Z1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new DM},providedIn:"root"}),t})();class DM{parse(n){const e=new CDe(n);return new Tf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${ey(n.root,!0)}`,i=function vDe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Hw(e)}=${Hw(r)}`).join("&"):`${Hw(e)}=${Hw(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function mDe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const pDe=new DM;function Vw(t){return t.segments.map(n=>i9(n)).join("/")}function ey(t,n){if(!t.hasChildren())return Vw(t);if(n){const e=t.children[zi]?ey(t.children[zi],!1):"",i=[];return Na(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${ey(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function fDe(t,n){let e=[];return Na(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Na(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[ey(t.children[zi],!1)]:[`${r}:${ey(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${Vw(t)}/${e[0]}`:`${Vw(t)}/(${e.join("//")})`}}function t9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Hw(t){return t9(t).replace(/%3B/gi,";")}function TM(t){return t9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zw(t){return decodeURIComponent(t)}function n9(t){return zw(t.replace(/\+/g,"%20"))}function i9(t){return`${TM(t.path)}${function gDe(t){return Object.keys(t).map(n=>`;${TM(n)}=${TM(t[n])}`).join("")}(t.parameters)}`}const yDe=/^[^\/()?;=#]+/;function Uw(t){const n=t.match(yDe);return n?n[0]:""}const bDe=/^[^=?&#]+/,xDe=/^[^&#]+/;class CDe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new fr([],{}):new fr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new fr(n,e)),i}parseSegment(){const n=Uw(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Ot(4009,$w);return this.capture(n),new Q1(zw(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Uw(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Uw(this.remaining);r&&(i=r,this.capture(i))}n[zw(e)]=zw(i)}parseQueryParam(n){const e=function _De(t){const n=t.match(bDe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wDe(t){const n=t.match(xDe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=n9(e),o=n9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Uw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Ot(4010,$w);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new fr([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Ot(4011,$w)}}function EM(t){return t.segments.length>0?new fr([],{[zi]:t}):t}function Gw(t){const n={};for(const i of Object.keys(t.children)){const o=Gw(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function kDe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new fr(t.segments.concat(n.segments),n.children)}return t}(new fr(t.segments,n))}function Yp(t){return t instanceof Tf}const AM=!1;function SDe(t,n,e,i,r){if(0===e.length)return Jg(n.root,n.root,n.root,i,r);const o=function l9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new a9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Na(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new a9(e,n,i)}(e);return o.toRoot()?Jg(n.root,n.root,new fr([],{}),i,r):function s(l){const c=function TDe(t,n,e,i){if(t.isAbsolute)return new Kg(n.root,!0,0);if(-1===i)return new Kg(e,e===n.root,0);return function c9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Ot(4005,AM&&"Invalid number of '../'");r=i.segments.length}return new Kg(i,!1,r-o)}(e,i+(ty(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Qg(c.segmentGroup,c.index,o.commands):MM(c.segmentGroup,c.index,o.commands);return Jg(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function ty(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function ny(t){return"object"==typeof t&&null!=t&&t.outlets}function Jg(t,n,e,i,r){let s,o={};i&&Na(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:s9(t,n,e);const a=EM(Gw(s));return new Tf(a,o,r)}function s9(t,n,e){const i={};return Na(t.children,(r,o)=>{i[o]=r===n?e:s9(r,n,e)}),new fr(t.segments,i)}class a9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&ty(i[0]))throw new Ot(4003,AM&&"Root segment cannot have matrix parameters");const r=i.find(ny);if(r&&r!==Y7(i))throw new Ot(4004,AM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kg{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function MM(t,n,e){if(t||(t=new fr([],{})),0===t.segments.length&&t.hasChildren())return Qg(t,n,e);const i=function ADe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(ny(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d9(l,c,s))return o;i+=2}else{if(!d9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=MM(t.children[s],n,o))}),Na(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new fr(t.segments,r))}}function IM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=IM(new fr([],{}),0,e))}),n}function u9(t){const n={};return Na(t,(e,i)=>n[i]=`${e}`),n}function d9(t,n,e){return t==e.path&&$d(n,e.parameters)}const iy="imperative";class Bd{constructor(n,e){this.id=n,this.url=e}}class Ww extends Bd{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class zh extends Bd{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ry extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class qw extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Xw extends Bd{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class IDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class FDe extends Bd{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ODe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PDe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class LDe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class RDe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $De{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BDe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VDe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class h9{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UDe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SDe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return UDe.\u0275fac(n)},providedIn:"root"}),t})();class f9{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=NM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=NM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=FM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return FM(n,this._root).map(e=>e.value)}}function NM(t,n){if(t===n.value)return n;for(const e of n.children){const i=NM(t,e);if(i)return i}return null}function FM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=FM(t,e);if(i.length)return i.unshift(n),i}return[]}class Uh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Zg(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class p9 extends f9{constructor(n,e){super(n),this.snapshot=e,OM(this,n)}toString(){return this.snapshot.toString()}}function m9(t,n){const e=function qDe(t,n){const s=new Yw([],{},{},"",{},zi,n,null,t.root,-1,{});return new v9("",new Uh(s,[]))}(t,n),i=new Hs([new Q1("",{})]),r=new Hs({}),o=new Hs({}),s=new Hs({}),a=new Hs(""),l=new Rr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new p9(new Uh(l,[]),e)}class Rr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(yn(c=>c[K1]))??$n(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(yn(n=>Yg(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(yn(n=>Yg(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function g9(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function XDe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Yw{get title(){return this.data?.[K1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Yg(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class v9 extends f9{constructor(n,e){super(e),this.url=n,OM(this,e)}toString(){return y9(this._root)}}function OM(t,n){n.value._routerState=t,n.children.forEach(e=>OM(t,e))}function y9(t){const n=t.children.length>0?` { ${t.children.map(y9).join(", ")} } `:"";return`${t.value}${n}`}function jM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$d(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),$d(n.params,e.params)||t.params.next(e.params),function lDe(t,n){if(t.length!==n.length)return!1;for(let e=0;e$d(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||PM(t.parent,n.parent))}function oy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JDe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return oy(t,i,r);return oy(t,i)})}(t,n,e);return new Uh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>oy(t,a)),s}}const i=function KDe(t){return new Rr(new Hs(t.url),new Hs(t.params),new Hs(t.queryParams),new Hs(t.fragment),new Hs(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>oy(t,o));return new Uh(i,r)}}const LM="ngNavigationCancelingError";function b9(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=Yp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=_9(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function _9(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[LM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function x9(t){return w9(t)&&Yp(t.url)}function w9(t){return t&&t[LM]}class QDe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new sy,this.attachRef=null}}let sy=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new QDe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Jw=!1;let Jp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new Ke,this.deactivateEvents=new Ke,this.attachEvents=new Ke,this.detachEvents=new Ke,this.parentContexts=ar(sy),this.location=ar(nl),this.changeDetector=ar(qo),this.environmentInjector=ar(Nd)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Ot(4012,Jw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Ot(4012,Jw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Ot(4012,Jw);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Ot(4013,Jw);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new ZDe(e,a,r.injector);if(i&&function eTe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Hn]}),t})();class ZDe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Rr?this.route:n===sy?this.childContexts:this.parent.get(n,e)}}let RM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[L6],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp],encapsulation:2}),t})();function C9(t,n){return t.providers&&!t._injector&&(t._injector=Gx(t.providers,n,`Route: ${t.path}`)),t._injector??n}function BM(t){const n=t.children&&t.children.map(BM),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=RM),e}function Gc(t){return t.outlet||zi}function k9(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function ay(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class oTe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),jM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Na(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new VDe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new $De(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(jM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),jM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=ay(r.snapshot),l=a?.get($c)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class S9{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Kw{constructor(n,e){this.component=n,this.route=e}}function sTe(t,n,e){const i=t._root;return ly(i,n?n._root:null,e,[i.value])}function ev(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function cge(t){return null!==q_(t)}(t)?n.get(t):t:i}function ly(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Zg(n);return t.children.forEach(s=>{(function lTe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function cTe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Xp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Xp(t.url,n.url)||!$d(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!PM(t,n)||!$d(t.queryParams,n.queryParams);default:return!PM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S9(i)):(o.data=s.data,o._resolvedData=s._resolvedData),ly(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Kw(a.outlet.component,s))}else s&&cy(n,a,r),r.canActivateChecks.push(new S9(i)),ly(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Na(o,(s,a)=>cy(s,e.getContext(a),r)),r}function cy(t,n,e){const i=Zg(t),r=t.value;Na(i,(o,s)=>{cy(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Kw(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function uy(t){return"function"==typeof t}function VM(t){return t instanceof Ow||"EmptyError"===t?.name}const Qw=Symbol("INITIAL_VALUE");function tv(){return zl(t=>jw(t.map(n=>n.pipe(Sl(1),function J1(...t){const n=t[t.length-1];return Sa(n)?(t.pop(),e=>Pw(t,e,n)):e=>Pw(t,e)}(Qw)))).pipe(yn(n=>{for(const e of n)if(!0!==e){if(e===Qw)return Qw;if(!1===e||e instanceof Tf)return e}return!0}),ns(n=>n!==Qw),Sl(1)))}function D9(t){return function Wt(...t){return wn(t)}(is(n=>{if(Yp(n))throw b9(0,n)}),yn(n=>!0===n))}const HM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function T9(t,n,e,i,r){const o=zM(t,n,e);return o.matched?function DTe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$n(r.map(s=>{const a=ev(s,t);return Df(function mTe(t){return t&&uy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9()):$n(!0)}(i=C9(n,i),n,e).pipe(yn(s=>!0===s?o:{...HM})):$n(o)}function zM(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...HM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||aDe)(e,t,n);if(!r)return{...HM};const o={};Na(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Zw(t,n,e,i){if(e.length>0&&function ATe(t,n,e){return e.some(i=>eC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new fr(n,function ETe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new fr([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new fr(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function MTe(t,n,e){return e.some(i=>eC(t,n,i))}(t,e,i)){const o=new fr(t.segments,function TTe(t,n,e,i,r){const o={};for(const s of i)if(eC(t,e,s)&&!r[Gc(s)]){const a=new fr([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new fr(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function eC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function E9(t,n,e,i){return!!(Gc(t)===i||i!==zi&&eC(n,e,t))&&("**"===t.path||zM(n,t,e).matched)}function A9(t,n,e){return 0===n.length&&!t.children[e]}const tC=!1;class nC{constructor(n){this.segmentGroup=n||null}}class M9{constructor(n){this.urlTree=n}}function dy(t){return qp(new nC(t))}function I9(t){return qp(new M9(t))}function ITe(t){return qp(new Ot(4e3,tC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class OTe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=Zw(this.urlTree.root,[],[],this.config).segmentGroup,e=new fr(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(yn(o=>this.createUrlTree(Gw(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ul(o=>{if(o instanceof M9)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof nC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(yn(r=>this.createUrlTree(Gw(r),n.queryParams,n.fragment))).pipe(Ul(r=>{throw r instanceof nC?this.noMatchError(r):r}))}noMatchError(n){return new Ot(4002,tC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=EM(n);return new Tf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(yn(o=>new fr([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return co(r).pipe(Sf(o=>{const s=i.children[o],a=k9(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(yn(l=>({segment:l,outlet:o})))}),G7((o,s)=>(o[s.outlet]=s.segment,o),{}),W7())}expandSegment(n,e,i,r,o,s){return co(i).pipe(Sf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ul(c=>{if(c instanceof nC)return $n(null);throw c}))),kf(a=>!!a),Ul((a,l)=>{if(VM(a))return A9(e,r,o)?$n(new fr([],{})):dy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return E9(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):dy(e):dy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?I9(o):this.lineralizeSegments(i,o).pipe(nt(s=>{const a=new fr(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zM(e,r,o);if(!a)return dy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?I9(d):this.lineralizeSegments(r,d).pipe(nt(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=C9(i,n),i.loadChildren?(i._loadedRoutes?$n({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(yn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new fr(r,{})))):$n(new fr(r,{}))):T9(e,i,r,n).pipe(zl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(nt(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=Zw(e,a,l,h),m=new fr(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(yn(_=>new fr(a,_)));if(0===h.length&&0===p.length)return $n(new fr(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(yn(y=>new fr(a.concat(y.segments),y.children)))})):dy(e)))}getChildConfig(n,e,i){return e.children?$n({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$n({routes:e._loadedRoutes,injector:e._loadedInjector}):function STe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$n(!0):$n(r.map(s=>{const a=ev(s,t);return Df(function dTe(t){return t&&uy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9())}(n,e,i).pipe(nt(r=>r?this.configLoader.loadChildren(n,e).pipe(is(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function NTe(t){return qp(_9(tC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$n({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $n(i);if(r.numberOfChildren>1||!r.children[zi])return ITe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Tf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Na(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Na(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new fr(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Ot(4001,tC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PTe{}class $Te{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=Zw(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(yn(e=>{if(null===e)return null;const i=new Yw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uh(i,e),o=new v9(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=g9(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return co(Object.keys(i.children)).pipe(Sf(r=>{const o=i.children[r],s=k9(e,r);return this.processSegmentGroup(n,s,o,r)}),G7((r,o)=>r&&o?(r.push(...o),r):null),function QSe(t,n=!1){return e=>e.lift(new ZSe(t,n))}(r=>null!==r),Rw(null),W7(),yn(r=>{if(null===r)return null;const o=F9(r);return function BTe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return co(e).pipe(Sf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),kf(s=>!!s),Ul(s=>{if(VM(s))return A9(i,r,o)?$n([]):$n(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!E9(e,i,r,o))return $n(null);let s;if("**"===e.path){const a=r.length>0?Y7(r).parameters:{},l=j9(i)+r.length;s=$n({snapshot:new Yw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),l,L9(e)),consumedSegments:[],remainingSegments:[]})}else s=T9(i,e,r,n).pipe(yn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=j9(i)+l.length;return{snapshot:new Yw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),d,L9(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(zl(a=>{if(null===a)return $n(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function VTe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Zw(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(yn(g=>null===g?null:[new Uh(l,g)]));if(0===h.length&&0===p.length)return $n([new Uh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(yn(g=>null===g?null:[new Uh(l,g)]))}))}}function HTe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function F9(t){const n=[],e=new Set;for(const i of t){if(!HTe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=F9(i.children);n.push(new Uh(i.value,r))}return n.filter(i=>!e.has(i))}function O9(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function j9(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function P9(t){return t.data||{}}function L9(t){return t.resolve||{}}function R9(t){return"string"==typeof t.title||null===t.title}function UM(t){return zl(n=>{const e=t(n);return e?co(e).pipe(yn(()=>n)):$n(n)})}const nv=new zn("ROUTES");let GM=(()=>{class t{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $n(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Df(e.loadComponent()).pipe(yn(B9),is(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),SM(()=>{this.componentLoaders.delete(e)})),r=new pe(i,()=>new tr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $n({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(yn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=X7(l.get(nv,[],ki.Self|ki.Optional)));return{routes:c.map(BM),injector:l}}),SM(()=>{this.childrenLoaders.delete(i)})),s=new pe(o,()=>new tr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Df(e()).pipe(yn(B9),nt(r=>r instanceof j6||Array.isArray(r)?$n(r):co(this.compiler.compileModuleAsync(r))))}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs),ct(k$))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function B9(t){return function KTe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let rC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new tr,this.configLoader=ar(GM),this.environmentInjector=ar(Nd),this.urlSerializer=ar(Z1),this.rootContexts=ar(sy),this.navigationId=0,this.afterPreactivation=()=>$n(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new LDe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PDe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Hs({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ns(i=>0!==i.id),yn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),zl(i=>{let r=!1,o=!1;return $n(i).pipe(is(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),zl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return V9(s.source)&&(e.browserUrlTree=s.extractedUrl),$n(s).pipe(zl(u=>{const d=this.transitions?.getValue();return this.events.next(new Ww(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vh:Promise.resolve(u)}),function jTe(t,n,e,i){return zl(r=>function FTe(t,n,e,i,r){return new OTe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(yn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),is(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UTe(t,n,e,i,r){return nt(o=>function RTe(t,n,e,i,r,o,s="emptyOnly"){return new $Te(t,n,e,i,r,s,o).recognize().pipe(zl(a=>null===a?function LTe(t){return new rn(n=>n.error(t))}(new PTe):$n(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(yn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),is(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new IDe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new Ww(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=m9(d,this.rootComponentType).snapshot;return $n(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}}),is(s=>{const a=new NDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),yn(s=>i={...s,guards:sTe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function vTe(t,n){return nt(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$n({...e,guardsResult:!0}):function yTe(t,n,e,i){return co(t).pipe(nt(r=>function kTe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$n(o.map(a=>{const l=ay(n)??r,c=ev(a,l);return Df(function pTe(t){return t&&uy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(kf())})).pipe(tv()):$n(!0)}(r.component,r.route,e,n,i)),kf(r=>!0!==r,!0))}(s,i,r,t).pipe(nt(a=>a&&function uTe(t){return"boolean"==typeof t}(a)?function bTe(t,n,e,i){return co(n).pipe(Sf(r=>Pw(function xTe(t,n){return null!==t&&n&&n(new RDe(t)),$n(!0)}(r.route.parent,i),function _Te(t,n){return null!==t&&n&&n(new BDe(t)),$n(!0)}(r.route,i),function CTe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function aTe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H7(()=>$n(s.guards.map(l=>{const c=ay(s.node)??e,u=ev(l,c);return Df(function fTe(t){return t&&uy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(kf())})).pipe(tv())));return $n(o).pipe(tv())}(t,r.path,e),function wTe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $n(!0);const r=i.map(o=>H7(()=>{const s=ay(n)??e,a=ev(o,s);return Df(function hTe(t){return t&&uy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(kf())}));return $n(r).pipe(tv())}(t,r.route,e))),kf(r=>!0!==r,!0))}(i,o,t,n):$n(a)),yn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),is(s=>{if(i.guardsResult=s.guardsResult,Yp(s.guardsResult))throw b9(0,s.guardsResult);const a=new FDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),ns(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),UM(s=>{if(s.guards.canActivateChecks.length)return $n(s).pipe(is(a=>{const l=new ODe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),zl(a=>{let l=!1;return $n(a).pipe(function GTe(t,n){return nt(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $n(e);let o=0;return co(r).pipe(Sf(s=>function WTe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!R9(r)&&(o[K1]=r.title),function qTe(t,n,e,i){const r=function XTe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $n({});const o={};return co(r).pipe(nt(s=>function YTe(t,n,e,i){const r=ay(n)??i,o=ev(t,r);return Df(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(kf(),is(a=>{o[s]=a}))),kM(1),function tDe(t){return n=>n.lift(new nDe(t))}(o),Ul(s=>VM(s)?Vh:qp(s)))}(o,t,n,i).pipe(yn(s=>(t._resolvedData=s,t.data=g9(t,e).resolve,r&&R9(r)&&(t.data[K1]=r.title),null)))}(s.route,i,t,n)),is(()=>o++),kM(1),nt(s=>o===r.length?$n(e):Vh))})}(e.paramsInheritanceStrategy,this.environmentInjector),is({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),is(a=>{const l=new jDe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),UM(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(is(u=>{l.component=u}),yn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return jw(a(s.targetSnapshot.root)).pipe(Rw(),Sl(1))}),UM(()=>this.afterPreactivation()),yn(s=>{const a=function YDe(t,n,e){const i=oy(t,n._root,e?e._root:void 0);return new p9(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),is(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>yn(i=>(new oTe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),is({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new zh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),SM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ul(s=>{if(o=!0,w9(s)){x9(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ry(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),x9(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V9(i.source)};e.scheduleNavigation(l,iy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Xw(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vh}))}))}cancelNavigationTransition(e,i,r){const o=new ry(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function V9(t){return t!==iy}let H9=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[K1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(QTe)},providedIn:"root"}),t})(),QTe=(()=>{class t extends H9{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(ct(JB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZTe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tEe)},providedIn:"root"}),t})();class eEe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let tEe=(()=>{class t extends eEe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oC=new zn("",{providedIn:"root",factory:()=>({})});let iEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(rEe)},providedIn:"root"}),t})(),rEe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function oEe(t){throw t}function sEe(t,n,e){return n.parse("/")}const aEe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},lEe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let cr=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=ar(xxe),this.isNgZoneEnabled=!1,this.options=ar(oC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||oEe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||sEe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=ar(iEe),this.routeReuseStrategy=ar(ZTe),this.urlCreationStrategy=ar(WDe),this.titleStrategy=ar(H9),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=X7(ar(nv,{optional:!0})??[]),this.navigationTransitions=ar(rC),this.urlSerializer=ar(Z1),this.location=ar(kA),this.isNgZoneEnabled=ar(Wi)instanceof Wi&&Wi.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=m9(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),iy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(BM),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Yp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,iy,null,i)}navigate(e,i={skipLocationChange:!1}){return function cEe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Nu=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new tr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof zh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=qg(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=qg(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=qg(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function d5(t,n,e){return function L0e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?u5:y1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(Rr),Ah("tabindex"),le(Ss),le(ti),le(zp))},t.\u0275dir=Zt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ht("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Hn]}),t})(),hy=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Ke,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof zh&&this.update()})}ngAfterContentInit(){$n(this.links.changes,$n(null)).pipe(A()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=co(e).pipe(A()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function uEe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(ti),le(Ss),le(qo),le(Nu,8))},t.\u0275dir=Zt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,Nu,5),2&e){let o;cn(o=un())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Hn]}),t})();class z9{}let dEe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(ns(e=>e instanceof zh),Sf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gx(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return co(r).pipe(A())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$n(null);const o=r.pipe(nt(s=>null===s?$n(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?co([o,this.loader.loadComponent(i)]).pipe(A()):o})}}return t.\u0275fac=function(e){return new(e||t)(ct(cr),ct(k$),ct(Nd),ct(z9),ct(GM))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const qM=new zn("");let U9=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Ww?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof zh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof h9&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new h9(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function V5(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var mc=(()=>((mc=mc||{})[mc.COMPLETE=0]="COMPLETE",mc[mc.FAILED=1]="FAILED",mc[mc.REDIRECTING=2]="REDIRECTING",mc))();const iv=!1;function Ef(t,n){return{\u0275kind:t,\u0275providers:n}}const XM=new zn("",{providedIn:"root",factory:()=>!1});function W9(){const t=ar(Rs);return n=>{const e=t.get(Au);if(n!==e.components[0])return;const i=t.get(cr),r=t.get(q9);1===t.get(YM)&&i.initialNavigation(),t.get(X9,null,ki.Optional)?.setUpPreloading(),t.get(qM,null,ki.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const q9=new zn(iv?"bootstrap done indicator":"",{factory:()=>new tr}),YM=new zn(iv?"initial navigation":"",{providedIn:"root",factory:()=>1});function gEe(){let t=[];return t=iv?[{provide:Sx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function HDe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Ef(1,t)}const X9=new zn(iv?"router preloader":"");function vEe(t){return Ef(0,[{provide:X9,useExisting:dEe},{provide:z9,useExisting:t}])}const fy=!1,Y9=new zn(fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),yEe=[kA,{provide:Z1,useClass:DM},cr,sy,{provide:Rr,useFactory:function G9(t){return t.routerState.root},deps:[cr]},GM,fy?{provide:XM,useValue:!0}:[]];function bEe(){return new N$("Router",cr)}let J9=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[yEe,fy&&i?.enableTracing?gEe().\u0275providers:[],{provide:nv,multi:!0,useValue:e},{provide:Y9,useFactory:CEe,deps:[[cr,new u1,new d1]]},{provide:oC,useValue:i||{}},i?.useHash?{provide:zp,useClass:lwe}:{provide:zp,useClass:tB},{provide:qM,useFactory:()=>{const t=ar(_Ce),n=ar(Wi),e=ar(oC),i=ar(rC),r=ar(Z1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new U9(r,i,t,n,e)}},i?.preloadingStrategy?vEe(i.preloadingStrategy).\u0275providers:[],{provide:N$,multi:!0,useFactory:bEe},i?.initialNavigation?kEe(i):[],[{provide:K9,useFactory:W9},{provide:I$,multi:!0,useExisting:K9}]]}}static forChild(e){return{ngModule:t,providers:[{provide:nv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(ct(Y9,8))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[RM]}),t})();function CEe(t){if(fy&&t)throw new Ot(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function kEe(t){return["disabled"===t.initialNavigation?Ef(3,[{provide:Yx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>{n.setUpLocationChangeListener()}}},{provide:YM,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ef(2,[{provide:YM,useValue:0},{provide:Yx,multi:!0,deps:[Rs],useFactory:n=>{const e=n.get(swe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(cr),o=n.get(q9);(function hEe(t,n){t.events.pipe(ns(e=>e instanceof zh||e instanceof ry||e instanceof Xw||e instanceof qw),yn(e=>e instanceof zh||e instanceof qw?mc.COMPLETE:e instanceof ry&&(0===e.code||1===e.code)?mc.REDIRECTING:mc.FAILED),ns(e=>e!==mc.REDIRECTING),Sl(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(rC).afterPreactivation=()=>(i(!0),o.closed?$n(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const K9=new zn(fy?"Router Initializer":"");function sC(t,n){return new rn(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let Q9=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti))},t.\u0275dir=Zt({type:t}),t})(),Kp=(()=>{class t extends Q9{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,features:[vi]}),t})();const ha=new zn("NgValueAccessor"),TEe={provide:ha,useExisting:Gi(()=>aC),multi:!0};let aC=(()=>{class t extends Kp{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Lr([TEe]),vi]}),t})();const EEe={provide:ha,useExisting:Gi(()=>Fa),multi:!0},MEe=new zn("CompositionEventMode");let Fa=(()=>{class t extends Q9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function AEe(){const t=jh()?jh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti),le(MEe,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Lr([EEe]),vi]}),t})();const IEe=!1;function Af(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function Z9(t){return null!=t&&"number"==typeof t.length}const Oa=new zn("NgValidators"),Mf=new zn("NgAsyncValidators"),NEe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Do{static min(n){return eV(n)}static max(n){return function tV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nV(n)}static requiredTrue(n){return function iV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rV(t){return Af(t.value)||NEe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oV(t){return n=>Af(n.value)||!Z9(n.value)?null:n.value.lengthZ9(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aV(t){if(!t)return lC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Af(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fV(n)}static composeAsync(n){return pV(n)}}function eV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dV(t,n){return n.map(e=>e(t))}function hV(t){return t.map(n=>function FEe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return uV(dV(e,n))}}function JM(t){return null!=t?fV(hV(t)):null}function pV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return function DEe(...t){if(1===t.length){const n=t[0];if(et(n))return sC(n,null);if(Ve(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return sC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return sC(t=1===t.length&&et(t[0])?t[0]:t,null).pipe(yn(e=>n(...e)))}return sC(t,null)}(dV(e,n).map(cV)).pipe(yn(uV))}}function KM(t){return null!=t?pV(hV(t)):null}function mV(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function gV(t){return t._rawValidators}function vV(t){return t._rawAsyncValidators}function QM(t){return t?Array.isArray(t)?t:[t]:[]}function cC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yV(t,n){const e=QM(n);return QM(t).forEach(r=>{cC(e,r)||e.push(r)}),e}function bV(t,n){return QM(n).filter(e=>!cC(t,e))}class _V{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=JM(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=KM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class Dl extends _V{get formDirective(){return null}get path(){return null}}class If extends _V{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class xV{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let rl=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(If,2))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[vi]}),t})(),ol=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Dl,10))},t.\u0275dir=Zt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[vi]}),t})();function wV(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const t3=!1,py="VALID",dC="INVALID",rv="PENDING",my="DISABLED";function n3(t){return(hC(t)?t.validators:t)||null}function i3(t,n){return(hC(n)?n.asyncValidators:t)||null}function hC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CV(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Ot(1e3,t3?function LEe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Ot(1001,t3?function REe(t,n){return`Cannot find form control ${wV(t,n)}`}(n,e):"")}function kV(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Ot(1002,t3?function $Ee(t,n){return`Must supply a value for form control ${wV(t,n)}`}(n,r):"")})}class fC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===py}get invalid(){return this.status===dC}get pending(){return this.status==rv}get disabled(){return this.status===my}get enabled(){return this.status!==my}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yV(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yV(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(bV(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(bV(n,this._rawAsyncValidators))}hasValidator(n){return cC(this._rawValidators,n)}hasAsyncValidator(n){return cC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=rv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=my,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===py||this.status===rv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?my:py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=rv,this._hasOwnPendingAsyncValidator=!0;const e=cV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Ke,this.statusChanges=new Ke}_calculateStatus(){return this._allControlsDisabled()?my:this.errors?dC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(rv)?rv:this._anyControlsHaveStatus(dC)?dC:py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){hC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function BEe(t){return Array.isArray(t)?JM(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function VEe(t){return Array.isArray(t)?KM(t):t||null}(this._rawAsyncValidators)}}class gy extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){kV(this,!0,n),Object.keys(n).forEach(i=>{CV(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class SV extends gy{}const Qp=new zn("CallSetDisabledState",{providedIn:"root",factory:()=>vy}),vy="always";function yy(t,n,e=vy){r3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function zEe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&DV(t,n)})}(t,n),function GEe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function UEe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&DV(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function HEe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),vC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function gC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function r3(t,n){const e=gV(t);null!==n.validator?t.setValidators(mV(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vV(t);null!==n.asyncValidator?t.setAsyncValidators(mV(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();gC(n._rawValidators,r),gC(n._rawAsyncValidators,r)}function vC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=gV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return gC(n._rawValidators,i),gC(n._rawAsyncValidators,i),e}function DV(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function AV(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MV(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const _y=class extends fC{constructor(n=null,e,i){super(n3(e),i3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MV(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){AV(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){AV(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MV(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const eAe={provide:ha,useExisting:Gi(()=>c3),multi:!0};let c3=(()=>{class t extends Kp{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Lr([eAe]),vi]}),t})(),jV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const u3=new zn("NgModelWithFormControlWarning"),oAe={provide:Dl,useExisting:Gi(()=>fa)};let fa=(()=>{class t extends Dl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ke,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(vC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return yy(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function YEe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function EV(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof _y)(r)&&(yy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function TV(t,n){r3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function WEe(t,n){return vC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){r3(this.form,this),this._oldForm&&vC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(le(Oa,10),le(Mf,10),le(Qp,8))},t.\u0275dir=Zt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Lr([oAe]),vi,Hn]}),t})();const lAe={provide:If,useExisting:Gi(()=>ja)};let ja=(()=>{class t extends If{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Ke,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function a3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Fa?e=o:function XEe(t){return Object.getPrototypeOf(t.constructor)===Kp}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function s3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function pC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(le(Dl,13),le(Oa,10),le(Mf,10),le(ha,10),le(u3,8))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Lr([lAe]),vi,Hn]}),t})();const cAe={provide:ha,useExisting:Gi(()=>ov),multi:!0};function BV(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let ov=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=BV(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function uAe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Lr([cAe]),vi]}),t})(),xy=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(BV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(ov,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const dAe={provide:ha,useExisting:Gi(()=>f3),multi:!0};function VV(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let f3=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(f3,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let Zp=(()=>{class t{constructor(){this._validator=lC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,features:[Hn]}),t})();const pAe={provide:Oa,useExisting:Gi(()=>p3),multi:!0};let p3=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function zV(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ht("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Lr([pAe]),vi]}),t})();const mAe={provide:Oa,useExisting:Gi(()=>Nf),multi:!0};let Nf=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=qg,this.createValidator=e=>nV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ht("required",i._enabled?"":null)},inputs:{required:"required"},features:[Lr([mAe]),vi]}),t})(),JV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[jV]}),t})();class KV extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){kV(this,!1,n),n.forEach((i,r)=>{CV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function QV(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let xAe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return QV(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new gy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new SV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(QV(i)?o=i:(o.validators=i,o.asyncValidators=r),new _y(e,{...o,nonNullable:!0})):new _y(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KV(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof _y||e instanceof fC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tl=(()=>{class t extends xAe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZV=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})(),wAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:u3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})();const m3=new zn("ngx-segment-analytics.config"),CAe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let g3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),yC=(()=>{class t{constructor(e,i,r){if(this._w=e,this._doc=i,this._config=Object.assign(Object.assign({},CAe),r),this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}get plugins(){return this._w.analytics.plugins}}return t.\u0275fac=function(e){return new(e||t)(ct(g3),ct(Ir),ct(m3))},t.\u0275prov=Et({factory:function(){return new t(ct(g3),ct(Ir),ct(m3))},token:t,providedIn:"root"}),t})();function kAe(t){return function DB(t){return t===SB}(t)?window:{}}let SAe=(()=>{class t{constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(e){return{ngModule:t,providers:[{provide:m3,useValue:e},yC]}}}return t.\u0275fac=function(e){return new(e||t)(ct(t,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:g3,useFactory:kAe,deps:[L1]}],imports:[Vs]}),t})();class bC{}class v3{}class Fu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Fu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Fu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Fu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class DAe{encodeKey(n){return eH(n)}encodeValue(n){return eH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const EAe=/%(\d[a-f0-9])/gi,AAe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eH(t){return encodeURIComponent(t).replace(EAe,(n,e)=>AAe[e]??n)}function _C(t){return`${t}`}class In{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new DAe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function TAe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(_C):[_C(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new In({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(_C(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(_C(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class MAe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nH(t){return typeof Blob<"u"&&t instanceof Blob}function iH(t){return typeof FormData<"u"&&t instanceof FormData}class Cy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function IAe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Fu),this.context||(this.context=new MAe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Cy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var zs=(()=>((zs=zs||{})[zs.Sent=0]="Sent",zs[zs.UploadProgress=1]="UploadProgress",zs[zs.ResponseHeader=2]="ResponseHeader",zs[zs.DownloadProgress=3]="DownloadProgress",zs[zs.Response=4]="Response",zs[zs.User=5]="User",zs))();class y3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Fu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class b3 extends y3{constructor(n={}){super(n),this.type=zs.ResponseHeader}clone(n={}){return new b3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class xC extends y3{constructor(n={}){super(n),this.type=zs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new xC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rH extends y3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function _3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let wC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Cy)o=e;else{let l,c;l=r.headers instanceof Fu?r.headers:new Fu(r.headers),r.params&&(c=r.params instanceof In?r.params:new In({fromObject:r.params})),o=new Cy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$n(o).pipe(Sf(l=>this.handler.handle(l)));if(e instanceof Cy||"events"===r.observe)return s;const a=s.pipe(ns(l=>l instanceof xC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(yn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(yn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new In).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,_3(r,i))}post(e,i,r={}){return this.request("POST",e,_3(r,i))}put(e,i,r={}){return this.request("PUT",e,_3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(ct(bC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function oH(t,n){return n(t)}function FAe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const x3=new zn("HTTP_INTERCEPTORS"),ky=new zn("HTTP_INTERCEPTOR_FNS");function jAe(){let t=null;return(n,e)=>(null===t&&(t=(ar(x3,{optional:!0})??[]).reduceRight(FAe,oH)),t(n,e))}let sH=(()=>{class t extends bC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ky)));this.chain=i.reduceRight((r,o)=>function OAe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(ct(v3),ct(Nd))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const $Ae=/^\)\]\}',?\n/;let lH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new rn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Fu(r.getAllResponseHeaders()),m=function BAe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new b3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const _=v;v=v.replace($Ae,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=_,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new xC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new rH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new rH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:zs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:zs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:zs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(ct(EB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const w3=new zn("XSRF_ENABLED"),cH=new zn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uH=new zn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dH{}let zAe=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=pB(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(L1),ct(cH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function UAe(t,n){const e=t.url.toLowerCase();if(!ar(w3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=ar(dH).getToken(),r=ar(uH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Ts=(()=>((Ts=Ts||{})[Ts.Interceptors=0]="Interceptors",Ts[Ts.LegacyInterceptors=1]="LegacyInterceptors",Ts[Ts.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ts[Ts.NoXsrfProtection=3]="NoXsrfProtection",Ts[Ts.JsonpSupport=4]="JsonpSupport",Ts[Ts.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ts))();function sv(t,n){return{\u0275kind:t,\u0275providers:n}}function GAe(...t){const n=[wC,lH,sH,{provide:bC,useExisting:sH},{provide:v3,useExisting:lH},{provide:ky,useValue:UAe,multi:!0},{provide:w3,useValue:!0},{provide:dH,useClass:zAe}];for(const e of t)n.push(...e.\u0275providers);return function R0e(t){return{\u0275providers:t}}(n)}const hH=new zn("LEGACY_INTERCEPTOR_FN");let qAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[GAe(sv(Ts.LegacyInterceptors,[{provide:hH,useFactory:jAe},{provide:ky,useExisting:hH,multi:!0}]))]}),t})();var oi=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(oi||(oi={})),oi))(),Sy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY"}(Sy||(Sy={})),Sy))();class C3{constructor(){K(this,"host",void 0),K(this,"timeoutMs",void 0)}}let xi=(()=>{class t{constructor(e,i){K(this,"httpClient",void 0),K(this,"config",void 0),this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new In({encoder:new Xn});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new In({encoder:new Xn});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new In({encoder:new Xn});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new In({encoder:new Xn});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new In({encoder:new Xn});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new In({encoder:new Xn});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Fu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Fu).set("Authorization","Basic "+btoa(e+":"+i))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(wC),ct(C3,8))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class Xn{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fH=new zn("window"),JAe=[{provide:fH,useFactory:()=>window}],k3="currentSession";let Xo=(()=>{class t{constructor(e,i,r,o){K(this,"window",void 0),K(this,"segment",void 0),K(this,"http",void 0),K(this,"consoleService",void 0),K(this,"currentSessionSubject",void 0),K(this,"currentSession",void 0),this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(k3));this.currentSessionSubject=new Hs(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return oi.USER_ROLE_ADMIN;case 2:return oi.USER_ROLE_DEVELOPER;case 3:return oi.USER_ROLE_MAINTAINER;case 4:return oi.USER_ROLE_READONLY;default:return oi.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(is(r=>{localStorage.setItem(k3,JSON.stringify(r)),this.currentSessionSubject.next(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(is(()=>{localStorage.removeItem(k3),this.currentSessionSubject.next(null)})):Vh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(fH),ct(yC),ct(wC),ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function KAe(t,n){if(1&t&&(b(0,"div",17),I(1),x()),2&t){const e=j();w(1),xn(" ",e.error," ")}}const QAe=function(t){return{"was-validated":t}},pH=function(t){return{"is-invalid":t}};let ZAe=(()=>{class t{constructor(e,i,r,o,s){K(this,"segment",void 0),K(this,"formBuilder",void 0),K(this,"route",void 0),K(this,"router",void 0),K(this,"authenticationService",void 0),K(this,"error",""),K(this,"loginForm",void 0),K(this,"submitted",void 0),K(this,"returnUrl",void 0),this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",Do.compose([Do.required])],password:["",Do.compose([Do.required,Do.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(yC),le(Tl),le(Rr),le(cr),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"h1",2),ge(3,"img",3),x(),J(4,KAe,2,1,"div",4),b(5,"div",5)(6,"div",6)(7,"h3",7),I(8,"Login"),x(),b(9,"form",8),ye("ngSubmit",function(){return i.onSubmit()}),b(10,"div",9)(11,"div",10)(12,"label",11),I(13,"Username"),x(),ge(14,"input",12),b(15,"div",13),I(16,"Please enter a username."),x()()(),b(17,"div",9)(18,"div",10)(19,"label",14),I(20,"Password"),x(),ge(21,"input",15),b(22,"div",13),I(23,"Password must be at least 8 characters."),x()()(),b(24,"button",16),I(25,"Login"),x()()()()()()),2&e&&(w(4),k("ngIf",i.error),w(5),k("formGroup",i.loginForm)("ngClass",lr(8,QAe,i.submitted)),w(5),k("ngClass",lr(10,pH,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(6),k("ngClass",lr(12,pH,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(2),k("disabled",!i.loginForm.valid||i.submitted))},dependencies:[Rh,gn,sl,Fa,rl,ol,Nf,fa,ja],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]})),t})(),eMe=(()=>{class t{constructor(e,i){K(this,"authService",void 0),K(this,"router",void 0),this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),tMe=(()=>{class t{constructor(e,i){K(this,"router",void 0),K(this,"authenticationService",void 0),this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(cr),ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class nMe extends ue{constructor(n,e){super()}schedule(n,e=0){return this}}class S3 extends nMe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let mH=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Hd extends mH{constructor(n,e=mH.now){super(n,()=>Hd.delegate&&Hd.delegate!==this?Hd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Hd.delegate&&Hd.delegate!==this?Hd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Dy=new Hd(S3);class rMe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new sMe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class oMe{constructor(){this.buffer=[]}}class sMe extends O{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(gH,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vH,e,{subscriber:this,context:s})),this.add(o.schedule(aMe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(gH,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new oMe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function gH(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function aMe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vH,e,{subscriber:i,context:o})),this.schedule(t,n))}function vH(t){const{subscriber:n,context:e}=t;n.closeContext(e)}class lMe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new cMe(n,this.compare,this.keySelector))}}class cMe extends O{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Es(t,n,e,i){return rt(e)&&(i=e,e=void 0),i?Es(t,n,e).pipe(yn(r=>et(r)?i(...r):i(r))):new rn(r=>{yH(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yH(t,n,e,i,r){let o;if(function hMe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function dMe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function uMe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function av(t=0,n,e){let i=-1;return bH(n)?i=Number(n)<1?1:Number(n):Sa(n)&&(e=n),Sa(e)||(e=Dy),new rn(r=>{const o=bH(t)?t:+t-e.now();return e.schedule(fMe,o,{index:0,period:i,subscriber:r})})}function fMe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function _H(...t){if(1===t.length){if(!et(t[0]))return t[0];t=t[0]}return st(t,void 0).lift(new pMe)}class pMe{call(n,e){return e.subscribe(new mMe(n))}}class mMe extends wM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Me extends W{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Ro](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Fe(this.observable,new ml(this))}}function yo(t){return n=>n.lift(new wMe(t))}class wMe{constructor(n){this.notifier=n}call(n,e){const i=new CMe(n),r=Fe(this.notifier,new ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class CMe extends W{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function D3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new kMe(t,e))}}class kMe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SMe(n,this.observables,this.project))}}class SMe extends wM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ou{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $n(this.value);case"E":return qp(this.error);case"C":return Lw()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ou("N",n):Ou.undefinedValueNotification}static createError(n){return new Ou("E",void 0,n)}static createComplete(){return Ou.completeNotification}}function T3(t,n=Dy){const i=function DMe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TMe(i,n))}Ou.completeNotification=new Ou("C"),Ou.undefinedValueNotification=new Ou("N",void 0);class TMe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new E3(n,this.delay,this.scheduler))}}class E3 extends O{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(E3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new EMe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ou.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ou.createComplete()),this.unsubscribe()}}class EMe{constructor(n,e){this.time=n,this.notification=e}}function $Me(t,n){if(1&t){const e=vt();b(0,"button",1),ye("click",function(){return $e(e),Be(j().close())}),b(1,"span",2),I(2,"\xd7"),x()()}}const lv=["*"],b3e=["dialog"];function Ff(t){return null!=t}typeof Element<"u"&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const CH={animation:!0,transitionTimerDelayMs:5};let pa=(()=>{class t{constructor(){this.animation=CH.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})();const TIe=()=>{},{transitionTimerDelayMs:EIe}=CH,EC=new Map,ma=(t,n,e)=>{let i=e.context||{};const r=EC.get(t);if(r)switch(e.runningTransition){case"continue":return Vh;case"stop":r.transition$.complete(),i=Object.assign(r.context,i),EC.delete(t)}!function TC(t){return(t||document.body).offsetHeight}(t);const o=n(t,i)||TIe;if(!e.animation||"none"===window.getComputedStyle(t).transitionProperty)return o(),$n(void 0);const s=new tr,a=s.pipe(function xMe(...t){return n=>Pw(n,$n(...t))}(!0));EC.set(t,{transition$:s,context:i});const l=function DIe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(t),c=Es(t,"transitionend").pipe(yo(a),ns(({target:d})=>d===t));return _H(av(l+EIe).pipe(yo(a)),c).pipe(yo(a)).subscribe(()=>{EC.delete(t),o(),s.next(),s.complete()}),s.asObservable()};let AH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),IIe=(()=>{class t{constructor(e){this.dismissible=!0,this.type="warning",this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const NIe=({classList:t})=>{t.remove("show")};let To=(()=>{class t{constructor(e,i,r){this._renderer=i,this._element=r,this.closed=new Ke,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ma(this._element.nativeElement,NIe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(le(IIe),le(Ss),le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Mn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[Hn],ngContentSelectors:lv,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"close",3,"click"],["aria-hidden","true"]]},template:function(e,i){1&e&&(Cu(),ku(0),J(1,$Me,3,0,"button",0)),2&e&&(w(1),k("ngIf",i.dismissible))},dependencies:[gn],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),MH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(e,i){2&e&&Mn("btn",!0)("active",i.active)("disabled",i.disabled)("focus",i.focused)}}),t})(),OIe=0,N3=(()=>{class t{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+OIe++,this.onChange=e=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}onRadioChange(e){this.writeValue(e.value),this.onChange(e.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(e){this._radios.add(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._disabled=e,this._updateRadiosDisabled()}unregister(e){this._radios.delete(e)}writeValue(e){this._value=e,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(e=>e.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(e=>e.updateDisabled())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[Lr([{provide:ha,useExisting:Gi(()=>t),multi:!0}])]}),t})(),IH=(()=>{class t{constructor(e,i,r,o,s){this._group=e,this._label=i,this._renderer=r,this._element=o,this._cd=s,this._value=null,this._group.register(this),this.updateDisabled()}set value(e){this._value=e;const i=e?e.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",i),this._group.onRadioValueUpdate()}set disabled(e){this._disabled=!1!==e,this.updateDisabled()}set focused(e){this._label&&(this._label.focused=e),e||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(e){this.value!==e&&this._cd.markForCheck(),this._checked=this.value===e,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}}return t.\u0275fac=function(e){return new(e||t)(le(N3),le(AC),le(Ss),le(ti),le(qo))},t.\u0275dir=Zt({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("focus",function(){return i.focused=!0})("blur",function(){return i.focused=!1}),2&e&&dc("checked",i.checked)("disabled",i.disabled)("name",i.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),NH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),LH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();var ur=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ur||(ur={})),ur))();const FC=(t,n)=>!!n&&n.some(e=>e.contains(t)),VH=(t,n)=>!n||null!=function kIe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),sNe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),aNe=t=>sNe?()=>setTimeout(()=>t(),100):t;function Ey(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(aNe(()=>{const c=Es(n,"keydown").pipe(yo(r),ns(h=>h.which===ur.Escape),is(h=>h.preventDefault())),u=Es(n,"mousedown").pipe(yn(h=>{const f=h.target;return 2!==h.button&&!FC(f,s)&&("inside"===e?FC(f,o)&&VH(f,a):"outside"===e?!FC(f,o):VH(f,a)||!FC(f,o))}),yo(r)),d=Es(n,"mouseup").pipe(D3(u),ns(([h,f])=>f),T3(0),yo(r));_H([c.pipe(yn(h=>0)),d.pipe(yn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const HH=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function zH(t){const n=Array.from(t.querySelectorAll(HH)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}const cNe=/\s+/,GH=new class lNe{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.pageYOffset-document.documentElement.clientTop,r_left=window.pageXOffset-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),h=parseFloat(l.marginRight);let f=0,p=0;switch(o){case"top":f=a.top-(e.offsetHeight+c+u);break;case"bottom":f=a.top+a.height;break;case"left":p=a.left-(e.offsetWidth+d+h);break;case"right":p=a.left+a.width}switch(s){case"top":f=a.top;break;case"bottom":f=a.top+a.height-e.offsetHeight;break;case"left":p=a.left;break;case"right":p=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?p=a.left+a.width/2-e.offsetWidth/2:f=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(f)}px)`;const m=e.getBoundingClientRect(),g=document.documentElement,v=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return m.left>=0&&m.top>=0&&m.right<=y&&m.bottom<=v}};function Ay(t,n,e,i,r){let o=Array.isArray(e)?e:e.split(cNe);const s=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=n.classList,l=f=>{const[p,m]=f.split("-"),g=[];return r&&(g.push(`${r}-${p}`),m&&g.push(`${r}-${p}-${m}`),g.forEach(v=>{a.add(v)})),g};r&&s.forEach(f=>{a.remove(`${r}-${f}`)});let c=o.findIndex(f=>"auto"===f);c>=0&&s.forEach(function(f){null==o.find(p=>-1!==p.search("^"+f))&&o.splice(c++,1,f)});const u=n.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of o){let f=l(d);if(GH.positionElements(t,n,d,i)){h=!0;break}r&&f.forEach(p=>{a.remove(p)})}return h||(d=o[0],l(d),GH.positionElements(t,n,d,i)),d}new Date(1882,10,12),new Date(2174,10,25);let ZH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,ZV]}),t})(),xNe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),jf=(()=>{class t{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,i){2&e&&Mn("disabled",i.disabled)},inputs:{disabled:"disabled"}}),t})(),Pf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,jf,4),2&e){let o;cn(o=un())&&(i.menuItems=o)}},hostVars:5,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&(ht("x-placement",i.placement),Mn("dropdown-menu",!0)("show",i.dropdown.isOpen()))}}),t})(),LC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ht("aria-expanded",i.dropdown.isOpen())}}),t})(),rm=(()=>{class t extends LC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ht("aria-expanded",i.dropdown.isOpen())},features:[Lr([{provide:LC,useExisting:Gi(()=>t)}]),vi]}),t})(),Pu=(()=>{class t{constructor(e,i,r,o,s,a,l){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._closed$=new tr,this._bodyContainer=null,this._open=!1,this.openChange=new Ke,this.placement=i.placement,this.container=i.container,this.autoClose=i.autoClose,this.display=l?"static":"dynamic",this._zoneSubscription=o.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Sl(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){Ey(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ur.Space&&i!==ur.Enter){if(i!==ur.Tab){if(a||s){if(this.open(),r.length){switch(i){case ur.ArrowDown:o=Math.min(o+1,r.length-1);break;case ur.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ur.Home:o=0;break;case ur.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(HH);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Es(e.target,"focusout").pipe(Sl(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Es(s,"click").pipe(Sl(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Ay(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const r=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,r),e.removeStyle(r,"position"),e.removeStyle(r,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1050"),i.appendChild(o,r),i.appendChild(this._document.body,o)}}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown"),i.placement="static"===this.display?null:e;const s=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,s);const a=this._bodyContainer;a&&(r.removeClass(a,"dropup"),r.removeClass(a,"dropdown"),r.addClass(a,s))}}}return t.\u0275fac=function(e){return new(e||t)(le(qo),le(xNe),le(Ir),le(Wi),le(ti),le(Ss),le(ez,8))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Pf,5),ni(r,LC,5)),2&e){let o;cn(o=un())&&(i._menu=o.first),cn(o=un())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("show",i.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Hn]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),nz=(()=>{class t{constructor(e){this.backdrop=!0,this.keyboard=!0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();class om{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class V3{constructor(n,e,i,r,o,s,a){this._type=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._componentFactoryResolver=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:r}=this._windowRef.location,s=this._ngZone.onStable.asObservable().pipe(Sl(1)).pipe(nt(()=>this._ngZone.run(()=>ma(r,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"}))));return{windowRef:this._windowRef,transition$:s}}close(n=!1){return this._windowRef?ma(this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(is(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),null!==(e=this._contentRef)&&void 0!==e&&e.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$n(void 0)}_getContentRef(n,e){if(n){if(n instanceof Si){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new om([i.rootNodes],i)}return new om([[this._renderer.createText(`${n}`)]])}return new om([])}}const wNe=()=>{};let iz=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):wNe}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({factory:function(){return new t(ct(Ir))},token:t,providedIn:"root"}),t})(),CNe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Sl(1)).subscribe(()=>{ma(this._el.nativeElement,({classList:e})=>e.add("show"),{animation:this.animation,runningTransition:"continue"})})}hide(){return ma(this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Su("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Mn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class rz{close(n){}dismiss(n){}}class kNe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tr,this._dismissed=new tr,this._hidden=new tr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(yo(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(yo(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$n(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),kC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Ny=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(Ny||(Ny={})),Ny))();let SNe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new tr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Ke,this.shown=new tr,this.hidden=new tr}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=kC(ma(e,()=>e.classList.remove("show"),i),ma(this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"continue"};kC(ma(e,()=>e.classList.add("show"),i),ma(this._dialogEl.nativeElement,()=>{},i)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Es(e,"keydown").pipe(yo(this._closed$),ns(r=>r.which===ur.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Ny.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Es(this._dialogEl.nativeElement,"mousedown").pipe(yo(this._closed$),is(()=>i=!1),zl(()=>Es(e,"mouseup").pipe(yo(this._closed$),Sl(1))),ns(({target:r})=>e===r)).subscribe(()=>{i=!0}),Es(e,"click").pipe(yo(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(Ny.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=zH(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ma(this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(le(Ir),le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&io(b3e,7),2&e){let r;cn(r=un())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ht("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Su("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Mn("fade",i.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:lv,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0,1)(2,"div",2),ku(3),x()()),2&e&&Su("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),oz=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new tr,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Ke,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Es(n,"focusin").pipe(yo(e),yn(o=>o.target));Es(n,"keydown").pipe(yo(e),ns(o=>o.which===ur.Tab),D3(r)).subscribe(([o,s])=>{const[a,l]=zH(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Es(n,"click").pipe(yo(e),D3(r),yn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:Ff(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new rz,d=this._getContentRef(e,o.injector||i,r,u,o);let h=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,f=this._attachWindowComponent(e,s,d),p=new kNe(f,d,h,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(f),p.result.then(l,l),p.result.then(c,c),u.close=m=>{p.close(m)},u.dismiss=m=>{p.dismiss(m)},this._applyWindowOptions(f.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),h&&h.instance&&this._applyBackdropOptions(h.instance,o),p}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(CNe).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(SNe).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{Ff(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{Ff(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof Si?this._createFromTemplateRef(r,o):function DC(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new om([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new om([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new om([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=Rs.create({providers:[{provide:rz,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new om([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct(Rs),ct(Ir),ct(iz),ct(Lp),ct(Wi))},t.\u0275prov=Et({factory:function(){return new t(ct(Au),ct(Dx),ct(Ir),ct(iz),ct(Lp),ct(Wi))},token:t,providedIn:"root"}),t})(),H3=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=Object.assign({},this._config,i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(ct($c),ct(Rs),ct(oz),ct(nz))},t.\u0275prov=Et({factory:function(){return new t(ct($c),ct(Dx),ct(oz),ct(nz))},token:t,providedIn:"root"}),t})(),sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[H3]}),t})(),DNe=(()=>{class t{constructor(e){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const az=t=>Ff(t)&&""!==t;let TNe=0,lz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),sm=(()=>{class t{constructor(e,i){this.elementRef=i,this.disabled=!1,this.shown=new Ke,this.hidden=new Ke,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Ff(this.domId)||(this.domId="ngb-nav-"+TNe++)}get active(){return this._nav.activeId===this.id}get id(){return az(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ff(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>am)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,lz,4),2&e){let o;cn(o=un())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),t})(),am=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Ke,this.shown=new Ke,this.hidden=new Ke,this.destroy$=new tr,this.navItemChange$=new tr,this.navChange=new Ke,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ur.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ur.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ur.Home:s=0;break;case ur.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Ff(this.activeId)){const e=this.items.first?this.items.first.id:null;az(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(yo(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(DNe),le(qo),le(Ir))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,sm,4),ni(r,fv,5)),2&e){let o;cn(o=un())&&(i.items=o),cn(o=un())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ht("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Mn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[Hn]}),t})(),fv=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(sm),le(am),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()}),2&e&&(dc("id",i.navItem.domId),ht("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Mn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))}}),t})(),cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();class NNe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const FNe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},vz=t=>t>0?T3(t):n=>n;let bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),_z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),QNe=(()=>{class t{constructor(e){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})(),ZNe=0,eFe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,i){2&e&&(dc("id",i.id),Su("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Mn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:lv,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(Cu(),ge(0,"div",0),b(1,"div",1),ku(2),x())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{bottom:.4rem;top:auto}"],encapsulation:2,changeDetection:0}),t})(),tFe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u,d){this._elementRef=e,this._renderer=i,this._ngZone=l,this._document=c,this._changeDetector=u,this.shown=new Ke,this.hidden=new Ke,this._ngbTooltipWindowId="ngb-tooltip-"+ZNe++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.triggers=a.triggers,this.container=a.container,this.disableTooltip=a.disableTooltip,this.tooltipClass=a.tooltipClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._popupService=new V3(eFe,r,s,i,this._ngZone,o,d),this._zoneSubscription=l.onStable.subscribe(()=>{this._windowRef&&Ay(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),Ey(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function yz(t,n,e,i,r,o,s=0,a=0){const l=function ONe(t,n=FNe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new NNe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function jNe(t,n,e,i){return new rn(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function PNe(t,n,e){return i=>{let r=null;const o=i.pipe(yn(l=>({open:l})),ns(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),We());return Tt(o.pipe(ns(l=>l.open),vz(t)),o.pipe(ns(l=>!l.open),vz(n))).pipe(ns(l=>l===r&&(r=null,l.open!==e())),yn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(Rs),le($c),le(nl),le(QNe),le(Wi),le(Ir),le(qo),le(Au))},t.\u0275dir=Zt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[Hn]}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();new zn("live announcer delay",{providedIn:"root",factory:function rFe(){return 100}});let Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();const lFe=[AH,MH,NH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz];let cFe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[lFe,AH,MH,NH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz]}),t})(),Iz=(()=>{class t{constructor(){K(this,"restrictedPages",new Map([["users",oi.USER_ROLE_ADMIN],["config",oi.USER_ROLE_DEVELOPER],["modules",oi.USER_ROLE_DEVELOPER],["apiexplorer",oi.USER_ROLE_DEVELOPER]]))}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function uFe(t,n){if(1&t&&(ta(0,5),b(1,"a",27),ge(2,"img",28),b(3,"span",12),I(4),x()(),na()),2&t){const e=j().$implicit;k("ngbNavItem",e.navItem),w(1),k("routerLink",e.routerLink),w(1),$p("src","/static/svg/",e.icon,".svg",y1),w(2),Dt(e.label)}}function dFe(t,n){1&t&&ge(0,"hr")}function hFe(t,n){if(1&t&&(J(0,uFe,5,4,"ng-container",26),J(1,dFe,1,0,"hr",25)),2&t){const e=n.$implicit;k("ngIf",j().getSessionRole()<=e.minRole),w(1),k("ngIf",e.separator)}}function fFe(t,n){if(1&t&&(b(0,"div",29)(1,"h2",30),ge(2,"img",31),I(3,"An error has occurred!"),x(),b(4,"h6",32),I(5),x(),b(6,"p"),I(7,"Please refresh the page to try again."),x()()),2&t){const e=j();w(5),Dt(e.error)}}function pFe(t,n){1&t&&(b(0,"div",33),ge(1,"img",34),x())}function mFe(t,n){1&t&&ge(0,"router-outlet")}const gFe=function(){return["/"]},vFe=function(){return["/login"]};let yFe=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"segment",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"routerSub",void 0),K(this,"segmentRouterSub",void 0),K(this,"loading",!0),K(this,"error",""),K(this,"routes",[{navItem:"status",routerLink:["/status"],label:"Status",minRole:oi.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:oi.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:oi.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:oi.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:oi.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:oi.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:oi.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:oi.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:oi.USER_ROLE_READONLY,icon:"chat"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:oi.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:oi.USER_ROLE_DEVELOPER,icon:"api-explorer"}]),this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function iMe(t){let n=arguments.length,e=Dy;Sa(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new rMe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof Ww&&(this.loading=!0),l instanceof zh&&(this.loading=!1),l instanceof ry&&(this.loading=!1),l instanceof Xw&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(function CC(t,n){return e=>e.lift(new lMe(t,n))}((a,l)=>!(l instanceof zh)||a.url===l.url)).subscribe(a=>{})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(yC),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(o){return i.onSidebarNavChange(o)}),b(4,"div",4),ta(5,5),b(6,"a",6),ge(7,"img",7)(8,"img",8),x(),na(),ge(9,"hr"),J(10,hFe,2,2,"ng-template",9),ge(11,"hr"),b(12,"a",10),ge(13,"img",11),b(14,"span",12),I(15,"Heroic Cloud"),x()(),b(16,"a",13),ge(17,"img",14),b(18,"span",12),I(19,"Documentation"),x()(),b(20,"a",15),ge(21,"img",16),b(22,"span",12),I(23,"Forum"),x()(),b(24,"a",17),ge(25,"img",18),b(26,"span",12),I(27,"Heroic Labs Blog"),x()(),ge(28,"hr"),b(29,"div",19),I(30),x(),ta(31,5),b(32,"a",20),ye("click",function(){return i.logout()}),ge(33,"img",21),b(34,"span",12),I(35,"Logout"),x()(),na(),x()(),b(36,"main",22),J(37,fFe,8,1,"div",23),J(38,pFe,2,0,"div",24),J(39,mFe,1,0,"router-outlet",25),x()()()),2&e&&(w(5),k("ngbNavItem","logo"),w(1),k("routerLink",wl(9,gFe)),w(4),k("ngForOf",i.routes),w(20),xn("Logged in as: ",i.getUsername(),""),w(1),k("ngbNavItem","logout"),w(1),k("routerLink",wl(10,vFe)),w(5),k("ngIf",i.error),w(1),k("ngIf",!i.error&&i.loading),w(1),k("ngIf",!i.error&&!i.loading))},dependencies:[Jp,Nu,hy,jn,gn,am,sm,fv],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})),t})(),bFe=(()=>{class t{constructor(e,i,r){K(this,"authService",void 0),K(this,"router",void 0),K(this,"globals",void 0),this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||Rs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class kFe extends CFe{}class EFe{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new AFe(n,this.dueTime,this.scheduler))}}class AFe extends O{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(MFe,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function MFe(t){t.debouncedNext()}function IFe(){}function W3(t){return null==t?IFe:function(){return this.querySelector(t)}}function FFe(){return[]}function Lz(t){return null==t?FFe:function(){return this.querySelectorAll(t)}}function Rz(t){return function(){return this.matches(t)}}function $z(t){return new Array(t.length)}function $C(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$C.prototype={constructor:$C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Bz="$";function RFe(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var q3="http://www.w3.org/1999/xhtml";const Vz={svg:"http://www.w3.org/2000/svg",xhtml:q3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function BC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Vz.hasOwnProperty(n)?{space:Vz[n],local:t}:t}function ZFe(t){return function(){this.removeAttribute(t)}}function eOe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tOe(t,n){return function(){this.setAttribute(t,n)}}function nOe(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function iOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function rOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Hz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sOe(t){return function(){this.style.removeProperty(t)}}function aOe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function lOe(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function pv(t,n){return t.style.getPropertyValue(n)||Hz(t).getComputedStyle(t,null).getPropertyValue(n)}function uOe(t){return function(){delete this[t]}}function dOe(t,n){return function(){this[t]=n}}function hOe(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function zz(t){return t.trim().split(/^|\s+/)}function X3(t){return t.classList||new Uz(t)}function Uz(t){this._node=t,this._names=zz(t.getAttribute("class")||"")}function Gz(t,n){for(var e=X3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Xz={},Vr=null;function HOe(t,n,e){return t=Yz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Yz(t,n,e){return function(i){var r=Vr;Vr=i;try{t.call(this,this.__data__,n,e)}finally{Vr=r}}}function UOe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=_&&(_=y+1);!(S=g[_])&&++_=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function GFe(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=WFe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?sOe:"function"==typeof n?lOe:aOe)(t,n,e??"")):pv(this.node(),t)},property:function fOe(t,n){return arguments.length>1?this.each((null==n?uOe:"function"==typeof n?hOe:dOe)(t,n)):this.node()[t]},classed:function vOe(t,n){var e=zz(t+"");if(arguments.length<2){for(var i=X3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?GOe:UOe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=i4e.exec(t))?new vc(n[1],n[2],n[3],1):(n=r4e.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=o4e.exec(t))?zC(n[1],n[2],n[3],n[4]):(n=s4e.exec(t))?zC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=a4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,1):(n=l4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,n[4]):iU.hasOwnProperty(t)?sU(iU[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function sU(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function zC(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function Ly(t,n,e,i){return 1===arguments.length?function u4e(t){return t instanceof Oy||(t=lm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function aU(){return"#"+K3(this.r)+K3(this.g)+K3(this.b)}function lU(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function K3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cU(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ud(t,n,e,i)}function uU(t){if(t instanceof Ud)return new Ud(t.h,t.s,t.l,t.opacity);if(t instanceof Oy||(t=lm(t)),!t)return new Ud;if(t instanceof Ud)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Ud(s,a,l,t.opacity)}function Ud(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Q3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function dU(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function Z3(t){return function(){return t}}function fU(t,n){var e=n-t;return e?function hU(t,n){return function(e){return t+e*n}}(t,e):Z3(isNaN(t)?n:t)}J3(Oy,lm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rU,formatHex:rU,formatHsl:function c4e(){return uU(this).formatHsl()},formatRgb:oU,toString:oU}),J3(vc,Ly,nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aU,formatHex:aU,formatRgb:lU,toString:lU})),J3(Ud,function d4e(t,n,e,i){return 1===arguments.length?uU(t):new Ud(t,n,e,i??1)},nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new Ud(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ud(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(Q3(t>=240?t-240:t+120,r,i),Q3(t,r,i),Q3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const UC=function t(n){var e=function m4e(t){return 1==(t=+t)?fU:function(n,e){return e-n?function p4e(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):Z3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Ly(r)).r,(o=Ly(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=fU(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function pU(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return dU((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=tI.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--gv}()}finally{gv=0,function T4e(){for(var t,e,n=GC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:GC=e);By=t,nI(i)}(),um=0}}function D4e(){var t=Vy.now(),n=t-WC;n>bU&&(qC-=n,WC=t)}function nI(t){gv||(Ry&&(Ry=clearTimeout(Ry)),t-um>24?(t<1/0&&(Ry=setTimeout(wU,t-Vy.now()-qC)),$y&&($y=clearInterval($y))):($y||(WC=Vy.now(),$y=setInterval(D4e,bU)),gv=1,_U(wU)))}function CU(t,n,e){var i=new YC;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}YC.prototype=xU.prototype={constructor:YC,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?XC():+e)+(null==n?0:+n),!this._next&&By!==this&&(By?By._next=this:GC=this,By=this),this._call=t,this._time=e,nI()},stop:function(){this._call&&(this._call=null,this._time=1/0,nI())}};var E4e=tU("start","end","cancel","interrupt"),A4e=[],kU=0,SU=1,iI=2,JC=3,DU=4,rI=5,KC=6;function QC(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function M4e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==SU)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===JC)return CU(s);f.state===DU?(f.state=KC,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ukU)throw new Error("too late; already scheduled");return e}function Gh(t,n){var e=Ru(t,n);if(e.state>JC)throw new Error("too late; already running");return e}function Ru(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function sI(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>iI&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?oI:Gh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function G4e(t,n){var e=BC(t),i="transform"===e?j4e:IU;return this.attrTween(t,"function"==typeof n?(e.local?U4e:z4e)(e,i,cI(this,"attr."+t,n)):null==n?(e.local?B4e:$4e)(e):(e.local?H4e:V4e)(e,i,n))},attrTween:function J4e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=BC(t);return this.tween(e,(i.local?X4e:Y4e)(i,n))},style:function _je(t,n,e){var i="transform"==(t+="")?O4e:IU;return null==n?this.styleTween(t,function gje(t,n){var e,i,r;return function(){var o=pv(this,t),s=(this.style.removeProperty(t),pv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,NU(t)):"function"==typeof n?this.styleTween(t,function yje(t,n,e){var i,r,o;return function(){var s=pv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=pv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,cI(this,"style."+t,n))).each(function bje(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Gh(this,t),c=l.on,u=null==l.value[o]?a||(a=NU(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function vje(t,n,e){var i,o,r=e+"";return function(){var s=pv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function Cje(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function wje(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function xje(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function Dje(t){return this.tween("text","function"==typeof t?function Sje(t){return function(){var n=t(this);this.textContent=n??""}}(cI(this,"text",t)):function kje(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function Aje(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function Eje(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function Tje(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function dje(){return this.on("end.remove",function uje(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function R4e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Ru(this.node(),e).tween,r=0,o=i.length;r0&&(R=z-N),C<0?he=E-F:C>0&&(q=re-F),y=fI,B.attr("cursor",qh.selection),Ie());break;default:return}hI()},!0).on("keyup.brush",function _t(){switch(Vr.keyCode){case 16:V&&(oe=fe=V=!1,Ie());break;case 18:y===bv&&(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv,Ie());break;case 32:y===fI&&(Vr.altKey?(_&&(X=Z-N*_,R=z+N*_),C&&(he=E-F*C,q=re+F*C),y=bv):(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv),B.attr("cursor",qh[v]),Ie());break;default:return}hI()},!0),function e4e(t){var n=t.document.documentElement,e=va(t).on("dragstart.drag",Y3,!0);"onselectstart"in n?e.on("selectstart.drag",Y3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Vr.view)}OU(),sI(g),c.call(g),ze.start()}function ie(){var At=Ne(g);V&&!oe&&!fe&&(Math.abs(At[0]-tt[0])>Math.abs(At[1]-tt[1])?fe=!0:oe=!0),tt=At,Y=!0,hI(),Ie()}function Ie(){var At;switch(N=tt[0]-xe[0],F=tt[1]-xe[1],y){case fI:case jU:_&&(N=Math.max(G-R,Math.min(L-X,N)),z=R+N,Z=X+N),C&&(F=Math.max(U-q,Math.min(H-he,F)),re=q+F,E=he+F);break;case yv:_<0?(N=Math.max(G-R,Math.min(L-R,N)),z=R+N,Z=X):_>0&&(N=Math.max(G-X,Math.min(L-X,N)),z=R,Z=X+N),C<0?(F=Math.max(U-q,Math.min(H-q,F)),re=q+F,E=he):C>0&&(F=Math.max(U-he,Math.min(H-he,F)),re=q,E=he+F);break;case bv:_&&(z=Math.max(G,Math.min(L,R-N*_)),Z=Math.max(G,Math.min(L,X+N*_))),C&&(re=Math.max(U,Math.min(H,q-F*C)),E=Math.max(U,Math.min(H,he+F*C)))}Zn?1:t>=n?0:NaN}function yI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function Xje(t){return(n,e)=>vI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var bI=Math.sqrt(50),_I=Math.sqrt(10),xI=Math.sqrt(2);function $U(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=bI?10:o>=_I?5:o>=xI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=bI?10:o>=_I?5:o>=xI?2:1)}function wI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=bI?r*=10:o>=_I?r*=5:o>=xI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return CI.setTime(+o),kI.setTime(+s),t(CI),t(kI),Math.floor(e(CI,kI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var SI=$u(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});SI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$u(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Jje=SI;var BU=$u(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});const Kje=BU;var Uy=6e4,Zje=6048e5;function dm(t){return $u(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Uy)/Zje})}var HU=dm(0),zU=(dm(1),dm(2),dm(3),dm(4),dm(5),dm(6),$u(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Uy)/864e5,t=>t.getDate()-1));const sPe=zU;var UU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Uy)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()});const aPe=UU;var GU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*Uy)},function(t,n){return(n-t)/Uy},function(t){return t.getMinutes()});const lPe=GU;var WU=$u(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()});const cPe=WU;var i2=$u(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});i2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$u(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):i2:null};const uPe=i2;var DI=new Date,TI=new Date;function Xh(t,n,e,i){function r(o){return t(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return t(o=new Date(+o)),o},r.ceil=function(o){return t(o=new Date(o-1)),n(o,1),t(o),o},r.round=function(o){var s=r(o),a=r.ceil(o);return o-s0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return DI.setTime(+o),TI.setTime(+s),t(DI),t(TI),Math.floor(e(DI,TI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var qU=6e4,YU=6048e5;function hm(t){return Xh(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/YU})}var JU=hm(0),r2=hm(1),_v=(hm(2),hm(3),hm(4)),KU=(hm(5),hm(6),Xh(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const QU=KU;function fm(t){return Xh(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qU)/YU})}var ZU=fm(0),o2=fm(1),xv=(fm(2),fm(3),fm(4)),eG=(fm(5),fm(6),Xh(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qU)/864e5},function(t){return t.getDate()-1}));const tG=eG;var EI=Xh(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});EI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Gy=EI;var AI=Xh(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});AI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Wy=AI;function MI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function II(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function qy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var wv,gG,nG={"-":"",_:" ",0:"0"},ya=/^\s*\d+/,_Pe=/^%/,xPe=/[\\^$*+?|[\]().{}]/g;function Gr(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function EPe(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function APe(t,n,e){var i=ya.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function MPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function oG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function IPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function sG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function NPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function FPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function OPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function jPe(t,n,e){var i=ya.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function PPe(t,n,e){var i=_Pe.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function LPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function RPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function aG(t,n){return Gr(t.getDate(),n,2)}function $Pe(t,n){return Gr(t.getHours(),n,2)}function BPe(t,n){return Gr(t.getHours()%12||12,n,2)}function VPe(t,n){return Gr(1+tG.count(Gy(t),t),n,3)}function lG(t,n){return Gr(t.getMilliseconds(),n,3)}function HPe(t,n){return lG(t,n)+"000"}function zPe(t,n){return Gr(t.getMonth()+1,n,2)}function UPe(t,n){return Gr(t.getMinutes(),n,2)}function GPe(t,n){return Gr(t.getSeconds(),n,2)}function WPe(t){var n=t.getDay();return 0===n?7:n}function qPe(t,n){return Gr(ZU.count(Gy(t)-1,t),n,2)}function cG(t){var n=t.getDay();return n>=4||0===n?xv(t):xv.ceil(t)}function XPe(t,n){return t=cG(t),Gr(xv.count(Gy(t),t)+(4===Gy(t).getDay()),n,2)}function YPe(t){return t.getDay()}function JPe(t,n){return Gr(o2.count(Gy(t)-1,t),n,2)}function KPe(t,n){return Gr(t.getFullYear()%100,n,2)}function QPe(t,n){return Gr((t=cG(t)).getFullYear()%100,n,2)}function ZPe(t,n){return Gr(t.getFullYear()%1e4,n,4)}function eLe(t,n){var e=t.getDay();return Gr((t=e>=4||0===e?xv(t):xv.ceil(t)).getFullYear()%1e4,n,4)}function tLe(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Gr(n/60|0,"0",2)+Gr(n%60,"0",2)}function uG(t,n){return Gr(t.getUTCDate(),n,2)}function nLe(t,n){return Gr(t.getUTCHours(),n,2)}function iLe(t,n){return Gr(t.getUTCHours()%12||12,n,2)}function rLe(t,n){return Gr(1+QU.count(Wy(t),t),n,3)}function dG(t,n){return Gr(t.getUTCMilliseconds(),n,3)}function oLe(t,n){return dG(t,n)+"000"}function sLe(t,n){return Gr(t.getUTCMonth()+1,n,2)}function aLe(t,n){return Gr(t.getUTCMinutes(),n,2)}function lLe(t,n){return Gr(t.getUTCSeconds(),n,2)}function cLe(t){var n=t.getUTCDay();return 0===n?7:n}function uLe(t,n){return Gr(JU.count(Wy(t)-1,t),n,2)}function hG(t){var n=t.getUTCDay();return n>=4||0===n?_v(t):_v.ceil(t)}function dLe(t,n){return t=hG(t),Gr(_v.count(Wy(t),t)+(4===Wy(t).getUTCDay()),n,2)}function hLe(t){return t.getUTCDay()}function fLe(t,n){return Gr(r2.count(Wy(t)-1,t),n,2)}function pLe(t,n){return Gr(t.getUTCFullYear()%100,n,2)}function mLe(t,n){return Gr((t=hG(t)).getUTCFullYear()%100,n,2)}function gLe(t,n){return Gr(t.getUTCFullYear()%1e4,n,4)}function vLe(t,n){var e=t.getUTCDay();return Gr((t=e>=4||0===e?_v(t):_v.ceil(t)).getUTCFullYear()%1e4,n,4)}function yLe(){return"+0000"}function fG(){return"%"}function pG(t){return+t}function mG(t){return Math.floor(+t/1e3)}function vG(t){return null===t?NaN:+t}!function wLe(t){wv=function bPe(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Xy(r),u=Yy(r),d=Xy(o),h=Yy(o),f=Xy(s),p=Yy(s),m=Xy(a),g=Yy(a),v=Xy(l),y=Yy(l),_={a:function H(ze){return s[ze.getDay()]},A:function he(ze){return o[ze.getDay()]},b:function E(ze){return l[ze.getMonth()]},B:function N(ze){return a[ze.getMonth()]},c:null,d:aG,e:aG,f:HPe,g:QPe,G:eLe,H:$Pe,I:BPe,j:VPe,L:lG,m:zPe,M:UPe,p:function F(ze){return r[+(ze.getHours()>=12)]},q:function Y(ze){return 1+~~(ze.getMonth()/3)},Q:pG,s:mG,S:GPe,u:WPe,U:qPe,V:XPe,w:YPe,W:JPe,x:null,X:null,y:KPe,Y:ZPe,Z:tLe,"%":fG},C={a:function V(ze){return s[ze.getUTCDay()]},A:function oe(ze){return o[ze.getUTCDay()]},b:function fe(ze){return l[ze.getUTCMonth()]},B:function Ne(ze){return a[ze.getUTCMonth()]},c:null,d:uG,e:uG,f:oLe,g:mLe,G:vLe,H:nLe,I:iLe,j:rLe,L:dG,m:sLe,M:aLe,p:function xe(ze){return r[+(ze.getUTCHours()>=12)]},q:function tt(ze){return 1+~~(ze.getUTCMonth()/3)},Q:pG,s:mG,S:lLe,u:cLe,U:uLe,V:dLe,w:hLe,W:fLe,x:null,X:null,y:pLe,Y:gLe,Z:yLe,"%":fG},S={a:function z(ze,ot,B){var ne=f.exec(ot.slice(B));return ne?(ze.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function U(ze,ot,B){var ne=d.exec(ot.slice(B));return ne?(ze.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function q(ze,ot,B){var ne=v.exec(ot.slice(B));return ne?(ze.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function re(ze,ot,B){var ne=m.exec(ot.slice(B));return ne?(ze.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function L(ze,ot,B){return G(ze,n,ot,B)},d:oG,e:oG,f:jPe,g:rG,G:iG,H:sG,I:sG,j:IPe,L:OPe,m:MPe,M:NPe,p:function R(ze,ot,B){var ne=c.exec(ot.slice(B));return ne?(ze.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:APe,Q:LPe,s:RPe,S:FPe,u:kPe,U:SPe,V:DPe,w:CPe,W:TPe,x:function X(ze,ot,B){return G(ze,e,ot,B)},X:function Z(ze,ot,B){return G(ze,i,ot,B)},y:rG,Y:iG,Z:EPe,"%":PPe};function M(ze,ot){return function(B){var Le,_t,At,ne=[],ie=-1,Ie=0,Ye=ze.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Ie=II(qy(ne.y,0,1))).getUTCDay(),Ie=Ye>4||0===Ye?r2.ceil(Ie):r2(Ie),Ie=QU.offset(Ie,7*(ne.V-1)),ne.y=Ie.getUTCFullYear(),ne.m=Ie.getUTCMonth(),ne.d=Ie.getUTCDate()+(ne.w+6)%7):(Ye=(Ie=MI(qy(ne.y,0,1))).getDay(),Ie=Ye>4||0===Ye?o2.ceil(Ie):o2(Ie),Ie=tG.offset(Ie,7*(ne.V-1)),ne.y=Ie.getFullYear(),ne.m=Ie.getMonth(),ne.d=Ie.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?II(qy(ne.y,0,1)).getUTCDay():MI(qy(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,II(ne)):MI(ne)}}function G(ze,ot,B,ne){for(var Le,_t,ie=0,Ie=ot.length,Ye=B.length;ie=Ye)return-1;if(37===(Le=ot.charCodeAt(ie++))){if(Le=ot.charAt(ie++),!(_t=S[Le in nG?ot.charAt(ie++):Le])||(ne=_t(ze,B,ne))<0)return-1}else if(Le!=B.charCodeAt(ne++))return-1}return ne}return _.x=M(e,_),_.X=M(i,_),_.c=M(n,_),C.x=M(e,C),C.X=M(i,C),C.c=M(n,C),{format:function(ze){var ot=M(ze+="",_);return ot.toString=function(){return ze},ot},parse:function(ze){var ot=$(ze+="",!1);return ot.toString=function(){return ze},ot},utcFormat:function(ze){var ot=M(ze+="",C);return ot.toString=function(){return ze},ot},utcParse:function(ze){var ot=$(ze+="",!0);return ot.toString=function(){return ze},ot}}}(t),gG=wv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const CLe=yI(vI).right,bG=(yI(vG),CLe);function kLe(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function DLe(t){return+t}var _G=[0,1];function Cv(t){return t}function NI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function SLe(t){return function(){return t}}(isNaN(n)?NaN:.5)}function ELe(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?ALe:ELe,l=c=null,d}function d(h){return isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,DLe),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=kLe,u()},d.clamp=function(h){return arguments.length?(s=!!h||Cv,u()):s!==Cv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Cv,Cv)}function Jy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Ky=1e3,Qy=60*Ky,Zy=60*Qy,eb=24*Zy,NLe=7*eb,CG=30*eb,FI=365*eb;function FLe(t){return new Date(t)}function OLe(t){return t instanceof Date?+t:+new Date(+t)}function kG(t,n,e,i,r,o,s,a,l){var c=wG(),u=c.invert,d=c.domain,h=l(".%L"),f=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),_=l("%Y"),C=[[s,1,Ky],[s,5,5*Ky],[s,15,15*Ky],[s,30,30*Ky],[o,1,Qy],[o,5,5*Qy],[o,15,15*Qy],[o,30,30*Qy],[r,1,Zy],[r,3,3*Zy],[r,6,6*Zy],[r,12,12*Zy],[i,1,eb],[i,2,2*eb],[e,1,NLe],[n,1,CG],[n,3,3*CG],[t,1,FI]];function S($){return(s($)<$?h:o($)<$?f:r($)<$?p:i($)<$?m:n($)<$?e($)<$?g:v:t($)<$?y:_)($)}function M($,G,R){if(null==$&&($=10),"number"==typeof $){var q,z=Math.abs(R-G)/$,U=yI(function(re){return re[2]}).right(C,z);return U===C.length?(q=wI(G/FI,R/FI,$),$=t):U?(q=(U=C[z/C[U-1][2]=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s2(t){if(!(n=jLe.exec(t)))throw new Error("invalid format: "+t);var n;return new OI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function OI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function a2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function kv(t){return(t=a2(Math.abs(t)))?t[1]:NaN}function DG(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}s2.prototype=OI.prototype,OI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const TG={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function PLe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return DG(100*t,n)},r:DG,s:function VLe(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(SG=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+a2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function EG(t){return t}var l2,jI,IG,AG=Array.prototype.map,MG=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function qLe(t){var n=t.domain;return t.ticks=function(e){var i=n();return function Yje(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),s=new Array(o=Math.ceil(n-t+1));++r0;){if((c=$U(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function bo(){var t=wG();return t.copy=function(){return xG(t,bo())},Jy.apply(t,arguments),qLe(t)}function NG(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(AG.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?EG:function $Le(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(AG.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=s2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,_=d.precision,C=d.trim,S=d.type;"n"===S?(y=!0,S="g"):TG[S]||(void 0===_&&(_=12),C=!0,S="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var M="$"===m?e:"#"===m&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",$="$"===m?i:/[%p]/.test(S)?s:"",G=TG[S],R=/[defgprs%]/.test(S);function z(U){var L,X,Z,q=M,re=$;if("c"===S)re=G(U)+re,U="";else{var H=(U=+U)<0||1/U<0;if(U=isNaN(U)?l:G(Math.abs(U),_),C&&(U=function BLe(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(U)),H&&0==+U&&"+"!==p&&(H=!1),q=(H?"("===p?p:a:"-"===p||"("===p?"":p)+q,re=("s"===S?MG[8+SG/3]:"")+re+(H&&"("===p?")":""),R)for(L=-1,X=U.length;++L(Z=U.charCodeAt(L))||Z>57){re=(46===Z?r+U.slice(L+1):U.slice(L))+re,U=U.slice(0,L);break}}y&&!g&&(U=n(U,1/0));var he=q.length+U.length+re.length,E=he>1)+q+U+re+E.slice(he);break;default:U=E+q+U+re}return o(U)}return _=void 0===_?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),z.toString=function(){return d+""},z}return{format:c,formatPrefix:function u(d,h){var f=c(((d=s2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(kv(h)/3))),m=Math.pow(10,-p),g=MG[8+p/3];return function(v){return f(m*v)+g}}}}(t),jI=l2.format,IG=l2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const FG=Symbol("implicit");function PI(){var t=new Map,n=[],e=[],i=FG;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==FG)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return PI(n,e).unknown(i)},Jy.apply(r,arguments),r}function La(){var o,s,t=PI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function jG(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],avm)if(Math.abs(u*a-l*c)>vm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((LI-Math.acos((p+d-m)/(2*g*v)))/2),_=y/v,C=y/g;Math.abs(_-1)>vm&&(this._+="L"+(t+_*c)+","+(n+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>vm||Math.abs(this._y1-c)>vm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%RI+RI),d>YLe?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>vm&&(this._+="A"+e+","+e+",0,"+ +(d>=LI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const BI=LG;function mo(t){return function(){return t}}function RG(t){return t[0]}function $G(t){return t[1]}function c2(){var t=RG,n=$G,e=mo(!0),i=null,r=gm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=BI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],_[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),_[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):_[d]))}if(v)return a=null,v+""||null}function c(){return c2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:mo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:mo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:mo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function BG(){}function VI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function VG(t,n){this._context=t,this._k=(1-n)/6}function HG(t,n){this._context=t,this._k=(1-n)/6}function zG(t){this._curve=t}function fRe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function XG(t,n){var r,s,a,l,c,e=new rb(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=FRe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new rb(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(YG)}function FRe(t){return t.children}function ORe(t){t.data=t.data.data}function YG(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rb(t){this.data=t,this.depth=this.height=0,this.parent=null}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:VI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new VG(i,n)}return e.tension=function(i){return t(+i)},e}(0),HG.prototype={areaStart:BG,areaEnd:BG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new HG(i,n)}return e.tension=function(i){return t(+i)},e}(0),function UG(t){function n(e){return new zG(t(e))}return n._curve=t,n}(gm),zG.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function gRe(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,_,C,S,M,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),M=g*g*S,(_=Math.max(y/M,M/v))>C){g-=c;break}C=_}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),rb.prototype=XG.prototype={constructor:rb,count:function _Re(){return this.eachAfter(bRe)},each:function xRe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function kRe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function SRe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function DRe(t){for(var n=this,e=function TRe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function ERe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function ARe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function MRe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function IRe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function NRe(){return XG(this).eachBefore(ORe)}};const $Re=["caretElm"];function BRe(t,n){}const VRe=function(t){return{model:t}};function HRe(t,n){if(1&t&&(b(0,"span"),J(1,BRe,0,0,"ng-template",5),x()),2&t){const e=j();w(1),k("ngTemplateOutlet",e.template)("ngTemplateOutletContext",lr(2,VRe,e.context))}}function zRe(t,n){1&t&&ge(0,"span",6),2&t&&k("innerHTML",j().title,kx)}function URe(t,n){if(1&t&&(at(),Ip(),ge(0,"ngx-charts-scale-legend",4)),2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function GRe(t,n){if(1&t){const e=vt();at(),Ip(),b(0,"ngx-charts-legend",5),ye("labelClick",function(r){return $e(e),Be(j().legendLabelClick.emit(r))})("labelActivate",function(r){return $e(e),Be(j().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return $e(e),Be(j().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const QG=["*"],WRe=["ngx-charts-axis-label",""],ZG=["ticksel"],qRe=["ngx-charts-x-axis-ticks",""];function XRe(t,n){if(1&t&&(at(),b(0,"g",3)(1,"title"),I(2),x(),b(3,"text",4),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function YRe(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",6),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),ht("y1",-e.gridLineHeight)}}function JRe(t,n){if(1&t&&(at(),b(0,"g"),J(1,YRe,2,2,"g",5),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(1),k("ngIf",i.showGridLines)}}const KRe=["ngx-charts-x-axis",""];function QRe(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksHeight(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function ZRe(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const e5e=["ngx-charts-y-axis-ticks",""];function t5e(t,n){if(1&t&&(at(),b(0,"g",4)(1,"title"),I(2),x(),b(3,"text",5),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function n5e(t,n){if(1&t&&(at(),ge(0,"path",6)),2&t){const e=j();ht("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function i5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",j(3).gridLineWidth)}function r5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",-j(3).gridLineWidth)}function o5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,i5e,1,1,"line",8),J(2,r5e,1,1,"line",8),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),k("ngIf","left"===e.orient),w(1),k("ngIf","right"===e.orient)}}function s5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,o5e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(1),k("ngIf",i.showGridLines)}}function a5e(t,n){if(1&t&&(at(),b(0,"g")(1,"title"),I(2),x(),b(3,"text",11),I(4),x()()),2&t){const e=j(2).$implicit,i=j();w(2),Dt(i.tickTrim(i.tickFormat(e.value))),w(1),ht("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),xn(" ",e.name," ")}}function l5e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",10),J(2,a5e,5,6,"g",7),x()),2&t){const e=j().$implicit,i=j();ht("transform",i.transform(e.value)),w(1),ht("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),k("ngIf",i.showRefLabels)}}function c5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,l5e,3,4,"g",7),x()),2&t){const e=j();w(1),k("ngIf",e.showRefLines)}}const u5e=["ngx-charts-y-axis",""];function d5e(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksWidth(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function h5e(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const f5e=["ngx-charts-circle-series",""];function p5e(t,n){if(1&t&&(at(),ge(0,"rect",4)),2&t){const e=j(2);k("@animationState","active"),ht("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const m5e=function(t){return{name:t}};function g5e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"defs"),ge(2,"g",1),x(),J(3,p5e,1,6,"rect",2),b(4,"g",3),ye("select",function(){$e(e);const r=j();return Be(r.onClick(r.circle.data))})("activate",function(){return $e(e),Be(j().activateCircle())})("deactivate",function(){return $e(e),Be(j().deactivateCircle())}),x()()}if(2&t){const e=j();w(2),k("name",e.gradientId)("stops",e.circle.gradientStops),w(1),k("ngIf",e.barVisible&&"standard"===e.type),w(1),Mn("active",e.isActive(lr(18,m5e,e.circle.seriesName))),k("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const v5e=["ngx-charts-circle",""],x5e=["ngx-charts-svg-linear-gradient",""];function w5e(t,n){if(1&t&&(at(),ge(0,"stop")),2&t){const e=n.$implicit;rr("stop-color",e.color)("stop-opacity",e.opacity),ht("offset",e.offset+"%")}}const S5e=["ngx-charts-area",""];function D5e(t,n){if(1&t&&(at(),b(0,"defs"),ge(1,"g",2),x()),2&t){const e=j();w(1),k("name",e.gradientId)("stops",e.gradientStops)}}const E5e=["tooltipAnchor"],A5e=["ngx-charts-tooltip-area",""];function M5e(t,n){if(1&t&&(b(0,"div",6),ge(1,"span",7),I(2),x()),2&t){const e=n.$implicit,i=j(2);w(1),rr("background-color",e.color),w(1),xn(" ",i.getToolTipText(e)," ")}}function I5e(t,n){if(1&t&&(at(),Ip(),b(0,"div",4),J(1,M5e,3,3,"div",5),x()),2&t){const e=n.model;w(1),k("ngForOf",e)}}const N5e=["ngx-charts-timeline",""];function F5e(t,n){if(1&t&&(b(0,"header",4)(1,"span",5),I(2),x()()),2&t){const e=j();w(2),Dt(e.title)}}function O5e(t,n){if(1&t){const e=vt();b(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return $e(e),Be(j().labelClick.emit(r))})("activate",function(r){return $e(e),Be(j().activate(r))})("deactivate",function(r){return $e(e),Be(j().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j();w(1),k("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Us=["tooltipTemplate"],p2=["seriesTooltipTemplate"],Eo=function(t,n){return[t,n]},n6e=["ngx-charts-line",""];function i6e(t,n){if(1&t){const e=vt();at(),b(0,"g",7),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateXAxisHeight(r))}),x()}if(2&t){const e=j();k("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function r6e(t,n){if(1&t){const e=vt();at(),b(0,"g",8),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateYAxisWidth(r))}),x()}if(2&t){const e=j();k("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function o6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",9),x()),2&t){const e=n.$implicit,i=j();k("@animationState","active"),w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function s6e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"g",13),ye("select",function(r){return $e(e),Be(j(2).onClick(r))})("activate",function(r){return $e(e),Be(j(2).onActivate(r))})("deactivate",function(r){return $e(e),Be(j(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function a6e(t,n){if(1&t){const e=vt();at(),b(0,"g",10),ye("mouseleave",function(){return $e(e),Be(j().hideCircles())}),b(1,"g",11),ye("hover",function(r){return $e(e),Be(j().updateHoveredVertical(r))}),x(),J(2,s6e,2,9,"g",12),x()}if(2&t){const e=j();w(1),k("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),k("ngForOf",e.results)}}function l6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",15),x()),2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function c6e(t,n){if(1&t){const e=vt();at(),b(0,"g",14),ye("onDomainChange",function(r){return $e(e),Be(j().updateDomain(r))}),J(1,l6e,2,8,"g",4),x()}if(2&t){const e=j();k("results",e.results)("view",Sr(10,Eo,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ht("transform",e.timelineTransform),w(1),k("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const u6e=["ngx-charts-line-series",""];function d6e(t,n){if(1&t&&(at(),ge(0,"g",4)),2&t){const e=j();k("name",e.gradientId)("stops",e.gradientStops)}}function h6e(t,n){if(1&t&&(at(),ge(0,"g",5)),2&t){const e=j();Mn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),k("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let iW=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function a$e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new kFe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Nz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct($c),ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function l$e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function c$e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:l$e(o.value,t,n)}),this[r]}}}}var Gs=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Gs||(Gs={})),Gs))();const Lf=7;function rW(t,n,e){return"top"===e?t.top-Lf:"bottom"===e?t.top+t.height-n.height+Lf:"center"===e?t.top+t.height/2-n.height/2:void 0}function oW(t,n,e){return"left"===e?t.left-Lf:"right"===e?t.left+t.width-n.width+Lf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=rW(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Lf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Lf),"center"===r&&(o=e.height/2-i.height/2);const s=rW(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=oW(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Lf),"right"===r&&(o=e.width-n.width/2-i.width/2-Lf),"center"===r&&(o=e.width/2-i.width/2);const s=oW(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===Gs.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===Gs.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===Gs.right)return Gs.left;if(n===Gs.left)return Gs.right;if(n===Gs.top)return Gs.bottom;if(n===Gs.bottom)return Gs.top}return n}}let u$e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&io($Re,5),2&e){let r;cn(r=un())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,w5),2&e&&Su(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(b(0,"div"),ge(1,"span",0,1),b(3,"div",2),J(4,HRe,2,4,"span",3),J(5,zRe,1,1,"span",4),x()()),2&e&&(w(1),function J8(t,n,e){Tu(lc,Pd,Ig(Gt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),k("hidden",!i.showCaret),w(3),k("ngIf",!i.title),w(1),k("ngIf",i.title))},dependencies:[gn,kl],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function SFe(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);r>3&&o&&Object.defineProperty(n,e,o)}([c$e(100)],t.prototype,"onWindowResize",null),t})();class d$e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let UI=(()=>{class t extends d$e{constructor(e){super(e),this.type=u$e}}return t.\u0275fac=function(e){return new(e||t)(ct(iW))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),os=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Ke,this.legendLabelActivate=new Ke,this.legendLabelDeactivate=new Ke}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Lr([UI]),Hn],ngContentSelectors:QG,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0),at(),b(1,"svg",1),ku(2),x(),J(3,URe,1,5,"ngx-charts-scale-legend",2),J(4,GRe,1,7,"ngx-charts-legend",3),x()),2&e&&(rr("width",i.view[0],"px"),k("@animationState","active")("@.disabled",!i.animations),w(1),ht("width",i.chartWidth)("height",i.view[1]),w(2),k("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),k("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[gn,vW,bW]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma("500ms 100ms",Dr({opacity:1}))])])]},changeDetection:0}),t})(),h$e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Ke,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275dir=Zt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),ss=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Ke}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new h$e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new EFe(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Hn],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"div")},encapsulation:2}),t})(),GI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Hn],attrs:WRe,decls:2,vars:6,template:function(e,i){1&e&&(at(),b(0,"text"),I(1),x()),2&e&&(ht("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),xn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Rf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function sW(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Ke,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:qRe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,XRe,5,7,"g",1),x(),J(3,JRe,2,2,"g",2)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngForOf",i.ticks))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),Wl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Ke,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&io(aW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:KRe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,QRe,1,12,"g",0),J(2,ZRe,1,5,"g",1),x()),2&e&&(ht("class",i.xAxisClassName)("transform",i.transform),w(1),k("ngIf",i.xScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,aW],encapsulation:2,changeDetection:0}),t})();let lW=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Ke,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Yh(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:e5e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,t5e,5,9,"g",1),x(),J(3,n5e,1,2,"path",2),J(4,s5e,2,2,"g",3),J(5,c5e,2,1,"g",3)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),k("ngForOf",i.ticks),w(1),k("ngForOf",i.referenceLines))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),El=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Ke,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&io(lW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:u5e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,d5e,1,14,"g",0),J(2,h5e,1,5,"g",1),x()),2&e&&(ht("class",i.yAxisClassName)("transform",i.transform),w(1),k("ngIf",i.yScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,lW],encapsulation:2,changeDetection:0}),t})(),cW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();var m2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(m2||(m2={})),m2))(),g2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(g2||(g2={})),g2))(),$f=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}($f||($f={})),$f))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Gs.top,this.tooltipAlignment=g2.center,this.tooltipType=m2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$f.all,this.tooltipImmediateExit=!1,this.show=new Ke,this.hide=new Ke}get listensForFocus(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.focus}get listensForHover(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(le(UI),le(nl),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),uW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[iW,UI],imports:[Vs]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function oa(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const dW={};function Al(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,dW[t]?Al():(dW[t]=!0,t)}let YI,ob=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${oa(r)} \u2022 ${oa(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:f5e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&J(0,g5e,5,20,"g",0),2&e&&k("ngIf",i.circle)},dependencies:function(){return[gn,Bu,v2,bm]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma(250,Dr({opacity:1}))])])]},changeDetection:0}),t})(),v2=(()=>{class t{constructor(){this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:v5e,decls:1,vars:8,template:function(e,i){1&e&&(at(),ge(0,"circle")),2&e&&ht("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),bm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Hn],attrs:x5e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(at(),b(0,"linearGradient",0),J(1,w5e,1,5,"stop",1),x()),2&e&&(k("id",i.name),ht("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),k("ngForOf",i.stops))},dependencies:[jn],encapsulation:2,changeDetection:0}),t})(),XI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Ke,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=va(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Hn],attrs:S5e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(J(0,D5e,2,2,"defs",0),at(),ge(1,"path",1)),2&e&&(k("ngIf",i.gradient),w(1),rr("opacity",i.opacity),ht("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[gn,bm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?YI=window:typeof global<"u"&&(YI=global);const gW=YI.MouseEvent;function JI(t,n=!1,e=!0){if("function"==typeof gW)return new gW(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let sb=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Ke}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=JI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&io(E5e,5),2&e){let r;cn(r=un())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:A5e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(at(),b(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),J(2,I5e,2,1,"ng-template",null,1,Ur),ge(4,"rect",2,3),x()),2&e){const r=uo(3);w(1),ht("x",0)("width",i.dims.width)("height",i.dims.height),w(3),rr("opacity",i.anchorOpacity)("pointer-events","none"),k("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ht("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[jn,Bu],encapsulation:2,data:{animation:[il("animationState",[Ia("inactive => active",[Dr({opacity:0}),Ma(250,Dr({opacity:.7}))]),Ia("active => inactive",[Dr({opacity:.7}),Ma(250,Dr({opacity:0}))])])]},changeDetection:0}),t})(),ab=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Ke,this.onDomainChange=new Ke,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+Al().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=pm().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=bo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=mm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function qje(){return gI(e2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Vr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),va(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),va(this.element).select(".brush").call(this.brush),va(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Hn],attrs:N5e,ngContentSelectors:QG,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(Cu(),at(),b(0,"g",0)(1,"filter"),ge(2,"feColorMatrix",1),x(),b(3,"g",2),ku(4),x(),ge(5,"rect",3)(6,"g",4),x()),2&e&&(ht("transform",i.transform),w(1),ht("id",i.filterId),w(4),ht("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),vW=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Ke,this.labelActivate=new Ke,this.labelDeactivate=new Ke,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Hn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(b(0,"div"),J(1,F5e,3,1,"header",0),b(2,"div",1)(3,"ul",2),J(4,O5e,2,4,"li",3),x()()()),2&e&&(rr("width",i.width,"px"),w(1),k("ngIf",(null==i.title?null:i.title.length)>0),w(2),rr("max-height",i.height-45,"px"),Mn("horizontal-legend",i.horizontal),w(1),k("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[jn,gn,yW]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),yW=(()=>{class t{constructor(){this.isActive=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.toggle=new Ke}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(b(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),b(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),b(2,"span",2),I(3),x()()),2&e&&(Mn("active",i.isActive),k("title",i.formattedLabel),w(1),rr("background-color",i.color),w(2),xn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),bW=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(le(ZB))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Hn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"span"),I(3),x()(),ge(4,"div",2),b(5,"div",1)(6,"span"),I(7),x()()()),2&e&&(rr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Mn("horizontal-legend",i.horizontal),w(3),Dt(i.valueRange[1].toLocaleString()),w(1),rr("background",i.gradient),w(3),Dt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,cW,uW,Vs,cW,uW]}),t})();let xW=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class vs{constructor(n,e,i,r){"string"==typeof n&&(n=xW.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=xW.find(o=>o.name===n)),"quantile"===e)r=jG().range(n.domain).domain(i);else if("ordinal"===e)r=PI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=NG(0,1,1/o.length);r=bo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=bo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=bo().domain(this.domain).range([0,1]),r=La().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let f$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),CW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),m$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),y$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),DW=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Ke,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=va(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Hn],attrs:n6e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(at(),ge(0,"path",0)),2&e&&(k("@animationState","active"),ht("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({strokeDasharray:2e3,strokeDashoffset:2e3}),Ma(1e3,Dr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),b$e=(()=>{class t extends ss{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=gm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Ke,this.deactivate=new Ke,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function gs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+Al().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function b2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Bf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=pm().range([0,i]).domain(e):"linear"===this.scaleType?(r=bo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=mm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=bo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new vs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Us,5),ni(r,p2,5)),2&e){let o;cn(o=un())&&(i.tooltipTemplate=o.first),cn(o=un())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[vi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(b(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),at(),b(1,"defs")(2,"clipPath"),ge(3,"rect"),x()(),b(4,"g",1),J(5,i6e,1,10,"g",2),J(6,r6e,1,12,"g",3),b(7,"g"),J(8,o6e,2,11,"g",4),J(9,a6e,3,9,"g",5),x()(),J(10,c6e,2,13,"g",6),x()),2&e&&(k("view",Sr(17,Eo,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ht("id",i.clipPathId),w(1),ht("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ht("transform",i.transform),w(1),k("ngIf",i.xAxis),w(1),k("ngIf",i.yAxis),w(1),ht("clip-path",i.clipPath),w(1),k("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),k("ngIf",!i.tooltipDisabled),w(1),k("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[jn,gn,Wl,El,sb,os,ob,ab,_$e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[il("animationState",[Ia(":leave",[Dr({opacity:1}),Ma(500,Dr({opacity:0}))])])]},changeDetection:0}),t})(),_$e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return c2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return Sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return Sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function KI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function ZI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function QI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+Al().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Hn],attrs:u6e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(at(),b(0,"g")(1,"defs"),J(2,d6e,1,2,"g",0),x(),ge(3,"g",1)(4,"g",2),J(5,h6e,1,9,"g",3),x()),2&e&&(w(2),k("ngIf",i.hasGradient),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),k("ngIf",i.hasRange))},dependencies:[gn,XI,bm,DW],encapsulation:2,changeDetection:0}),t})(),TW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})();Math;let iN=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),S$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iN,TW]}),t})(),A$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),N$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),j$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iN,CW]}),t})(),L$e=(()=>{class t{constructor(){!function P$e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,f$e,CW,m$e,y$e,TW,S$e,A$e,iN,N$e,j$e]}),t})();function R$e(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function $$e(t,n){1&t&&ge(0,"img",31)}function B$e(t,n){1&t&&ge(0,"img",32)}function V$e(t,n){1&t&&ge(0,"img",33)}function H$e(t,n){1&t&&ge(0,"img",34)}function z$e(t,n){if(1&t&&(b(0,"tr",24)(1,"td"),ta(2,25),J(3,$$e,1,0,"img",26),J(4,B$e,1,0,"img",27),J(5,V$e,1,0,"img",28),J(6,H$e,1,0,"img",29),na(),b(7,"span"),I(8),x()(),b(9,"td"),I(10),b(11,"span",30),I(12),x()(),b(13,"td"),I(14),b(15,"span",30),I(16),x()(),b(17,"td"),I(18),b(19,"span",30),I(20),x()(),b(21,"td"),I(22),b(23,"span",30),I(24),x()()()),2&t){const e=n.$implicit,i=j(2);w(2),k("ngSwitch",e.health),w(1),k("ngSwitchCase",0),w(1),k("ngSwitchCase",1),w(1),k("ngSwitchCase",2),w(1),k("ngSwitchCase",3),w(2),Dt(e.name),w(2),xn("",e.session_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),xn("",e.presence_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),xn("",e.match_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),xn("",e.goroutine_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function U$e(t,n){if(1&t&&(b(0,"tbody"),J(1,z$e,25,18,"tr",22),b(2,"tr",3),ge(3,"td",23),b(4,"th",3),I(5),x(),b(6,"th",3),I(7),x(),b(8,"th",3),I(9),x(),b(10,"th",3),I(11),x()()()),2&t){const e=j();w(1),k("ngForOf",e.statusData.nodes),w(4),Dt(e.getTotalSessionCount()),w(2),Dt(e.getMaxPresenceCount()),w(2),Dt(e.getTotalMatchCount()),w(2),Dt(e.getTotalGorountineCount())}}function G$e(t,n){if(1&t&&(b(0,"option",35),I(1),x()),2&t){const e=n.$implicit,i=j();Fh("value",e),w(1),Dt(i.ranges[e])}}const w2=function(t){return{"background-color":t}};function W$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function q$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,W$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function X$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",37),J(2,q$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function Y$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function J$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Y$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function K$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",43),J(2,J$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function Q$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function Z$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Q$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function eBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",44),J(2,Z$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function tBe(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function nBe(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,tBe,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function iBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",45),J(2,nBe,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let rBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"showDelta",!1),K(this,"statusData",void 0),K(this,"rateGraphData",[]),K(this,"latencyGraphData",[]),K(this,"inputGraphData",[]),K(this,"outputGraphData",[]),K(this,"rangeForm",void 0),K(this,"ranges",{1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"}),K(this,"rangesKeys",Object.keys(this.ranges).map(o=>+o)),K(this,"colorScheme",{domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]}),K(this,"samples",60),K(this,"refreshTimer",void 0),K(this,"$refreshTimer",void 0),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Status"),x(),J(2,R$e,4,2,"ngb-alert",1),b(3,"table",2),ye("mouseover",function(){return i.showDelta=!0})("mouseout",function(){return i.showDelta=!1}),b(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Node name"),x(),b(8,"th",4),I(9,"Sessions"),x(),b(10,"th",4),I(11,"Presences"),x(),b(12,"th",4),I(13,"Authoritative Matches"),x(),b(14,"th",4),I(15,"Goroutines"),x()()(),J(16,U$e,12,5,"tbody",5),x(),b(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),I(21,"View:"),x(),b(22,"div",9)(23,"select",10),ye("change",function(o){return i.setRange(o)}),J(24,G$e,2,2,"option",11),function qE(t,n){const e=Pr();let i;const r=t+Bo;e.firstCreatePass?(i=function R_e(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Ap(i.type)),s=Pc(le);try{const a=ux(!1),l=o();return ux(a),function Lye(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,Gt(),r,l),l}finally{Pc(s)}}(25,"sortNumbers"),x()()()()(),b(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),I(30,"Processing Latency"),x(),b(31,"small"),I(32," (ms)"),x()()(),b(33,"div",13)(34,"div",14)(35,"h5",15),I(36,"Rate"),x(),b(37,"small"),I(38," (rpc/s)"),x()()()(),b(39,"div",12)(40,"div",16),J(41,X$e,4,12,"div",17),x(),b(42,"div",16),J(43,K$e,4,12,"div",17),x()(),b(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),I(48,"Input"),x(),b(49,"small"),I(50," (kb/s)"),x()()(),b(51,"div",13)(52,"div",14)(53,"h5",15),I(54,"Output"),x(),b(55,"small"),I(56," (kb/s)"),x()()()(),b(57,"div",12)(58,"div",16),J(59,eBe,4,12,"div",17),x(),b(60,"div",16),J(61,iBe,4,12,"div",17),x()()),2&e&&(w(2),k("ngIf",i.error),w(14),k("ngIf",i.statusData),w(1),k("formGroup",i.rangeForm),w(7),k("ngForOf",XE(25,8,i.rangesKeys)),w(17),k("ngIf",i.latencyGraphData.length>0),w(2),k("ngIf",i.rateGraphData.length>0),w(16),k("ngIf",i.inputGraphData.length>0),w(2),k("ngIf",i.outputGraphData.length>0))},dependencies:function(){return[jn,gn,wB,dw,_B,To,Pu,tFe,b$e,sl,xy,wy,ov,rl,ol,fa,ja,sBe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})),t})(),oBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),sBe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275pipe",gl({name:"sortNumbers",type:t,pure:!1})),t})();var aBe=De(870),rN=De(327);const lBe=["fileSelector"];function cBe(t,n){if(1&t&&(b(0,"div",8),I(1),x()),2&t){const e=j(2);w(1),Dt(e.dropZoneLabel)}}function uBe(t,n){if(1&t){const e=vt();b(0,"div")(1,"input",9),ye("click",function(r){return $e(e),Be(j(2).openFileSelector(r))}),x()()}if(2&t){const e=j(2);w(1),Fh("value",e.browseBtnLabel),k("className",e.browseBtnClassName)}}function dBe(t,n){if(1&t&&(J(0,cBe,2,1,"div",6),J(1,uBe,2,2,"div",7)),2&t){const e=j();k("ngIf",e.dropZoneLabel),w(1),k("ngIf",e.showBrowseBtn)}}function hBe(t,n){}const fBe=function(t){return{openFileSelector:t}};class C2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let OW=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),jW=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Ke,this.onFileOver=new Ke,this.onFileLeave=new Ke,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new C2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=av(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new C2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new C2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(le(Wi),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&ni(r,OW,5,Si),2&e){let o;cn(o=un())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&io(lBe,7),2&e){let r;cn(r=un())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(b(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),b(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),J(4,dBe,2,2,"ng-template",null,4,Ur),J(6,hBe,0,0,"ng-template",5),x()()),2&e){const r=uo(5);Mn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),k("className",i.dropZoneClassName),w(1),k("className",i.contentClassName),w(1),k("accept",i.accept)("multiple",i.multiple),ht("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),k("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",lr(13,fBe,i.openFileSelector))}},dependencies:[gn,kl],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),pBe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t,bootstrap:function(){return[jW]}}),t.\u0275inj=Ci({imports:[Vs]}),t})();function mBe(t,n){1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3,"Failed to retrieve configuration."),x()()),2&t&&k("dismissible",!1)}function gBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(2).$implicit;k("id",e.name),w(1),Dt(e.value)}}function vBe(t,n){1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t&&k("id",j(2).$implicit.name)}function yBe(t,n){if(1&t&&(b(0,"div",35)(1,"b"),I(2),x(),b(3,"label",27)(4,"a",28),ge(5,"img",10),x()()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.flatConfig[e+1].name),w(1),k("for",i.flatConfig[e+1].name),w(1),$p("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",y1)}}function bBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(3).index,i=j();k("id",i.flatConfig[e+1].name),w(1),Dt(i.flatConfig[e+1].value)}}function _Be(t,n){if(1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t){const e=j(3).index;k("id",j().flatConfig[e+1].name)}}function xBe(t,n){if(1&t&&(b(0,"div",36),J(1,bBe,2,2,"span",29),J(2,_Be,2,1,"span",30),x()),2&t){const e=j(2).index,i=j();w(1),k("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),k("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function wBe(t,n){if(1&t&&(b(0,"div",26)(1,"div",7)(2,"b"),I(3),x(),b(4,"label",27)(5,"a",28),ge(6,"img",10),x()()(),b(7,"div",7),J(8,gBe,2,2,"span",29),J(9,vBe,2,1,"span",30),x(),J(10,yBe,6,3,"div",31),J(11,xBe,3,2,"div",32),x()),2&t){const e=j(),i=e.index,r=e.$implicit,o=j();Mn("border-top-0",i>0),w(3),Dt(r.name),w(1),k("for",r.name),w(1),$p("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",y1),w(3),k("ngIf",!o.isEmpty(r.value)),w(1),k("ngIf",o.isEmpty(r.value)),w(1),k("ngIf",i{class t{constructor(e,i,r,o,s,a){K(this,"config",void 0),K(this,"route",void 0),K(this,"httpClient",void 0),K(this,"modalService",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"configError",""),K(this,"uploadError",""),K(this,"deleteError",""),K(this,"jsonConfig",void 0),K(this,"flatConfig",void 0),K(this,"nakamaVersion",void 0),K(this,"file",void 0),K(this,"uploading",!1),K(this,"uploadSuccess",!1),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"confirmDeleteForm",void 0),K(this,"apiConfig",void 0),this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,aBe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});rN.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(T3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(C3),le(Rr),le(wC),le(H3),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:43,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],["autocomplete","off",3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,i){if(1&e){const r=vt();J(0,mBe,4,1,"ngb-alert",0),b(1,"h2",1),I(2,"Server Configuration"),x(),b(3,"div",2)(4,"h5")(5,"b"),I(6,"Server version:"),x(),I(7),x(),b(8,"button",3),ye("click",function(){return i.exportYaml()}),I(9,"Export Configuration"),x()(),b(10,"div",4),J(11,CBe,2,1,"ng-container",5),b(12,"div",6)(13,"div",7)(14,"b"),I(15,"runtime.env"),x(),b(16,"label",8)(17,"a",9),ge(18,"img",10),x()()(),b(19,"div",11),J(20,SBe,2,1,"div",12),J(21,DBe,3,0,"div",12),x()()(),b(22,"h5",13),I(23,"Import storage data"),x(),b(24,"p"),I(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),J(26,TBe,6,2,"ngb-alert",0),J(27,EBe,4,1,"ngb-alert",14),b(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return i.dropped(s)}),J(29,ABe,2,0,"ng-template",16),x(),b(30,"h5",13),I(31,"Delete all data"),x(),J(32,MBe,6,2,"ngb-alert",0),J(33,IBe,4,1,"ngb-alert",14),b(34,"div",17)(35,"div"),ge(36,"img",18),b(37,"small",19),I(38,"Warning - this operation is not reversible!"),x()(),J(39,FBe,19,5,"ng-template",null,20,Ur),b(41,"button",21),ye("click",function(){$e(r);const s=uo(40);return Be(i.openDeleteDataModal(s))}),I(42,"Delete all"),x()()}2&e&&(k("ngIf",i.configError),w(7),xn(" ",i.nakamaVersion,""),w(4),k("ngForOf",i.flatConfig),w(9),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&i.jsonConfig.runtime.env.length>0),w(1),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&0===i.jsonConfig.runtime.env.length),w(5),k("ngIf",i.uploadError),w(1),k("ngIf",i.uploadSuccess),w(1),k("disabled",i.uploading),w(4),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(8),k("disabled",i.deleting))},dependencies:[jW,OW,Rh,jn,gn,To,sl,Fa,rl,ol,fa,ja],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})),t})(),jBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function PBe(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function LBe(t,n){1&t&&(b(0,"tr")(1,"td",51),I(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),k("colSpan",4))}function RBe(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td")(6,"span",36),I(7,"Administrator"),x(),b(8,"span",36),I(9,"Developer"),x(),b(10,"span",36),I(11,"Maintainer"),x(),b(12,"span",36),I(13,"View Only"),x()(),b(14,"td")(15,"button",52),ye("click",function(){const o=$e(e).$implicit;return Be(j().deleteUser(o.username))}),I(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.username),w(2),Dt(e.email),w(2),k("hidden",e.role!==i.adminRole),w(2),k("hidden",e.role!==i.developerRole),w(2),k("hidden",e.role!==i.maintainerRole),w(2),k("hidden",e.role!==i.readonlyRole)}}function $Be(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3,"An error occurred:"),x(),b(4,"p",53),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.userCreateError)}}const oN=function(t){return{"is-invalid":t}};let BBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"userCreateError",""),K(this,"users",[]),K(this,"createUserForm",void 0),K(this,"adminRole",oi.USER_ROLE_ADMIN),K(this,"developerRole",oi.USER_ROLE_DEVELOPER),K(this,"maintainerRole",oi.USER_ROLE_MAINTAINER),K(this,"readonlyRole",oi.USER_ROLE_READONLY),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Do.required],email:["",[Do.required,Do.email]],password:["",Do.compose([Do.required,Do.minLength(8)])],role:[+this.readonlyRole,Do.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=oi.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=oi.USER_ROLE_ADMIN;break;case 2:e=oi.USER_ROLE_DEVELOPER;break;case 3:e=oi.USER_ROLE_MAINTAINER;break;case 4:e=oi.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Management"),x(),J(2,PBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Username"),x(),b(8,"th"),I(9,"Email"),x(),b(10,"th",5),I(11,"Role"),x(),b(12,"th",6),I(13,"Action"),x()()(),b(14,"tbody"),J(15,LBe,3,1,"tr",7),J(16,RBe,17,6,"tr",8),x()(),b(17,"h5",9),I(18,"Add new user"),x(),b(19,"ngb-alert",10)(20,"h6",11),I(21,"User roles"),x(),b(22,"div",12)(23,"div",13)(24,"div",14),ge(25,"img",15),b(26,"h6",16),I(27,"Administrator"),x()(),b(28,"small"),I(29," Owners have complete control over the server, its users and resources. "),x()(),b(30,"div",13)(31,"div",14),ge(32,"img",17),b(33,"h6",16),I(34,"Developer"),x()(),b(35,"small"),I(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),b(37,"div",13)(38,"div",14),ge(39,"img",18),b(40,"h6",16),I(41,"Maintainer"),x()(),b(42,"small"),I(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),b(44,"div",13)(45,"div",14),ge(46,"img",19),b(47,"h6",16),I(48,"View Only"),x()(),b(49,"small"),I(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),J(51,$Be,6,2,"ngb-alert",1),b(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return i.addUser()}),b(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),I(58,"Email"),x()(),b(59,"div",26),ge(60,"input",27),b(61,"div",28),I(62,"Email is required"),x()()()(),b(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),I(67,"Username"),x()(),b(68,"div",26),ge(69,"input",30),b(70,"div",28),I(71,"Username is required"),x()()()(),b(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),I(76,"Password"),x()(),b(77,"div",26),ge(78,"input",32),b(79,"div",28),I(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),b(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),I(85,"Role"),x()(),b(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),I(90,"Administrator"),x(),b(91,"span",36),I(92,"Developer"),x(),b(93,"span",36),I(94,"Maintainer"),x(),b(95,"span",36),I(96,"View Only"),x()(),b(97,"div",37),ge(98,"button",38),b(99,"div",39)(100,"button",40),ye("click",function(){return i.f.role.setValue(+i.adminRole)}),I(101,"Administrator"),x(),b(102,"button",40),ye("click",function(){return i.f.role.setValue(+i.developerRole)}),I(103,"Developer"),x(),b(104,"button",40),ye("click",function(){return i.f.role.setValue(+i.maintainerRole)}),I(105,"Maintainer"),x(),b(106,"button",40),ye("click",function(){return i.f.role.setValue(+i.readonlyRole)}),I(107,"View Only"),x()()()(),b(108,"div",28),I(109,"Role is required"),x()()()(),b(110,"div",41)(111,"div",42),ge(112,"div",24),b(113,"div",26)(114,"div",43),ge(115,"input",44),b(116,"label",45),I(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),b(118,"div",46)(119,"button",47),I(120,"Save"),x()()()()),2&e&&(w(2),k("ngIf",i.error),w(13),k("ngIf",0===i.users.length),w(1),k("ngForOf",i.users),w(3),k("type","secondary"),w(32),k("ngIf",i.userCreateError),w(2),k("formGroup",i.createUserForm),w(7),k("ngClass",lr(18,oN,i.f.email.dirty&&i.f.email.errors)),w(1),k("hidden",i.f.email.disabled||i.f.email.valid||i.f.email.pristine),w(8),k("ngClass",lr(20,oN,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(8),k("ngClass",lr(22,oN,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(10),k("hidden",i.f.role.value!==+i.adminRole),w(2),k("hidden",i.f.role.value!==+i.developerRole),w(2),k("hidden",i.f.role.value!==+i.maintainerRole),w(2),k("hidden",i.f.role.value!==+i.readonlyRole),w(13),k("hidden",i.f.role.disabled||i.f.role.valid||i.f.role.pristine),w(11),k("disabled",i.createUserForm.invalid))},dependencies:[Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Fa,aC,rl,ol,Nf,fa,ja],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})),t})(),VBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function HBe(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Failed to retrieve runtime information: ",e.error,"")}}function zBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function UBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Go modules were found."),x(),ge(3,"td"),x())}function GBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function WBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Lua modules were found."),x(),ge(3,"td"),x())}function qBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function XBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No JavaScript modules were found."),x(),ge(3,"td"),x())}const sN=function(){return["/apiexplorer"]},aN=function(t){return{endpoint:t}};function YBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function JBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Go RPC functions were found."),x()())}function KBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function QBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Lua RPC functions were found."),x()())}function ZBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sN))("queryParams",lr(4,aN,e))}}function e7e(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No JavaScript RPC functions were found."),x()())}let t7e=(()=>{class t{constructor(e,i){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"runtimeInfo",void 0),this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Runtime Modules"),x(),J(2,HBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),I(7,"Go Modules"),x(),b(8,"th",4),I(9,"Last Modified"),x()()(),b(10,"tbody"),J(11,zBe,5,2,"tr",5),J(12,UBe,4,0,"tr",6),x(),b(13,"thead",3)(14,"tr")(15,"th",7),I(16,"Lua Modules"),x()()(),b(17,"tbody"),J(18,GBe,5,2,"tr",5),J(19,WBe,4,0,"tr",6),x(),b(20,"thead",3)(21,"tr")(22,"th",7),I(23,"JavaScript Modules"),x()()(),b(24,"tbody"),J(25,qBe,5,2,"tr",5),J(26,XBe,4,0,"tr",6),x()(),b(27,"h4",8),I(28,"Registered RPC Functions"),x(),b(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),I(33,"Go RPC Functions"),x()()(),b(34,"tbody"),J(35,YBe,7,6,"tr",5),J(36,JBe,3,0,"tr",6),x(),b(37,"thead",3)(38,"tr")(39,"th",7),I(40,"Lua RPC Functions"),x()()(),b(41,"tbody"),J(42,KBe,7,6,"tr",5),J(43,QBe,3,0,"tr",6),x(),b(44,"thead",3)(45,"tr")(46,"th",7),I(47,"JavaScript RPC Functions"),x()()(),b(48,"tbody"),J(49,ZBe,7,6,"tr",5),J(50,e7e,3,0,"tr",6),x()()),2&e&&(w(2),k("ngIf",i.error),w(9),k("ngForOf",i.runtimeInfo.go_modules),w(1),k("ngIf",0===i.runtimeInfo.go_modules.length),w(6),k("ngForOf",i.runtimeInfo.lua_modules),w(1),k("ngIf",0===i.runtimeInfo.lua_modules.length),w(6),k("ngForOf",i.runtimeInfo.js_modules),w(1),k("ngIf",0===i.runtimeInfo.js_modules.length),w(9),k("ngForOf",i.runtimeInfo.go_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.go_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.lua_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.lua_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.js_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.js_rpc_functions.length))},dependencies:[Nu,jn,gn,To],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})),t})(),n7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function i7e(t,n){1&t&&(b(0,"span"),I(1,"Filter by collection"),x())}function r7e(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.f.collection.value)}}function o7e(t,n){if(1&t){const e=vt();b(0,"button",34),ye("click",function(){const o=$e(e).$implicit;return Be(j().f.collection.setValue(o))}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function s7e(t,n){if(1&t&&(b(0,"ngb-alert",35),ge(1,"img",36),b(2,"h6",37),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying storage objects: ",e.error,"")}}function a7e(t,n){1&t&&(b(0,"th",38),I(1,"Remove"),x())}function l7e(t,n){1&t&&(b(0,"tr")(1,"td",39),I(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function c7e(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteObject(r,s,a))}),I(2,"Delete"),x()()}}function u7e(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(2),x(),b(3,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(4),x(),b(5,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(6),x(),b(7,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(8),x(),J(9,c7e,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.collection),w(2),Dt(e.key),w(2),Dt(e.user_id),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let d7e=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"collections",[]),K(this,"objects",[]),K(this,"objectCount",0),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Objects"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),J(12,i7e,2,0,"span",10),J(13,r7e,2,1,"span",10),x(),b(14,"div",11)(15,"button",12),ye("click",function(){return i.f.collection.reset()}),I(16,"\u2718 Deselect collection"),x(),ge(17,"div",13),J(18,o7e,2,1,"button",14),x()()(),ge(19,"input",15)(20,"input",16),b(21,"div",17)(22,"span",18),ye("click",function(){return i.f.user_id.setValue(i.systemUserId)}),ge(23,"img",19),x()(),b(24,"div",17)(25,"button",20),ye("click",function(){return i.search(0)}),I(26,"Search"),x()()()()(),b(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return i.search(0)}),ge(30,"img",24),x(),b(31,"button",23),ye("click",function(){return i.search(1)}),ge(32,"img",25),x()()()()(),J(33,s7e,4,2,"ngb-alert",26),b(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),I(39,"Collection Name"),x(),b(40,"th"),I(41,"Key Name"),x(),b(42,"th",30),I(43,"User ID"),x(),b(44,"th",31),I(45,"Last Update"),x(),J(46,a7e,2,0,"th",32),x()(),b(47,"tbody"),J(48,l7e,3,0,"tr",10),J(49,u7e,10,5,"tr",33),x()()()),2&e&&(w(3),xn("",i.objectCount," objects found."),w(4),k("formGroup",i.searchForm),w(4),k("disabled",0===i.collections.length),w(1),k("ngIf",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngIf",i.f.collection.value&&""!==i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngForOf",i.collections),w(7),k("disabled",i.disableSearch()),w(4),k("disabled",0===i.objects.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.objects.length),w(1),k("ngForOf",i.objects))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),h7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),f7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();var lN,PW,LW,RW,$W,BW,VW,HW,zW,UW,GW,WW,qW,XW,YW,JW,KW,QW,ZW,eq,tq,nq,iq,rq,oq,sq,aq,lq,cq,uq,dq,hq,fq,pq,mq,gq,vq,yq,bq,_q,xq,wq,Cq,kq,Sq,Dq,Tq,Eq,Aq,Mq,Iq,Nq,Fq,Oq,jq,Pq,Lq,Rq,$q,Bq,Vq,Hq,zq,Uq,Gq,Wq,qq,Xq,Yq,Jq,Kq,Qq,Zq,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,bX,_X,xX,wX,CX,kX,SX,DX,TX,EX,AX,MX,IX,NX,FX,OX,jX,PX,LX,RX,$X,BX,VX,HX,zX,UX,GX,WX,qX,XX,YX,JX,KX,QX,ZX,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,bY,_Y,xY,wY,CY,kY,SY,DY,TY,EY,AY,MY,IY,NY,FY,OY,jY,PY,LY,RY,$Y,BY,VY,HY,zY,UY,GY,WY,qY,XY,YY,JY,KY,QY,ZY,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,bJ,_J,xJ,wJ,CJ,kJ,SJ,DJ,TJ,EJ,AJ,MJ,IJ,NJ,FJ,OJ,jJ,PJ,LJ,RJ,$J,BJ,VJ,HJ,zJ,UJ,GJ,WJ,qJ,XJ,YJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,bK,_K,xK,wK,CK,kK,SK,DK,TK,EK,AK,MK,IK,NK,FK,OK,jK,PK,LK,RK,$K,BK,VK,HK,zK,UK,GK,WK,qK,p7e=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],m7e=["mainAxis","crossAxis","limiter"];function lb(t){var n="function"==typeof Map?new Map:void 0;return lb=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return cN(e,arguments,qi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),cb(r,e)},lb(t)}function cN(t,n,e){return(cN=ZK()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&cb(a,o.prototype),a}).apply(null,arguments)}function Ae(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function XK(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=k2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}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 o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function vn(){vn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(q,re,L){q[re]=L.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(q,re,L){return Object.defineProperty(q,re,{value:L,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{l({},"")}catch{l=function(re,L,X){return re[L]=X}}function c(q,re,L,X){var H=Object.create((re&&re.prototype instanceof h?re:h).prototype),he=new R(X||[]);return i(H,"_invoke",{value:S(q,L,he)}),H}function u(q,re,L){try{return{type:"normal",arg:q.call(re,L)}}catch(X){return{type:"throw",arg:X}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(z([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function _(q){["next","throw","return"].forEach(function(re){l(q,re,function(L){return this._invoke(re,L)})})}function C(q,re){function L(Z,H,he,E){var N=u(q[Z],q,H);if("throw"!==N.type){var F=N.arg,Y=F.value;return Y&&"object"==bn(Y)&&e.call(Y,"__await")?re.resolve(Y.__await).then(function(V){L("next",V,he,E)},function(V){L("throw",V,he,E)}):re.resolve(Y).then(function(V){F.value=V,he(F)},function(V){return L("throw",V,he,E)})}E(N.arg)}var X;i(this,"_invoke",{value:function(Z,H){function he(){return new re(function(E,N){L(Z,H,E,N)})}return X=X?X.then(he,he):he()}})}function S(q,re,L){var X="suspendedStart";return function(Z,H){if("executing"===X)throw new Error("Generator is already running");if("completed"===X){if("throw"===Z)throw H;return{value:void 0,done:!0}}for(L.method=Z,L.arg=H;;){var he=L.delegate;if(he){var E=M(he,L);if(E){if(E===d)continue;return E}}if("next"===L.method)L.sent=L._sent=L.arg;else if("throw"===L.method){if("suspendedStart"===X)throw X="completed",L.arg;L.dispatchException(L.arg)}else"return"===L.method&&L.abrupt("return",L.arg);X="executing";var N=u(q,re,L);if("normal"===N.type){if(X=L.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:L.done}}"throw"===N.type&&(X="completed",L.method="throw",L.arg=N.arg)}}}function M(q,re){var L=re.method,X=q.iterator[L];if(void 0===X)return re.delegate=null,"throw"===L&&q.iterator.return&&(re.method="return",re.arg=void 0,M(q,re),"throw"===re.method)||"return"!==L&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+L+"' method")),d;var Z=u(X,q.iterator,re.arg);if("throw"===Z.type)return re.method="throw",re.arg=Z.arg,re.delegate=null,d;var H=Z.arg;return H?H.done?(re[q.resultName]=H.value,re.next=q.nextLoc,"return"!==re.method&&(re.method="next",re.arg=void 0),re.delegate=null,d):H:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,d)}function $(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function G(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function R(q){this.tryEntries=[{tryLoc:"root"}],q.forEach($,this),this.reset(!0)}function z(q){if(q){var re=q[o];if(re)return re.call(q);if("function"==typeof q.next)return q;if(!isNaN(q.length)){var L=-1,X=function Z(){for(;++L=0;--X){var Z=this.tryEntries[X],H=Z.completion;if("root"===Z.tryLoc)return L("end");if(Z.tryLoc<=this.prev){var he=e.call(Z,"catchLoc"),E=e.call(Z,"finallyLoc");if(he&&E){if(this.prev=0;--L){var X=this.tryEntries[L];if(X.tryLoc<=this.prev&&e.call(X,"finallyLoc")&&this.prev=0;--re){var L=this.tryEntries[re];if(L.finallyLoc===q)return this.complete(L.completion,L.afterLoc),G(L),d}},catch:function(q){for(var re=this.tryEntries.length-1;re>=0;--re){var L=this.tryEntries[re];if(L.tryLoc===q){var X=L.completion;if("throw"===X.type){var Z=X.arg;G(L)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(q,re,L){return this.delegate={iterator:z(q),resultName:re,nextLoc:L},"next"===this.method&&(this.arg=void 0),d}},t}function YK(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Zi(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){YK(o,i,r,s,a,"next",l)}function a(l){YK(o,i,r,s,a,"throw",l)}s(void 0)})}}function Un(t,n){return KK(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||k2(t,n)||JK()}function JK(){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 KK(t){if(Array.isArray(t))return t}function QK(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ze(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ke(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function eQ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function qd(t,n){return new t(n)}var db,D2=new Map,fN=0;function fQ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function x7e(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=hN(t),m=D2.get(p)||function w7e(t,n){var e={stylesheet:b7e(n),rules:{}};return D2.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),fN+=1,f}function hb(t){db=t}function Tv(){if(!db)throw new Error("Function called outside component initialization");return db}function Wc(t){Tv().$$.on_mount.push(t)}function Hu(t){Tv().$$.on_destroy.push(t)}function pQ(){var t=Tv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=hQ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function mQ(t,n){return Tv().$$.context.set(t,n),n}function xa(t){return Tv().$$.context.get(t)}function T2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Ev=[],Vi=[],E2=[],pN=[],gQ=Promise.resolve(),mN=!1;function vQ(){mN||(mN=!0,gQ.then(yQ))}function Xl(){return vQ(),gQ}function _m(t){E2.push(t)}function zu(t){pN.push(t)}var A2,gN=new Set,Av=0;function yQ(){if(0===Av){var t=db;do{try{for(;Avl.start&&(a=d(l,_),l=null,vN(t,a.b,"start"),G&&(u(),c=fQ(t,s,a.b,a.duration,0,S,o.css))),a&&(z>=a.end?($(s=a.b,1-s),vN(t,a.b,"end"),l||(a.b?u():--a.group.r||ho(a.group.c)),a=null):z>=a.start&&(s=a.a+a.d*S((z-a.start)/a.duration),$(s,1-s))),!(!a&&!l)},0===ub.size&&dN(lQ),new Promise(function(z){ub.add({c:p,f:z})}))}return{run:function(f){ba(o)?(A2||(A2=Promise.resolve()).then(function(){A2=null}),A2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var yN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function D7e(t,n){t.d(1),n.delete(t.key)}function bN(t,n){ce(t,1,1,function(){n.delete(t.key)})}function N2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var _=d(r,o,p),C=e(_),S=s.get(C);S?i&&S.p(_,n):(S=c(C,_)).c(),v.set(C,g[p]=S),C in m&&y.set(C,Math.abs(p-m[C]))}var M=new Set,$=new Set;function G(L){Q(L,1),L.m(a,u),s.set(L.key,L),u=L.first,f--}for(;h&&f;){var R=g[f-1],z=t[h-1],U=R.key,q=z.key;R===z?(u=R.first,h--,f--):v.has(q)?!s.has(U)||M.has(U)?G(R):$.has(q)?h--:y.get(U)>y.get(q)?($.add(U),G(R)):(M.add(q),h--):(l(z,s),h--)}for(;h--;){var re=t[h];v.has(re.key)||l(re,s)}for(;f;)G(g[f-1]);return g}function xm(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function F2(t){return"object"===bn(t)&&null!==t?t:{}}function Uu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function mt(t){t&&t.c()}function ft(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||_m(function(){var a,l=t.$$.on_mount.map(rQ).filter(ba);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,si(l)):ho(l),t.$$.on_mount=[]}),s.forEach(_m)}function pt(t,n){var e=t.$$;null!==e.fragment&&(ho(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=db;hb(t);var c=t.$$={fragment:null,ctx:[],props:o,update:Lt,not_equal:r,bound:oQ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:oQ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function T7e(t,n){-1===t.$$.dirty[0]&&(Ev.push(t),vQ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function M7e(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function I7e(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?iQ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var F7e=yN.window;function O7e(t){pi(t,"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 _Q(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=t[1].closeButton&&xQ(t),C=t[2];return C&&(s=qd(C,{})),{c:function(){n=be("div"),e=be("div"),i=be("div"),_&&_.c(),r=it(),o=be("div"),s&&mt(s.$$.fragment),P(o,"class",a=Ao(t[1].classContent)+" svelte-n7cvum"),P(o,"style",t[9]),Mt(o,"content",!t[0]),P(i,"class",l=Ao(t[1].classWindow)+" svelte-n7cvum"),P(i,"role","dialog"),P(i,"aria-modal","true"),P(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),P(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),P(i,"style",t[8]),Mt(i,"window",!t[0]),P(e,"class",h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"),P(e,"style",t[7]),Mt(e,"wrap",!t[0]),P(n,"id",f=t[1].id),P(n,"class",p=Ao(t[1].classBg)+" svelte-n7cvum"),P(n,"style",t[6]),Mt(n,"bg",!t[0])},m:function(S,M){Pe(S,n,M),de(n,e),de(e,i),_&&_.m(i,null),de(i,r),de(i,o),s&&ft(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[Ft(i,"introstart",function(){ba(t[13])&&t[13].apply(this,arguments)}),Ft(i,"outrostart",function(){ba(t[14])&&t[14].apply(this,arguments)}),Ft(i,"introend",function(){ba(t[15])&&t[15].apply(this,arguments)}),Ft(i,"outroend",function(){ba(t[16])&&t[16].apply(this,arguments)}),Ft(n,"mousedown",t[20]),Ft(n,"mouseup",t[21])],v=!0)},p:function(S,M){if((t=S)[1].closeButton?_?(_.p(t,M),2&M[0]&&Q(_,1)):((_=xQ(t)).c(),Q(_,1),_.m(i,r)):_&&($t(),ce(_,1,1,function(){_=null}),Bt()),C!==(C=t[2])){if(s){$t();var $=s;ce($.$$.fragment,1,0,function(){pt($,1)}),Bt()}C?(mt((s=qd(C,{})).$$.fragment),Q(s.$$.fragment,1),ft(s,o,null)):s=null}(!g||2&M[0]&&a!==(a=Ao(t[1].classContent)+" svelte-n7cvum"))&&P(o,"class",a),(!g||512&M[0])&&P(o,"style",t[9]),(!g||3&M[0])&&Mt(o,"content",!t[0]),(!g||2&M[0]&&l!==(l=Ao(t[1].classWindow)+" svelte-n7cvum"))&&P(i,"class",l),(!g||2&M[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&P(i,"aria-label",c),(!g||2&M[0]&&u!==(u=t[1].ariaLabelledBy||null))&&P(i,"aria-labelledby",u),(!g||256&M[0])&&P(i,"style",t[8]),(!g||3&M[0])&&Mt(i,"window",!t[0]),(!g||2&M[0]&&h!==(h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"))&&P(e,"class",h),(!g||128&M[0])&&P(e,"style",t[7]),(!g||3&M[0])&&Mt(e,"wrap",!t[0]),(!g||2&M[0]&&f!==(f=t[1].id))&&P(n,"id",f),(!g||2&M[0]&&p!==(p=Ao(t[1].classBg)+" svelte-n7cvum"))&&P(n,"class",p),(!g||64&M[0])&&P(n,"style",t[6]),(!g||3&M[0])&&Mt(n,"bg",!t[0])},i:function(S){g||(Q(_),s&&Q(s.$$.fragment,S),_m(function(){d||(d=I2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),_m(function(){m||(m=I2(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(S){ce(_),s&&ce(s.$$.fragment,S),d||(d=I2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=I2(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(S){S&&je(n),_&&_.d(),s&&pt(s),t[50](null),S&&d&&d.end(),t[51](null),t[52](null),S&&m&&m.end(),v=!1,ho(y)}}}function xQ(t){var n,e,i,r,o,s=[P7e,j7e],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function j7e(t){var n,e,i,r;return{c:function(){P(n=be("button"),"class",e=Ao(t[1].classCloseButton)+" svelte-n7cvum"),P(n,"aria-label","Close modal"),P(n,"style",t[10]),P(n,"type","button"),Mt(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=Ft(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Ao(o[1].classCloseButton)+" svelte-n7cvum")&&P(n,"class",e),1024&s[0]&&P(n,"style",o[10]),3&s[0]&&Mt(n,"close",!o[0])},i:Lt,o:Lt,d:function(o){o&&je(n),i=!1,r()}}}function P7e(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=qd(r,o(t))),{c:function(){n&&mt(n.$$.fragment),e=_r()},m:function(s,a){n&&ft(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){$t();var l=n;ce(l.$$.fragment,1,0,function(){pt(l,1)}),Bt()}r?(mt((n=qd(r,o(s))).$$.fragment),Q(n.$$.fragment,1),ft(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&Q(n.$$.fragment,s),i=!0)},o:function(s){n&&ce(n.$$.fragment,s),i=!1},d:function(s){s&&je(e),n&&pt(n,s)}}}function L7e(t){var n,e,i,r,o=t[2]&&_Q(t),s=t[49].default,a=Ms(s,t,t[48],null);return{c:function(){o&&o.c(),n=it(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=Ft(F7e,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&Q(o,1)):((o=_Q(l)).c(),Q(o,1),o.m(n.parentNode,n)):o&&($t(),ce(o,1,1,function(){o=null}),Bt()),a&&a.p&&(!e||131072&c[1])&&Ns(a,s,l,l[48],e?Is(s,l[48],c,null):Fs(l[48]),null)},i:function(l){e||(Q(o),Q(a,l),e=!0)},o:function(l){ce(o),ce(a,l),e=!1},d:function(l){o&&o.d(l),l&&je(n),a&&a.d(l),i=!1,r()}}}function wQ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ze(Ze({},e),{},{props:Ze(Ze({},n),e.props)}))}}function R7e(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,_=void 0===y?{}:y,C=n.$$scope,S=pQ(),$=n.isTabbable,G=void 0===$?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:$,R=n.show,z=void 0===R?null:R,U=n.id,q=void 0===U?null:U,re=n.key,L=void 0===re?"simple-modal":re,X=n.ariaLabel,Z=void 0===X?null:X,H=n.ariaLabelledBy,he=void 0===H?null:H,E=n.closeButton,N=void 0===E||E,F=n.closeOnEsc,Y=void 0===F||F,V=n.closeOnOuterClick,oe=void 0===V||V,fe=n.styleBg,Ne=void 0===fe?{}:fe,xe=n.styleWindowWrap,tt=void 0===xe?{}:xe,ze=n.styleWindow,ot=void 0===ze?{}:ze,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Ie=void 0===ie?{}:ie,Ye=n.classBg,Le=void 0===Ye?null:Ye,_t=n.classWindowWrap,At=void 0===_t?null:_t,_n=n.classWindow,ci=void 0===_n?null:_n,on=n.classContent,Ni=void 0===on?null:on,pn=n.classCloseButton,Fr=void 0===pn?null:pn,$r=n.unstyled,wr=void 0!==$r&&$r,Or=n.setContext,Ai=void 0===Or?mQ:Or,Wr=n.transitionBg,jo=void 0===Wr?N7e:Wr,Fn=n.transitionBgProps,xt=void 0===Fn?{duration:250}:Fn,ui=n.transitionWindow,Fi=void 0===ui?jo:ui,Cr=n.transitionWindowProps,xo=void 0===Cr?xt:Cr,Qo=n.disableFocusTrap,gt=void 0!==Qo&&Qo,On={id:q,ariaLabel:Z,ariaLabelledBy:he,closeButton:N,closeOnEsc:Y,closeOnOuterClick:oe,styleBg:Ne,styleWindowWrap:tt,styleWindow:ot,styleContent:ne,styleCloseButton:Ie,classBg:Le,classWindowWrap:At,classWindow:ci,classContent:Ni,classCloseButton:Fr,transitionBg:jo,transitionBgProps:xt,transitionWindow:Fi,transitionWindowProps:xo,disableFocusTrap:gt,isTabbable:G,unstyled:wr},ai=Ze({},On),bi=null,Er=function(Ue){return Ue?Object.keys(Ue).reduce(function(Dn,ii){return"".concat(Dn,"; ").concat((hi=ii,hi.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ii]);var hi},""):""},qr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},ao=function(){e(6,a=Er(Object.assign({},{width:window.innerWidth,height:window.innerHeight},ai.styleBg))),e(7,l=Er(ai.styleWindowWrap)),e(8,c=Er(ai.styleWindow)),e(9,u=Er(ai.styleContent)),e(10,d=Er(ai.styleCloseButton)),e(11,h=ai.transitionBg),e(12,f=ai.transitionWindow)},Js=function(){},vr=Js,Ks=Js,qa=Js,Xa=Js,Ic=function(Ue){var ii=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hi=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,bi=wQ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,ai=Ze(Ze({},On),ii)),ao(),He(),e(13,vr=function(di){hi.onOpen&&hi.onOpen(di),S("open"),S("opening")}),e(14,Ks=function(di){hi.onClose&&hi.onClose(di),S("close"),S("closing")}),e(15,qa=function(di){hi.onOpened&&hi.onOpened(di),S("opened")}),e(16,Xa=function(di){hi.onClosed&&hi.onClosed(di),S("closed")})},we=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};bi&&(e(14,Ks=Ue.onClose||Ks),e(16,Xa=Ue.onClosed||Xa),e(2,bi=null),qe())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},qe=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};Ai(L,{open:Ic,close:we});var ut=!1;return Hu(function(){ut&&we()}),Wc(function(){e(47,ut=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,G=Ue.isTabbable),"show"in Ue&&e(23,z=Ue.show),"id"in Ue&&e(24,q=Ue.id),"key"in Ue&&e(25,L=Ue.key),"ariaLabel"in Ue&&e(26,Z=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,he=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,N=Ue.closeButton),"closeOnEsc"in Ue&&e(29,Y=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,oe=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Ne=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,tt=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,ot=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Ie=Ue.styleCloseButton),"classBg"in Ue&&e(36,Le=Ue.classBg),"classWindowWrap"in Ue&&e(37,At=Ue.classWindowWrap),"classWindow"in Ue&&e(38,ci=Ue.classWindow),"classContent"in Ue&&e(39,Ni=Ue.classContent),"classCloseButton"in Ue&&e(40,Fr=Ue.classCloseButton),"unstyled"in Ue&&e(0,wr=Ue.unstyled),"setContext"in Ue&&e(41,Ai=Ue.setContext),"transitionBg"in Ue&&e(42,jo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Fi=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,xo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,gt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&ut&&(qr(z)?Ic(z):we())},[wr,ai,bi,i,r,o,a,l,c,u,d,h,f,vr,Ks,qa,Xa,qr,we,function(Ue){if(ai.closeOnEsc&&bi&&"Escape"===Ue.key&&(Ue.preventDefault(),we()),bi&&"Tab"===Ue.key&&!ai.disableFocusTrap){var Dn=o.querySelectorAll("*"),ii=Array.from(Dn).filter(ai.isTabbable).sort(function(di,kr){return di.tabIndex-kr.tabIndex}),hi=ii.indexOf(document.activeElement);-1===hi&&Ue.shiftKey&&(hi=0),hi+=ii.length+(Ue.shiftKey?-1:1),ii[hi%=ii.length].focus(),Ue.preventDefault()}},function(Ue){!ai.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){ai.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),we())},G,z,q,L,Z,he,N,Y,oe,Ne,tt,ot,ne,Ie,Le,At,ci,Ni,Fr,Ai,jo,xt,Fi,xo,gt,ut,C,_,function(Ue){Vi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Jo,ro,Gu,Xd,Wu,qc,CQ=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,R7e,L7e,ys,{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},O7e,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Jo||(Jo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(ro||(ro={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Xd||(Xd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(qc||(qc={}));var wm=[{start:0,end:100}],Cm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},$7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),B7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),kQ=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),_N="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",xN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",V7e="NO",wN="SELF",CN="NEXT_INSIDE",H7e=(ql(lN={},qc.asc,"ascending"),ql(lN,qc.desc,"descending"),lN),z7e=0;function fb(){return++z7e}function Uf(t){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function oo(t){return Array.isArray(t)}function Mo(t){return null!==t&&"object"===Uf(t)&&t.constructor===Object}function SQ(t){return!(!t||"object"!==Uf(t))&&"add"===t.op}function DQ(t){return!(!t||"object"!==Uf(t))&&"remove"===t.op}function kN(t){return!(!t||"object"!==Uf(t))&&"replace"===t.op}function SN(t){return!(!t||"object"!==Uf(t))&&"copy"===t.op}function Mv(t){return!(!t||"object"!==Uf(t))&&"move"===t.op}function DN(t){return(DN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function U7e(t,n){return t===n}function TQ(t){return t.slice(0,t.length-1)}function EQ(t){return"object"===DN(t)&&null!==t}function pb(t){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function AQ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function G7e(t,n,e){return r=function(o,s){if("object"!==pb(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==pb(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===pb(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function TN(t){if(oo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Mo(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Mo(t)||oo(t))return EN(t,r,o);if(i){var s=W7e.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var W7e=/^\d+$/;function MQ(t,n,e){if(0===n.length)return e(t);if(!EQ(t))throw new Error("Path doesn't exist");var i=n[0];return EN(t,i,MQ(t[i],n.slice(1),e))}function AN(t,n){if(0===n.length)return t;if(!EQ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=TN(t);return oo(i)&&i.splice(parseInt(e),1),Mo(i)&&delete i[e],i}return t}var r=n[0];return EN(t,r,AN(t[r],n.slice(1)))}function MN(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return MQ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=TN(o);return s.splice(parseInt(r),0,e),s})}function Xc(t,n){return void 0!==t&&(0===n.length||null!==t&&Xc(t[n[0]],n.slice(1)))}function Xu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function ln(t){return t.map(IQ).join("")}function IQ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function IN(t,n){return t+IQ(n)}function Iv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:U7e;if(p.length=0?G=function(){var z="",U=!0;"-"==t[s]&&(z+=h()),z+="0"==t[s]?h():m(),"."==t[s]&&(z+=h()+m(),U=!1),"e"!=t[s]&&"E"!=t[s]||(z+=h(),"+"!=t[s]&&"-"!=t[s]||(z+=h()),z+=m(),U=!1);var q=+z;return a&&U&&(q>Number.MAX_SAFE_INTEGER||q="a"&&G<="f"?$+=G.charCodeAt()-n9e+10:G>="0"&&G<="9"?$+=+G:C()}return String.fromCharCode($)}function m(){for(var M="";t[s]>="0"&&t[s]<="9";)M+=h();if(M.length)return M;S(),_()}function g(M,$){v(M,$,y())}function v(M,$,G){i[M]=i[M]||{},i[M][$]=G}function y(){return{line:r,column:o,pos:s}}function _(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),_()}function S(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},O2.stringify=function(t,n,e){if(j2(t)){var i,r,o=0,s="object"==bn(e)?e.space:e;switch(bn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var r9e=/"|\\/g,o9e=/[\b]/g,s9e=/\f/g,a9e=/\n/g,l9e=/\r/g,c9e=/\t/g;function P2(t){return'"'+(t=t.replace(r9e,"\\$&").replace(s9e,"\\f").replace(o9e,"\\b").replace(a9e,"\\n").replace(l9e,"\\r").replace(c9e,"\\t"))+'"'}var u9e=/~/g,d9e=/\//g;function ON(t){return t.replace(u9e,"~0").replace(d9e,"~1")}function jN(t){return(jN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function PN(t){var n="function"==typeof Map?new Map:void 0;return PN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return LN(e,arguments,vb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),gb(r,e)},PN(t)}function LN(t,n,e){return(LN=RQ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&gb(a,o.prototype),a}).apply(null,arguments)}function RQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gb(t,n){return(gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function vb(t){return(vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var Gf=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&gb(l,c)}(a,PN(Error));var n,e,i,s=(n=a,e=RQ(),function(){var l,c=vb(n);if(e){var u=vb(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function h9e(t,n){if(n&&("object"===jN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function L2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function R2(t){return t>=48&&t<=57}function f9e(t){return t>=32&&t<=1114111}var p9e=/^[,:[\]{}()\n]$/;function $Q(t){return m9e.test(t)||t&&B2(t.charCodeAt(0))}var m9e=/^[[{\w-]$/;function g9e(t){return 10===t||13===t||9===t||8===t||12===t}function $2(t){return 32===t||10===t||9===t||13===t}function v9e(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function B2(t){return BQ(t)||RN(t)}function BQ(t){return 34===t||8220===t||8221===t}function RN(t){return 39===t||8216===t||8217===t||96===t||180===t}function yb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function km(t,n){var e=t.length;if(!$2(t.charCodeAt(e-1)))return t+n;for(;$2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function y9e(t,n,e){return t.substring(0,n)+t.substring(n+e)}var b9e={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_9e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yd(t){var n=0,e="";r()||function(){throw new Gf("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),$Q(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=km(e,",")),function(){for(var _=!0,C=!0;C;)_?_=!1:l(44)||(e=km(e,",")),C=r();C||(e=yb(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=yb(e,",")),n>=t.length)return e;function r(){o();var _=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&S<=57)for(n++;R2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);R2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);R2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),_}function o(){var _=n,C=s();do{(C=a())&&(C=s())}while(C);return n>_}function s(){for(var _,C="";(_=$2(t.charCodeAt(n)))||v9e(t.charCodeAt(n));)C+=_?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;$2(t.charCodeAt(n-1))&&n>0;)n--;var S=t.slice(C,n);return e+=JSON.stringify(S),!0}}function f(_){if(!R2(t.charCodeAt(n))){var C=t.slice(_,n);throw new Gf("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(_){throw new Gf("Invalid character "+JSON.stringify(_),n)}function m(){throw new Gf("Object key expected",n)}function g(){throw new Gf("Object value expected",n)}function v(){throw new Gf("Colon expected",n)}function y(_){for(var C=_+2;/\w/.test(t[C]);)C++;var S=t.slice(_,C);throw new Gf('Invalid unicode character "'.concat(S,'"'),n)}!function(){throw new Gf("Unexpected character "+JSON.stringify(t[n]),n)}()}function x9e(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ws(t){return parseInt(t,10)}function $N(t){return w9e.test(t)}var w9e=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Io(t){return"object"===bn(t)&&null!==t&&t.constructor===Object}function Ho(t){return"object"===bn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function BN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return BN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return BN(n)}catch{return!1}return!1}function VQ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function VN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return bn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Io(t))return"object";var e=n.stringify(t);return e&&$N(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var C9e=/^https?:\/\/\S+$/;function V2(t){return"string"==typeof t&&C9e.test(t)}function Nv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&($N(e)?n.parse(e):t)}var k9e=/^-?[0-9]+$/,zQ="object"==(typeof global>"u"?"undefined":bn(global))&&global&&global.Object===Object&&global,S9e="object"==(typeof self>"u"?"undefined":bn(self))&&self&&self.Object===Object&&self,Ca=zQ||S9e||Function("return this")(),ll=Ca.Symbol,UQ=Object.prototype,D9e=UQ.hasOwnProperty,T9e=UQ.toString,bb=ll?ll.toStringTag:void 0,E9e=Object.prototype.toString,GQ=ll?ll.toStringTag:void 0;function Ml(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":GQ&&GQ in Object(t)?function(n){var e=D9e.call(n,bb),i=n[bb];try{n[bb]=void 0;var r=!0}catch{}var o=T9e.call(n);return r&&(e?n[bb]=i:delete n[bb]),o}(t):E9e.call(t)}function ls(t){return null!=t&&"object"==bn(t)}function Yl(t){return"symbol"==bn(t)||ls(t)&&"[object Symbol]"==Ml(t)}function WQ(t){return"number"==typeof t?t:Yl(t)?NaN:+t}function Ko(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var lZ=aZ(nZ),K9e=/\{\n\/\* \[wrapped with (.+)\] \*/,Q9e=/,? & /,Z9e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function q2(t){return function(){return t}}var eVe=function(){try{var t=Dm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),X2=eVe,tVe=X2?function(t,n){return X2(t,"toString",{configurable:!0,enumerable:!1,value:q2(n),writable:!0})}:cl,UN=aZ(tVe);function Jc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var nVe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function uZ(t,n,e){var o,i=n+"";return UN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(Z9e,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Jc(nVe,function(s){var a="_."+s[0];o&s[1]&&!J2(r,a)&&r.push(a)}),r.sort()}((o=i.match(K9e))?o[1].split(Q9e):[],e)))}function dZ(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return zN(t)&&lZ(h,d),h.placeholder=i,uZ(h,t,n)}function Pv(t){return t.placeholder}var iVe=/^(?:0|[1-9]\d*)$/;function Zh(t,n){var e=bn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&iVe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Il(t){return null!=t&&Cb(t.length)&&!Kd(t)}function Nl(t,n,e){if(!zo(e))return!1;var i=bn(n);return!!("number"==i?Il(e)&&Zh(n,e.length):"string"==i&&n in e)&&Kc(e[n],t)}function Lv(t){return dr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Nl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,yZ=vZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,bZ=yZ&&yZ.exports===vZ?Ca.Buffer:void 0,nf=(bZ?bZ.isBuffer:void 0)||Q2,Uo={};function Cc(t){return function(n){return t(n)}}Uo["[object Float32Array]"]=Uo["[object Float64Array]"]=Uo["[object Int8Array]"]=Uo["[object Int16Array]"]=Uo["[object Int32Array]"]=Uo["[object Uint8Array]"]=Uo["[object Uint8ClampedArray]"]=Uo["[object Uint16Array]"]=Uo["[object Uint32Array]"]=!0,Uo["[object Arguments]"]=Uo["[object Array]"]=Uo["[object ArrayBuffer]"]=Uo["[object Boolean]"]=Uo["[object DataView]"]=Uo["[object Date]"]=Uo["[object Error]"]=Uo["[object Function]"]=Uo["[object Map]"]=Uo["[object Number]"]=Uo["[object Object]"]=Uo["[object RegExp]"]=Uo["[object Set]"]=Uo["[object String]"]=Uo["[object WeakMap]"]=!1;var _Z="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,Sb=_Z&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,qN=Sb&&Sb.exports===_Z&&zQ.process,Qc=function(){try{return Sb&&Sb.require&&Sb.require("util").types||qN&&qN.binding&&qN.binding("util")}catch{}}(),xZ=Qc&&Qc.isTypedArray,Tm=xZ?Cc(xZ):function(t){return ls(t)&&Cb(t.length)&&!!Uo[Ml(t)]},hVe=Object.prototype.hasOwnProperty;function wZ(t,n){var e=Pi(t),i=!e&&qf(t),r=!e&&!i&&nf(t),o=!e&&!i&&!r&&Tm(t),s=e||i||r||o,a=s?WN(t.length,String):[],l=a.length;for(var c in t)!n&&!hVe.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zh(c,l))||a.push(c);return a}function CZ(t,n){return function(e){return t(n(e))}}var fVe=CZ(Object.keys,Object),pVe=Object.prototype.hasOwnProperty;function XN(t){if(!kb(t))return fVe(t);var n=[];for(var e in Object(t))pVe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function qs(t){return Il(t)?wZ(t):XN(t)}var mVe=Object.prototype.hasOwnProperty,gVe=Lv(function(t,n){if(kb(n)||Il(n))Qd(n,qs(n),t);else for(var e in n)mVe.call(n,e)&&wb(t,e,n[e])}),kZ=gVe,vVe=Object.prototype.hasOwnProperty;function Fl(t){return Il(t)?wZ(t,!0):function yVe(t){if(!zo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=kb(t),e=[];for(var i in t)("constructor"!=i||!n&&vVe.call(t,i))&&e.push(i);return e}(t)}var bVe=Lv(function(t,n){Qd(n,Fl(n),t)}),Z2=bVe,_Ve=Lv(function(t,n,e,i){Qd(n,Fl(n),t,i)}),Rv=_Ve,xVe=Lv(function(t,n,e,i){Qd(n,qs(n),t,i)}),SZ=xVe,wVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CVe=/^\w*$/;function YN(t,n){if(Pi(t))return!1;var e=bn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Yl(t))||CVe.test(t)||!wVe.test(t)||null!=n&&t in Object(n)}var Db=Dm(Object,"create"),kVe=Object.prototype.hasOwnProperty,SVe=Object.prototype.hasOwnProperty;function Em(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},rf.prototype.set=function(t,n){var e=this.__data__,i=ek(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var Tb=Dm(Ca,"Map");function tk(t,n){var i,r,e=t.__data__;return("string"==(r=bn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function sf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?$a(a,n-1,e,i,r):Yf(r,a):i||(r[r.length]=a)}return r}function KN(t){return null!=t&&t.length?$a(t,1):[]}function af(t){return UN(pZ(t,void 0,KN),t+"")}var EZ=af(JN),ik=CZ(Object.getPrototypeOf,Object),AZ=Function.prototype.toString,FVe=Object.prototype.hasOwnProperty,OVe=AZ.call(Object);function Bv(t){if(!ls(t)||"[object Object]"!=Ml(t))return!1;var n=ik(t);if(null===n)return!0;var e=FVe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&AZ.call(e)==OVe}function rk(t){if(!ls(t))return!1;var n=Ml(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Bv(t)}var jVe=dr(function(t,n){try{return wc(t,void 0,n)}catch(e){return rk(e)?e:new Error(e)}}),QN=jVe;function ZN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Ui(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var eF=dr(function(t,n,e){var i=1;if(e.length){var r=Wf(e,Pv(eF));i|=32}return ef(t,i,n,e,r)});eF.placeholder={};var tF=eF,PVe=af(function(t,n){return Jc(n,function(e){e=Zd(e),tf(t,e,tF(t[e],t))}),t}),MZ=PVe,nF=dr(function(t,n,e){var i=3;if(e.length){var r=Wf(e,Pv(nF));i|=32}return ef(n,i,t,e,r)});nF.placeholder={};var IZ=nF;function Zc(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:Zc(t,n,e)}var LVe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Vv(t){return LVe.test(t)}var iF="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rF="\\ud83c[\\udffb-\\udfff]",NZ="[^\\ud800-\\udfff]",FZ="(?:\\ud83c[\\udde6-\\uddff]){2}",OZ="[\\ud800-\\udbff][\\udc00-\\udfff]",jZ="(?:"+iF+"|"+rF+")?",$Ve="[\\ufe0e\\ufe0f]?"+jZ+"(?:\\u200d(?:"+[NZ,FZ,OZ].join("|")+")[\\ufe0e\\ufe0f]?"+jZ+")*",BVe="(?:"+[NZ+iF+"?",iF,FZ,OZ,"[\\ud800-\\udfff]"].join("|")+")",VVe=RegExp(rF+"(?="+rF+")|"+BVe+$Ve,"g");function Ku(t){return Vv(t)?function(n){return n.match(VVe)||[]}(t):function(n){return n.split("")}(t)}function PZ(t){return function(n){var e=Vv(n=Jr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?Jf(e,1).join(""):n.slice(1);return i[t]()+r}}var ok=PZ("toUpperCase");function oF(t){return ok(Jr(t).toLowerCase())}function sF(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function JZ(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Mm(xc(t),n,e)}function Qu(t){var n=this.__data__=new rf(t);this.size=n.size}function KZ(t,n){return t&&Qd(n,qs(n),t)}Qu.prototype.clear=function(){this.__data__=new rf,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof rf){var i=e.__data__;if(!Tb||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new sf(i)}return e.set(t,n),this.size=e.size,this};var QZ="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,ZZ=QZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,eee=ZZ&&ZZ.exports===QZ?Ca.Buffer:void 0,tee=eee?eee.allocUnsafe:void 0;function nee(t,n){if(n)return t.slice();var e=t.length,i=tee?tee(e):new t.constructor(e);return t.copy(i),i}function Kf(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Nm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&_-c>=o}function g(){var C,S,_=Mb();if(m(_))return v(_);a=setTimeout(g,(S=n-((C=_)-l),d?CHe(S,o-(C-c)):S))}function v(_){return a=void 0,h&&i?f(_):(i=r=void 0,s)}function y(){var _=Mb(),C=m(_);if(i=arguments,r=this,l=_,C){if(void 0===a)return function p(_){return c=_,a=setTimeout(g,n),u?f(_):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,zo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?wHe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Mb())},y}function Fee(t,n){return null==t||t!=t?n:t}var Oee=Object.prototype,kHe=Oee.hasOwnProperty,SHe=dr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Nl(n[0],n[1],r)&&(i=1);++e=200&&(o=Eb,s=!1,n=new Nm(n));e:for(;++r=0&&t.slice(e,r)==n}function Qee(t){return function(n){var i,r,o,e=eh(n);return"[object Map]"==e?CF(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Ko(r,function(o){return[o,i[o]]})}(n,t(n))}}var vk=Qee(qs),yk=Qee(Fl),FHe=aF({"&":"&","<":"<",">":">",'"':""","'":"'"}),Zee=/[&<>"']/g,OHe=RegExp(Zee.source);function PF(t){return(t=Jr(t))&&OHe.test(t)?t.replace(Zee,FHe):t}var ete=/[\\^$.*+?()[\]{}|]/g,jHe=RegExp(ete.source);function tte(t){return(t=Jr(t))&&jHe.test(t)?t.replace(ete,"\\$&"):t}function nte(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Ui(l))<0&&(l+=c),l=a>l?0:LF(l);a-1?r[o?n[s]:s]:void 0}}var LHe=Math.max;function RF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=LHe(i+r,0)),Y2(t,Li(n),r)}var lte=ate(RF);function cte(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function ute(t,n){return cte(t,Li(n),th)}var RHe=Math.max,$He=Math.min;function $F(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Ui(e),r=e<0?RHe(i+r,0):$He(r,i-1)),Y2(t,Li(n),r,!0)}var dte=ate($F);function hte(t,n){return cte(t,Li(n),jF)}function sa(t){return t&&t.length?t[0]:void 0}function fte(t,n){var e=-1,i=Il(t)?Array(t.length):[];return Qf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Wv(t,n){return(Pi(t)?Ko:fte)(t,Li(n))}function pte(t,n){return $a(Wv(t,n),1)}function mte(t,n){return $a(Wv(t,n),1/0)}function gte(t,n,e){return e=void 0===e?1:Ui(e),$a(Wv(t,n),e)}function vte(t){return null!=t&&t.length?$a(t,1/0):[]}function yte(t,n){return null!=t&&t.length?$a(t,n=void 0===n?1:Ui(n)):[]}function bte(t){return ef(t,512)}var _te=uF("floor");function xte(t){return af(function(n){var e=n.length,i=e,r=Yc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==W2(o))var s=new Yc([],!0)}for(i=s?i:e;++in}function _k(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Ite=_k(BF),Nte=_k(function(t,n){return t>=n}),HHe=Object.prototype.hasOwnProperty;function zHe(t,n){return null!=t&&HHe.call(t,n)}function Fte(t,n){return null!=t&&Cee(t,n,zHe)}var UHe=Math.max,GHe=Math.min;function Ote(t,n,e){return n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),(i=t=xc(t))>=GHe(r=n,o=e)&&i-1:!!r&&jv(t,n,e)>-1}var qHe=Math.max;function Pte(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=qHe(i+r,0)),jv(t,n,r)}function Xi(t){return null!=t&&t.length?Zc(t,0,-1):[]}var XHe=Math.min;function HF(t,n,e){for(var i=e?OF:J2,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Ko(u,Cc(n))),l=XHe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Nm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function cne(t){return void 0===t}function une(t){return ls(t)&&"[object WeakMap]"==eh(t)}function dne(t){return ls(t)&&"[object WeakSet]"==Ml(t)}function hne(t){return Li("function"==typeof t?t:eu(t,1))}var oze=Array.prototype.join;function fne(t,n){return null==t?"":oze.call(t,n)}var sze=zv(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),pne=sze,aze=dk(function(t,n,e){tf(t,e,n)}),mne=aze,lze=Math.max,cze=Math.min;function gne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Ui(e))<0?lze(i+r,0):cze(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):Y2(t,cZ,r,!0)}var uze=zv(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),vne=uze,yne=PZ("toLowerCase");function WF(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function One(t,n){var e=t.length;if(e)return Zh(n+=n<0?e:0,e)?t[n]:void 0}function jne(t,n){return t&&t.length?One(t,Ui(n)):void 0}function Pne(t){return t=Ui(t),dr(function(n){return One(n,t)})}function ZF(t,n){return null==(t=Ute(t,n=Xf(n,t)))||delete t[Zd(Ln(n))]}function pze(t){return Bv(t)?void 0:t}var mze=af(function(t,n){var e={};if(null==t)return e;var i=!1;n=Ko(n,function(o){return o=Xf(o,t),i||(i=o.length>1),o}),Qd(t,pF(t),e),i&&(e=eu(e,7,pze));for(var r=n.length;r--;)ZF(e,n[r]);return e}),Lne=mze;function jb(t,n,e,i){if(!zo(t))return t;for(var r=-1,o=(n=Xf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(fte(t,function(o,s,a){return{criteria:Ko(n,function(c){return c(o)}),index:++i,value:o}}))}function zne(t,n,e,i){return null==t?[]:(Pi(n)||(n=null==n?[]:[n]),Pi(e=i?void 0:e)||(e=null==e?[]:[e]),Hne(t,n,e))}function tO(t){return af(function(n){return n=Ko(n,Cc(Li)),dr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var Une=tO(Ko),vze=Math.min,yze=dr(function(t,n){var e=(n=1==n.length&&Pi(n[0])?Ko(n[0],Cc(Li)):Ko($a(n,1),Cc(Li))).length;return dr(function(i){for(var r=-1,o=vze(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=bze(n/2))&&(t+=t)}while(n);return e}var _ze=TF("length"),iO="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rO="\\ud83c[\\udffb-\\udfff]",Xne="[^\\ud800-\\udfff]",Yne="(?:\\ud83c[\\udde6-\\uddff]){2}",Jne="[\\ud800-\\udbff][\\udc00-\\udfff]",Kne="(?:"+iO+"|"+rO+")?",wze="[\\ufe0e\\ufe0f]?"+Kne+"(?:\\u200d(?:"+[Xne,Yne,Jne].join("|")+")[\\ufe0e\\ufe0f]?"+Kne+")*",Cze="(?:"+[Xne+iO+"?",iO,Yne,Jne,"[\\ud800-\\udfff]"].join("|")+")",Qne=RegExp(rO+"(?="+rO+")|"+Cze+wze,"g");function Jv(t){return Vv(t)?function(n){for(var e=Qne.lastIndex=0;Qne.test(n);)++e;return e}(t):_ze(t)}var kze=Math.ceil;function Ck(t,n){var e=(n=void 0===n?" ":_c(n)).length;if(e<2)return e?nO(n,t):n;var i=nO(n,kze(t/Jv(n)));return Vv(n)?Jf(Ku(i),0,t).join(""):i.slice(0,t)}var Sze=Math.ceil,Dze=Math.floor;function Zne(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return Ck(Dze(r),e)+t+Ck(Sze(r),e)}function eie(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;return n&&i-1;)a!==t&&sie.call(a,l,1),sie.call(t,l,1);return t}function dO(t,n){return t&&t.length&&n&&n.length?uO(t,n):t}var aie=dr(dO);function lie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,Li(e)):t}function cie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,void 0,e):t}var Nze=Array.prototype.splice;function uie(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;Zh(r)?Nze.call(t,r,1):ZF(t,r)}}return t}var Fze=af(function(t,n){var e=null==t?0:t.length,i=JN(t,n);return uie(t,Ko(n,function(r){return Zh(r,e)?+r:r}).sort(Vne)),i}),die=Fze,Oze=Math.floor,jze=Math.random;function hO(t,n){return t+Oze(jze()*(n-t+1))}var Pze=parseFloat,Lze=Math.min,Rze=Math.random;function hie(t,n,e){if(e&&"boolean"!=typeof e&&Nl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Jd(t),void 0===n?(n=t,t=0):n=Jd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=Rze();return Lze(t+r*(n-t+Pze("1e-"+((r+"").length-1))),n)}return hO(t,n)}var $ze=Math.ceil,Bze=Math.max;function fie(t){return function(n,e,i){return i&&"number"!=typeof i&&Nl(n,e,i)&&(e=i=void 0),n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),function(r,o,s,a){for(var l=-1,c=Bze($ze((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Nl(t,n[0],n[1])?n=[]:e>2&&Nl(n[0],n[1],n[2])&&(n=[n[0]]),Hne(t,$a(n,1),[])}),pO=Kze,Qze=Math.floor,Zze=Math.min;function mO(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Yl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Yl(s)&&(e?s<=n:s>>0)?(t=Jr(t))&&("string"==typeof n||null!=n&&!xk(n))&&!(n=_c(n))&&Vv(t)?Jf(Ku(t),0,e):t.split(n,e):[]}var eUe=Math.max;function Wie(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:eUe(Ui(n),0),dr(function(e){var i=e[n],r=Jf(e,0,n);return i&&Yf(r,i),wc(t,this,r)})}var tUe=zv(function(t,n,e){return t+(e?" ":"")+ok(n)}),qie=tUe;function Xie(t,n,e){return t=Jr(t),e=null==e?0:Mm(Ui(e),0,t.length),n=_c(n),t.slice(e,e+n.length)==n}function Yie(){return{}}function Jie(){return""}function Kie(){return!0}var Qie=H2(function(t,n){return t-n},0);function Zie(t){return t&&t.length?XF(t,cl):0}function ere(t,n){return t&&t.length?XF(t,Li(n)):0}function tre(t){var n=null==t?0:t.length;return n?Zc(t,1,n):[]}function nre(t,n,e){return t&&t.length?Zc(t,0,(n=e||void 0===n?1:Ui(n))<0?0:n):[]}function ire(t,n,e){var i=null==t?0:t.length;return i?Zc(t,(n=i-(n=e||void 0===n?1:Ui(n)))<0?0:n,i):[]}function rre(t,n){return t&&t.length?mk(t,Li(n),!1,!0):[]}function ore(t,n){return t&&t.length?mk(t,Li(n)):[]}function sre(t,n){return n(t),t}var are=Object.prototype,nUe=are.hasOwnProperty;function lre(t,n,e,i){return void 0===t||Kc(t,are[e])&&!nUe.call(i,e)?n:t}var iUe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function rUe(t){return"\\"+iUe[t]}var cre=/<%=([\s\S]+?)%>/g,Tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:cre,variable:"",imports:{_:{escape:PF}}},oUe=/\b__p \+= '';/g,sUe=/\b(__p \+=) '' \+/g,aUe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lUe=/[()=,{}\[\]\/\s]/,cUe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ek=/($^)/,uUe=/['\n\r\u2028\u2029\\]/g,ure=Object.prototype.hasOwnProperty;function dre(t,n,e){var i=Tk.imports._.templateSettings||Tk;e&&Nl(t,n,e)&&(n=void 0),t=Jr(t),n=Rv({},n,i,lre);var r,o,s=Rv({},n.imports,i.imports,lre),a=qs(s),l=VF(s,a),c=0,u=n.interpolate||Ek,d="__p += '",h=RegExp((n.escape||Ek).source+"|"+u.source+"|"+(u===cre?cUe:Ek).source+"|"+(n.evaluate||Ek).source+"|$","g"),f=ure.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,_,C,S){return y||(y=_),d+=t.slice(c,S).replace(uUe,rUe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=S+g.length,g}),d+="';\n";var p=ure.call(n,"variable")&&n.variable;if(p){if(lUe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(oUe,""):d).replace(sUe,"$1").replace(aUe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=QN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,rk(m))throw m;return m}function gO(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return zo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Gv(t,n,{leading:i,maxWait:n,trailing:r})}function Kv(t,n){return n(t)}var dUe=Math.min;function vO(t,n){if((t=Ui(t))<1||t>9007199254740991)return[];var e=4294967295,i=dUe(t,4294967295);t-=4294967295;for(var r=WN(i,n=nh(n));++e-1;);return e}function bre(t,n){for(var e=-1,i=t.length;++e-1;);return e}function _re(t,n,e){if((t=Jr(t))&&(e||void 0===n))return KQ(t);if(!t||!(n=_c(n)))return t;var i=Ku(t),r=Ku(n);return Jf(i,bre(i,r),yre(i,r)+1).join("")}function xre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.slice(0,JQ(t)+1);if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,0,yre(i,Ku(n))+1).join("")}var hUe=/^\s+/;function wre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.replace(hUe,"");if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,bre(i,Ku(n))).join("")}var fUe=/\w*$/;function Cre(t,n){var e=30,i="...";if(zo(n)){var r="separator"in n?n.separator:r;e="length"in n?Ui(n.length):e,i="omission"in n?_c(n.omission):i}var o=(t=Jr(t)).length;if(Vv(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-Jv(i);if(a<1)return i;var l=s?Jf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),xk(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Jr(fUe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(_c(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function kre(t){return GN(t,1)}var pUe=aF({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Sre=/&(?:amp|lt|gt|quot|#39);/g,mUe=RegExp(Sre.source);function Dre(t){return(t=Jr(t))&&mUe.test(t)?t.replace(Sre,pUe):t}var gUe=Uv&&1/lk(new Uv([,-0]))[1]==1/0?function(t){return new Uv(t)}:go,vUe=gUe;function Zf(t,n,e){var i=-1,r=J2,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=OF;else if(o>=200){var c=n?null:vUe(t);if(c)return lk(c);s=!1,r=Eb,l=new Nm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Tr&&Zh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Kv,args:[r],thisArg:void 0}),new Yc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Vre=CUe;function Hre(){return dF(this)}function zre(){var t=this.__wrapped__;if(t instanceof Tr){var n=t;return this.__actions__.length&&(n=new Tr(this)),(n=n.reverse()).__actions__.push({func:Kv,args:[kk],thisArg:void 0}),new Yc(n,this.__chain__)}return this.thru(kk)}function _O(t,n,e){var i=t.length;if(i<2)return i?Zf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,bO(t,e)}),Kre=SUe,Gn={chunk:YZ,compact:mee,concat:gee,difference:Vee,differenceBy:Hee,differenceWith:zee,drop:Gee,dropRight:Wee,dropRightWhile:qee,dropWhile:Xee,fill:rte,findIndex:RF,findLastIndex:$F,first:sa,flatten:KN,flattenDeep:vte,flattenDepth:yte,fromPairs:Ete,head:sa,indexOf:Pte,initial:Xi,intersection:Lte,intersectionBy:Rte,intersectionWith:$te,join:fne,last:Ln,lastIndexOf:gne,nth:jne,pull:aie,pullAll:dO,pullAllBy:lie,pullAllWith:cie,pullAt:die,remove:_ie,reverse:kk,slice:Fie,sortedIndex:Pie,sortedIndexBy:Lie,sortedIndexOf:Rie,sortedLastIndex:$ie,sortedLastIndexBy:Bie,sortedLastIndexOf:Vie,sortedUniq:zie,sortedUniqBy:Uie,tail:tre,take:nre,takeRight:ire,takeRightWhile:rre,takeWhile:ore,union:Tre,unionBy:Ere,unionWith:Are,uniq:Mre,uniqBy:Ire,uniqWith:Nre,unzip:Ak,unzipWith:bO,without:$re,xor:Ure,xorBy:Gre,xorWith:Wre,zip:qre,zipObject:Yre,zipObjectDeep:Jre,zipWith:Kre},vo={countBy:Iee,each:gk,eachRight:Nb,every:ite,filter:ste,find:lte,findLast:dte,flatMap:pte,flatMapDeep:mte,flatMapDepth:gte,forEach:gk,forEachRight:Nb,groupBy:qv,includes:jte,invokeMap:Wte,keyBy:mne,map:Wv,orderBy:zne,partition:lO,reduce:vie,reduceRight:yie,reject:bie,sample:Tie,sampleSize:Eie,shuffle:Iie,size:Nie,some:jie,sortBy:pO},DUe={now:Mb},_s={after:QQ,ary:GN,before:ZN,bind:tF,bindKey:IZ,curry:hk,curryRight:fk,debounce:Gv,defer:$ee,delay:Bee,flip:bte,memoize:$v,negate:Yv,once:Bne,overArgs:Gne,partial:sO,partialRight:iie,rearg:mie,rest:Cie,spread:Wie,throttle:gO,unary:kre,wrap:Bre},mi={castArray:qZ,clone:hee,cloneDeep:fee,cloneDeepWith:_F,cloneWith:pee,conformsTo:Eee,eq:Kc,gt:Ite,gte:Nte,isArguments:qf,isArray:Pi,isArrayBuffer:Xte,isArrayLike:Il,isArrayLikeObject:bs,isBoolean:Yte,isBuffer:nf,isDate:Kte,isElement:Qte,isEmpty:Hi,isEqual:or,isEqualWith:Zte,isError:rk,isFinite:ene,isFunction:Kd,isInteger:UF,isLength:Cb,isMap:yF,isMatch:tne,isMatchWith:nne,isNaN:ine,isNative:rne,isNil:one,isNull:sne,isNumber:GF,isObject:zo,isObjectLike:ls,isPlainObject:Bv,isRegExp:xk,isSafeInteger:lne,isSet:bF,isString:Fb,isSymbol:Yl,isTypedArray:Tm,isUndefined:cne,isWeakMap:une,isWeakSet:dne,lt:bne,lte:_ne,toArray:KF,toFinite:Jd,toInteger:Ui,toLength:LF,toNumber:xc,toPlainObject:NF,toSafeInteger:mre,toString:Jr},Ol={add:YQ,ceil:XZ,divide:Uee,floor:_te,max:kne,maxBy:Sne,mean:Tne,meanBy:Ene,min:Nne,minBy:Xv,multiply:Fne,round:Sie,subtract:Qie,sum:Zie,sumBy:ere},TUe=JZ,EUe=Ote,AUe=hie,Ii={assign:kZ,assignIn:Z2,assignInWith:Rv,assignWith:SZ,at:EZ,create:Nee,defaults:jee,defaultsDeep:Lee,entries:vk,entriesIn:yk,extend:Z2,extendWith:Rv,findKey:ute,findLastKey:hte,forIn:kte,forInRight:Ste,forOwn:Dte,forOwnRight:Tte,functions:Ate,functionsIn:Mte,get:nk,has:Fte,hasIn:uk,invert:Vte,invertBy:zte,invoke:Gte,keys:qs,keysIn:Fl,mapKeys:xne,mapValues:qF,merge:Ane,mergeWith:FF,omit:Lne,omitBy:$ne,pick:rie,pickBy:eO,result:kie,set:Aie,setWith:Mie,toPairs:vk,toPairsIn:yk,transform:vre,unset:Fre,update:jre,updateWith:Pre,values:Fm,valuesIn:Rre},ih={at:Vre,chain:dF,commit:xF,lodash:me,next:QF,plant:cO,reverse:zre,tap:sre,thru:Kv,toIterator:yO,toJSON:Om,value:Om,valueOf:Om,wrapperChain:Hre},Kr={camelCase:WZ,capitalize:oF,deburr:lF,endsWith:Kee,escape:PF,escapeRegExp:tte,kebabCase:pne,lowerCase:vne,lowerFirst:yne,pad:Zne,padEnd:eie,padStart:tie,parseInt:nie,repeat:xie,replace:wie,snakeCase:Oie,split:Gie,startCase:qie,startsWith:Xie,template:dre,templateSettings:Tk,toLower:fre,toUpper:gre,trim:_re,trimEnd:xre,trimStart:wre,truncate:Cre,unescape:Dre,upperCase:Lre,upperFirst:ok,words:cF},so={attempt:QN,bindAll:MZ,cond:See,conforms:Tee,constant:q2,defaultTo:Fee,flow:wte,flowRight:Cte,identity:cl,iteratee:hne,matches:wne,matchesProperty:Cne,method:Mne,methodOf:Ine,mixin:YF,noop:go,nthArg:Pne,over:Une,overEvery:Wne,overSome:qne,property:EF,propertyOf:oie,range:fO,rangeRight:pie,stubArray:sk,stubFalse:Q2,stubObject:Yie,stubString:Jie,stubTrue:Kie,times:vO,toPath:pre,uniqueId:ep},MUe=Math.max,IUe=Math.min,NUe=Math.min,FUe=Array.prototype,Qre=Object.prototype.hasOwnProperty,Zre=ll?ll.iterator:void 0,OUe=Math.max,eoe=Math.min,wO=function(t){return function(n,e,i){if(null==i){var r=zo(e),o=r&&qs(e),s=o&&o.length&&bk(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(YF);me.after=_s.after,me.ary=_s.ary,me.assign=Ii.assign,me.assignIn=Ii.assignIn,me.assignInWith=Ii.assignInWith,me.assignWith=Ii.assignWith,me.at=Ii.at,me.before=_s.before,me.bind=_s.bind,me.bindAll=so.bindAll,me.bindKey=_s.bindKey,me.castArray=mi.castArray,me.chain=ih.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=so.cond,me.conforms=so.conforms,me.constant=so.constant,me.countBy=vo.countBy,me.create=Ii.create,me.curry=_s.curry,me.curryRight=_s.curryRight,me.debounce=_s.debounce,me.defaults=Ii.defaults,me.defaultsDeep=Ii.defaultsDeep,me.defer=_s.defer,me.delay=_s.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=vo.filter,me.flatMap=vo.flatMap,me.flatMapDeep=vo.flatMapDeep,me.flatMapDepth=vo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=_s.flip,me.flow=so.flow,me.flowRight=so.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Ii.functions,me.functionsIn=Ii.functionsIn,me.groupBy=vo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Ii.invert,me.invertBy=Ii.invertBy,me.invokeMap=vo.invokeMap,me.iteratee=so.iteratee,me.keyBy=vo.keyBy,me.keys=qs,me.keysIn=Ii.keysIn,me.map=vo.map,me.mapKeys=Ii.mapKeys,me.mapValues=Ii.mapValues,me.matches=so.matches,me.matchesProperty=so.matchesProperty,me.memoize=_s.memoize,me.merge=Ii.merge,me.mergeWith=Ii.mergeWith,me.method=so.method,me.methodOf=so.methodOf,me.mixin=wO,me.negate=Yv,me.nthArg=so.nthArg,me.omit=Ii.omit,me.omitBy=Ii.omitBy,me.once=_s.once,me.orderBy=vo.orderBy,me.over=so.over,me.overArgs=_s.overArgs,me.overEvery=so.overEvery,me.overSome=so.overSome,me.partial=_s.partial,me.partialRight=_s.partialRight,me.partition=vo.partition,me.pick=Ii.pick,me.pickBy=Ii.pickBy,me.property=so.property,me.propertyOf=so.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=so.range,me.rangeRight=so.rangeRight,me.rearg=_s.rearg,me.reject=vo.reject,me.remove=Gn.remove,me.rest=_s.rest,me.reverse=Gn.reverse,me.sampleSize=vo.sampleSize,me.set=Ii.set,me.setWith=Ii.setWith,me.shuffle=vo.shuffle,me.slice=Gn.slice,me.sortBy=vo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Kr.split,me.spread=_s.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=ih.tap,me.throttle=_s.throttle,me.thru=Kv,me.toArray=mi.toArray,me.toPairs=Ii.toPairs,me.toPairsIn=Ii.toPairsIn,me.toPath=so.toPath,me.toPlainObject=mi.toPlainObject,me.transform=Ii.transform,me.unary=_s.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Ii.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Ii.update,me.updateWith=Ii.updateWith,me.values=Ii.values,me.valuesIn=Ii.valuesIn,me.without=Gn.without,me.words=Kr.words,me.wrap=_s.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Ii.toPairs,me.entriesIn=Ii.toPairsIn,me.extend=Ii.assignIn,me.extendWith=Ii.assignInWith,wO(me,me),me.add=Ol.add,me.attempt=so.attempt,me.camelCase=Kr.camelCase,me.capitalize=Kr.capitalize,me.ceil=Ol.ceil,me.clamp=TUe,me.clone=mi.clone,me.cloneDeep=mi.cloneDeep,me.cloneDeepWith=mi.cloneDeepWith,me.cloneWith=mi.cloneWith,me.conformsTo=mi.conformsTo,me.deburr=Kr.deburr,me.defaultTo=so.defaultTo,me.divide=Ol.divide,me.endsWith=Kr.endsWith,me.eq=mi.eq,me.escape=Kr.escape,me.escapeRegExp=Kr.escapeRegExp,me.every=vo.every,me.find=vo.find,me.findIndex=Gn.findIndex,me.findKey=Ii.findKey,me.findLast=vo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Ii.findLastKey,me.floor=Ol.floor,me.forEach=vo.forEach,me.forEachRight=vo.forEachRight,me.forIn=Ii.forIn,me.forInRight=Ii.forInRight,me.forOwn=Ii.forOwn,me.forOwnRight=Ii.forOwnRight,me.get=Ii.get,me.gt=mi.gt,me.gte=mi.gte,me.has=Ii.has,me.hasIn=Ii.hasIn,me.head=Gn.head,me.identity=cl,me.includes=vo.includes,me.indexOf=Gn.indexOf,me.inRange=EUe,me.invoke=Ii.invoke,me.isArguments=mi.isArguments,me.isArray=Pi,me.isArrayBuffer=mi.isArrayBuffer,me.isArrayLike=mi.isArrayLike,me.isArrayLikeObject=mi.isArrayLikeObject,me.isBoolean=mi.isBoolean,me.isBuffer=mi.isBuffer,me.isDate=mi.isDate,me.isElement=mi.isElement,me.isEmpty=mi.isEmpty,me.isEqual=mi.isEqual,me.isEqualWith=mi.isEqualWith,me.isError=mi.isError,me.isFinite=mi.isFinite,me.isFunction=mi.isFunction,me.isInteger=mi.isInteger,me.isLength=mi.isLength,me.isMap=mi.isMap,me.isMatch=mi.isMatch,me.isMatchWith=mi.isMatchWith,me.isNaN=mi.isNaN,me.isNative=mi.isNative,me.isNil=mi.isNil,me.isNull=mi.isNull,me.isNumber=mi.isNumber,me.isObject=zo,me.isObjectLike=mi.isObjectLike,me.isPlainObject=mi.isPlainObject,me.isRegExp=mi.isRegExp,me.isSafeInteger=mi.isSafeInteger,me.isSet=mi.isSet,me.isString=mi.isString,me.isSymbol=mi.isSymbol,me.isTypedArray=mi.isTypedArray,me.isUndefined=mi.isUndefined,me.isWeakMap=mi.isWeakMap,me.isWeakSet=mi.isWeakSet,me.join=Gn.join,me.kebabCase=Kr.kebabCase,me.last=Ln,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Kr.lowerCase,me.lowerFirst=Kr.lowerFirst,me.lt=mi.lt,me.lte=mi.lte,me.max=Ol.max,me.maxBy=Ol.maxBy,me.mean=Ol.mean,me.meanBy=Ol.meanBy,me.min=Ol.min,me.minBy=Ol.minBy,me.stubArray=so.stubArray,me.stubFalse=so.stubFalse,me.stubObject=so.stubObject,me.stubString=so.stubString,me.stubTrue=so.stubTrue,me.multiply=Ol.multiply,me.nth=Gn.nth,me.noop=so.noop,me.now=DUe.now,me.pad=Kr.pad,me.padEnd=Kr.padEnd,me.padStart=Kr.padStart,me.parseInt=Kr.parseInt,me.random=AUe,me.reduce=vo.reduce,me.reduceRight=vo.reduceRight,me.repeat=Kr.repeat,me.replace=Kr.replace,me.result=Ii.result,me.round=Ol.round,me.sample=vo.sample,me.size=vo.size,me.snakeCase=Kr.snakeCase,me.some=vo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Kr.startCase,me.startsWith=Kr.startsWith,me.subtract=Ol.subtract,me.sum=Ol.sum,me.sumBy=Ol.sumBy,me.template=Kr.template,me.times=so.times,me.toFinite=mi.toFinite,me.toInteger=Ui,me.toLength=mi.toLength,me.toLower=Kr.toLower,me.toNumber=mi.toNumber,me.toSafeInteger=mi.toSafeInteger,me.toString=mi.toString,me.toUpper=Kr.toUpper,me.trim=Kr.trim,me.trimEnd=Kr.trimEnd,me.trimStart=Kr.trimStart,me.truncate=Kr.truncate,me.unescape=Kr.unescape,me.uniqueId=so.uniqueId,me.upperCase=Kr.upperCase,me.upperFirst=Kr.upperFirst,me.each=vo.forEach,me.eachRight=vo.forEachRight,me.first=Gn.head,wO(me,(xO={},th(me,function(t,n){Qre.call(me.prototype,n)||(xO[n]=t)}),xO),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Kr.templateSettings).imports._=me,Jc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Jc(["drop","take"],function(t,n){Tr.prototype[t]=function(e){e=void 0===e?1:OUe(Ui(e),0);var i=this.__filtered__&&!n?new Tr(this):this.clone();return i.__filtered__?i.__takeCount__=eoe(e,i.__takeCount__):i.__views__.push({size:eoe(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Tr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Jc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Tr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Li(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Jc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Tr.prototype[t]=function(){return this[e](1).value()[0]}}),Jc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Tr.prototype[t]=function(){return this.__filtered__?new Tr(this):this[e](1)}}),Tr.prototype.compact=function(){return this.filter(cl)},Tr.prototype.find=function(t){return this.filter(t).head()},Tr.prototype.findLast=function(t){return this.reverse().find(t)},Tr.prototype.invokeMap=dr(function(t,n){return"function"==typeof t?new Tr(this):this.map(function(e){return Ob(e,t,n)})}),Tr.prototype.reject=function(t){return this.filter(Yv(Li(t)))},Tr.prototype.slice=function(t,n){t=Ui(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Tr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Ui(n))<0?e.dropRight(-n):e.take(n-t)),e)},Tr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tr.prototype.toArray=function(){return this.take(4294967295)},th(Tr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Tr,c=a[0],u=l||Pi(s),d=function(v){var y=r.apply(me,Yf([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Tr(this);var g=t.apply(s,a);return g.__actions__.push({func:Kv,args:[d],thisArg:void 0}),new Yc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Jc(["pop","push","shift","sort","splice","unshift"],function(t){var n=FUe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Pi(o)?o:[],r)}return this[e](function(s){return n.apply(Pi(s)?s:[],r)})}}),th(Tr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";Qre.call(Ov,i)||(Ov[i]=[]),Ov[i].push({name:n,func:e})}}),Ov[K2(void 0,2).name]=[{name:"wrapper",func:void 0}],Tr.prototype.clone=function(){var t=new Tr(this.__wrapped__);return t.__actions__=Jl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Jl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Jl(this.__views__),t},Tr.prototype.reverse=function(){if(this.__filtered__){var t=new Tr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Tr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Pi(t),i=n<0,r=e?t.length:0,o=function(S,M,$){for(var G=-1,R=$.length;++G1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Io(l)||n&&c.length>0)&&(e[ln(c)]=!0),Io(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function noe(t){return Ze({},t)}function ioe(t){return Object.values(t)}function roe(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(si(o))),r}function kO(t,n){try{return n.parse(t)}catch{return n.parse(Yd(t))}}function ooe(t,n){try{return kO(t,n)}catch{return}}function Ik(t,n){t=t.replace(aoe,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function soe(t){t=t.replace(aoe,"");try{return Yd(t)}catch{}try{var n=Yd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var aoe=/,\s*$/;function Nk(t,n){var e=uoe.exec(n);if(e){var i=Ws(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Qv(t)?t:{text:e.stringify(t.json,null,n)}}function loe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return DO(t)?t:{json:n.parse(t.text)}}function Fk(t,n,e){return Zv(t,n,e).text}function coe(t,n){return function RUe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Qv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Io(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var uoe=/(position|char) (\d+)/,$Ue=/line (\d+)/,BUe=/column (\d+)/;function hoe(t){return VUe.test(t)&&t.length>2}var VUe=/^[[{]\S/;function TO(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?HUe:zUe:e?UUe:GUe}var HUe={escapeValue:function(t){return foe(goe(String(t)))},unescapeValue:function(t){return voe(poe(t))}},zUe={escapeValue:function(t){return goe(String(t))},unescapeValue:function(t){return voe(t)}},UUe={escapeValue:function(t){return foe(String(t))},unescapeValue:function(t){return poe(t)}},GUe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function foe(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function poe(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return moe[e]||e}catch{return n}})}var moe={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},WUe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function goe(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return moe[n]||n})}function voe(t){return t.replace(/\\["bfnrt\\]/g,function(n){return WUe[n]||n})}function jm(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function yoe(t,n){return Pb(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function Pm(t,n,e){return Pb(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function Pb(t,n){return!!EO(t,n)}function EO(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function boe(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function Ok(t,n,e){var i=e0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,boe(r))}}function e0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function jk(t){var e=e0(t)?.document.activeElement;return!!e&&Pb(e,function(i){return i===t})}function _oe(t,n){return EO(t,function(e){return e.nodeName===n})}function AO(t){return Pm(t,"data-type","selectable-key")?ro.key:Pm(t,"data-type","selectable-value")?ro.value:Pm(t,"data-type","insert-selection-area-inside")?ro.inside:Pm(t,"data-type","insert-selection-area-after")?ro.after:ro.multi}function t0(t){return encodeURIComponent(ln(t))}function xoe(t){var e=EO(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Xu(decodeURIComponent(e)):null}function tp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in XUe||e.push(i),e.join(n)}var XUe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},MO=yN.window;function YUe(t){pi(t,"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 woe(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,G="left"===v||_+u>window.innerWidth&&_>u;return{left:G?y.right-g:_+g,top:$?C-p:y.bottom+p,positionAbove:$,positionLeft:G}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,z=n.top,U=n.width,q=void 0===U?0:U,re=n.height,L=void 0===re?0:re;return{left:R,top:z,positionAbove:z+L>window.innerHeight&&z>L,positionLeft:R+q>window.innerWidth&&R>q}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function QUe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!Pb(l.target,function(c){return c===i})&&s(o.id)}return Wc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===tp(l)&&s(o.id)},function(l){a(l)},s,function(l){Vi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Vi[l?"unshift":"push"](function(){e(1,i=l)})}]}var ZUe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QUe,JUe,ys,{popup:0,closeAbsolutePopup:6},YUe),r}return Se(e)}();function koe(t,n,e){var i=t.slice();return i[6]=n[e],i}function Soe(t){var n,e;return n=new ZUe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eGe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(iGe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var iGe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function Lb(t){return{value:t,label:Hi(t)?"(whole item)":tu(Kl(t))}}function rh(t){return t.map(function(n){return NO.test(n)?"?.[".concat(n,"]"):IO.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var IO=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,NO=/^\d+$/;function Rb(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function oh(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var rGe={id:"javascript",name:"JavaScript",description:"\n

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

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(rh(e.path)),a=function FO(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function HQ(t){return k9e.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(rh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(rh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\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')()(t);return void 0!==e?e:null}},oGe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 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.5H93c-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.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 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.5H210.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.7zM176 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-80V416H256v16c0 44.2-35.8 80-80 80z"]},$b={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},Bb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},sGe={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 aGe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var OGe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,FGe,NGe,Ei,{path:4,value:0,readOnly:1,onPatch:5,focus:6},IGe),r}return Se(e)}();function Poe(t){for(var n=pO(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=Rk(n,u);jO(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(Io(l)&&i(o)){r[ln(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Ze(Ze({},n),{},{expandedMap:r})}function Loe(t,n){var e=n0(t.expandedMap,n),i=n0(t.enforceStringMap,n),r=n0(t.visibleSectionsMap,n);return Ze(Ze({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Roe(t,n,e){if(e){var i=Ze({},t.enforceStringMap);return i[n]=e,Ze(Ze({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ze({},t.enforceStringMap);return delete r[n],Ze(Ze({},t),{},{enforceStringMap:r})}return t}function $oe(t,n,e){var i=Yu(t,e),r=e.reduce(function(o,s){return SQ(s)?Boe(i,o,s):DQ(s)?Voe(i,o,s):kN(s)?(u=(c=s).path,d=BO(a=i,(l=o).expandedMap),h=BO(a,l.enforceStringMap),f=BO(a,l.visibleSectionsMap),Mo(c.value)||oo(c.value)||delete d[u],oo(c.value)||delete f[u],(Mo(c.value)||oo(c.value))&&delete h[u],Ze(Ze({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):SN(s)||Mv(s)?function(a,l,c){if(Mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=$O(LO(l.expandedMap,c.from),u),h=$O(LO(l.enforceStringMap,c.from),u),f=$O(LO(l.visibleSectionsMap,c.from),u),p=l;Mv(c)&&(p=Voe(a,p,{op:"remove",path:c.from}));var m=RO((p=Boe(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=RO(p.enforceStringMap,h),v=RO(p.visibleSectionsMap,f);return Ze(Ze({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Boe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r);if(oo(Sn(t,r))){var s=Ws(Ln(i)),a=r0(n.expandedMap,r,s,1),l=r0(n.enforceStringMap,r,s,1),c=r0(n.visibleSectionsMap,r,s,1);return c=Hoe(c,o,function(u){return zoe(u,s,1)}),Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Voe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=n0(a,i),l=n0(l,i),c=n0(c,i),oo(s)){var u=Ws(Ln(i));a=r0(a,r,u,-1),l=r0(l,r,u,-1),c=Hoe(c=r0(c,r,u,-1),o,function(d){return zoe(d,u,-1)})}return Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function n0(t,n){var e={},i=ln(n);return Object.keys(t).forEach(function(r){Iv(r,i)||(e[r]=t[r])}),e}function LO(t,n){var e={};return Object.keys(t).forEach(function(i){Iv(i,n)&&(e[i]=t[i])}),e}function RO(t,n){return Ze(Ze({},t),n)}function $O(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function r0(t,n,e,i){for(var r=n.length,o=ln(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:ln(u),value:t[c]}))}}if(0===s.length)return t;var h=Ze({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function BO(t,n){var e={};return Object.keys(n).filter(function(i){return Xc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function Hoe(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!or(i,r)){var o=Ze({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function zoe(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function lf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof Nv(o,i)}function Vb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function VO(t,n){var e=[];return function i(r,o){e.push(o);var s=ln(o);if(r&&!0===n.expandedMap[s]){if(oo(r)){var a=Rk(n,s);jO(r,a,function(l){i(r[l],o.concat(String(l)))})}Mo(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function Uoe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=ln(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),oo(o)){var l=Rk(n,a);jO(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Mo(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function HO(t,n,e){var i=VO(t,n),r=i.map(ln).indexOf(ln(e));return-1!==r&&r0;){if(!0===t.pointersMap[ln(i)])return!0;i.pop()}return xs(t)?e===ro.key&&or(t.focusPath,n):!(!Yi(t)||!(e===ro.value&&or(t.focusPath,n)||l0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===ro.key||e===ro.value||e===ro.multi)))}function qoe(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Nr(r)?r.focusPath:sa(r.paths),s=function LGe(t,n,e){var i=VO(t,n),r=i.map(ln),o=ln(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Xs(r)?Os(t,r.anchorPath,r.anchorPath):Os(t,r.anchorPath,l);if(xs(r)){var u=Sn(t,Xi(s));return Array.isArray(u)||Hi(s)?mr(s,!1):iu(s,!1)}return Yi(r)?mr(s,!1):Zu(r)||Xs(r)?Os(t,o,o):Os(t,a,l)}function Xoe(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=Uoe(t,n,e),o=r.findIndex(function(s){return or(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,Xi(r)))?mr(r,!1):iu(r,!1)}function a0(t,n){if(1===n.length){var e=sa(n);if("replace"===e.op||"move"===e.op)return mr(Ju(t,e.path),!1)}if(!Hi(n)&&n.every(function(s){return"move"===s.op})){var i=sa(n),r=n.slice(1);if((SN(i)||Mv(i))&&i.from!==i.path&&r.every(function(s){return(SN(s)||Mv(s))&&s.from===s.path}))return iu(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Hi(o))return{type:ro.multi,paths:o,anchorPath:sa(o),focusPath:Ln(o),pointersMap:Yoe(o)}}function Yoe(t){var n={};return t.forEach(function(e){n[ln(e)]=!0}),n}function Bk(t){return ql({},ln(t),!0)}function zb(t){return void 0!==t&&(xs(t)||Yi(t)||Nr(t)&&1===t.paths.length)}function Joe(t,n){return zb(n)&&Ho(Sn(t,n.focusPath))?n.focusPath:Xi(n.focusPath)}function l0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function WGe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function ase(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Mo(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else lse(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function lse(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function WO(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function cse(t,n,e){var i=t;return Nb(e,function(r){i=WO(i,n,r.start,r.end)}),i}function qGe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=Xi(s),u=Sn(t,c),d=Ln(s),h=Gb(c,Object.keys(u),d,WO(d,e,a,l));return{newSelection:a0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(ln(s)));var p="string"==typeof f?f:String(f),m=ln(s),g=lf(f,n.enforceStringMap,m,r),v=WO(p,e,a,l),y=[{op:"replace",path:ln(s),value:g?v:Nv(v,r)}];return{newSelection:a0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function XGe(t,n,e,i,r){for(var o=ase(e,t,1/0),s=[],a=0;an.floating[o]&&(s=Xk(s)),{main:s,cross:Xk(s)}}var OWe={start:"end",end:"start"};function e4(t){return t.replace(/start|end/g,function(n){return OWe[n]})}var jWe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,he,E,N,F,Y,V,oe;return vn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,_=void 0===(y=u.fallbackAxisSideDirection)?"none":y,S=void 0===(C=u.flipAlignment)||C,M=XK(u,p7e),$=Bm(r),G=Bm(a)===a,fe.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=fe.sent,z=m||(G||!S?[Xk(a)]:(void 0,xe=Xk(Ne=a),[e4(Ne),xe,e4(xe)])),m||"none"===_||z.push.apply(z,si(function(Ne,xe,tt,ze){var ot=Wk(Ne),B=function(ne,ie,Ie){var Ye=["left","right"],Le=["right","left"];switch(ne){case"top":case"bottom":return Ie?ie?Le:Ye:ie?Ye:Le;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(Bm(Ne),"start"===tt,ze);return ot&&(B=B.map(function(ne){return ne+"-"+ot}),xe&&(B=B.concat(B.map(e4)))),B}(a,S,_,R))),U=[a].concat(si(z)),fe.next=29,Sse(n,M);case 29:if(q=fe.sent,re=[],L=(null==(i=o.flip)?void 0:i.overflows)||[],h&&re.push(q[$]),p&&(X=FWe(r,s,R),re.push(q[X.main],q[X.cross])),L=[].concat(si(L),[{placement:r,overflows:re}]),re.every(function(Ne){return Ne<=0})){fe.next=48;break}if(N=((null==(he=o.flip)?void 0:he.index)||0)+1,!(F=U[N])){fe.next=37;break}return fe.abrupt("return",{data:{index:N,overflows:L},reset:{placement:F}});case 37:if(Y=null==(E=L.filter(function(Ne){return Ne.overflows[0]<=0}).sort(function(Ne,xe){return Ne.overflows[1]-xe.overflows[1]})[0])?void 0:E.placement,Y){fe.next=46;break}fe.t0=v,fe.next="bestFit"===fe.t0?42:"initialPlacement"===fe.t0?45:46;break;case 42:return oe=null==(V=L.map(function(Ne){return[Ne.placement,Ne.overflows.filter(function(xe){return xe>0}).reduce(function(xe,tt){return xe+tt},0)]}).sort(function(Ne,xe){return Ne[1]-xe[1]})[0])?void 0:V[0],oe&&(Y=oe),fe.abrupt("break",46);case 45:Y=a;case 46:if(r===Y){fe.next=48;break}return fe.abrupt("return",{reset:{placement:Y}});case 48:return fe.abrupt("return",{});case 49:case"end":return fe.stop()}var Ne,xe},e)}))()}}},PWe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o;return vn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Zi(vn().mark(function l(c,u){var d,h,f,p,m,g,v,y,_,C,S,M,$,G;return vn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=Bm(d),g=Wk(d),v="x"===qk(d),y=["left","top"].includes(m)?-1:1,_=p&&v?-1:1,C="function"==typeof u?u(c):u,S="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ze({mainAxis:0,crossAxis:0,alignmentAxis:null},C),M=S.mainAxis,$=S.crossAxis,G=S.alignmentAxis,R.abrupt("return",(g&&"number"==typeof G&&($="end"===g?-1*G:G),v?{x:$*_,y:M*y}:{x:M*y,y:$*_}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function LWe(t){return"x"===t?"y":"x"}var RWe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,$;return vn().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=XK(a,m7e),m={x:r,y:o},G.next=14,Sse(n,p);case 14:return g=G.sent,v=qk(Bm(s)),y=LWe(v),_=m[v],C=m[y],c&&(_=Dse(_+g["y"===v?"top":"left"],_,_-g["y"===v?"bottom":"right"])),d&&(C=Dse(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),$=f.fn(Ze(Ze({},n),{},(ql(i={},v,_),ql(i,y,C),i))),G.abrupt("return",Ze(Ze({},$),{},{data:{x:$.x-r,y:$.y-o}}));case 22:case"end":return G.stop()}},e)}))()}}};function kc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function lh(t){return kc(t).getComputedStyle(t)}var t4,Tse=Math.min,qb=Math.max,Yk=Math.round;function Ese(t){var n=lh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Yk(e)!==r||Yk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function ap(t){return Mse(t)?(t.nodeName||"").toLowerCase():""}function Ase(){if(t4)return t4;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t4=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ch(t){return t instanceof kc(t).HTMLElement}function td(t){return t instanceof kc(t).Element}function Mse(t){return t instanceof kc(t).Node}function Ise(t){return typeof ShadowRoot<"u"&&(t instanceof kc(t).ShadowRoot||t instanceof ShadowRoot)}function Jk(t){var n=lh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function $We(t){return["table","td","th"].includes(ap(t))}function n4(t){var n=/firefox/i.test(Ase()),e=lh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function i4(){return/^((?!chrome|android).)*safari/i.test(Ase())}function r4(t){return["html","body","#document"].includes(ap(t))}function Nse(t){return td(t)?t:t.contextElement}var Fse={x:1,y:1};function m0(t){var n=Nse(t);if(!ch(n))return Fse;var e=n.getBoundingClientRect(),i=Ese(n),r=i.width,o=i.height,s=i.fallback,a=(s?Yk(e.width):e.width)/r,l=(s?Yk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function Vm(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=Nse(t),l=Fse;n&&(i?td(i)&&(l=m0(i)):l=m0(t));var c=a?kc(a):window,u=i4()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=kc(a),g=i&&td(i)?kc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=m0(v),_=v.getBoundingClientRect(),C=getComputedStyle(v);_.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,_.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=_.x,h+=_.y,v=kc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function lp(t){return((Mse(t)?t.ownerDocument:t.document)||window.document).documentElement}function Kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ose(t){return Vm(lp(t)).left+Kk(t).scrollLeft}function Xb(t){if("html"===ap(t))return t;var n=t.assignedSlot||t.parentNode||Ise(t)&&t.host||lp(t);return Ise(n)?n.host:n}function jse(t){var n=Xb(t);return r4(n)?n.ownerDocument.body:ch(n)&&Jk(n)?n:jse(n)}function Yb(t,n){var e;void 0===n&&(n=[]);var i=jse(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=kc(i);return r?n.concat(o,o.visualViewport||[],Jk(i)?i:[]):n.concat(i,Yb(i))}function Pse(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=kc(l),d=lp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=i4();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=lp(t),c=lp(l),u=Kk(l),h=qb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=qb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Ose(l),m=-u.scrollTop,"rtl"===lh(d).direction&&(p+=qb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=Vm(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ch(l)?m0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ze({},n);if(i4()){var o,s,a=kc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return QO(i)}function Lse(t,n){return ch(t)&&"fixed"!==lh(t).position?n?n(t):t.offsetParent:null}function Rse(t,n){for(var e=kc(t),i=Lse(t,n);i&&$We(i)&&"static"===lh(i).position;)i=Lse(i,n);return i&&("html"===ap(i)||"body"===ap(i)&&"static"===lh(i).position&&!n4(i))?e:i||function(r){for(var o=Xb(r);ch(o)&&!r4(o);){if(n4(o))return o;o=Xb(o)}return null}(t)||e}function BWe(t,n,e){var i=ch(n),r=lp(n),o=Vm(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==ap(n)||Jk(r))&&(s=Kk(n)),ch(n)){var l=Vm(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Ose(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var VWe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=Yb(c).filter(function(y){return td(y)&&"body"!==ap(y)}),f=null,p="fixed"===lh(c).position,m=p?Xb(c):c;td(m)&&!r4(m);){var g=lh(m),v=n4(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=Xb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(si(o),[i]),l=s.reduce(function(c,u){var d=Pse(n,u,r);return c.top=qb(d.top,c.top),c.right=Tse(d.right,c.right),c.bottom=Tse(d.bottom,c.bottom),c.left=qb(d.left,c.left),c},Pse(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ch(e),o=lp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==ap(e)||Jk(o))&&(s=Kk(e)),ch(e))){var c=Vm(e);a=m0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return ch(t)?Ese(t):t.getBoundingClientRect()},getOffsetParent:Rse,getDocumentElement:lp,getScale:m0,getElementRects:function(t){var n=this;return Zi(vn().mark(function e(){var i,r,o,s,a;return vn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Rse,a=n.getDimensions,l.t0=BWe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ze,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===lh(t).direction}};function UWe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==bn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function GWe(t){return o4.apply(this,arguments)}function o4(){return o4=Zi(vn().mark(function t(n){var e,i,r,o,s;return vn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==bn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),o4.apply(this,arguments)}function WWe(t){pi(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function qWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","0 0 20 20"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var XWe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,qWe,ys,{},WWe),r}return Se(e)}();function YWe(t){pi(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function JWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","-2 -2 50 50"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"role","presentation"),P(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var Qk=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,JWe,ys,{},YWe),r}return Se(e)}();function KWe(t){pi(t,"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 QWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("circle"),"class","circle_path svelte-1p3nqvd"),P(e,"cx","50"),P(e,"cy","50"),P(e,"r","20"),P(e,"fill","none"),P(e,"stroke","currentColor"),P(e,"stroke-width","5"),P(e,"stroke-miterlimit","10"),P(n,"class","loading svelte-1p3nqvd"),P(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var ZWe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,QWe,ys,{},KWe),r}return Se(e)}();function eqe(t){pi(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var tqe=function(t){return{value:8&t[0]}},$se=function(t){return{value:t[3]}},nqe=function(t){return{listOpen:64&t[0]}},Bse=function(t){return{listOpen:t[6]}},iqe=function(t){return{}},Vse=function(t){return{}},rqe=function(t){return{}},Hse=function(t){return{}},oqe=function(t){return{selection:8&t[0]}},zse=function(t){return{selection:t[3]}};function Use(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var sqe=function(t){return{}},Gse=function(t){return{}},aqe=function(t){return{selection:8&t[0]}},Wse=function(t){return{selection:t[127],index:t[129]}},lqe=function(t){return{}},qse=function(t){return{}},cqe=function(t){return{}},Xse=function(t){return{}};function Yse(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var uqe=function(t){return{item:16777216&t[0]}},Jse=function(t){return{item:t[127],index:t[129]}},dqe=function(t){return{filteredItems:16777216&t[0]}},Kse=function(t){return{filteredItems:t[24]}};function Qse(t){var n,e,i,r,o,s,a=[pqe,fqe,hqe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=be("div"),i&&i.c(),P(n,"class","svelte-select-list svelte-tyxmms"),Mt(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[_a(t[49].call(null,n)),Ft(n,"scroll",t[41]),Ft(n,"pointerdown",Jh(t[50])),Ft(n,"pointerup",Kh(Jh(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&($t(),ce(l[h],1,1,function(){l[h]=null}),Bt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),Q(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Mt(n,"prefloat",u[28])},i:function(u){r||(Q(i),r=!0)},o:function(u){ce(i),r=!1},d:function(u){u&&je(n),~e&&l[e].d(),t[91](null),o=!1,ho(s)}}}function hqe(t){var n,e,i=t[83].empty,r=Ms(i,t,t[82],Xse),o=r||{c:function(){(e=be("div")).textContent="No options",P(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:Lt,d:function(s){s&&je(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Ns(r,i,s,s[82],n?Is(i,s[82],a,cqe):Fs(s[82]),Xse)},i:function(s){n||(Q(o,s),n=!0)},o:function(s){ce(o,s),n=!1},d:function(s){o&&o.d(s)}}}function fqe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Qe,Jn)}:Dn,hi=n.debounceWait,di=void 0===hi?300:hi,kr=n.hideEmptyState,Qr=void 0!==kr&&kr,gi=n.inputAttributes,yr=void 0===gi?{}:gi,Ee=n.listAutoWidth,St=void 0===Ee||Ee,Ht=n.showChevron,sn=void 0!==Ht&&Ht,hn=n.listOffset,ri=void 0===hn?5:hn,Oi=n.hoverItemIndex,Bn=void 0===Oi?0:Oi,ei=n.floatingConfig,Yn=void 0===ei?{}:ei,br=n.class,Ar=void 0===br?"":br;function Po(Qe){var Jn=[],er={};Qe.forEach(function(wd){var Br=$r(wd);Jn.includes(Br)||(Jn.push(Br),er[Br]=[],Br&&er[Br].push(Object.assign(Js(Br,wd),{id:Br,groupHeader:!0,selectable:Wr}))),er[Br].push(Object.assign({groupItem:!!Br},wd))});var Qs=[];return Or(Jn).forEach(function(wd){er[wd]&&Qs.push.apply(Qs,si(er[wd]))}),Qs}function ca(){var Qe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,Bn=Qe<0?0:Qe),!Jn&&$r&&c[Bn]&&!c[Bn].selectable&&wo(1)}function md(){var Qe=!0;if(B){var Jn=[],er=[];B.forEach(function(Qs){Jn.includes(Qs[Fn])?Qe=!1:(Jn.push(Qs[Fn]),er.push(Qs))}),Qe||e(3,B=er)}return Qe}function hu(Qe){var Jn=Qe?Qe[Fn]:B[Fn];return _n.find(function(er){return er[Fn]===Jn})}function ua(Qe){return Rl.apply(this,arguments)}function Rl(){return(Rl=Zi(vn().mark(function Qe(Jn){var er;return vn().wrap(function(Qs){for(;;)switch(Qs.prev=Qs.next){case 0:er=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==er})),$("clear",er);case 3:case"end":return Qs.stop()}},Qe)}))).apply(this,arguments)}function gd(Qe){var Jn;ze&&F===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Qe&&$("focus",Qe),F.focus(),e(2,ze=!0))}function Ps(Qe){return vd.apply(this,arguments)}function vd(){return(vd=Zi(vn().mark(function Qe(Jn){return vn().wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!fi&&!z_){er.next=2;break}return er.abrupt("return");case 2:(Ue||ze)&&($("blur",Jn),yd(),e(2,ze=!1),e(26,f=void 0),F.blur());case 3:case"end":return er.stop()}},Qe)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Zi(vn().mark(function Qe(){return vn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Qe)})),Tv().$$.before_update.push(y),Wc(function(){Ue&&e(2,ze=!0),ze&&F&&F.focus()});var an,eT=n.ariaValues,Ce=void 0===eT?function(Qe){return"Option ".concat(Qe,", selected.")}:eT,lt=n.ariaListOpen,It=void 0===lt?function(Qe,Jn){return"You are currently focused on option ".concat(Qe,". There are ").concat(Jn," results available.")}:lt,Jt=n.ariaFocused,nn=void 0===Jt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Jt,Vn=null;function li(){clearTimeout(an),an=setTimeout(function(){fi=!1},100)}Hu(function(){var Qe;null===(Qe=Vn)||void 0===Qe||Qe.remove()});var fi=!1;function Lo(Qe){Qe&&!1!==Qe.selectable&&function(Jn){if(Jn){e(4,ie="");var er=Object.assign({},Jn);if(er.groupHeader&&!er.selectable)return;e(3,B=V?B?B.concat([er]):[er]:e(3,B=er)),setTimeout(function(){qr&&yd(),e(26,f=void 0),$("change",B),$("select",Jn)})}}(Qe)}function Ls(Qe){fi||e(7,Bn=Qe)}function Zo(Qe){var Qs,Jn=Qe.item,er=Qe.i;if(!1!==Jn?.selectable){if(B&&!V&&B[Fn]===Jn[Fn])return yd();((Qs=Jn).groupHeader&&Qs.selectable||Qs.selectable||!Qs.hasOwnProperty("selectable"))&&(e(7,Bn=er),Lo(Jn)),z_=!1}}function wo(Qe){if(0===c.filter(function(er){return!Object.hasOwn(er,"selectable")||!0===er.selectable}).length)return e(7,Bn=0);e(7,Qe>0&&Bn===c.length-1?Bn=0:Qe<0&&0===Bn?Bn=c.length-1:Bn+=Qe);var Jn=c[Bn];Jn&&!1===Jn.selectable&&(1!==Qe&&-1!==Qe||wo(Qe))}var $l=bd,wh=bd;function bd(Qe){return{update:function(Jn){Jn.scroll&&(li(),Qe.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Mr={strategy:"absolute",placement:"bottom-start",middleware:[PWe(ri),jWe(),RWe()],autoUpdate:!1},tc=Un(function zWe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ze(Ze(Ze({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ze({platform:VWe},d),p=Ze(Ze({},f.platform),{},{_c:h}),EWe(c,u,Ze(Ze({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function HWe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(si(td(t)?Yb(t):t.contextElement?Yb(t.contextElement):[]),si(Yb(n))):[];p.forEach(function(_){f&&_.addEventListener("scroll",e,{passive:!0}),l&&_.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?Vm(t):null;return h&&function _(){var C=Vm(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(_)}(),e(),function(){var _;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(_=g)||_.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Mr),3),fu=tc[0],_d=tc[1],Ch=tc[2],xd=!0,z_=!1;return t.$$set=function(Qe){"justValue"in Qe&&e(53,R=Qe.justValue),"filter"in Qe&&e(54,U=Qe.filter),"getItems"in Qe&&e(55,re=Qe.getItems),"id"in Qe&&e(56,X=Qe.id),"name"in Qe&&e(8,H=Qe.name),"container"in Qe&&e(0,E=Qe.container),"input"in Qe&&e(1,F=Qe.input),"multiple"in Qe&&e(9,V=Qe.multiple),"multiFullItemClearable"in Qe&&e(10,fe=Qe.multiFullItemClearable),"disabled"in Qe&&e(11,xe=Qe.disabled),"focused"in Qe&&e(2,ze=Qe.focused),"value"in Qe&&e(3,B=Qe.value),"filterText"in Qe&&e(4,ie=Qe.filterText),"placeholder"in Qe&&e(57,Ye=Qe.placeholder),"placeholderAlwaysShow"in Qe&&e(58,_t=Qe.placeholderAlwaysShow),"items"in Qe&&e(52,_n=Qe.items),"label"in Qe&&e(12,on=Qe.label),"itemFilter"in Qe&&e(59,pn=Qe.itemFilter),"groupBy"in Qe&&e(60,$r=Qe.groupBy),"groupFilter"in Qe&&e(61,Or=Qe.groupFilter),"groupHeaderSelectable"in Qe&&e(62,Wr=Qe.groupHeaderSelectable),"itemId"in Qe&&e(13,Fn=Qe.itemId),"loadOptions"in Qe&&e(63,ui=Qe.loadOptions),"containerStyles"in Qe&&e(14,Cr=Qe.containerStyles),"hasError"in Qe&&e(15,Qo=Qe.hasError),"filterSelectedItems"in Qe&&e(64,On=Qe.filterSelectedItems),"required"in Qe&&e(16,bi=Qe.required),"closeListOnChange"in Qe&&e(65,qr=Qe.closeListOnChange),"createGroupHeaderItem"in Qe&&e(66,Js=Qe.createGroupHeaderItem),"searchable"in Qe&&e(17,Ks=Qe.searchable),"inputStyles"in Qe&&e(18,Xa=Qe.inputStyles),"clearable"in Qe&&e(68,we=Qe.clearable),"loading"in Qe&&e(5,qe=Qe.loading),"listOpen"in Qe&&e(6,Ue=Qe.listOpen),"debounce"in Qe&&e(69,ii=Qe.debounce),"debounceWait"in Qe&&e(70,di=Qe.debounceWait),"hideEmptyState"in Qe&&e(19,Qr=Qe.hideEmptyState),"inputAttributes"in Qe&&e(71,yr=Qe.inputAttributes),"listAutoWidth"in Qe&&e(72,St=Qe.listAutoWidth),"showChevron"in Qe&&e(20,sn=Qe.showChevron),"listOffset"in Qe&&e(73,ri=Qe.listOffset),"hoverItemIndex"in Qe&&e(7,Bn=Qe.hoverItemIndex),"floatingConfig"in Qe&&e(74,Yn=Qe.floatingConfig),"class"in Qe&&e(21,Ar=Qe.class),"ariaValues"in Qe&&e(75,Ce=Qe.ariaValues),"ariaListOpen"in Qe&&e(76,It=Qe.ariaListOpen),"ariaFocused"in Qe&&e(77,nn=Qe.ariaFocused),"$$scope"in Qe&&e(82,S=Qe.$$scope)},t.$$.update=function(){var Qe,Jn,er,Qs,wd,Br;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var Br,Zs=(_n||[]).find(function(pu){return pu[Fn]===B});e(3,B=Zs||(ql(Br={},Fn,B),ql(Br,"label",B),Br))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(pu){return"string"==typeof pu?{value:pu,label:pu}:pu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!yr&&Ks||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},yr)),X&&e(27,v.id=X,v),Ks||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=si(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&$("input",B):p&&JSON.stringify(B[Fn])===JSON.stringify(p[Fn])||$("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&$("input",B),6&t.$$.dirty[0]&&!ze&&F&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ui||0!==ie.length)&&(ui?ii(Zi(vn().mark(function Br(){var Zs;return vn().wrap(function(pu){for(;;)switch(pu.prev=pu.next){case 0:return e(5,qe=!0),pu.next=3,re({dispatch:$,loadOptions:ui,convertStringItemsToObjects:lae,filterText:ie});case 3:(Zs=pu.sent)?(e(5,qe=Zs.loading),e(6,Ue=Ue?Zs.listOpen:ie.length>0),e(2,ze=Ue&&Zs.focused),e(52,_n=$r?Po(Zs.filteredItems):Zs.filteredItems)):(e(5,qe=!1),e(2,ze=!0),e(6,Ue=!0));case 5:case"end":return pu.stop()}},Br)})),di):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=U({loadOptions:ui,filterText:ie,items:_n,multiple:V,value:B,itemId:Fn,groupBy:$r,label:on,filterSelectedItems:On,itemFilter:pn,convertStringItemsToObjects:lae,filterGroupedItems:Po})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Qe=c.findIndex(function(Br){return Br[Fn]===B[Fn]}),ca(Qe,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,Bn=0),16&t.$$.dirty[0]&&ie&&e(7,Bn=0),128&t.$$.dirty[0]&&$("hoverItem",Bn),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&we&&!xe&&!qe),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=_t&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(er=V&&B.length>0?B.map(function(Br){return Br[on]}).join(", "):B[on],Ce(er)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Br=c[Bn];return Ue&&Br?It(Br[on],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(Br=_n)&&0!==Br.length&&!Br.some(function(Zs){return"object"!==bn(Zs)})&&B&&(V?!B.some(function(Zs){return!Zs||!Zs[Fn]}):B[Fn])&&(Array.isArray(B)?e(3,B=B.map(function(Zs){return hu(Zs)||Zs})):e(3,B=hu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(Br){return Br[Fn]}):null:B&&B[Fn]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||$("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&ca(),16777216&t.$$.dirty[0]&&function(Br){Ue&&$("filter",Br)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Qs=Yn)||void 0===Qs?void 0:Qs.autoUpdate)&&e(81,Mr.autoUpdate=!0,Mr),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Yn&&Ch(Object.assign(Mr,Yn)),8388608&t.$$.dirty[0]&&e(30,u=!!Vn),8388672&t.$$.dirty[0]&&function(Br,Zs){if(!Br||!Zs)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Vn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Vn&&(wd=E.getBoundingClientRect().width,e(23,Vn.style.width=St?wd+"px":"auto",Vn)),128&t.$$.dirty[0]&&e(29,d=Bn),70&t.$$.dirty[0]&&F&&Ue&&!ze&&gd()},[E,F,ze,B,ie,qe,Ue,Bn,H,V,fe,xe,on,Fn,Cr,Qo,bi,Ks,Xa,Qr,sn,Ar,function(){$("clear",B),e(3,B=void 0),yd(),gd()},Vn,c,i,f,v,xd,d,u,l,a,s,o,r,ua,function(Qe){if(ze)switch(Qe.stopPropagation(),Qe.key){case"Escape":Qe.preventDefault(),yd();break;case"Enter":if(Qe.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[Fn]===c[Bn][Fn]){yd();break}Lo(c[Bn])}break;case"ArrowDown":Qe.preventDefault(),Ue?wo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Qe.preventDefault(),Ue?wo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&ze){if(0===c.length||B&&B[Fn]===c[Bn][Fn])return yd();Qe.preventDefault(),Lo(c[Bn]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(ua(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(X){return{value:X,label:X}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],z=null!==(i=M)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?Lb(M.filter.path):null,U=null!==(o=M)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?G.find(function(X){var Z;return X.value===(null===(Z=M.filter)||void 0===Z?void 0:Z.relation)}):null,q=(null===(a=M)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",re=null!==(c=M)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?Lb(M.sort.path):null,L=null!==(d=M)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(X){var Z;return X.value===(null===(Z=M.sort)||void 0===Z?void 0:Z.direction)}):null;return t.$$set=function(X){"json"in X&&e(11,C=X.json),"queryOptions"in X&&e(10,M=X.queryOptions),"onChange"in X&&e(12,$=X.onChange)},t.$$.update=function(){var X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne,ie,Ie,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?CO(C):[]),34816&t.$$.dirty&&e(13,m=f?CO(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(Lb)),8192&t.$$.dirty&&e(6,v=m?m.map(Lb):[]),1088&t.$$.dirty&&e(5,y=null!==(X=M)&&void 0!==X&&null!==(Z=X.projection)&&void 0!==Z&&Z.paths&&v?M.projection.paths.map(function(ie){return v.find(function(Ie){return or(Ie.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(he=(null===(H=z)||void 0===H?void 0:H.value)||null,or(null===(E=M)||void 0===E||null===(N=E.filter)||void 0===N?void 0:N.path,he)||(_("changeFilterPath",he),e(10,M=qu(M,["filter","path"],he,!0)),$(M))),2&t.$$.dirty&&(Y=(null===(F=U)||void 0===F?void 0:F.value)||null,or(null===(V=M)||void 0===V||null===(oe=V.filter)||void 0===oe?void 0:oe.relation,Y)||(_("changeFilterRelation",Y),e(10,M=qu(M,["filter","relation"],Y,!0)),$(M))),4&t.$$.dirty&&(or(null===(Ne=M)||void 0===Ne||null===(xe=Ne.filter)||void 0===xe?void 0:xe.value,fe=q||null)||(_("changeFilterValue",fe),e(10,M=qu(M,["filter","value"],fe,!0)),$(M))),8&t.$$.dirty&&(ie=(null===(tt=re)||void 0===tt?void 0:tt.value)||null,or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.sort)||void 0===Ye?void 0:Ye.path,ie)||(_("changeSortPath",ie),e(10,M=qu(M,["sort","path"],ie,!0)),$(M))),16&t.$$.dirty&&(ot=(null===(ze=L)||void 0===ze?void 0:ze.value)||null,or(null===(B=M)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,ot)||(_("changeSortDirection",ot),e(10,M=qu(M,["sort","direction"],ot,!0)),$(M))),32&t.$$.dirty&&function(ie){var Ie,Ye;or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.projection)||void 0===Ye?void 0:Ye.paths,ie)||(_("changeProjectionPaths",ie),e(10,M=qu(M,["projection","paths"],ie,!0)),$(M))}(y?y.map(function(ie){return ie.value}):null)},[z,U,q,re,L,y,v,g,G,R,M,C,$,m,p,f,function(X){e(0,z=X)},function(X){e(1,U=X)},function(){e(2,q=this.value)},function(X){e(3,re=X)},function(X){e(4,L=X)},function(X){e(5,y=X),e(10,M),e(6,v),e(13,m),e(15,f),e(11,C)}]}var wqe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,xqe,_qe,Ei,{json:11,queryOptions:10,onChange:12},bqe),r}return Se(e)}();function Cqe(t){pi(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function cae(t,n,e){var i=t.slice();return i[5]=n[e],i}function kqe(t){var n,e;return n=new sr({props:{data:Bb}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Sqe(t){var n,e;return n=new sr({props:{data:$b}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function uae(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[Sqe,kqe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=be("button"),i.c(),r=it(),o=tn(d),s=it(),P(n,"type","button"),P(n,"class","jse-query-language svelte-19cxesy"),P(n,"title",a="Select ".concat(t[5].name," as query language")),Mt(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),de(n,r),de(n,o),de(n,s),l=!0,c||(u=Ft(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):($t(),ce(f[y],1,1,function(){f[y]=null}),Bt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),Q(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&P(n,"title",a),(!l||3&v)&&Mt(n,"selected",t[5].id===t[0])},i:function(g){l||(Q(i),l=!0)},o:function(g){ce(i),l=!1},d:function(g){g&&je(n),f[e].d(),c=!1,u()}}}function Dqe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&dae(t);return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),(e=be("div")).textContent="Transform",i=it(),u&&u.c(),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),de(n,e),de(n,i),u&&u.m(n,null),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Ft(o,"click",t[2]),l=!0)},p:function(d,h){var f=Un(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&Q(u,1)):((u=dae(d)).c(),Q(u,1),u.m(n,r)):u&&($t(),ce(u,1,1,function(){u=null}),Bt())},i:function(d){a||(Q(u),Q(s.$$.fragment,d),a=!0)},o:function(d){ce(u),ce(s.$$.fragment,d),a=!1},d:function(d){d&&je(n),u&&u.d(),pt(s),l=!1,c()}}}function Iqe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xa("simple-modal").close,c=xa("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Eqe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Vi[h?"unshift":"push"](function(){e(1,i=h)})}]}var Nqe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Iqe,Mqe,Ei,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Aqe),r}return Se(e)}(),s4=wa("jsoneditor:AutoScrollHandler"),Fqe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},hae=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Fqe,s=y.a11y||!1,bn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),bn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,bn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Zk=wa("jsoneditor:History");function fae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Zk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Zk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Zk("undo",h),a(),h}},redo:function d(){if(o())return Zk("redo",e[i-=1]),a(),e[i]}}}function g0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var v0=wa("validation");function pae(t,n,e,i){return v0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Oqe(t,n,e,i){if(v0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Xd.info}]};if(0===t.length)return null;try{var r=g0(function(){return e.parse(t)},function(l){return v0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:g0(function(){return i.parse(t)},function(l){return v0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=g0(function(){return n(o)},function(l){return v0("validate: validated json in ".concat(l," ms"))});return Hi(s)?null:{validationErrors:s}}catch(l){var a=g0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yd(c)),!0}catch{return!1}}(t,e)},function(c){return v0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:Nk(t,l.message||l.toString()),isRepairable:a}}}var eS=wa("jsoneditor:FocusTracker");function a4(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(eS("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){eS("blur"),l=!1,a()}))}(0,t.onMount)(function(){eS("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){eS("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function jqe(t){pi(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function mae(t,n,e){var i=t.slice();return i[8]=n[e],i}function gae(t){var n,e;return n=new sr({props:{data:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function vae(t){var n,e;return n=new sr({props:{data:t[8].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function yae(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&vae(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=be("button"),d&&d.c(),e=it(),i=tn(u),r=it(),P(n,"type","button"),P(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),P(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),de(n,e),de(n,i),de(n,r),a=!0,l||(c=[Ft(n,"click",h),Ft(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&Q(d,1)):((d=vae(t)).c(),Q(d,1),d.m(n,e)):d&&($t(),ce(d,1,1,function(){d=null}),Bt()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&P(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(Q(d),a=!0)},o:function(p){ce(d),a=!1},d:function(p){p&&je(n),d&&d.d(),l=!1,ho(c)}}}function Pqe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&gae(t),f=t[3],p=[],m=0;m100&&Cae(t);return{c:function(){n=be("table"),e=be("tbody");for(var u=0;u100?c?c.p(u,d):((c=Cae(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&xae(t);function y(){return t[6](t[7])}return{c:function(){n=be("tr"),e=be("td"),mt(i.$$.fragment),r=it(),o=be("td"),s=tn(m),a=it(),l=be("td"),c=tn(g),u=it(),d=be("td"),v&&v.c(),P(e,"class","jse-validation-error-icon svelte-1oe8e8r"),P(o,"class","svelte-1oe8e8r"),P(l,"class","svelte-1oe8e8r"),P(d,"class","jse-validation-error-action svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(_,C){Pe(_,n,C),de(n,e),ft(i,e,null),de(n,r),de(n,o),de(o,s),de(n,a),de(n,l),de(l,c),de(n,u),de(n,d),v&&v.m(d,null),h=!0,f||(p=Ft(n,"click",y),f=!0)},p:function(_,C){t=_,(!h||1&C)&&m!==(m=tu(Kl(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&Q(v,1)):((v=xae(t)).c(),Q(v,1),v.m(d,null)):v&&($t(),ce(v,1,1,function(){v=null}),Bt())},i:function(_){h||(Q(i.$$.fragment,_),Q(v),h=!0)},o:function(_){ce(i.$$.fragment,_),ce(v),h=!1},d:function(_){_&&je(n),pt(i),v&&v.d(),f=!1,p()}}}function Cae(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=be("tr"),e=be("td"),i=it(),r=be("td"),o=it(),s=be("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=it(),d=be("td"),P(e,"class","svelte-1oe8e8r"),P(r,"class","svelte-1oe8e8r"),P(s,"class","svelte-1oe8e8r"),P(d,"class","svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(n,u),de(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&je(n)}}}function Vqe(t){var n,e,i=!Hi(t[0]),r=i&&_ae(t);return{c:function(){r&&r.c(),n=_r()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=Un(s,1)[0];1&a&&(i=!Hi(o[0])),i?r?(r.p(o,a),1&a&&Q(r,1)):((r=_ae(o)).c(),Q(r,1),r.m(n.parentNode,n)):r&&($t(),ce(r,1,1,function(){r=null}),Bt())},i:function(o){e||(Q(r),e=!0)},o:function(o){ce(r),e=!1},d:function(o){r&&r.d(o),o&&je(n)}}}function Hqe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var l4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Hqe,Vqe,Ei,{validationErrors:0,selectError:1},Rqe),r}return Se(e)}(),zqe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Uqe(t){pi(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function Gqe(t){var n,e,i,r,o,s,a,l,c;return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),e=be("div"),i=tn(t[0]),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),de(n,e),de(e,i),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Ft(o,"click",t[3]),l=!0)},p:function(u,d){var h=Un(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(Q(s.$$.fragment,u),a=!0)},o:function(u){ce(s.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(s),l=!1,c()}}}function Wqe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xa("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var c4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wqe,Gqe,Ei,{title:0,onClose:1},Uqe),r}return Se(e)}();function qqe(t){pi(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function Xqe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G;return e=new c4({props:{title:"Copying and pasting"}}),{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).textContent="These actions are unavailable via the menu. Please use:",s=it(),a=be("div"),l=be("div"),(c=be("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=it(),h=be("div"),(f=be("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=it(),g=be("div"),(v=be("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),_=it(),C=be("div"),(S=be("button")).textContent="Close",P(c,"class","jse-key svelte-1olothd"),P(l,"class","jse-shortcut"),P(f,"class","jse-key svelte-1olothd"),P(h,"class","jse-shortcut"),P(v,"class","jse-key svelte-1olothd"),P(g,"class","jse-shortcut"),P(a,"class","jse-shortcuts svelte-1olothd"),P(S,"type","button"),P(S,"class","jse-primary svelte-1olothd"),P(C,"class","jse-actions svelte-1olothd"),P(r,"class","jse-modal-contents svelte-1olothd"),P(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(a,l),de(l,c),de(l,u),de(a,d),de(a,h),de(h,f),de(h,p),de(a,m),de(a,g),de(g,v),de(g,y),de(r,_),de(r,C),de(C,S),M=!0,$||(G=Ft(S,"click",t[0]),$=!0)},p:Lt,i:function(R){M||(Q(e.$$.fragment,R),M=!0)},o:function(R){ce(e.$$.fragment,R),M=!1},d:function(R){R&&je(n),pt(e),$=!1,G()}}}function Yqe(t){return[xa("simple-modal").close,zqe?"\u2318":"Ctrl"]}var kae=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Yqe,Xqe,Ei,{},qqe),r}return Se(e)}();function Sae(t){return!!t&&("space"===t.type||!0===t.space)}function tS(t){return!!t&&("separator"===t.type||!0===t.separator)}function Jb(t){return!!t&&"function"==typeof t.onClick}function u4(t){return!!t&&"dropdown-button"===t.type&&Jb(t.main)&&Array.isArray(t.items)}function Dae(t){return Io(t)&&Io(t.parseError)}function Kqe(t){pi(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var Qqe=function(t){return{}},Tae=function(t){return{}};function Eae(t,n,e){var i=t.slice();return i[3]=n[e],i}var Zqe=function(t){return{}},Aae=function(t){return{}};function eXe(t){var n,e=Fae(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Fae(i[3])+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function tXe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Mae(t),u=t[3].text&&Iae(t);return{c:function(){n=be("button"),c&&c.c(),e=it(),u&&u.c(),P(n,"type","button"),P(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),P(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),de(n,e),u&&u.m(n,null),s=!0,a||(l=Ft(n,"click",function(){ba(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&Q(c,1)):((c=Mae(t)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),t[3].text?u?u.p(t,h):((u=Iae(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&P(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&P(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(Q(c),s=!0)},o:function(d){ce(c),s=!1},d:function(d){d&&je(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function nXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function iXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Mae(t){var n,e;return n=new sr({props:{data:t[3].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Iae(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&je(n)}}}function Nae(t){var n,e,i,r,o,s,a,l=[iXe,nXe,tXe,eXe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!tS(d[3])),n?0:(null==e&&(e=!!Sae(d[3])),e?1:(null==i&&(i=!!Jb(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=_r()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(d){a||(Q(o),a=!0)},o:function(d){ce(o),a=!1},d:function(d){c[r].d(d),d&&je(s)}}}function rXe(t){for(var n,e,i,r,o=t[2].left,s=Ms(o,t,t[1],Aae),a=t[0],l=[],c=0;c0&&_.height>0}),u),c=u(e);function u(y){var _=y.getBoundingClientRect();return{x:_.left+_.width/2,y:_.top+_.height/2,rect:_,element:y}}function d(y,_){var S=y.x-_.x,M=(y.y-_.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(S*S+M*M)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(Xv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(Xv(g.filter(function(y){return o(y.element)}),h)||Xv(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Vi[a?"unshift":"push"](function(){e(2,i=a)})}]}var Jae=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,GXe,UXe,Ei,{items:0,tip:1},EXe),r}return Se(e)}();function WXe(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qXe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$=n.json,G=n.documentState,R=n.parser,z=n.showTip,U=n.onCloseContextMenu,q=n.onEditKey,re=n.onEditValue,L=n.onToggleEnforceString,X=n.onCut,Z=n.onCopy,H=n.onPaste,he=n.onRemove,E=n.onDuplicate,N=n.onExtract,F=n.onInsertBefore,Y=n.onInsert,V=n.onConvert,oe=n.onInsertAfter,fe=n.onSort,Ne=n.onTransform;function xe(){U(),q()}function tt(){U(),re()}function ze(){U(),L()}function ot(){U(),X(!0)}function B(){U(),X(!1)}function ne(){U(),Z(!0)}function ie(){U(),Z(!1)}function Ie(){U(),H()}function Ye(){U(),he()}function Le(){U(),E()}function _t(){U(),N()}function At(pn){U(),c?V(pn):Y(pn)}function _n(){U(),fe()}function ci(){U(),Ne()}function on(){U(),F()}function Ni(){U(),oe()}return t.$$set=function(pn){"json"in pn&&e(2,$=pn.json),"documentState"in pn&&e(3,G=pn.documentState),"parser"in pn&&e(4,R=pn.parser),"showTip"in pn&&e(0,z=pn.showTip),"onCloseContextMenu"in pn&&e(5,U=pn.onCloseContextMenu),"onEditKey"in pn&&e(6,q=pn.onEditKey),"onEditValue"in pn&&e(7,re=pn.onEditValue),"onToggleEnforceString"in pn&&e(8,L=pn.onToggleEnforceString),"onCut"in pn&&e(9,X=pn.onCut),"onCopy"in pn&&e(10,Z=pn.onCopy),"onPaste"in pn&&e(11,H=pn.onPaste),"onRemove"in pn&&e(12,he=pn.onRemove),"onDuplicate"in pn&&e(13,E=pn.onDuplicate),"onExtract"in pn&&e(14,N=pn.onExtract),"onInsertBefore"in pn&&e(15,F=pn.onInsertBefore),"onInsert"in pn&&e(16,Y=pn.onInsert),"onConvert"in pn&&e(17,V=pn.onConvert),"onInsertAfter"in pn&&e(18,oe=pn.onInsertAfter),"onSort"in pn&&e(19,fe=pn.onSort),"onTransform"in pn&&e(20,Ne=pn.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=G.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==$),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Hi(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn($,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Io(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Nr(i)||xs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Nr(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&zb(i)&&!s&&!Array.isArray(Sn($,Xi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&zb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!Ho(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?Lm(i)&&!Io(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,_=m?Lm(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?Lm(i)&&Ho(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,S=null!=i&&lf(a,G.enforceStringMap,ln(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,M=[{type:"row",items:[{type:"button",onClick:xe,icon:h0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:tt,icon:h0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:h0,text:l,title:"Edit the value (Double-click on the value)",onClick:tt,disabled:!f},{type:"button",icon:S?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:ze,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:ot,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:ot,disabled:!c},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Ie,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:Le,icon:wse,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:_t,icon:wWe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_n,icon:Gk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:ci,icon:Hk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return At("structure")},icon:m?Uk:f0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return At("object")},icon:m?Uk:f0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return At("array")},icon:m?Uk:f0,text:"Array",title:g+" array",disabled:!_},{type:"button",onClick:function(){return At("value")},icon:m?Uk:f0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:on,icon:_We,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Ni,icon:vWe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[z,M,$,G,R,U,q,re,L,X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,s,c,C,g,m,_,y,v,d,u,o,p,S,f,l,h,i,a,r]}var XXe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,qXe,WXe,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function YXe(t){pi(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Kae(t,n,e){var i=t.slice();return i[13]=n[e],i}function Qae(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=be("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=it(),P(n,"type","button"),P(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=Ft(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&je(n),a=!1,l()}}}function JXe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&_.end<=M.start)&&$.push(_),M.start>=(G?_.end:v.end)&&$.push(M),a=$))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var ZXe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QXe,JXe,Ei,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},YXe),r}return Se(e)}();function eYe(t){pi(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function tYe(t){var n,e,i,r,o;return e=new sr({props:{data:ru}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-context-menu-pointer svelte-1yzl4st"),P(n,"title",xN),Mt(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Ft(n,"click",t[1]),r=!0)},p:function(s,a){var l=Un(a,1)[0];(!i||1&l)&&Mt(n,"jse-selected",s[0])},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nYe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var cp=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,nYe,tYe,Ei,{selected:0,onContextMenu:2},eYe),r}return Se(e)}();function iYe(t){pi(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function rYe(t){var n,e,i,r,o,s,a,l=[aYe,sYe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=be("div"),i.c(),P(n,"data-type","selectable-key"),P(n,"class",r=Ao(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=Ft(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),Q(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Ao(d[6](d[0]))+" svelte-24a1b2"))&&P(n,"class",r)},i:function(d){o||(Q(i),o=!0)},o:function(d){ce(i),o=!1},d:function(d){d&&je(n),c[e].d(),s=!1,a()}}}function oYe(t){var n,e;return n=new tse({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function sYe(t){var n,e=jm(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=jm(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function aYe(t){var n,e;return n=new pse({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ele(t){var n,e;return n=new cp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function lYe(t){var n,e,i,r,o,s=[oYe,rYe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&ele(t);return{c:function(){e.c(),i=it(),c&&c.c(),r=_r()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=Un(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):($t(),ce(a[f],1,1,function(){a[f]=null}),Bt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),Q(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&($t(),ce(c,1,1,function(){c=null}),Bt()):c?(c.p(u,h),28&h&&Q(c,1)):((c=ele(u)).c(),Q(c,1),c.m(r.parentNode,r))},i:function(u){o||(Q(e),Q(c),o=!0)},o:function(u){ce(e),ce(c),o=!1},d:function(u){a[n].d(u),u&&je(i),c&&c.d(u),u&&je(r)}}}function cYe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&xs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&ip(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(iu(o,!0)))},function(h){return ah("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=Xi(o).concat(p);d.onSelect(f===CN?mr(m,!1):iu(m,!1)),f!==wN&&d.focus()},function(){d.onSelect(iu(o,!1)),d.focus()},o,s,l,u]}var uYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cYe,lYe,Ei,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},iYe),r}return Se(e)}();function tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function nle(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=$k(u.selection),v=f.findIndex(function(z){return or(z.path,g)}),y=0,_=v,C=function(){var z;return null===(z=f[_+1])||void 0===z?void 0:z.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),_+=1;var M=Sn(h,Xi(g)),$=Array.isArray(M),G=null===(d=f[$?_:_+1])||void 0===d?void 0:d.path,R=_-v;return G?{beforePath:G,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,_,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=Xi(d.focusPath),g=Sn(u,m);if(!(p||f&&l0(f,m)&&f.length>m.length))return[];var v=o0(d),y=$k(d),_=Ln(v),C=Ln(y),S=f?f[m.length]:void 0;if(!Mo(g)){if(oo(g)){var M=Ws(_),$=Ws(C),G=void 0!==S?Ws(S):g.length;return vO($-M+1,Gz?[].concat(si(R.slice(z,U+1)),si(R.slice(q,R.length))).map(function(re){return Rm(m,re)}):[].concat(si(R.slice(q,z)),si(R.slice(U+1,R.length))).map(function(re){return Rm(m,re)}):[]}(n,o,s),l=Sn(n,Xi(o0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=o0(m=u.selection),y=$k(m),_=f.findIndex(function($){return or($.path,v)}),C=f.findIndex(function($){return or($.path,y)}),Os(p,null===(d=f[_+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function uh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Iv(e,n)})}function mYe(t){pi(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function gYe(t){var n,e,i,r,o,s;return e=new sr({props:{data:$m}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=[Ft(n,"click",function(){ba(t[0])&&t[0].apply(this,arguments)}),_a(i=qO.call(null,n,Ze({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Un(l,1)[0];t=a,i&&ba(i.update)&&2&c&&i.update.call(null,Ze({text:t[1]},t[2]))},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,ho(s)}}}function vYe(t,n,e){var i,r=xa("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var _0=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vYe,gYe,ys,{validationError:3,onExpand:0},mYe),r}return Se(e)}();function yYe(t){pi(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var bYe=function(t){return{}},ile=function(t){return{}};function rle(t,n,e){var i=t.slice();return i[53]=n[e],i}var _Ye=function(t){return{}},ole=function(t){return{}};function sle(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function ale(t,n,e){var i=t.slice();return i[50]=n[e],i}var xYe=function(t){return{}},lle=function(t){return{}};function wYe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),d=t[34].identifier,h=Ms(d,t,t[35],ile),f=!t[17]&&cle();o=new pYe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:dse(t[6],t[9]),context:t[8]}});var p=u&&ule(t),m=t[15]&&dle(t),g=!t[17]&&hle(t);return{c:function(){n=be("div"),e=be("div"),h&&h.c(),i=it(),f&&f.c(),r=it(),mt(o.$$.fragment),s=it(),p&&p.c(),a=it(),m&&m.c(),l=it(),g&&g.c(),P(e,"class","jse-contents svelte-1wlxti1"),P(n,"class","jse-contents-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(v,y){Pe(v,n,y),de(n,e),h&&h.m(e,null),de(e,i),f&&f.m(e,null),de(e,r),ft(o,e,null),de(e,s),p&&p.m(e,null),de(n,a),m&&m.m(n,null),de(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Ns(h,d,v,v[35],c?Is(d,v[35],y,bYe):Fs(v[35]),ile),v[17]?f&&(f.d(1),f=null):f||((f=cle()).c(),f.m(e,r));var _={};2&y[0]&&(_.path=v[1]),1&y[0]&&(_.value=v[0]),8192&y[0]&&(_.enforceString=v[13]),65664&y[0]&&(_.selection=v[16]?v[7]:void 0),576&y[0]&&(_.searchResultItems=dse(v[6],v[9])),256&y[0]&&(_.context=v[8]),o.$set(_),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Nr(v[7]))&&!v[7].edit&&or(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&Q(p,1)):((p=ule(v)).c(),Q(p,1),p.m(e,null)):p&&($t(),ce(p,1,1,function(){p=null}),Bt()),v[15]?m?(m.p(v,y),32768&y[0]&&Q(m,1)):((m=dle(v)).c(),Q(m,1),m.m(n,l)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=hle(v)).c(),g.m(n,null)),(!c||262144&y[0])&&P(n,"style",v[18])},i:function(v){c||(Q(h,v),Q(o.$$.fragment,v),Q(p),Q(m),c=!0)},o:function(v){ce(h,v),ce(o.$$.fragment,v),ce(p),ce(m),c=!1},d:function(v){v&&je(n),h&&h.d(v),f&&f.d(),pt(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function CYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[DYe,SYe],S=[];function M(E,N){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],ole),R=!t[17]&&fle();function z(E,N){return E[12]?EYe:TYe}var U=z(t),q=U(t),re=_&&ple(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&mle(t);function X(E,N){return E[12]?MYe:E[17]?void 0:AYe}var Z=X(t),H=Z&&Z(t),he=t[12]&&gle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H&&H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(c,"class","jse-meta svelte-1wlxti1"),P(c,"data-type","selectable-value"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,N){Pe(E,n,N),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H&&H.m(n,null),Pe(E,p,N),he&&he.m(E,N),Pe(E,m,N),g=!0,v||(y=Ft(i,"click",t[21]),v=!0)},p:function(E,N){var F=r;(r=M(E))===F?S[r].p(E,N):($t(),ce(S[F],1,1,function(){S[F]=null}),Bt(),(o=S[r])?o.p(E,N):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&N[1])&&Ns(G,$,E,E[35],g?Is($,E[35],N,_Ye):Fs(E[35]),ole),E[17]?R&&(R.d(1),R=null):R||((R=fle()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,N):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&N[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Nr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,N),65922&N[0]&&Q(re,1)):((re=ple(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),36864&N[0]&&Q(L,1)):((L=mle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,N):(H&&H.d(1),(H=Z&&Z(E))&&(H.c(),H.m(n,null))),(!g||262144&N[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,N),4096&N[0]&&Q(he,1)):((he=gle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H&&H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function kYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Nr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[FYe,NYe],S=[];function M(E,N){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],lle),R=!t[17]&&_le();function z(E,N){return E[12]?jYe:OYe}var U=z(t),q=U(t),re=_&&xle(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&wle(t);function X(E,N){return E[12]?LYe:PYe}var Z=X(t),H=Z(t),he=t[12]&&Cle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(u,"data-type","selectable-value"),P(c,"class","jse-meta svelte-1wlxti1"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,N){Pe(E,n,N),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H.m(n,null),Pe(E,p,N),he&&he.m(E,N),Pe(E,m,N),g=!0,v||(y=Ft(i,"click",t[21]),v=!0)},p:function(E,N){var F=r;(r=M(E))===F?S[r].p(E,N):($t(),ce(S[F],1,1,function(){S[F]=null}),Bt(),(o=S[r])?o.p(E,N):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&N[1])&&Ns(G,$,E,E[35],g?Is($,E[35],N,xYe):Fs(E[35]),lle),E[17]?R&&(R.d(1),R=null):R||((R=_le()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,N):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&N[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Nr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,N),65922&N[0]&&Q(re,1)):((re=xle(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),36864&N[0]&&Q(L,1)):((L=wle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,N):(H.d(1),(H=Z(E))&&(H.c(),H.m(n,null))),(!g||262144&N[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,N),4096&N[0]&&Q(he,1)):((he=Cle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function cle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function ule(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function dle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hle(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function SYe(t){var n,e;return n=new sr({props:{data:rp}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function DYe(t){var n,e;return n=new sr({props:{data:ru}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function TYe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=be("div")).textContent="{",e=it(),i=be("button"),r=tn(d),o=it(),s=tn(h),a=it(),(l=be("div")).textContent="}",P(n,"class","jse-bracket svelte-1wlxti1"),P(i,"type","button"),P(i,"class","jse-tag svelte-1wlxti1"),P(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),de(i,r),de(i,o),de(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=Ft(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&je(n),f&&je(e),f&&je(i),f&&je(a),f&&je(l),c=!1,u()}}}function EYe(t){var n;return{c:function(){(n=be("div")).textContent="{",P(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function ple(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function mle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function AYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function MYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),P(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=Ft(n,"click",t[29]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function gle(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Xs(t[7])),c=l&&vle(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=it(),p&&p.c(),P(n,"class","jse-props svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),de(n,e);for(var v=0;v]',s=it(),v&&v.c(),P(n,"class","jse-items svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(y,_){Pe(y,n,_),d&&d.m(n,null),de(n,e);for(var C=0;C=Le.start&&ne<=Le.end});if(!ie)return null;toe(ie.start,Math.min(p.length,ie.end),function(Le){return tt(String(Le))})}else Object.keys(p).forEach(tt);return xe}(S,l||wm);if(G("dragSelectionStart",{selection:S,items:F}),F){var Y=o0(S),V=F.findIndex(function(fe){return or(fe.path,Y)}),oe=f4({json:M.getJson(),documentState:M.getDocumentState(),deltaY:0,items:F}).offset;e(11,U={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:X(),selectionStartIndex:V,selectionItemsCount:Qoe(S).length,items:F,offset:oe,didMoveItems:!1}),aa.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",he)}else G("Cannot drag the current selection (probably spread over multiple sections)")}else $(E)}},function(E){aa.selecting||aa.dragging||(E.stopPropagation(),Pm(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):Pm(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):Pm(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(z))},function(E){E.stopPropagation(),z=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(cf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(uf(m)))},function(E){M.onSelect(cf(m)),M.onContextMenu(E)},function(E){M.onSelect(uf(m)),M.onContextMenu(E)},$,h,f]}var p4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,BYe,$Ye,Ei,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},yYe,[-1,-1]),r}return Se(e)}(),VYe=p4,HYe={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"]},zYe={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"]},m4={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"]},UYe={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 GYe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function WYe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,_=n.onRedo,C=n.onSort,S=n.onTransform,M=n.onContextMenu,$=n.onCopy,G=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(z){"json"in z&&e(2,u=z.json),"selection"in z&&e(3,d=z.selection),"readOnly"in z&&e(4,h=z.readOnly),"showSearch"in z&&e(1,p=z.showSearch),"historyState"in z&&e(5,m=z.historyState),"onExpandAll"in z&&e(6,g=z.onExpandAll),"onCollapseAll"in z&&e(7,v=z.onCollapseAll),"onUndo"in z&&e(8,y=z.onUndo),"onRedo"in z&&e(9,_=z.onRedo),"onSort"in z&&e(10,C=z.onSort),"onTransform"in z&&e(11,S=z.onTransform),"onContextMenu"in z&&e(12,M=z.onContextMenu),"onCopy"in z&&e(13,$=z.onCopy),"onRenderMenu"in z&&e(14,G=z.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Nr(d)||xs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:HYe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!Ho(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:zYe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!Ho(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:sp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:$,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:S,disabled:h||void 0===u},l,{type:"button",icon:bse,title:xN,className:"jse-contextmenu",onClick:M},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:_,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=G(c)||c)},[o,p,u,d,h,m,g,v,y,_,C,S,M,$,G,s,a,l,c,r,i]}var qYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,WYe,GYe,Ei,{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}),r}return Se(e)}();function XYe(t){pi(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Mle(t){var n;return{c:function(){(n=be("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',P(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function YYe(t){var n,e,i,r,o,s,a,l=!t[0]&&Mle();return{c:function(){n=be("div"),e=be("div"),i=it(),r=be("div"),o=tn("Empty document\n "),l&&l.c(),s=it(),a=be("div"),P(e,"class","jse-space jse-before svelte-1q2qkk2"),P(r,"class","jse-contents svelte-1q2qkk2"),P(a,"class","jse-space jse-after svelte-1q2qkk2"),P(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),de(n,e),de(n,i),de(n,r),de(r,o),l&&l.m(r,null),de(n,s),de(n,a)},p:function(c,u){Un(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Mle()).c(),l.m(r,null))},i:Lt,o:Lt,d:function(c){c&&je(n),l&&l.d()}}}function JYe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var KYe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,JYe,YYe,Ei,{readOnly:0},XYe),r}return Se(e)}(),g4={},QYe={get exports(){return g4},set exports(t){g4=t}},Ile=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(oo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function eJe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function tJe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:ln(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Io(t))return function ZYe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*v4(u,d)});for(var s=[],a=0;aQb&&jle();return{c:function(){n=be("div");for(var d=0;dQb?u?u.p(d,f):((u=jle()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:Lt,o:Lt,d:function(d){d&&je(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return fO(0,v.length).map(String);if(Io(v)){var y=Object.keys(v).slice(0);return y.sort(v4),y}return[]},function(g){return Xc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Vi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Vi[g?"unshift":"push"](function(){e(4,o=g)})}]}var yJe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vJe,gJe,Ei,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},fJe),r}return Se(e)}();function bJe(t){pi(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function Ule(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",L=!t[4]&&Gle(t),X=[xJe,_Je],Z=[];function H(E,N){return E[2]?0:1}a=H(t),l=Z[a]=X[a](t),y=new sr({props:{data:DWe}}),S=new sr({props:{data:bWe}}),G=new sr({props:{data:p0}});var he=t[0]&&!t[4]&&Wle(t);return{c:function(){n=be("div"),e=be("form"),L&&L.c(),i=it(),r=be("div"),o=be("div"),s=be("div"),l.c(),c=it(),u=be("label"),d=be("input"),h=it(),f=be("div"),p=tn(re),m=tn(t[10]),g=it(),v=be("button"),mt(y.$$.fragment),_=it(),C=be("button"),mt(S.$$.fragment),M=it(),$=be("button"),mt(G.$$.fragment),R=it(),he&&he.c(),P(s,"class","jse-search-icon svelte-3lbrbf"),P(d,"class","jse-search-input svelte-3lbrbf"),P(d,"title","Enter text to search"),P(d,"type","text"),P(d,"placeholder","Find"),P(u,"class","jse-search-input-label svelte-3lbrbf"),P(u,"about","jse-search input"),P(f,"class","jse-search-count svelte-3lbrbf"),Mt(f,"jse-visible",""!==t[8]),P(v,"type","button"),P(v,"class","jse-search-next svelte-3lbrbf"),P(v,"title","Go to next search result (Enter)"),P(C,"type","button"),P(C,"class","jse-search-previous svelte-3lbrbf"),P(C,"title","Go to previous search result (Shift+Enter)"),P($,"type","button"),P($,"class","jse-search-clear svelte-3lbrbf"),P($,"title","Close search box (Esc)"),P(o,"class","jse-search-section svelte-3lbrbf"),P(r,"class","jse-search-contents svelte-3lbrbf"),P(e,"class","jse-search-form svelte-3lbrbf"),P(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,N){Pe(E,n,N),de(n,e),L&&L.m(e,null),de(e,i),de(e,r),de(r,o),de(o,s),Z[a].m(s,null),de(o,c),de(o,u),de(u,d),Hf(d,t[8]),de(o,h),de(o,f),de(f,p),de(f,m),de(o,g),de(o,v),ft(y,v,null),de(o,_),de(o,C),ft(S,C,null),de(o,M),de(o,$),ft(G,$,null),de(r,R),he&&he.m(r,null),z=!0,U||(q=[Ft(d,"input",t[21]),_a(CJe.call(null,d)),Ft(v,"click",t[22]),Ft(C,"click",t[23]),Ft($,"click",t[24]),Ft(e,"submit",t[12]),Ft(e,"keydown",t[13])],U=!0)},p:function(E,N){E[4]?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,N),16&N&&Q(L,1)):((L=Gle(E)).c(),Q(L,1),L.m(e,i));var F=a;(a=H(E))===F?Z[a].p(E,N):($t(),ce(Z[F],1,1,function(){Z[F]=null}),Bt(),(l=Z[a])?l.p(E,N):(l=Z[a]=X[a](E)).c(),Q(l,1),l.m(s,null)),256&N&&d.value!==E[8]&&Hf(d,E[8]),(!z||8&N)&&re!==(re=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,re),(!z||1024&N)&&qn(m,E[10]),(!z||256&N)&&Mt(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?he?he.p(E,N):((he=Wle(E)).c(),he.m(r,null)):he&&(he.d(1),he=null)},i:function(E){z||(Q(L),Q(l),Q(y.$$.fragment,E),Q(S.$$.fragment,E),Q(G.$$.fragment,E),z=!0)},o:function(E){ce(L),ce(l),ce(y.$$.fragment,E),ce(S.$$.fragment,E),ce(G.$$.fragment,E),z=!1},d:function(E){E&&je(n),L&&L.d(),Z[a].d(),pt(y),pt(S),pt(G),he&&he.d(),U=!1,ho(q)}}}function Gle(t){var n,e,i,r,o;return e=new sr({props:{data:t[0]?ru:rp}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-replace-toggle svelte-3lbrbf"),P(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Ft(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?ru:rp),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function _Je(t){var n,e;return n=new sr({props:{data:KO}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function xJe(t){var n,e;return n=new sr({props:{data:gWe,spin:!0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wle(t){var n,e,i,r,o,s,a,l;return{c:function(){n=be("div"),e=be("input"),i=it(),(r=be("button")).textContent="Replace",o=it(),(s=be("button")).textContent="All",P(e,"class","jse-replace-input svelte-3lbrbf"),P(e,"title","Enter replacement text"),P(e,"type","text"),P(e,"placeholder","Replace"),P(r,"type","button"),P(r,"title","Replace current occurrence (Ctrl+Enter)"),P(r,"class","svelte-3lbrbf"),P(s,"type","button"),P(s,"title","Replace all occurrences"),P(s,"class","svelte-3lbrbf"),P(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),de(n,e),Hf(e,t[9]),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=[Ft(e,"input",t[25]),Ft(r,"click",t[14]),Ft(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&Hf(e,c[9])},d:function(c){c&&je(n),a=!1,ho(l)}}}function wJe(t){var n,e,i=t[1]&&Ule(t);return{c:function(){i&&i.c(),n=_r()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=Un(o,1)[0];r[1]?i?(i.p(r,s),2&s&&Q(i,1)):((i=Ule(r)).c(),Q(i,1),i.m(n.parentNode,n)):i&&($t(),ce(i,1,1,function(){i=null}),Bt())},i:function(r){e||(Q(i),e=!0)},o:function(r){ce(i),e=!1},d:function(r){i&&i.d(r),r&&je(n)}}}function CJe(t){t.select()}function kJe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?go:g,y=n.onPrevious,_=void 0===y?go:y,C=n.onNext,S=void 0===C?go:C,M=n.onReplace,$=void 0===M?go:M,G=n.onReplaceAll,R=void 0===G?go:G,z=n.onClose,U=void 0===z?go:z,q="",re="",L="";function X(){e(0,f=!f&&!m)}function Z(){m||$(q,L)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,_=H.onPrevious),"onNext"in H&&e(6,S=H.onNext),"onReplace"in H&&e(18,$=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,U=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Gv(v,300)),1048832&t.$$.dirty&&r(q),2&t.$$.dirty&&s&&""!==q&&v(q)},[f,s,a,d,m,_,S,U,q,L,i,X,function(H){H.preventDefault(),q!==re?(re=q,r.cancel(),v(q)):S()},function(H){H.stopPropagation();var he=tp(H);"Enter"===he&&(H.preventDefault(),S()),"Shift+Enter"===he&&(H.preventDefault(),_()),"Ctrl+Enter"===he&&(H.preventDefault(),f?Z():S()),"Ctrl+H"===he&&(H.preventDefault(),X()),"Escape"===he&&(H.preventDefault(),U())},Z,function(){m||R(q,L)},c,v,$,R,r,function(){e(8,q=this.value)},function(){return S()},function(){return _()},function(){return U()},function(){e(9,L=this.value)}]}var SJe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,kJe,wJe,Ei,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},bJe),r}return Se(e)}(),qle=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function DJe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',P(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function HJe(t){var n,e,i,r,o,s,a,l,c,u=[UJe,zJe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-qojdc1"),P(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),de(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Ft(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[76](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function zJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new SJe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new VYe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:go}});var m=t[18]&&rce(t),g=t[23]&&oce(t);return f=new l4({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=be("div"),mt(s.$$.fragment),a=it(),l=be("div"),mt(c.$$.fragment),u=it(),m&&m.c(),d=it(),g&&g.c(),h=it(),mt(f.$$.fragment),P(o,"class","jse-search-box-container svelte-qojdc1"),P(l,"class","jse-contents svelte-qojdc1"),P(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),ft(s,o,null),Pe(v,a,y),Pe(v,l,y),ft(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),ft(f,v,y),p=!0},p:function(v,y){var _,C,S,M,$={};524288&y[0]&&($.show=v[19]),131072&y[0]&&($.resultCount=(null===(_=v[17])||void 0===_||null===(C=_.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&($.activeIndex=(null===(S=v[17])||void 0===S?void 0:S.activeIndex)||0),1048576&y[0]&&($.showReplace=v[20]),2097152&y[0]&&($.searching=v[21]),1&y[0]&&($.readOnly=v[0]),s.$set($);var G={};1024&y[0]&&(G.value=v[10]),65536&y[0]&&(G.expandedMap=v[16].expandedMap),65536&y[0]&&(G.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(G.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(G.validationErrorsMap=v[24]),131072&y[0]&&(G.searchResultItemsMap=null===(M=v[17])||void 0===M?void 0:M.itemsMap),65536&y[0]&&(G.selection=v[16].selection),8192&y[0]&&(G.context=v[13]),c.$set(G),v[18]?m?(m.p(v,y),262144&y[0]&&Q(m,1)):((m=rce(v)).c(),Q(m,1),m.m(d.parentNode,d)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[23]?g?(g.p(v,y),8388608&y[0]&&Q(g,1)):((g=oce(v)).c(),Q(g,1),g.m(h.parentNode,h)):g&&($t(),ce(g,1,1,function(){g=null}),Bt());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(m),Q(g),Q(f.$$.fragment,v),p=!0)},o:function(v){ce(s.$$.fragment,v),ce(c.$$.fragment,v),ce(m),ce(g),ce(f.$$.fragment,v),p=!1},d:function(v){v&&je(o),pt(s),v&&je(a),v&&je(l),pt(c),t[77](null),v&&je(u),m&&m.d(v),v&&je(d),g&&g.d(v),v&&je(h),pt(f,v)}}}function UJe(t){var n,e,i,r,o=[WJe,GJe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=_r()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):($t(),ce(s[u],1,1,function(){s[u]=null}),Bt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),Q(e,1),e.m(i.parentNode,i))},i:function(l){r||(Q(e),r=!0)},o:function(l){ce(e),r=!1},d:function(l){s[n].d(l),l&&je(i)}}}function rce(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:zk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function oce(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:Wb,text:"Ok",onClick:t[8]},{icon:op,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:Wb,text:"Ok",onClick:i[8]},{icon:op,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function GJe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[47]}]}}),i=new tce({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function WJe(t){var n,e;return n=new KYe({props:{readOnly:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qJe(t){var n,e,i,r,o,s,a,l,c=t[1]&&nce(t),u=t[2]&&ice(t),h=[];return o=h[r=t[25]?1:0]=[HJe,VJe][r](t),{c:function(){n=be("div"),c&&c.c(),e=it(),u&&u.c(),i=it(),o.c(),P(n,"class","jse-tree-mode svelte-qojdc1"),Mt(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),de(n,e),u&&u.m(n,null),de(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Ft($Je,"mousedown",t[49]),Ft(n,"keydown",t[41]),Ft(n,"mousedown",t[42]),Ft(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&Q(c,1)):((c=nce(f)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),f[2]?u?(u.p(f,p),4&p[0]&&Q(u,1)):((u=ice(f)).c(),Q(u,1),u.m(n,i)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),o.p(f,p),(!s||2&p[0])&&Mt(n,"no-main-menu",!f[1])},i:function(f){s||(Q(c),Q(u),Q(o),s=!0)},o:function(f){ce(c),ce(u),ce(o),s=!1},d:function(f){f&&je(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,ho(l)}}}function XJe(t,n,e){var i,r=wa("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xa("simple-modal").open,h=ep(),f=ep(),p=xa("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=hae(),_=n.readOnly,C=n.externalContent,S=n.mainMenuBar,M=n.navigationBar,$=n.escapeControlCharacters,G=n.escapeUnicodeCharacters,R=n.parser,z=n.parseMemoizeOne,U=n.validator,q=n.validationParser,re=n.pathParser,L=n.indentation,X=n.onError,Z=n.onChange,H=n.onChangeMode,he=n.onRenderValue,E=n.onRenderMenu,N=n.onClassName,F=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal,Ne=!1;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(l)},hasFocus:function(){return Ne&&document.hasFocus()||jk(l)},onFocus:function(){v=!0,F&&F()},onBlur:function(){v=!1,Y&&Y()}});var xe=void 0;function tt(Ce){r("updateSelection",Ce);var lt="function"==typeof Ce?Ce(ie.selection):Ce;or(lt,ie.selection)||e(16,ie=Ze(Ze({},ie),{},{selection:lt}))}var ze,ot,B,ne=!1,ie=Lk(),Ie=!1,Ye=!1,Le=!1,_t="";function At(Ce){return _n.apply(this,arguments)}function _n(){return(_n=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return r("search text updated",lt),e(74,_t=lt),It.next=4,Xl();case 4:return It.next=6,Fr();case 6:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function ci(){return(ci=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?GGe(ze):void 0),lt.next=3,Fr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function on(){return(on=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?WGe(ze):void 0),lt.next=3,Fr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function Ni(){return(Ni=Zi(vn().mark(function Ce(lt,It){var Jt,nn,an,li;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(nn=null===(Jt=ze)||void 0===Jt?void 0:Jt.activeItem,r("handleReplace",{replacementText:It,activeItem:nn}),nn){fi.next=4;break}return fi.abrupt("return");case 4:return an=qGe(c,ie,It,nn,R),li=an.newSelection,Yn(an.operations,function(Lo,Ls){return{state:Ze(Ze({},Ls),{},{selection:li})}}),fi.next=8,Xl();case 8:return fi.next=10,Fr();case 10:case"end":return fi.stop()}},Ce)}))).apply(this,arguments)}function pn(){return(pn=Zi(vn().mark(function Ce(lt,It){var Jt,an;return vn().wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return r("handleReplaceAll",{text:lt,replacementText:It}),Jt=XGe(c,ie,lt,It,R),an=Jt.newSelection,Yn(Jt.operations,function(li,fi){return{state:Ze(Ze({},fi),{},{selection:an})}}),Vn.next=5,Xl();case 5:return Vn.next=7,Fr();case 7:case"end":return Vn.stop()}},Ce)}))).apply(this,arguments)}function Fr(){return $r.apply(this,arguments)}function $r(){return($r=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(It=null===(lt=ze)||void 0===lt?void 0:lt.activeItem,r("focusActiveSearchResult",ze),!It){nn.next=9;break}return e(16,ie=Ze(Ze({},PO(c,ie,Jt=It.path)),{},{selection:void 0})),nn.next=7,Xl();case 7:return nn.next=9,hn(Jt);case 9:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}var Ai,Wr,wr=fae({onChange:function(Ce){e(22,Or=Ce)}}),Or=wr.getState(),jo=gO(function(Ce,lt){if(""===Ce)return r("clearing search result"),void(void 0!==ze&&e(17,ze=void 0));e(21,Le=!0),setTimeout(function(){r("searching...",Ce);var nn,an,Vn,li,fi,Lo,Ls,It=ase(Ce,lt,1e3);e(17,(nn=It,Vn=null!=(an=ze)&&an.activeItem?use(an.activeItem):void 0,li=nn.findIndex(function(Zo){return or(Vn,use(Zo))}),fi=-1!==li?li:void 0!==an?.activeIndex&&an?.activeIndex0?0:-1,Ls=(Lo=nn.map(function(Zo,wo){return Ze(Ze({},Zo),{},{active:wo===fi})}))[fi],ze={items:Lo,itemsMap:qv(Lo,function(Zo){return ln(Zo.path)}),activeItem:Ls,activeIndex:fi})),e(21,Le=!1)})},300),Fn=!1,xt=[],ui=Zb(pae);function Fi(Ce,lt,It,Jt){g0(function(){var nn;try{nn=ui(Ce,lt,It,Jt)}catch(an){nn=[{path:[],message:"Failed to validate: "+an.message,severity:Xd.warning}]}or(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),xe?{parseError:xe,isRepairable:!1}:(Fi(c,U,R,q),Hi(xt)?null:{validationErrors:xt})}function xo(){return c}function Qo(){return ie}function On(Ce){ne||(ne=!0,e(16,ie=nu(Ce,ie,[],coe({json:Ce},10240)?sh:Hb)))}function ai(Ce){void 0!==ie.selection&&(ie.selection&&Xc(Ce,ie.selection.anchorPath)&&Xc(Ce,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Ze(Ze({},ie),{},{selection:s0(Ce,ie)}))))}function bi(Ce){var lt=Ce.previousJson,It=Ce.previousState,Jt=Ce.previousText,nn=Ce.previousTextIsRepaired;void 0===lt&&void 0===Jt||(void 0!==c?wr.add(void 0!==lt?{undo:{patch:[{op:"replace",path:"",value:lt}],state:ul(It),json:void 0,text:Jt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ul(ie),json:void 0,text:u,textIsRepaired:Fn}}:{undo:{patch:void 0,json:void 0,text:Jt,state:ul(It),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ul(ie),text:u,textIsRepaired:Fn}}):void 0!==lt&&wr.add({undo:{patch:void 0,json:lt,state:ul(It),text:Jt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Fn,state:ul(ie)}}))}function Er(Ce,lt){if(r("patch",Ce,lt),void 0===c)throw new Error("Cannot apply patch: no JSON");var It={json:c,text:u},Jt=c,nn=ie,an=u,Vn=Fn,li=ose(c,Ce),fi=$oe(c,ie,Ce),Lo=a0(c,Ce),Ls=function(wh,bd){return void 0!==bd||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ze(Ze({},wh),{},{selection:bd}):wh}(fi.documentState,Lo,!1);r("patch updatedSelection",Lo);var Zo="function"==typeof lt?lt(fi.json,Ls):void 0;e(10,c=Zo&&void 0!==Zo.json?Zo.json:fi.json);var wo=Zo&&void 0!==Zo.state?Zo.state:Ls;e(16,ie=wo),e(11,u=void 0),e(23,Fn=!1),e(18,B=void 0),ai(c),wr.add({undo:{patch:li,json:void 0,text:an,state:ul(nn),textIsRepaired:Vn},redo:{patch:Ce,json:void 0,state:ul(wo),text:u,textIsRepaired:Fn}});var $l={json:c,previousJson:Jt,undo:li,redo:Ce};return ei(It,$l),$l}function qr(){!_&&ie.selection&&tt(iu(ie.selection.focusPath,!0))}function ao(){if(!_&&ie.selection){var Ce=ie.selection.focusPath,lt=Sn(c,Ce);Ho(lt)?(r("openJSONEditorModal",{path:It=Ce,value:Jt=lt}),Ne=!0,fe({content:{json:Jt},path:It,onPatch:Wr.onPatch,onClose:function(){Ne=!1,Ps()}})):tt(mr(Ce,!0))}var It,Jt}function Js(){if(!_&&Yi(ie.selection)){var Ce=ie.selection.focusPath,lt=ln(Ce),It=Sn(c,Ce),Jt=!lf(It,ie.enforceStringMap,lt,R),nn=Jt?String(It):Nv(String(It),R);r("handleToggleEnforceString",{enforceString:Jt,value:It,updatedValue:nn}),Yn([{op:"replace",path:lt,value:nn}],function(an,Vn){return{state:Roe(Vn,lt,Jt)}})}}function vr(){return Ks.apply(this,arguments)}function Ks(){return Ks=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return lt=!(It.length>0&&void 0!==It[0])||It[0],Jt.next=3,Jle({json:c,documentState:ie,indentation:lt?L:void 0,readOnly:_,parser:R,onPatch:Yn});case 3:case"end":return Jt.stop()}},Ce)})),Ks.apply(this,arguments)}function qa(){return Xa.apply(this,arguments)}function Xa(){return Xa=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(lt=!(It.length>0&&void 0!==It[0])||It[0],void 0!==c){Jt.next=3;break}return Jt.abrupt("return");case 3:return Jt.next=5,Kle({json:c,documentState:ie,indentation:lt?L:void 0,parser:R});case 5:case"end":return Jt.stop()}},Ce)})),Xa.apply(this,arguments)}function Ic(){d(kae,{},Ze(Ze({},Cm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ps()}})}function we(Ce,lt){d(jae,{text:Ce,onParse:Ik,onRepair:soe,onApply:lt},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ps()}})}function He(){Zle({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:_,onChange:Z,onPatch:Yn})}function qe(){!_&&void 0!==c&&ie.selection&&c0(ie.selection)&&!Hi(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Yn(nse(c,Qoe(ie.selection))))}function ut(){_||!ie.selection||!Nr(ie.selection)&&!Yi(ie.selection)||Hi(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Yn(function(lt,It){if(Yi(It))return[{op:"move",from:ln(It.focusPath),path:""}];if(!Nr(It))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Jt=Sn(lt,Xi(It.focusPath));if(oo(Jt))return[{op:"replace",path:"",value:It.paths.map(function(an){var Vn=Ws(Ln(an));return Jt[Vn]})}];if(Mo(Jt)){var nn={};return It.paths.forEach(function(an){var Vn=String(Ln(an));nn[Vn]=Jt[Vn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(It))}(c,ie.selection),function(lt,It){if(Ho(lt))return{state:np(lt,It,[])}}))}function Ue(Ce){void 0!==c&&rS({insertType:Ce,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br})}function Dn(Ce){xs(ie.selection)&&tt(mr(ie.selection.focusPath,!1)),Ue(Ce)}function ii(Ce){if(!_&&ie.selection)if(Lm(ie.selection))try{var lt=ie.selection.anchorPath,It=Sn(c,lt),Jt=function(an,Vn,li){if("array"===Vn){if(Array.isArray(an))return an;if(Io(an))return ioe(an);if("string"==typeof an)try{var fi=li.parse(an);if(Array.isArray(fi))return fi;if(Io(fi))return ioe(fi)}catch{return[an]}return[an]}if("object"===Vn){if(Array.isArray(an))return noe(an);if(Io(an))return an;if("string"==typeof an)try{var Lo=li.parse(an);if(Io(Lo))return Lo;if(Array.isArray(Lo))return noe(Lo)}catch{return{value:an}}return{value:an}}if("value"===Vn)return Ho(an)?li.stringify(an):an;throw new Error("Cannot convert ".concat(VN(an,li)," to ").concat(Vn))}(It,Ce,R);if(Jt===It)return;var nn=[{op:"replace",path:ln(lt),value:Jt}];r("handleConvert",{selection:ie.selection,path:lt,type:Ce,operations:nn}),Yn(nn,function(an,Vn){return{state:np(an,Vn,ie.selection.focusPath)}})}catch(an){X(an)}else X(new Error("Cannot convert current selection to ".concat(Ce)))}function hi(){var Ce=qoe(c,ie,!1),lt=Xi(ie.selection.focusPath);!Hi(Ce.focusPath)&&or(lt,Xi(Ce.focusPath))?tt(uf(Ce.focusPath)):tt(cf(lt)),r("insert before",{selection:ie.selection,selectionBefore:Ce,parentPath:lt}),Xl().then(Rl)}function di(){var Ce=Nr(ie.selection)?Ln(ie.selection.paths):ie.selection.focusPath;r("insert after",Ce),tt(uf(Ce)),Xl().then(Rl)}function kr(Ce){return Qr.apply(this,arguments)}function Qr(){return(Qr=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,ece({char:lt,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br,onSelect:tt});case 2:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function gi(){if(!_&&wr.getState().canUndo){var Ce=wr.undo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.undo.patch?Yu(c,Ce.undo.patch):Ce.undo.json),e(16,ie=Ce.undo.state),e(11,u=Ce.undo.text),e(23,Fn=Ce.undo.textIsRepaired),r("undo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.undo.patch,undo:Ce.redo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function yr(){if(!_&&wr.getState().canRedo){var Ce=wr.redo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.redo.patch?Yu(c,Ce.redo.patch):Ce.redo.json),e(16,ie=Ce.redo.state),e(11,u=Ce.redo.text),e(23,Fn=Ce.redo.textIsRepaired),r("redo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.redo.patch,undo:Ce.undo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function Ee(Ce){var lt;_||void 0===c||(Ne=!0,V({id:h,json:c,rootPath:Ce,onSort:(lt=Zi(vn().mark(function It(Jt){var nn;return vn().wrap(function(an){for(;;)switch(an.prev=an.next){case 0:r("onSort",Ce,nn=Jt.operations),Yn(nn,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,Ce)),{},{selection:mr(Ce,!1)})}});case 3:case"end":return an.stop()}},It)})),function(It){return lt.apply(this,arguments)}),onClose:function(){Ne=!1,Ps()}}))}function St(){ie.selection&&Ee(Joe(c,ie.selection))}function Ht(Ce){var It=Ce.rootPath,Jt=Ce.onTransform,nn=Ce.onClose;void 0!==c&&It&&(Ne=!0,oe({id:Ce.id||f,json:c,rootPath:It,onTransform:Jt?function(an){Jt({operations:an,json:c,transformedJson:Yu(c,an)})}:function(an){r("onTransform",It,an),Yn(an,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,It)),{},{selection:mr(It,!1)})}})},onClose:function(){Ne=!1,Ps(),nn&&nn()}}))}function sn(){ie.selection&&Ht({rootPath:Joe(c,ie.selection)})}function hn(Ce){return ri.apply(this,arguments)}function ri(){return ri=Zi(vn().mark(function Ce(lt){var It,Jt,nn,an,li=arguments;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return It=!(li.length>1&&void 0!==li[1])||li[1],e(16,ie=PO(c,ie,Xi(lt))),fi.next=4,Xl();case 4:if(!(Jt=Oi(lt))){fi.next=14;break}if(r("scrollTo",{path:lt,elem:Jt,refContents:s}),nn=s.getBoundingClientRect(),an=Jt.getBoundingClientRect(),It){fi.next=12;break}if(!(an.bottom>nn.top&&an.topIt.bottom-20&&y(lt,{container:s,offset:-(It.height-nn-20),duration:0})}}function ei(Ce,lt){(void 0!==Ce.json||void 0!==Ce?.text)&&(void 0!==u?Z({text:u,json:void 0},Ce,{contentErrors:Cr(),patchResult:lt}):void 0!==c&&Z({text:void 0,json:c},Ce,{contentErrors:Cr(),patchResult:lt}))}function Yn(Ce,lt){if(!_)return r("handlePatch",Ce,lt),Er(Ce,lt)}function br(Ce,lt){var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Fn,li=nu(c,ie,[],sh),fi="function"==typeof lt?lt(Ce,li):void 0;e(10,c=fi&&void 0!==fi.json?fi.json:Ce),e(16,ie=fi&&void 0!==fi.state?fi.state:li),e(11,u=void 0),e(23,Fn=!1),ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Ar(Ce,lt){r("handleChangeText");var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Fn;try{e(10,c=z(Ce)),e(16,ie=nu(c,ie,[],sh)),e(11,u=void 0),e(23,Fn=!1)}catch{try{e(10,c=z(Yd(Ce))),e(16,ie=nu(c,ie,[],sh)),e(11,u=Ce),e(23,Fn=!0)}catch{e(10,c=void 0),e(16,ie=Lk({json:c,expand:sh})),e(11,u=Ce),e(23,Fn=!1)}}if("function"==typeof lt){var li=lt(c,ie);e(10,c=li&&li.json?li.json:c),e(16,ie=li&&li.state?li.state:ie)}ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Po(Ce,lt){var It=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:Ce,expanded:lt,recursive:It}),e(16,ie=lt?It?nu(c,ie,Ce,Hb):function PGe(t,n){return Ze(Ze({},t),{},{expandedMap:Ze(Ze({},t.expandedMap),{},ql({},ln(n),!0))})}(ie,Ce):Loe(ie,Ce)),ie.selection&&!lt&&function RGe(t,n){return l0(t.focusPath,n)&&(t.focusPath.length>n.length||Xs(t))}(ie.selection,Ce)&&tt(void 0),setTimeout(function(){jk(l)||Ps()})}function ca(Ce){r("openFind",{findAndReplace:Ce}),e(19,Ie=!1),e(20,Ye=!1),Xl().then(function(){e(19,Ie=!0),e(20,Ye=Ce)})}function md(Ce,lt){r("handleExpandSection",Ce,lt);var nn,an,Vn,It=ln(Ce);e(16,(an=It,Vn=lt,ie=Ze(Ze({},nn=ie),{},{visibleSectionsMap:Ze(Ze({},nn.visibleSectionsMap),{},ql({},an,Poe(Rk(nn,an).concat(Vn))))})))}function hu(Ce){r("pasted json as text",Ce),e(18,B=Ce)}function ua(Ce){Ne=!0;var Lo=m(XXe,{json:c,documentState:ie,parser:R,showTip:Ce.showTip,onEditKey:qr,onEditValue:ao,onToggleEnforceString:Js,onCut:vr,onCopy:qa,onPaste:Ic,onRemove:He,onDuplicate:qe,onExtract:ut,onInsertBefore:hi,onInsert:Dn,onConvert:ii,onInsertAfter:di,onSort:St,onTransform:sn,onCloseContextMenu:function(){g(Lo),Ps()}},{left:Ce.left,top:Ce.top,offsetTop:Ce.offsetTop,offsetLeft:Ce.offsetLeft,width:Ce.width,height:Ce.height,anchor:Ce.anchor,closeOnOuterClick:!0,onClose:function(){Ne=!1,Ps()}})}function Rl(Ce){if(!_&&!ip(ie.selection)){if(Ce&&(Ce.stopPropagation(),Ce.preventDefault()),Ce&&"contextmenu"===Ce.type&&Ce.target!==a)ua({left:Ce.clientX,top:Ce.clientY,width:260,height:336,showTip:!1});else{var lt,It=null===(lt=s)||void 0===lt?void 0:lt.querySelector(".jse-context-menu-pointer.jse-selected");if(It)ua({anchor:It,offsetTop:2,width:260,height:336,showTip:!1});else{var Jt,nn=null===(Jt=s)||void 0===Jt?void 0:Jt.getBoundingClientRect();nn&&ua({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),It=(lt=B).path,Jt=lt.contents,tt(mr(It,!1)),nn.next=5,Xl();case 5:Yn([{op:"replace",path:ln(It),value:Jt}],function(an,Vn){return{state:np(an,Vn,It)}});case 7:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}function Ps(){r("focus"),a&&(a.focus(),a.select())}function vd(Ce){return lt=c,It=ie,nn=Xi(Jt=Ce),an=[Ln(Jt)],(li=(Vn=Sn(lt,nn))?HO(Vn,It,an):void 0)?mr(nn.concat(li),!1):uf(Jt);var lt,It,Jt,nn,an,Vn,li}function yd(Ce){i&&i.onDrag(Ce)}function eT(){i&&i.onDragEnd()}return t.$$set=function(Ce){"readOnly"in Ce&&e(0,_=Ce.readOnly),"externalContent"in Ce&&e(50,C=Ce.externalContent),"mainMenuBar"in Ce&&e(1,S=Ce.mainMenuBar),"navigationBar"in Ce&&e(2,M=Ce.navigationBar),"escapeControlCharacters"in Ce&&e(51,$=Ce.escapeControlCharacters),"escapeUnicodeCharacters"in Ce&&e(52,G=Ce.escapeUnicodeCharacters),"parser"in Ce&&e(3,R=Ce.parser),"parseMemoizeOne"in Ce&&e(53,z=Ce.parseMemoizeOne),"validator"in Ce&&e(54,U=Ce.validator),"validationParser"in Ce&&e(55,q=Ce.validationParser),"pathParser"in Ce&&e(4,re=Ce.pathParser),"indentation"in Ce&&e(5,L=Ce.indentation),"onError"in Ce&&e(6,X=Ce.onError),"onChange"in Ce&&e(56,Z=Ce.onChange),"onChangeMode"in Ce&&e(57,H=Ce.onChangeMode),"onRenderValue"in Ce&&e(58,he=Ce.onRenderValue),"onRenderMenu"in Ce&&e(7,E=Ce.onRenderMenu),"onClassName"in Ce&&e(59,N=Ce.onClassName),"onFocus"in Ce&&e(60,F=Ce.onFocus),"onBlur"in Ce&&e(61,Y=Ce.onBlur),"onSortModal"in Ce&&e(62,V=Ce.onSortModal),"onTransformModal"in Ce&&e(63,oe=Ce.onTransformModal),"onJSONEditorModal"in Ce&&e(64,fe=Ce.onJSONEditorModal)},t.$$.update=function(){var Ce,lt;3145728&t.$$.dirty[1]&&e(73,ot=TO({escapeControlCharacters:$,escapeUnicodeCharacters:G})),524288&t.$$.dirty[1]&&function gt(Ce){void 0!==Ce.json&&function(lt){if(void 0!==lt){var It=!or(c,lt);if(r("update external json",{isChanged:It,currentlyText:void 0===c}),It){var Jt={json:c,text:u},nn=ie,an=c,Vn=u,li=Fn;e(10,c=lt),On(c),e(11,u=void 0),e(23,Fn=!1),ai(c),bi({previousJson:an,previousState:nn,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.json),void 0!==Ce.text&&function(lt){if(void 0!==lt&&void 0===C.json){var It=lt!==u;if(r("update external text",{isChanged:It}),It){var Jt={json:c,text:u},nn=c,an=ie,Vn=u,li=Fn;try{e(10,c=z(lt)),On(c),e(11,u=lt),e(23,Fn=!1),xe=void 0}catch(fi){try{e(10,c=z(Yd(lt))),On(c),e(11,u=lt),e(23,Fn=!0),xe=void 0,ai(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Fn=!1),xe=Nk(u,fi.message||fi.toString())}}ai(c),bi({previousJson:nn,previousState:an,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&jo(_t,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Fi(c,U,R,q),4096&t.$$.dirty[0]&&e(24,(lt={},(Ce=xt).forEach(function(It){lt[ln(It.path)]=It}),Ce.forEach(function(It){for(var Jt=It.path;Jt.length>0;){var nn=ln(Jt=Xi(Jt));nn in lt||(lt[nn]={isChildError:!0,path:Jt,message:"Contains invalid data",severity:Xd.warning})}}),Ai=lt)),512&t.$$.dirty[0]&&(i=s?function(Ce){var lt,It;function Jt(li){return li<20?200:li<50?400:1200}function nn(){Ce&&(Ce.scrollTop+=.05*(lt||0))}function an(li){It&&li===lt||(Vn(),s4("startAutoScroll",li),lt=li,It=setInterval(nn,50))}function Vn(){It&&(s4("stopAutoScroll"),clearInterval(It),It=void 0,lt=void 0)}return s4("createAutoScrollHandler",Ce),{onDrag:function(li){if(Ce){var fi=li.clientY,Lo=Ce.getBoundingClientRect(),Ls=Lo.top,Zo=Lo.bottom;fiZo?an(Jt(fi-Zo)):Vn()}},onDragEnd:function(){Vn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Wr={readOnly:_,parser:R,normalization:ot,getJson:xo,getDocumentState:Qo,findElement:Oi,findNextInside:vd,focus:Ps,onPatch:Yn,onInsert:Ue,onExpand:Po,onSelect:tt,onFind:ca,onExpandSection:md,onPasteJson:hu,onRenderValue:he,onContextMenu:ua,onClassName:N||function(){},onDrag:yd,onDragEnd:eT}),8192&t.$$.dirty[0]&&r("context changed",Wr)},[_,S,M,R,re,L,X,E,function(){return Fn&&void 0!==c&&br(c),{json:c,text:u}},s,c,u,xt,Wr,a,l,ie,ze,B,Ie,Ye,Le,Or,Fn,Ai,o,At,function(){return ci.apply(this,arguments)},function(){return on.apply(this,arguments)},function(Ce,lt){return Ni.apply(this,arguments)},function(Ce,lt){return pn.apply(this,arguments)},function(){e(19,Ie=!1),e(20,Ye=!1),At(""),Ps()},function(Ce){r("select validation error",Ce),tt(mr(Ce.path,!1)),hn(Ce.path)},qa,function(Ce){Ce.preventDefault(),Qle({clipboardText:Ce.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onChangeText:Ar,openRepairModal:we})},gi,yr,function(){Ee([])},function(){Ht({rootPath:[]})},function(){Po([],!0,!0)},function(){Po([],!1,!0)},function(Ce){var lt=tp(Ce),It=Ce.shiftKey;if(r("keydown",{combo:lt,key:Ce.key}),"Ctrl+X"===lt&&(Ce.preventDefault(),vr(!0)),"Ctrl+Shift+X"===lt&&(Ce.preventDefault(),vr(!1)),"Ctrl+C"===lt&&(Ce.preventDefault(),qa(!0)),"Ctrl+Shift+C"===lt&&(Ce.preventDefault(),qa(!1)),"Ctrl+D"===lt&&(Ce.preventDefault(),qe()),"Delete"!==lt&&"Backspace"!==lt||(Ce.preventDefault(),He()),"Insert"===lt&&(Ce.preventDefault(),Ue("structure")),"Ctrl+A"===lt&&(Ce.preventDefault(),tt(mr([],!1))),"Ctrl+Q"===lt&&Rl(Ce),"ArrowUp"===lt||"Shift+ArrowUp"===lt){Ce.preventDefault();var Jt=ie.selection?qoe(c,ie,It,!0)||ie.selection:s0(c,ie);tt(Jt),Bn(Jt.focusPath)}if("ArrowDown"===lt||"Shift+ArrowDown"===lt){Ce.preventDefault();var nn=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Nr(Mr)?Mr.focusPath:Ln(Mr.paths),fu=HO(wo,$l,tc),_d=fu,Ch=fu;if(null===fu||null==_d||null==Ch)return null;if(wh){var xd=HO(wo,Ho(Sn(wo,tc))?Loe($l,tc):$l,tc);return null===xd?null:Zu(Mr)?Os(wo,xd,xd):Xs(Mr)?Os(wo,_d,Ch):Os(wo,Mr.anchorPath,xd)}if(xs(Mr)){var z_=Sn(wo,Xi(fu));return Array.isArray(z_)?mr(Ch,!1):iu(Ch,!1)}return Yi(Mr)?mr(Ch,!1):Xs(Mr)?Os(wo,_d,Ch):Os(wo,fu,fu)}(c,ie,It,!0)||ie.selection:s0(c,ie);tt(nn),Bn(nn.focusPath)}if("ArrowLeft"===lt||"Shift+ArrowLeft"===lt){Ce.preventDefault();var an=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.previous;if(wh)return Nr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath);if(fu&&_d)return zO(_d);var xd=Sn(wo,Xi(Mr.focusPath));return Yi(Mr)&&Array.isArray(xd)?Os(wo,Mr.focusPath,Mr.focusPath):Nr(Mr)&&!Array.isArray(xd)?iu(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(an),Bn(an.focusPath)}if("ArrowRight"===lt||"Shift+ArrowRight"===lt){Ce.preventDefault();var Vn=ie.selection&&void 0!==c?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.next;return wh?Nr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath):fu&&_d?zO(_d):Nr(Mr)?mr(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(Vn),Bn(Vn.focusPath)}if("Enter"===lt&&ie.selection){if(!_&&Nr(ie.selection)&&1===ie.selection.paths.length){var li=ie.selection.focusPath,fi=Sn(c,Xi(li));Array.isArray(fi)&&tt(mr(li,!1))}!_&&xs(ie.selection)&&(Ce.preventDefault(),tt(Ze(Ze({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(Ce.preventDefault(),Ho(Sn(c,ie.selection.focusPath))?Po(ie.selection.focusPath,!0):_||tt(Ze(Ze({},ie.selection),{},{edit:!0})))}if(1===lt.replace(/^Shift\+/,"").length&&ie.selection)return Ce.preventDefault(),void kr(Ce.key);if("Enter"===lt&&(Zu(ie.selection)||Xs(ie.selection)))return Ce.preventDefault(),void kr("");if("Ctrl+Enter"===lt&&Yi(ie.selection)){var Lo=Sn(c,ie.selection.focusPath);V2(Lo)&&window.open(String(Lo),"_blank")}if("Escape"===lt&&ie.selection&&(Ce.preventDefault(),tt(void 0)),"Ctrl+F"===lt&&(Ce.preventDefault(),ca(!1)),"Ctrl+H"===lt&&(Ce.preventDefault(),ca(!0)),"Ctrl+Z"===lt){Ce.preventDefault();var Ls=document.activeElement;Ls&&Ls.blur&&Ls.focus?(Ls.blur(),setTimeout(function(){gi(),setTimeout(function(){return Ls.select()})})):gi()}if("Ctrl+Shift+Z"===lt){Ce.preventDefault();var Zo=document.activeElement;Zo&&Zo.blur&&Zo.focus?(Zo.blur(),setTimeout(function(){yr(),setTimeout(function(){return Zo.select()})})):yr()}},function(Ce){r("handleMouseDown",Ce),setTimeout(function(){setTimeout(function(){v||yoe(Ce.target,"BUTTON")||(Ps(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Ze(Ze({},ie),{},{selection:Os(c||{},[],[])}))))})})},Rl,function(Ce){_||ua({anchor:_oe(Ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Jo.text)},function(Ce){tt(Ce),Ps(),hn(Ce.focusPath)},function(Ce){!Pb(Ce.target,function(It){return It===l})&&ip(ie.selection)&&(r("click outside the editor, stop edit mode"),tt(function(It){return xs(It)||Yi(It)?Ze(Ze({},It),{},{edit:!1}):It}),v&&a&&(a.focus(),a.blur()),Xl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,$,G,z,U,q,Z,H,he,N,F,Y,V,oe,fe,function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hb;r("expand");var lt=Ze(Ze({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=nu(c,lt,[],Ce))},Cr,xo,Er,Ht,hn,Oi,Ps,ot,_t,function(Ce){e(19,Ie=Ce)},function(Ce){Vi[Ce?"unshift":"push"](function(){e(14,a=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(9,s=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(15,l=Ce)})}]}var k4=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,XJe,qJe,Ei,{readOnly:0,externalContent: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,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},BJe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function YJe(t){pi(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function sce(t){var n,e,i,r,o,s=[KJe,JJe],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function JJe(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function KJe(t){var n,e;return n=new wqe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ace(t){var n,e;return n=new k4({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function QJe(t){var n,e;return{c:function(){n=be("div"),e=tn(t[17]),P(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function ZJe(t){var n,e;return n=new k4({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z,H,he,E,N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne=t[21](t[0]).description+"";n=new Nqe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new sr({props:{data:t[15]?ru:rp}});var ie=t[15]&&sce(t);X=new sr({props:{data:t[16]?ru:rp}});var Ie=t[16]&&ace(t),Ye=[ZJe,QJe],Le=[];function _t(At,_n){return At[17]?1:0}return Y=_t(t),V=Le[Y]=Ye[Y](t),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=be("div"),o=be("div"),(s=be("div")).innerHTML='
    Language
    ',a=it(),l=be("div"),c=it(),(u=be("div")).innerHTML='
    Path
    ',d=it(),h=be("input"),p=it(),m=be("div"),g=be("div"),v=be("button"),mt(y.$$.fragment),_=tn("\n Wizard"),C=it(),ie&&ie.c(),S=it(),(M=be("div")).innerHTML='
    Query
    ',$=it(),G=be("textarea"),R=it(),z=be("div"),U=be("div"),q=be("div"),re=be("div"),L=be("button"),mt(X.$$.fragment),Z=tn("\n Original"),H=it(),Ie&&Ie.c(),he=it(),E=be("div"),(N=be("div")).innerHTML='
    Preview
    ',F=it(),V.c(),oe=it(),fe=be("div"),Ne=be("button"),xe=tn("Transform"),P(s,"class","jse-label svelte-107mggt"),P(l,"class","jse-description svelte-107mggt"),P(u,"class","jse-label svelte-107mggt"),P(h,"class","jse-path svelte-107mggt"),P(h,"type","text"),h.readOnly=!0,P(h,"title","Selected path"),h.value=f=Hi(t[1])?"(whole document)":tu(Kl(t[1])),P(v,"type","button"),P(v,"class","svelte-107mggt"),P(g,"class","jse-label-inner svelte-107mggt"),P(m,"class","jse-label svelte-107mggt"),P(M,"class","jse-label svelte-107mggt"),P(G,"class","jse-query svelte-107mggt"),P(G,"spellcheck","false"),G.value=t[13],P(o,"class","jse-query-contents svelte-107mggt"),P(L,"type","button"),P(L,"class","svelte-107mggt"),P(re,"class","jse-label-inner svelte-107mggt"),P(q,"class","jse-label svelte-107mggt"),P(U,"class","jse-original-data svelte-107mggt"),Mt(U,"jse-hide",!t[16]),P(N,"class","jse-label svelte-107mggt"),P(E,"class","jse-preview-data svelte-107mggt"),P(z,"class","jse-data-contents svelte-107mggt"),Mt(z,"jse-hide-original-data",!t[16]),P(r,"class","jse-main-contents svelte-107mggt"),P(Ne,"type","button"),P(Ne,"class","jse-primary svelte-107mggt"),Ne.disabled=tt=!!t[17],P(fe,"class","jse-actions svelte-107mggt"),P(i,"class","jse-modal-contents svelte-107mggt")},m:function(At,_n){ft(n,At,_n),Pe(At,e,_n),Pe(At,i,_n),de(i,r),de(r,o),de(o,s),de(o,a),de(o,l),l.innerHTML=ne,de(o,c),de(o,u),de(o,d),de(o,h),de(o,p),de(o,m),de(m,g),de(g,v),ft(y,v,null),de(v,_),de(o,C),ie&&ie.m(o,null),de(o,S),de(o,M),de(o,$),de(o,G),de(r,R),de(r,z),de(z,U),de(U,q),de(q,re),de(re,L),ft(X,L,null),de(L,Z),de(U,H),Ie&&Ie.m(U,null),de(z,he),de(z,E),de(E,N),de(E,F),Le[Y].m(E,null),de(i,oe),de(i,fe),de(fe,Ne),de(Ne,xe),ze=!0,ot||(B=[Ft(v,"click",t[25]),Ft(G,"input",t[23]),Ft(L,"click",t[26]),Ft(Ne,"click",t[24]),_a(nKe.call(null,Ne))],ot=!0)},p:function(At,_n){var ci={};512&_n[0]&&(ci.queryLanguages=At[9]),1&_n[0]&&(ci.queryLanguageId=At[0]),n.$set(ci),(!ze||1&_n[0])&&ne!==(ne=At[21](At[0]).description+"")&&(l.innerHTML=ne),(!ze||2&_n[0]&&f!==(f=Hi(At[1])?"(whole document)":tu(Kl(At[1])))&&h.value!==f)&&(h.value=f);var on={};32768&_n[0]&&(on.data=At[15]?ru:rp),y.$set(on),At[15]?ie?(ie.p(At,_n),32768&_n[0]&&Q(ie,1)):((ie=sce(At)).c(),Q(ie,1),ie.m(o,S)):ie&&($t(),ce(ie,1,1,function(){ie=null}),Bt()),(!ze||8192&_n[0])&&(G.value=At[13]);var Ni={};65536&_n[0]&&(Ni.data=At[16]?ru:rp),X.$set(Ni),At[16]?Ie?(Ie.p(At,_n),65536&_n[0]&&Q(Ie,1)):((Ie=ace(At)).c(),Q(Ie,1),Ie.m(U,null)):Ie&&($t(),ce(Ie,1,1,function(){Ie=null}),Bt()),(!ze||65536&_n[0])&&Mt(U,"jse-hide",!At[16]);var pn=Y;(Y=_t(At))===pn?Le[Y].p(At,_n):($t(),ce(Le[pn],1,1,function(){Le[pn]=null}),Bt(),(V=Le[Y])?V.p(At,_n):(V=Le[Y]=Ye[Y](At)).c(),Q(V,1),V.m(E,null)),(!ze||65536&_n[0])&&Mt(z,"jse-hide-original-data",!At[16]),(!ze||131072&_n[0]&&tt!==(tt=!!At[17]))&&(Ne.disabled=tt)},i:function(At){ze||(Q(n.$$.fragment,At),Q(y.$$.fragment,At),Q(ie),Q(X.$$.fragment,At),Q(Ie),Q(V),ze=!0)},o:function(At){ce(n.$$.fragment,At),ce(y.$$.fragment,At),ce(ie),ce(X.$$.fragment,At),ce(Ie),ce(V),ze=!1},d:function(At){pt(n,At),At&&je(e),At&&je(i),pt(y),ie&&ie.d(),pt(X),Ie&&Ie.d(),Le[Y].d(),ot=!1,ho(B)}}}function tKe(t){var n,e,i,r,o;return e=new Doe({props:{$$slots:{default:[eKe]},$$scope:{ctx:t}}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=_a(iS.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nKe(t){t.focus()}function iKe(t,n,e){var i,r,o=wa("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+fb():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,_=n.queryLanguageId,C=n.onChangeQueryLanguage,S=n.onRenderValue,M=n.onClassName,$=n.onTransform,G=xa("simple-modal").close,R="".concat(a,":").concat(ln(u)),z=ed[R]||{},U=!1!==ed.showWizard,q=!1!==ed.showOriginal,re=z.queryOptions||{},L=_===z.queryLanguageId&&z.query?z.query:he(_).createQuery(l,z.queryOptions||{}),X=z.isManual||!1,Z=void 0,H={text:""};function he(N){return y.find(function(F){return F.id===N})||y[0]}var E=Gv(function(N,F){try{o("previewTransform",{query:F});var Y=he(_).executeQuery(N,F,p);e(18,H={json:Y}),e(17,Z=void 0)}catch(V){e(18,H={text:""}),e(17,Z=V.toString())}},300);return t.$$set=function(N){"id"in N&&e(28,a=N.id),"json"in N&&e(29,l=N.json),"rootPath"in N&&e(1,u=N.rootPath),"indentation"in N&&e(2,d=N.indentation),"escapeControlCharacters"in N&&e(3,h=N.escapeControlCharacters),"escapeUnicodeCharacters"in N&&e(4,f=N.escapeUnicodeCharacters),"parser"in N&&e(5,p=N.parser),"parseMemoizeOne"in N&&e(6,m=N.parseMemoizeOne),"validationParser"in N&&e(7,g=N.validationParser),"pathParser"in N&&e(8,v=N.pathParser),"queryLanguages"in N&&e(9,y=N.queryLanguages),"queryLanguageId"in N&&e(0,_=N.queryLanguageId),"onChangeQueryLanguage"in N&&e(30,C=N.onChangeQueryLanguage),"onRenderValue"in N&&e(10,S=N.onRenderValue),"onClassName"in N&&e(11,M=N.onClassName),"onTransform"in N&&e(31,$=N.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,L),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:re,query:L,queryLanguageId:_,isManual:X},ed),o("store state in memory",R,ed[R]))},[_,u,d,h,f,p,m,g,v,y,S,M,re,L,i,U,q,Z,H,r,G,he,function(N){e(12,re=N),e(13,L=he(_).createQuery(l,N)),e(33,X=!1),o("updateQueryByWizard",{queryOptions:re,query:L,isManual:X})},function(N){e(13,L=N.target.value),e(33,X=!0),o("handleChangeQuery",{query:L,isManual:X})},function(){try{o("handleTransform",{query:L});var N=he(_).executeQuery(i,L,p);$([{op:"replace",path:ln(u),value:N}]),G()}catch(F){console.error(F),e(18,H={text:""}),e(17,Z=F.toString())}},function(){e(15,U=!U),e(32,ed.showWizard=U,ed)},function(){e(16,q=!q),e(32,ed.showOriginal=q,ed)},function(N){o("handleChangeQueryLanguage",N),e(0,_=N),C(N);var F=he(_);e(13,L=F.createQuery(l,re)),e(33,X=!1)},a,l,C,$,ed,X]}var rKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,iKe,tKe,Ei,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},YJe,[-1,-1]),r}return Se(e)}(),up={};function oKe(t){pi(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function lce(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new Hm({props:c}),Vi.push(function(){return Uu(o,"value",l)}),{c:function(){n=be("tr"),(e=be("th")).textContent="Property",i=it(),r=be("td"),mt(o.$$.fragment),P(e,"class","svelte-1y818v2"),P(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),de(n,e),de(n,i),de(n,r),ft(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],zu(function(){return s=!1})),o.$set(h)},i:function(u){a||(Q(o.$$.fragment,u),a=!0)},o:function(u){ce(o.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(o)}}}function cce(t){var n,e;return{c:function(){n=be("div"),e=tn(t[5]),P(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&je(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z;e=new c4({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&lce(t);function he(F){t[15](F)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),S=new Hm({props:E}),Vi.push(function(){return Uu(S,"value",he)});var N=t[5]&&cce(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),o=be("table"),(s=be("colgroup")).innerHTML=' \n ',a=it(),l=be("tbody"),c=be("tr"),(u=be("th")).textContent="Path",d=it(),h=be("td"),f=be("input"),m=it(),H&&H.c(),g=it(),v=be("tr"),(y=be("th")).textContent="Direction",_=it(),C=be("td"),mt(S.$$.fragment),$=it(),G=be("div"),N&&N.c(),R=it(),z=be("div"),U=be("button"),q=tn("Sort"),P(u,"class","svelte-1y818v2"),P(f,"class","jse-path svelte-1y818v2"),P(f,"type","text"),f.readOnly=!0,P(f,"title","Selected path"),f.value=p=Hi(t[0])?"(whole document)":tu(Kl(t[0])),P(h,"class","svelte-1y818v2"),P(y,"class","svelte-1y818v2"),P(C,"class","svelte-1y818v2"),P(o,"class","svelte-1y818v2"),P(G,"class","jse-space svelte-1y818v2"),P(U,"type","button"),P(U,"class","jse-primary svelte-1y818v2"),U.disabled=re=!!t[4]&&!t[1],P(z,"class","jse-actions svelte-1y818v2"),P(r,"class","jse-modal-contents svelte-1y818v2"),P(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(F,Y){Pe(F,n,Y),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(o,s),de(o,a),de(o,l),de(l,c),de(c,u),de(c,d),de(c,h),de(h,f),de(l,m),H&&H.m(l,null),de(l,g),de(l,v),de(v,y),de(v,_),de(v,C),ft(S,C,null),de(r,$),de(r,G),N&&N.m(G,null),de(r,R),de(r,z),de(z,U),de(U,q),L=!0,X||(Z=[Ft(U,"click",t[8]),_a(aKe.call(null,U)),_a(iS.call(null,n,t[6]))],X=!0)},p:function(F,Y){var V=Un(Y,1)[0],oe={};16&V&&(oe.title=F[4]?"Sort array items":"Sort object keys"),e.$set(oe),(!L||1&V&&p!==(p=Hi(F[0])?"(whole document)":tu(Kl(F[0])))&&f.value!==p)&&(f.value=p),F[4]&&(F[3].length>1||void 0===F[1])?H?(H.p(F,V),26&V&&Q(H,1)):((H=lce(F)).c(),Q(H,1),H.m(l,g)):H&&($t(),ce(H,1,1,function(){H=null}),Bt());var fe={};!M&&4&V&&(M=!0,fe.value=F[2],zu(function(){return M=!1})),S.$set(fe),F[5]?N?N.p(F,V):((N=cce(F)).c(),N.m(G,null)):N&&(N.d(1),N=null),(!L||18&V&&re!==(re=!!F[4]&&!F[1]))&&(U.disabled=re)},i:function(F){L||(Q(e.$$.fragment,F),Q(H),Q(S.$$.fragment,F),L=!0)},o:function(F){ce(e.$$.fragment,F),ce(H),ce(S.$$.fragment,F),L=!1},d:function(F){F&&je(n),pt(e),H&&H.d(),pt(S),N&&N.d(),X=!1,ho(Z)}}}function aKe(t){t.focus()}function lKe(t,n,e){var i,r,o,s=wa("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xa("simple-modal").close,h="".concat(a,":").concat(ln(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=up[h]&&up[h].selectedProperty||void 0,v=up[h]&&up[h].selectedDirection||p,y=void 0;return t.$$set=function(_){"id"in _&&e(9,a=_.id),"json"in _&&e(10,l=_.json),"rootPath"in _&&e(0,c=_.rootPath),"onSort"in _&&e(11,u=_.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?CO(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(Lb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,up[h]={selectedProperty:g,selectedDirection:v},up),s("store state in memory",h,up[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var _,C;e(5,y=void 0);var S=null===(_=g)||void 0===_?void 0:_.value,M=null===(C=v)||void 0===C?void 0:C.value,$=Nle(l,c,S,M);u({operations:$,rootPath:c,itemPath:S,direction:M}),d()}catch(G){e(5,y=G.toString())}},a,l,u,up,r,function(_){e(1,g=_),e(3,o),e(13,r),e(4,i)},function(_){e(2,v=_)}]}var cKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,lKe,sKe,Ei,{id:9,json:10,rootPath:0,onSort:11},oKe),r}return Se(e)}();function dh(){}function sS(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function uKe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function dKe(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,_=n.canTransform,C=n.onRenderMenu;return t.$$set=function(S){"readOnly"in S&&e(1,s=S.readOnly),"onFormat"in S&&e(2,a=S.onFormat),"onCompact"in S&&e(3,l=S.onCompact),"onSort"in S&&e(4,c=S.onSort),"onTransform"in S&&e(5,u=S.onTransform),"onToggleSearch"in S&&e(6,d=S.onToggleSearch),"onUndo"in S&&e(7,h=S.onUndo),"onRedo"in S&&e(8,f=S.onRedo),"canUndo"in S&&e(9,p=S.canUndo),"canRedo"in S&&e(10,m=S.canRedo),"canFormat"in S&&e(11,g=S.canFormat),"canCompact"in S&&e(12,v=S.canCompact),"canSort"in S&&e(13,y=S.canSort),"canTransform"in S&&e(14,_=S.canTransform),"onRenderMenu"in S&&e(15,C=S.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:m4,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:UYe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!_},{type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,r]}var hKe=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,dKe,uKe,Ei,{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}),r}return Se(e)}(),fo=function(){function t(){ke(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),aS.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),aS.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new t_(this),o=new t_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new t_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new dce(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new hce(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):aS.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,fo);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function fKe(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ke(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new pKe(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(uce(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=lS(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return pr(qi(e.prototype),"replace",this).call(this,i,r,o);var s=lS(this.text,lS(o.text,uce(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):aS.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),aS=function(t){wt(e,fo);var n=Ct(e);function e(i,r){var o;ke(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return pr(qi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return pr(qi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Un(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,z){return R+z.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,_=[];function C(R){var z;if(R.lines>p&&R instanceof e){var U,q=Re(R.children);try{for(q.s();!(U=q.n()).done;)C(U.value)}catch(re){q.e(re)}finally{q.f()}}else R.lines>m&&(v>m||!v)?(S(),g.push(R)):R instanceof id&&v&&(z=_[_.length-1])instanceof id&&R.lines+z.lines<=32?(v+=R.lines,y+=R.length+1,_[_.length-1]=new id(z.text.concat(R.text),z.length+1+R.length)):(v+R.lines>f&&S(),v+=R.lines,y+=R.length+1,_.push(R))}function S(){0!=v&&(g.push(1==_.length?_[0]:e.from(_,y)),y=-1,v=_.length=0)}var M,$=Re(i);try{for($.s();!(M=$.n()).done;)C(M.value)}catch(R){$.e(R)}finally{$.f()}return S(),1==g.length?g[0]:new e(g,o)}}]),e}();function lS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ke(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),dce=function(){function t(n,e,i){ke(this,t),this.value="",this.done=!1,this.cursor=new t_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),hce=function(){function t(n){ke(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(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}}]),t}();typeof Symbol<"u"&&(fo.prototype[Symbol.iterator]=function(){return this.iter()},t_.prototype[Symbol.iterator]=dce.prototype[Symbol.iterator]=hce.prototype[Symbol.iterator]=function(){return this});for(var pKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),w0="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(t){return t?parseInt(t,36):1}),cS=1;cSt)return w0[n-1]<=t;return!1}function fce(t){return t>=127462&&t<=127487}function Pl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?gKe:pce)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function pce(t,n,e){if(n==t.length)return n;n&&mce(t.charCodeAt(n))&&gce(t.charCodeAt(n-1))&&n--;var i=Ba(t,n);for(n+=Sc(i);n=0&&fce(Ba(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function gKe(t,n,e){for(;n>0;){var i=pce(t,n-2,e);if(i=56320&&t<57344}function gce(t){return t>=55296&&t<56320}function Ba(t,n){var e=t.charCodeAt(n);if(!gce(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return mce(i)?i-56320+(e-55296<<10)+65536:e}function S4(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Sc(t){return t<65536?1:2}var D4=/\r\n?|\n/,Ll=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ll||(Ll={})),C0=function(){function t(n){ke(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ll.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ll.Simple&&c>=n&&(i==Ll.TrackDel&&rn||i==Ll.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,C0);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return T4(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return E4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){T4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return C0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new n_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&dp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var _=y?"string"==typeof y?fo.of(y.split(o||D4)):y:fo.empty,C=_.length;if(m==v&&0==C)return;ml&&dl(s,m-l,-1),dl(s,v-m,C),dp(a,s,_),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function dp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function E4(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new n_(t),a=new n_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);dl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):C0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new n_(t),s=new n_(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):C0.create(i);if(0==o.ins)dl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;dl(i,l,u,a),r&&u&&dp(r,i,s.text)}else-1==s.ins?(dl(i,o.off?0:o.len,l,a),r&&dp(r,i,o.textBit(l))):(dl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&dp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else dl(i,0,s.ins,a),r&&dp(r,i,s.text),s.next()}}var n_=function(){function t(n){ke(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?fo.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?fo.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),uS=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return en.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return en.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return en.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),en=function(){function t(n,e){ke(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return uS.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return uS.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function yce(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var A4=0,Qn=function(){function t(n,e,i,r,o){ke(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=A4++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new dS([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:M4),!!n.static,n.enables)}}]),t}();function M4(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var dS=function(){function t(n,e,i,r){ke(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=A4++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||I4(m,h)){var v=o(m);if(c?!bce(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var _=hS(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Va)||g.field(C,!1)==m.field(C,!1)})||(c?bce(v=o(m),_,s):s(v=o(m),_)))return m.values[l]=_,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function bce(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,_ce.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(A4++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function i_(t){return function(n){return new xce(n,t)}}var k0={highest:i_(0),high:i_(1),default:i_(2),low:i_(3),lowest:i_(4)},xce=Se(function t(n,e){ke(this,t),this.inner=n,this.prec=e}),hp=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new F4(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),F4=Se(function t(n,e){ke(this,t),this.compartment=n,this.inner=e}),wce=function(){function t(n,e,i,r,o,s){for(ke(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,S,M,$,G,o=[],s=Object.create(null),a=new Map,l=Re((C=n,S=e,M=a,$=[[],[],[],[],[]],G=new Map,function R(z,U){var q=G.get(z);if(null!=q){if(q<=U)return;var re=$[q].indexOf(z);re>-1&&$[q].splice(re,1),z instanceof F4&&M.delete(z.compartment)}if(G.set(z,U),Array.isArray(z)){var L,X=Re(z);try{for(X.s();!(L=X.n()).done;)R(L.value,U)}catch(he){X.e(he)}finally{X.f()}}else if(z instanceof F4){if(M.has(z.compartment))throw new RangeError("Duplicate use of compartment in extensions");var Z=S.get(z.compartment)||z.inner;M.set(z.compartment,Z),R(Z,U)}else if(z instanceof xce)R(z.inner,z.prec);else if(z instanceof Va)$[U].push(z),z.provides&&R(z.provides,U);else if(z instanceof dS)$[U].push(z),z.facet.extensions&&R(z.facet.extensions,2);else{var H=z.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(z,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,U)}}(C,2),$.reduce(function(z,U){return z.concat(U)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Va?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(S){return C.slot(S)})},p=0,m=o;p>1;function N(F){for(var Y=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function hS(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Cce=Qn.define(),kce=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Sce=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Dce=Qn.define(),Tce=Qn.define(),Ece=Qn.define(),Ace=Qn.define({combine:function(t){return!!t.length&&t[0]}}),fp=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new _Ke}}]),t}(),_Ke=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new fp(this,n)}}]),t}(),xKe=function(){function t(n){ke(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new hr(this,n)}}]),t}(),hr=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new xKe((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();hr.reconfigure=hr.define(),hr.appendConfig=hr.define();var Ql=function(){function t(n,e,i,r,o,s){ke(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&yce(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{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(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function wKe(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Mce(u,O4(l,h,a.changes.newLength),!0))}return u==a?a:Ql.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Dce));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:wKe(u,h))}}catch(_){d.e(_)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Ql.create(c,f,a.selection&&a.selection.map(p),hr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet(Tce),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Ql?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Ql?y[0]:Ice(c,S0(y),!1)}return a}(s):s)}Ql.time=fp.define(),Ql.userEvent=fp.define(),Ql.addToHistory=fp.define(),Ql.remote=fp.define();var CKe=[];function S0(t){return null==t?CKe:Array.isArray(t)?t:[t]}var j4,cs=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(cs||(cs={})),kKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{j4=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Fo=function(){function t(n,e,i,r,o,s){ke(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return r_(this,i),hS(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return fo.of(n.split(this.facet(t.lineSeparator)||D4))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(r_(this,e),hS(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Va&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Ace)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Cce));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function SKe(t){return function(n){if(!/\S/.test(n))return cs.Space;if(function(i){if(j4)return j4.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||kKe.test(o)))return!0}return!1}(n))return cs.Word;for(var e=0;e-1)return cs.Word;return cs.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Pl(i,a,!1);if(s(i.slice(c,a))!=cs.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:en.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=wce.resolve(n.extensions||[],new Map),i=n.doc instanceof fo?n.doc:fo.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||D4)),r=n.selection?n.selection instanceof en?n.selection:en.single(n.selection.anchor,n.selection.head):en.single(0);return yce(r,i.length),e.staticFacet(kce)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function su(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();Um.prototype.startSide=Um.prototype.endSide=0,Um.prototype.point=!1,Um.prototype.mapMode=Ll.TrackDel;var P4=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function L4(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var DKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Go=function(){function t(n,e,i,r){ke(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(L4)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Fce(this,null,-1).goto(0),h=0,f=[],p=new Gm;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return R4.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R4.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=Nce(s,a,i),c=new o_(s,l,o),u=new o_(a,l,o);i.iterGaps(function(d,h,f){return Oce(c,d,u,h,f,r)}),i.empty&&0==i.length&&Oce(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=Nce(o,s),l=new o_(o,a,0).goto(i),c=new o_(s,a,0).goto(i);;){if(l.to!=c.to||!B4(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new o_(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Gm,o=Re(n instanceof P4?[n]:i?function TKe(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(L4);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Go.empty=new Go([],[],null,-1),Go.empty.nextLayer=Go.empty;var Gm=function(){function t(){ke(this,t),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 Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new DKe(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,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.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=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Go.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Go.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function Nce(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{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(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)$4(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)$4(this.heap,o);(this.to-n||this.value.endSide-e)<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 n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),$4(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Fce(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function $4(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var o_=function(){function t(n,e,i){ke(this,t),this.minPoint=i,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=R4.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){fS(this.active,n),fS(this.activeTo,n),fS(this.activeRank,n),this.minActive=jce(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&fS(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Oce(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&B4(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!B4(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function B4(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function jce(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Pl(t,r)}return!0===i?-1:t.length}for(var Pce=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),H4=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Lce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},pp=function(){function t(n,e){ke(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==bn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Lce[Pce]||1;return Lce[Pce]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[H4]||new EKe(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),mS=null,EKe=function(){function t(n){if(ke(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(mS)return n.adoptedStyleSheets=[mS.sheet].concat(n.adoptedStyleSheets),n[H4]=mS;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),mS=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[H4]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Rce=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),AKe=typeof navigator<"u"&&/Mac/.test(navigator.platform),MKe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),IKe=AKe||Rce&&+Rce[1]<57,Ha=0;Ha<10;Ha++)mp[48+Ha]=mp[96+Ha]=String(Ha);for(Ha=1;Ha<=24;Ha++)mp[Ha+111]="F"+Ha;for(Ha=65;Ha<=90;Ha++)mp[Ha]=String.fromCharCode(Ha+32),a_[Ha]=String.fromCharCode(Ha);for(var z4 in mp)a_.hasOwnProperty(z4)||(a_[z4]=mp[z4]);function gS(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function D0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function vS(t,n){if(!n.anchorNode)return!1;try{return D0(t,n.anchorNode)}catch{return!1}}function l_(t){return 3==t.nodeType?E0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function yS(t,n,e,i){return!!e&&($ce(t,n,e,i,-1)||$ce(t,n,e,i,1))}function bS(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function $ce(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:c_(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=bS(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?c_(t):0}}}function c_(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Bce={left:0,right:0,top:0,bottom:0};function U4(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function NKe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Vce,FKe=function(){function t(){ke(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),T0=null;function Hce(t){if(t.setActive)return t.setActive();if(T0)return t.focus(T0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==T0?{get preventScroll(){return T0={preventScroll:!0},!0}}:void 0),!T0){T0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Vce||(Vce=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function A0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function zce(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ke(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,bS(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,bS(n)+1,e)}}]),t}(),G4=[],ws=function(){function t(){ke(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{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(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=Uce(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=Uce(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==c_(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G4;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function Uce(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ws.prototype.breakAfter=0;var Gce=function(){function t(n,e,i){ke(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function Wce(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:Qce||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:_S,ie_version:Xce?W4.documentMode||6:X4?+X4[1]:q4?+q4[1]:0,gecko:Yce,gecko_version:Yce?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Y4,chrome_version:Y4?+Y4[1]:0,ios:Qce,android:/Android\b/.test(Tc.userAgent),webkit:Jce,safari:Kce,webkit_version:Jce?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=W4.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},u_=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return J4(this.dom,i,r)}}]),e}(),Wm=function(t){wt(e,ws);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ke(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(zce(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),pr(qi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}}]),e}();function J4(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?U4(l,s<0):l||null}var K4=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:U4(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){pr(qi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),Zce=function(t){wt(e,K4);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Q4(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?eue(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Q4(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return J4(a,l,c)}):J4(a,i,r)}},{key:"destroy",value:function(){var i;pr(qi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Q4(t,n,e,i,r,o){if(e instanceof Wm){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ws.get(s);if(!a)return o(t,n);var l=D0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return fo.empty}}]),e}();function tue(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof Wm&&r.length&&(i=r[r.length-1])instanceof Wm&&i.mark.eq(n.mark)?nue(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function iue(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new rue(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new d_(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=oue(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new d_(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new ij(i)}},{key:"set",value:function(i){return Go.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();yi.none=Go.empty;var rue=function(t){wt(e,yi);var n=Ct(e);function e(i){var r;ke(this,e);var o=oue(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&tj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();rue.prototype.point=!1;var ij=function(t){wt(e,yi);var n=Ct(e);function e(i){return ke(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&tj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();ij.prototype.mapMode=Ll.TrackBefore,ij.prototype.point=!0;var d_=function(t){wt(e,yi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return ke(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ll.TrackBefore:Ll.TrackAfter:Ll.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();function oue(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function rj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}d_.prototype.point=!0;var od=function(t){wt(e,ws);var n=Ct(e);function e(){var i;return ke(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),qce(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){tj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){nue(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=ej(r,this.attrs||{})),o&&(this.attrs=ej({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(zce(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&&(nj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),pr(qi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ws.get(s)instanceof Wm;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ws.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof u_})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof u_)||/[^ -~]/.test(s.text))return null;var a=l_(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return _o.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),oj=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(xS(new Z4(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(xS(new u_(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof d_){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof d_)if(i.block){var l=i.type;l!=_o.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new oj(i.widget||new sue("div"),a,l))}else{var c=K4.create(i.widget||new sue("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(xS(new Z4(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(xS(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);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=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Go.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function xS(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new Wm(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var sue=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),aue=Qn.define(),lue=Qn.define(),cue=Qn.define(),uue=Qn.define(),sj=Qn.define(),due=Qn.define(),hue=Qn.define(),fue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),pue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),mue=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ke(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),gue=hr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(uue);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var wS=Qn.define({combine:function(t){return!t.length||t[0]}}),PKe=0,h_=Qn.define(),ka=function(){function t(n,e,i,r){ke(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(PKe++,n,i.eventHandlers,function(a){var l=[h_.of(a)];return s&&l.push(f_.of(function(c){var u=c.plugin(a);return u?s(u):yi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),aj=function(){function t(n){ke(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),vue=Qn.define(),lj=Qn.define(),f_=Qn.define(),yue=Qn.define(),bue=Qn.define(),p_=Qn.define(),M0=function(){function t(n,e,i,r){ke(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),_ue=function(){function t(n,e,i){ke(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new M0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{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(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),us=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(us||(us={})),cj=us.LTR,LKe=us.RTL;function xue(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),ds=[];function Due(t){return[new I0(0,t,0)]}var Tue="";function HKe(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=I0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Pl(t.text,s,u);if(Tue=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return en.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ws.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Aue(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Mue=Se(function t(n,e){ke(this,t),this.node=n,this.offset=e,this.pos=-1}),Iue=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).view=i,r.compositionDeco=yi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new M0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=yi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Fue(a);if(!c)return yi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Eue([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=jKe.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,_=v.off,C=o.findPos(l,-1);Wce(this,C.i,C.off,y,_,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function zKe(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&yS(l.node,l.offset,d.anchorNode,d.anchorOffset)&&yS(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function qKe(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=gS(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function GKe(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=gS(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||vS(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ws.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=_o.WidgetBefore&&a.type!=_o.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==_o.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==us.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?l_(g):[];if(v.length){var y=v[v.length-1],_=u?y.right-m.left:m.right-y.left;_>c&&(c=_,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?us.RTL:us.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=l_(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new Gce(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(yi.replace({widget:new Nue(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return yi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(f_).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(bue).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,S,M,$,G,R,z,U){for(var q=C.ownerDocument,re=q.defaultView||window,L=C;L;)if(1==L.nodeType){var X=void 0,Z=L==q.body;if(Z)X=NKe(re);else{if(L.scrollHeight<=L.clientHeight&&L.scrollWidth<=L.clientWidth){L=L.assignedSlot||L.parentNode;continue}var H=L.getBoundingClientRect();X={left:H.left,right:H.left+L.clientWidth,top:H.top,bottom:H.top+L.clientHeight}}var he=0,E=0;if("nearest"==G)S.top0&&S.bottom>X.bottom+E&&(E=S.bottom-X.bottom+E+z)):S.bottom>X.bottom&&(E=S.bottom-X.bottom+z,M<0&&S.top-E0&&S.right>X.right+he&&(he=S.right-X.right+he+R)):S.right>X.right&&(he=S.right-X.right+R,M<0&&S.left0&&e<=0)n=c_(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var WKe=function(){function t(){ke(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){rj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){rj(n,e,this.changes)}}]),t}();function XKe(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function YKe(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function hj(t,n){return t.topn.top+1}function jue(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function fj(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=l_(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&hj(c,m)?c=Pue(c,m.bottom):u&&hj(u,m)&&(u=jue(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var _=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Lue(i,_,e):d&&"false"!=i.contentEditable?fj(i,_,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Lue(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&E0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Rue(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=_o.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:$ue(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,_=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,_=C.offset)}else if(m.caretRangeFromPoint){var S=m.caretRangeFromPoint(c,u);S&&(_=S.startOffset,(!t.contentDOM.contains(y=S.startContainer)||Zn.safari&&function JKe(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return E0(t,i-1,i).getBoundingClientRect().left>e}(y,_,c)||Zn.chrome&&function KKe(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():E0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,_,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var M=od.find(t.docView,p);if(!M)return d>r.top+r.height/2?r.to:r.from;var $=fj(M.dom,c,u);y=$.node,_=$.offset}var G=t.docView.nearest(y);if(!G)return null;if(G.isWidget){var R=G.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+V4(s,o,t.state.tabSize)}function Bue(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=HKe(r,o,s,a,e),u=Tue;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=en.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function pj(t,n,e){for(var i=t.state.facet(yue).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?en.cursor(a,1):en.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var ZKe=function(){function t(n){var e=this;ke(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=la[s];n.contentDOM.addEventListener(s,function(l){zue(n,l)&&i(a,l)},mj[s]),e.registeredEvents.push(s)};for(var o in la)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(la.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){zue(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,A0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Vue=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],eQe="dthko",Hue=[16,17,18,20,91,92,224,225];function CS(t){return.7*t+8}var tQe=function(){function t(n,e,i,r){ke(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Fo.allowMultipleSelections)&&(a=e,(l=n.state.facet(aue)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(lue);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=gS(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Zue(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-CS(o.left-n.clientX):n.clientX>=o.right&&(i=CS(n.clientX-o.right)),n.clientY<=o.top?r=-CS(o.top-n.clientY):n.clientY>=o.bottom&&(r=CS(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.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:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function zue(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ws.get(i))&&e.ignoreEvent(n))return!1;return!0}var la=Object.create(null),mj=Object.create(null),Uue=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function Gue(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=gj&&i.selection.ranges.every(function(c){return c.empty})&&gj==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:en.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:en.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function Wue(t,n,e,i){if(1==i)return en.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return en.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Pl(h.text,f,!1):m=Pl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Pl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(cue));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=Yue(s=t,a=n),c=Zue(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=Yue(s,d),m=Wue(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=Wue(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(_){return _.eq(m)})?function(_,C){for(var S=0;;S++)if(_.ranges[S].eq(C))return en.create(_.ranges.slice(0,S).concat(_.ranges.slice(S+1)),_.mainIndex==S?0:_.mainIndex-(_.mainIndex>S?1:0))}(u,m):f?u.addRange(m):en.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new tQe(t,n,i,o)),o&&t.observer.ignore(function(){return Hce(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var que=function(t,n){return t>=n.top&&t<=n.bottom},Xue=function(t,n,e){return que(n,e)&&t>=e.left&&t<=e.right};function nQe(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&Xue(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&Xue(e,i,a)?1:s&&que(i,s)?-1:1}function Yue(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:nQe(t,e,n.clientX,n.clientY)}}var iQe=Zn.ie&&Zn.ie_version<=11,Jue=null,Kue=0,Que=0;function Zue(t){if(!iQe)return t.detail;var n=Jue,e=Que;return Jue=t,Que=Date.now(),Kue=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Kue+1)%3:1}function ede(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}la.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},la.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&ede(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(_){g.e(_)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){gj=o?i:null;var s=Uue?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var tde=fp.define();function nde(t,n){var e,i=[],r=Re(t.facet(hue));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:tde.of(!0)}):null}function ide(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=nde(t.state,n);e?t.dispatch(e):t.update([])}},10)}la.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ide(t)},la.blur=function(t){t.observer.clearSelectionRange(),ide(t)},la.compositionstart=la.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},la.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},la.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},la.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Vue.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var rde=["pre-wrap","normal","pre-line","break-spaces"],rQe=function(){function t(n){ke(this,t),this.lineWrapping=n,this.doc=fo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return rde.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ke(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Wo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Wo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),fh=function(t){wt(e,ode);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i,r,_o.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof N0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof N0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),N0=function(t){wt(e,sd);var n=Ct(e);function e(i){return ke(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new qm(f.from,f.length,m,p,_o.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new qm(v.from,v.length,o+u*g,u,_o.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Wo.ByHeight)return this.blockAt(i,o,s,a);if(r==Wo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new qm(c,l.to-c,0,0,_o.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new qm(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,_o.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new qm(m.from,m.length,p,v,_o.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new fh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),sQe=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Wo.ByPosNoHeight?Wo.ByPosNoHeight:Wo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Wo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&sde(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function sde(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof N0&&(i=t[n+1])instanceof N0&&t.splice(n-1,3,new N0(e.length+1+i.length))}var aQe=function(){function t(n,e){ke(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof fh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new fh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new fh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new N0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof fh)return n;var e=new fh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=_o.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=_o.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof fh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function dQe(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var vj=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return yi.replace({widget:new hQe(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new kS(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?lde:new pQe(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:m_(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(f_).filter(function(c){return"function"!=typeof c});var o=M0.extendWithRanges(n.changedRanges,function lQe(t,n,e){var i=new cQe;return Go.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(pue)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?us.RTL:us.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?dQe:uQe)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var _=n.docView.measureTextSize(),C=_.lineHeight,S=_.charWidth;(s=C>0&&r.refresh(o,C,S,v/S,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var M,$=Re(this.viewports);try{for($.s();!(M=$.n()).done;){var G=M.value,R=G.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(G);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,fo.empty,this.heightOracle,[new M0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oQe(G.from,R))}}catch(U){$.e(U)}finally{$.f()}r.heightChanged&&(c|=2)}var z=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return z&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.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(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new kS(r.lineAt(this.visibleTop-1e3*i,Wo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Wo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Wo.ByPos,o,0,0);l=new kS(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Wo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Wo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=us.LTR&&!r)return[];var l,c=[],u=function q(re,L,X,Z){if(!(L-rere&&F=X.from&&oe.to<=X.to&&Math.abs(oe.from-re)fe})});if(!Y){if(L=L})){var V=e.moveToLineBoundary(en.cursor(L),!1,!0).head;V>re&&(L=V)}Y=new vj(re,L,i.gapSize(X,re,L,Z))}c.push(Y)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||m_(this.heightMap.lineAt(n,Wo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return m_(this.heightMap.lineAt(this.scaler.fromDOM(n),Wo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return m_(this.heightMap.blockAt(this.scaler.fromDOM(n),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}}]),t}(),kS=Se(function t(n,e){ke(this,t),this.from=n,this.to=e});function fQe(t,n,e){var i=[],r=t,o=0;return Go.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function DS(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var lde={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},pQe=function(){function t(n,e,i){ke(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Wo.ByPos,n,0,0).top,p=e.lineAt(h,Wo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),bj=pp.newName(),cde=pp.newName(),ude=pp.newName(),dde={"&light":"."+cde,"&dark":"."+ude};function _j(t,n,e){return new pp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var mQe=_j("."+bj,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .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-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',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"}},dde),gQe=Se(function t(n,e,i,r){ke(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,_=m.focusOffset;return g&&(p.push(new Mue(g,v)),y==g&&_==v||p.push(new Mue(y,_))),p}(n),c=new Eue(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?en.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!D0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!D0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=en.single(h,d)}});function hde(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&Z>0&&R.charCodeAt(X-1)==z.charCodeAt(Z-1);)X--,Z--;return"end"==q&&(U-=X+Math.max(0,L-Math.min(X,Z))-L),X=X?L-U:0)+(Z-X),X=L):Z=Z?L-U:0)+(X-Z),Z=L),{from:L,toA:X,toB:Z}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:fo.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(wS)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&A0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&A0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&A0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(due).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),_=Fue(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,S=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var z=R.to-C,U=z-y.length;if(R.to-R.from!=S||t.state.sliceDoc(U,z)!=y||_&&R.to>=_.from&&R.from<=_.to)return{range:R};var q=d.changes({from:U,to:z,insert:e.insert}),re=R.to-r.to;return{changes:q,range:v?en.range(Math.max(0,v.anchor+re),Math.max(0,v.head+re)):R.map(q)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var M="input.type";return t.composing&&(M+=".compose",t.inputState.compositionFirstChange&&(M+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:M}),!0}if(i&&!i.main.eq(r)){var $=!1,G="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&($=!0),G=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:$,userEvent:G}),!0}return!1}var vQe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xj=Zn.ie&&Zn.ie_version<=11,yQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.active=!1,this.selectionRange=new FKe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),xj&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.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 i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(wS)?i.root.activeElement==this.dom:vS(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&yS(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(yS(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||gS(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=vS(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&vS(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gQe(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=hde(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=fde(e,n.previousSibling||n.target.previousSibling,-1),r=fde(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function fde(t,n,e){for(;n;){var i=ws.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function OKe(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new ade(e.state||Fo.create(e)),this.plugins=this.state.facet(h_).map(function(s){return new aj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new yQe(this),this.inputState=new ZKe(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Iue(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Ql?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(tde)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=nde(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Fo.phrases)!=this.state.facet(Fo.phrases))return this.setState(a);(i=_ue.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var _=y.state.selection.main;m=new mue(_.empty?_:en.cursor(_.head,_.head>_.anchor?-1:1))}var C,S=Re(y.effects);try{for(S.s();!(C=S.n()).done;){var M=C.value;M.is(gue)&&(m=M.value)}}catch(R){S.e(R)}finally{S.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=mde.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(p_)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(TS)!=i.state.facet(TS)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var $,G=Re(this.state.facet(sj));try{for(G.s();!($=G.n()).done;)(0,$.value)(i)}catch(R){G.e(R)}finally{G.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!hde(e,p)&&f.force&&A0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){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=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new ade(n),this.plugins=n.facet(h_).map(function(a){return new aj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Iue(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(h_),i=n.state.facet(h_);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new aj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!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&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(z){return Ec(n.state,z),pde}}),g=_ue.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var _=0;_1||S<-1)&&(this.scrollDOM.scrollTop+=S,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var M,$=Re(this.state.facet(sj));try{for($.s();!(M=$.n()).done;)(0,M.value)(i)}catch(R){$.e(R)}finally{$.f()}}}}},{key:"themeClasses",get:function(){return bj+" "+(this.state.facet(yj)?ude:cde)+" "+this.state.facet(TS)}},{key:"updateAttrs",value:function(){var n=this,e=gde(this,vue,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(wS)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),gde(this,lj,i);var r=this.observer.ignore(function(){var o=nj(n.contentDOM,n.contentAttrs,i),s=nj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(p_),pp.mount(this.root,this.styleModules.concat(mQe).reverse())}},{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(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==us.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return en.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return en.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return pj(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return en.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var _=u+(v+y)*c,C=Rue(r,{x:g,y:_},!1,c);if(_h.bottom||(c<0?Cl))return en.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Rue(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return U4(i,o[I0.find(o,n-r.from,-1,e)].dir==us.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(fue)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>bQe)return Due(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==cj?1:2,d=l==cj?2:1;if(!a||1==u&&!VKe.test(a))return Due(c);for(var h=0,f=u,p=u;h=0;re-=3)if(hh[re+1]==-G){var L=hh[re+2],X=2&L?u:4&L?1&L?d:u:0;X&&(ds[z]=ds[hh[re]]=X),U=re;break}}else{if(189==hh.length)break;hh[U++]=z,hh[U++]=$,hh[U++]=q}else if(2==(R=ds[z])||1==R){var Z=R==u;q=Z?0:1;for(var H=U-3;H>=0;H-=3){var he=hh[H+2];if(2&he)break;if(Z)hh[H+2]|=2;else{if(4&he)break;hh[H+2]|=4}}}for(var E=0;ENe;){for(var ze=tt,ot=2!=ds[--tt];tt>Ne&&ot==(2!=ds[tt-1]);)tt--;oe.push(new I0(tt,ze,ot?2:1))}else oe.push(new I0(Ne,fe,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){Hce(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gue.of(new mue("number"==typeof n?en.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ka.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=pp.newName(),r=[TS.of(i),p_.of(_j(".".concat(i),n))];return e&&e.dark&&r.push(yj.of(!0)),r}},{key:"baseTheme",value:function(n){return k0.lowest(p_.of(_j("."+bj,n,dde)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ws.get(i)||ws.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=p_,Wn.inputHandler=due,Wn.focusChangeEffect=hue,Wn.perLineTextDirection=fue,Wn.exceptionSink=uue,Wn.updateListener=sj,Wn.editable=wS,Wn.mouseSelectionStyle=cue,Wn.dragMovesSelection=lue,Wn.clickAddsSelectionRange=aue,Wn.decorations=f_,Wn.atomicRanges=yue,Wn.scrollMargins=bue,Wn.darkTheme=yj,Wn.contentAttributes=lj,Wn.editorAttributes=vue,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=hr.define();var bQe=4096,pde={},mde=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:us.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&ej(s,e)}return e}var _Qe=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function ES(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var wQe=k0.default(Wn.domEventHandlers({keydown:function(t,n){return bde(yde(n.state),t,n,"editor")}})),AS=Qn.define({enables:wQe}),vde=new WeakMap;function yde(t){var n=t.facet(AS),e=vde.get(n);return e||vde.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_Qe,s=Object.create(null),a=Object.create(null),l=function(M,$){var G=a[M];if(null==G)a[M]=$;else if(G!=$)throw new Error("Key binding "+M+" is used both as a regular binding and as a multi-stroke prefix")},c=function(M,$,G,R){for(var z,U,q=s[M]||(s[M]=Object.create(null)),re=$.split(/ (?!$)/).map(function(he){return function xQe(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==us.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=_de(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=wde(t,i),f=wde(t,r),p=h.type==_o.Text?h:null,m=f.type==_o.Text?f:null;if(t.lineWrapping&&(p&&(p=xde(t,i,p)),m&&(m=xde(t,r,m))),p&&m&&p.from==m.from)return C(S(e.from,e.to,p));var g=p?S(e.from,null,p):M(h,!1),v=m?S(null,e.to,m):M(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(_(u,g.bottom,d,v.top)):g.bottomX&&he.from=N)break;Ne>E&&re(Math.max(fe,E),null==$&&fe<=X,Math.min(Ne,N),null==G&&Ne>=Z,oe.dir)}}catch(xe){V.e(xe)}finally{V.f()}if((E=Y.to+1)>=N)break}}}catch(xe){H.e(xe)}finally{H.f()}return 0==q.length&&re(X,null==$,Z,null==G,t.textDirection),{top:z,bottom:U,horizontal:q}}function M($,G){var R=a.top+(G?$.top:$.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function _de(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==us.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function xde(t,n,e){var i=en.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:_o.Text}}function wde(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==_o.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var kQe=function(){function t(n,e){ke(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(MS)!=n.state.facet(MS)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(MS);e0&&void 0!==arguments[0]?arguments[0]:{}),DQe,TQe,EQe,pue.of(!0)]}function Sde(t){return t.startState.facet(g_)!=t.state.facet(g_)}var DQe=Cde({above:!0,markers:function(t){var n,e=t.state,i=e.facet(g_),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||kde:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:en.cursor(s.head,s.head>s.anchor?-1:1),d=Re(wj.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Sde(t);return e&&Dde(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Dde(n.state,t)},class:"cm-cursorLayer"});function Dde(t,n){n.style.animationDuration=t.facet(g_).cursorBlinkRate+"ms"}var TQe=Cde({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:wj.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Sde(t)},class:"cm-selectionLayer"}),Tde={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kde&&(Tde[".cm-line"].caretColor="transparent !important");var EQe=k0.highest(Wn.theme(Tde)),Ede=hr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),v_=Va.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Ede)?i.value:e},t)}}),AQe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(v_);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(v_)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(v_),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(v_)!=n&&this.view.dispatch({effects:Ede.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Ade(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var MQe=function(){function t(n){ke(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new Gm,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(_){m.e(_)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Ade(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),Cj=null!=/x/.unicode?"gu":"g",IQe=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",Cj),NQe={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"},kj=null,IS=Qn.define({combine:function(t){var n=su(t,{render:null,specialChars:IQe,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==kj&&typeof document<"u"&&document.body){var i=document.body.style;kj=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return kj||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,Cj)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,Cj)),n}});function FQe(){return[IS.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Mde||(Mde=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=yi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(IS)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new MQe({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Ba(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=s_(l.text,c,o-l.from);return yi.replace({widget:new PQe((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=yi.replace({widget:new jQe(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(IS);n.startState.facet(IS)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Mde=null,jQe=function(t){wt(e,gp);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(NQe[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),PQe=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),LQe=yi.line({class:"cm-activeLine"}),RQe=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(LQe.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return yi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Ide(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):s_(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function BQe(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function $Qe(t,n){var e=Ide(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Ide(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(en.range(y.from+m,y.to+g))}else for(var _=Math.min(u.col,d.col),C=Math.max(u.col,d.col),S=h;S<=f;S++){var M=c.doc.line(S),$=V4(M.text,_,c.tabSize,!0);if($<0)p.push(en.cursor(M.to));else{var G=V4(M.text,C,c.tabSize);p.push(en.range(M.from+$,M.from+G))}}return p}(t.state,e,a);return l.length?en.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var VQe={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},HQe={style:"cursor: crosshair"};function zQe(){var n=Un(VQe[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ka.fromClass(function(){function o(s){ke(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?HQe:null})]}var Nde=function(){function t(n,e,i){ke(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(Sj);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(Sj).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Fde.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||WQe,v=this.view.textDirection==us.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),_=!!a.above;!a.strictSide&&(_?u.top-(d.bottom-d.top)-g.yr.bottom)&&_==r.bottom-u.bottom>u.top-r.top&&(_=!_);var C=(_?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topS&&(S=_?R.top-m-2-f:R.bottom+f+2)}}catch(z){G.e(z)}finally{G.f()}}"absolute"==this.position?(c.style.top=S-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=S+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:S,right:M,bottom:S+m}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(n.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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),GQe=Wn.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"}}}),WQe={x:0,y:0},NS=Qn.define({enables:[Ode,GQe]}),FS=Qn.define(),qQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Nde(n,FS,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),XQe=NS.compute([FS],function(t){var n=t.facet(FS).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,si(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,si(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:qQe.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),YQe=function(){function t(n,e,i,r,o){ke(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==us.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=hr.define(),i=Va.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ll.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(QQe)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return FS.from(r)}});return[i,ka.define(function(r){return new YQe(r,t,i,e,n.hoverTime||300)}),XQe]}var QQe=hr.define(),Pde=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function y_(t,n){var e=t.plugin(Lde),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Lde=ka.fromClass(function(){function t(n){ke(this,t),this.input=n.state.facet(b_),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Pde);this.top=new OS(n,!0,e.topContainer),this.bottom=new OS(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Pde);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new OS(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new OS(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(b_);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),zde=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Vde(e.markers(n)),e.initialSpacer&&(this.spacer=new Ude(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Vde(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Go.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),Ude=function(){function t(n,e,i,r){ke(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Bde(),iZe]}function Gde(t){for(var n=9;ni&&(i=s,e.push(oZe.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Go.of(e)}),aZe=0,Aj=Se(function t(n,e){ke(this,t),this.from=n,this.to=e}),gr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.id=aZe++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=au.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();gr.closedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.openedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.group=new gr({deserialize:function(t){return t.split(" ")}}),gr.contextHash=new gr({perNode:!0}),gr.lookAhead=new gr({perNode:!0}),gr.mounted=new gr({perNode:!0});var lZe=Object.create(null),au=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.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(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(gr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):lZe,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(gr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();au.none=new au("",Object.create(null),0,8);var za,cZe=function(){function t(n){ke(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=PS.get(this)||this.topNode,r=new $S(i);return r.moveTo(n,e),PS.set(this,r._tree),r}},{key:"topNode",get:function(){return new w_(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(PS.get(this)||this.topNode,n,e,!1);return PS.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(Wde.get(this)||this.topNode,n,e,!0);return Wde.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|za.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:Nj(au.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(au.none,i,r,o)})}}],[{key:"build",value:function(n){return function hZe(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new uZe(e,e.length):e,d=i.types,h=0,f=0;function p(S,M,$,G,R){for(var z=u.id,U=u.start,q=u.end,re=u.size,L=f;re<0;){if(u.next(),-1==re)return $.push(a[z]),void G.push(U-S);if(-3==re)return void(h=z);if(-4==re)return void(f=z);throw new RangeError("Unrecognized record size: ".concat(re))}var Z,H,ot,he=d[z],E=U-S;if(q-U<=o&&(H=function(ot,B){var ne=u.fork(),ie=0,Ie=0,Ye=0,Le=ne.end-o,_t={size:0,start:0,skip:0};e:for(var At=ne.pos-ot;ne.pos>At;){var _n=ne.size;if(ne.id==B&&_n>=0)_t.size=ie,_t.start=Ie,_t.skip=Ye,Ye+=4,ie+=4,ne.next();else{var ci=ne.pos-_n;if(_n<0||ci=c?4:0,Ni=ne.start;for(ne.next();ne.pos>ci;){if(ne.size<0){if(-3!=ne.size)break e;on+=4}else ne.id>=c&&(on+=4);ne.next()}Ie=Ni,ie+=_n,Ye+=on}}return(B<0||ie==ot)&&(_t.size=ie,_t.start=Ie,_t.skip=Ye),_t.size>4?_t:void 0}(u.pos-M,R))){for(var N=new Uint16Array(H.size-H.skip),F=u.pos-H.size,Y=N.length;u.pos>F;)Y=v(H.start,N,Y);Z=new x_(N,q-H.start,i),E=H.start-S}else{var V=u.pos-re;u.next();for(var oe=[],fe=[],Ne=z>=c?z:-1,xe=0,tt=q;u.pos>V;)Ne>=0&&u.id==Ne&&u.size>=0?(u.end<=tt-o&&(m(oe,fe,U,xe,u.end,tt,Ne,L),xe=oe.length,tt=u.end),u.next()):p(U,V,oe,fe,Ne);if(Ne>=0&&xe>0&&xe-1&&xe>0){var ze=(ot=he,function(B,ne,ie){var Ie,Ye,Le=0,_t=B.length-1;if(_t>=0&&(Ie=B[_t])instanceof Ua){if(!_t&&Ie.type==ot&&Ie.length==ie)return Ie;(Ye=Ie.prop(gr.lookAhead))&&(Le=ne[_t]+Ie.length+Ye)}return g(ot,B,ne,ie,Le)});Z=Nj(he,oe,fe,0,oe.length,0,q-U,ze,ze)}else Z=g(he,oe,fe,q-U,L-q)}$.push(Z),G.push(E)}function m(S,M,$,G,R,z,U,q){for(var re=[],L=[];S.length>G;)re.push(S.pop()),L.push(M.pop()+$-R);S.push(g(i.types[U],re,L,z-R,q-z)),M.push(R-$)}function g(S,M,$,G){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0;if(h){var U=[gr.contextHash,h];z=z?[U].concat(z):[U]}if(R>25){var q=[gr.lookAhead,R];z=z?[q].concat(z):[q]}return new Ua(S,M,$,G,z)}function v(S,M,$){var G=u.id,R=u.start,z=u.end,U=u.size;if(u.next(),U>=0&&G4)for(var re=u.pos-(U-4);u.pos>re;)$=v(S,M,$);M[--$]=q,M[--$]=z-S,M[--$]=R-S,M[--$]=G}else-3==U?h=G:-4==U&&(f=G);return $}for(var y=[],_=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,_,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?_[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),_.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(au.none,[],[],0);var uZe=function(){function t(n,e){ke(this,t),this.buffer=n,this.index=e}return Se(t,[{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 t(this.buffer,this.index)}}]),t}(),x_=function(){function t(n,e,i){ke(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return au.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function Xde(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function O0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(qde(r,i,h,h+d.length))if(d instanceof x_){if(o&za.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new Mj(new dZe(s,d,n,h),null,f)}else if(o&za.IncludeAnonymous||!d.type.isAnonymous||Ij(d)){var p=void 0;if(!(o&za.IgnoreMounts)&&d.props&&(p=d.prop(gr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&za.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&za.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._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(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&za.IgnoreOverlays)&&(i=this._tree.prop(gr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}();function LS(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function RS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var dZe=Se(function t(n,e,i,r){ke(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),Mj=function(){function t(n,e,i){ke(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(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(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&za.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);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(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}(),$S=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ke(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof w_)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof w_?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);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(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&za.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&za.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&za.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&za.IncludeAnonymous||u instanceof x_||!u.type.isAnonymous||Ij(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return RS(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function Ij(t){return t.children.some(function(n){return n instanceof x_||!n.type.isAnonymous||Ij(n)})}var Yde=new WeakMap;function BS(t,n){if(!t.isAnonymous||n instanceof x_||n.type!=t)return 1;var e=Yde.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=BS(t,o)}}catch(s){r.e(s)}finally{r.f()}Yde.set(n,e)}return e}function Nj(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;$+=G}if(C==S+1){if($>d){var R=m[S];p(R.children,R.positions,0,R.children.length,g[S]+_);continue}h.push(m[S])}else h.push(Nj(t,m,g,S,C,M,g[C-1]+m[C-1].length-M,null,l));f.push(M+_-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var VS=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ke(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Kde.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),mZe=0,Kde=function(){function t(){ke(this,t),this.instances=[],this.id=mZe++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,_){return y==v[_]});var g,v});if(i)return i;var r,o=[],s=new yp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=Qde(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function Qde(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new gZe(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return ehe.add(n)}var ehe=new gr,gZe=function(){function t(n,e,i,r){ke(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new bZe(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var Fj,bZe=function(){function t(n,e,i){ke(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function($){return!$.scope||$.scope(s)}));for(var c=r,u=s.prop(ehe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=vZe(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(gr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function($){return!$.scope||$.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var _=v=C)&&n.nextSibling()););if(!_||C>i)break;(y=_.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,_.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),kn=yp.define,HS=kn(),bp=kn(),nhe=kn(bp),ihe=kn(bp),_p=kn(),zS=kn(_p),Oj=kn(_p),mh=kn(),Xm=kn(mh),gh=kn(),vh=kn(),jj=kn(),C_=kn(jj),US=kn(),fn={comment:HS,lineComment:kn(HS),blockComment:kn(HS),docComment:kn(HS),name:bp,variableName:kn(bp),typeName:nhe,tagName:kn(nhe),propertyName:ihe,attributeName:kn(ihe),className:kn(bp),labelName:kn(bp),namespace:kn(bp),macroName:kn(bp),literal:_p,string:zS,docString:kn(zS),character:kn(zS),attributeValue:kn(zS),number:Oj,integer:kn(Oj),float:kn(Oj),bool:kn(_p),regexp:kn(_p),escape:kn(_p),color:kn(_p),url:kn(_p),keyword:gh,self:kn(gh),null:kn(gh),atom:kn(gh),unit:kn(gh),modifier:kn(gh),operatorKeyword:kn(gh),controlKeyword:kn(gh),definitionKeyword:kn(gh),moduleKeyword:kn(gh),operator:vh,derefOperator:kn(vh),arithmeticOperator:kn(vh),logicOperator:kn(vh),bitwiseOperator:kn(vh),compareOperator:kn(vh),updateOperator:kn(vh),definitionOperator:kn(vh),typeOperator:kn(vh),controlOperator:kn(vh),punctuation:jj,separator:kn(jj),bracket:C_,angleBracket:kn(C_),squareBracket:kn(C_),paren:kn(C_),brace:kn(C_),content:mh,heading:Xm,heading1:kn(Xm),heading2:kn(Xm),heading3:kn(Xm),heading4:kn(Xm),heading5:kn(Xm),heading6:kn(Xm),contentSeparator:kn(mh),list:kn(mh),quote:kn(mh),emphasis:kn(mh),strong:kn(mh),link:kn(mh),monospace:kn(mh),strikethrough:kn(mh),inserted:kn(),deleted:kn(),changed:kn(),invalid:kn(),meta:US,documentMeta:kn(US),annotation:kn(US),processingInstruction:kn(US),definition:yp.defineModifier(),constant:yp.defineModifier(),function:yp.defineModifier(),standard:yp.defineModifier(),local:yp.defineModifier(),special:yp.defineModifier()};the([{tag:fn.link,class:"tok-link"},{tag:fn.heading,class:"tok-heading"},{tag:fn.emphasis,class:"tok-emphasis"},{tag:fn.strong,class:"tok-strong"},{tag:fn.keyword,class:"tok-keyword"},{tag:fn.atom,class:"tok-atom"},{tag:fn.bool,class:"tok-bool"},{tag:fn.url,class:"tok-url"},{tag:fn.labelName,class:"tok-labelName"},{tag:fn.inserted,class:"tok-inserted"},{tag:fn.deleted,class:"tok-deleted"},{tag:fn.literal,class:"tok-literal"},{tag:fn.string,class:"tok-string"},{tag:fn.number,class:"tok-number"},{tag:[fn.regexp,fn.escape,fn.special(fn.string)],class:"tok-string2"},{tag:fn.variableName,class:"tok-variableName"},{tag:fn.local(fn.variableName),class:"tok-variableName tok-local"},{tag:fn.definition(fn.variableName),class:"tok-variableName tok-definition"},{tag:fn.special(fn.variableName),class:"tok-variableName2"},{tag:fn.definition(fn.propertyName),class:"tok-propertyName tok-definition"},{tag:fn.typeName,class:"tok-typeName"},{tag:fn.namespace,class:"tok-namespace"},{tag:fn.className,class:"tok-className"},{tag:fn.macroName,class:"tok-macroName"},{tag:fn.propertyName,class:"tok-propertyName"},{tag:fn.operator,class:"tok-operator"},{tag:fn.comment,class:"tok-comment"},{tag:fn.meta,class:"tok-meta"},{tag:fn.invalid,class:"tok-invalid"},{tag:fn.punctuation,class:"tok-punctuation"}]);var j0=new gr,_Ze=new gr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ke(this,t),this.data=n,this.name=r,Fo.prototype.hasOwnProperty("tree")||Object.defineProperty(Fo.prototype,"tree",{get:function(){return hl(this)}}),this.parser=e,this.extension=[xp.of(this),Fo.languageData.of(function(o,s,a){var l=rhe(o,s,a),c=l.type.prop(j0);if(!c)return[];var u=o.facet(c),d=l.type.prop(_Ze);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return rhe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(j0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(xp);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(j0)!=e.data){var l=s.prop(gr.mounted);if(l){if(l.tree.prop(j0)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),k_=null,CZe=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ke(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new wZe(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(VS.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=k_;k_=this;try{return n()}finally{k_=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=ohe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=VS.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=ohe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,Jde);var i=Ct(r);function r(){return ke(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=k_;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(au.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return k_}}]),t}();function ohe(t,n,e){return VS.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var Pj=function(){function t(n){ke(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=CZe.create(n.facet(xp).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Va.define({create:Pj.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(xp)!=n.state.facet(xp)?Pj.init(n.state):t.apply(n)}});var she=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(she=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var Lj=typeof navigator<"u"&&null!==(Fj=navigator.scheduling)&&void 0!==Fj&&Fj.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,kZe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=she(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return Lj&&Lj()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new Pj(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),xp=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,kZe,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),SZe=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ke(this,t),this.language=n,this.support=e,this.extension=[n,e]}),DZe=Qn.define(),GS=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function P0(t){var n=t.facet(GS);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function S_(t,n){var e="",i=t.tabSize,r=t.facet(GS)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ke(this,t),this.state=n,this.options=e,this.unit=P0(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return s_(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),ahe=new gr;function TZe(t){var n=t.type.prop(ahe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(gr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),_=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,S=g.state.doc.lineAt(y.from),M=null==C||C<=S.from?S.to:Math.min(S.to,C),$=y.to;;){var G=v.childAfter($);if(!G||G==_)return null;if(!G.type.isSkipped)return G.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var IZe=Qn.define(),uhe=new gr;function qS(t,n,e){var i,r=Re(t.facet(IZe));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=hl(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function dhe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var XS=hr.define({map:dhe}),D_=hr.define({map:dhe});function hhe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Ym=Va.define({create:function(){return yi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(XS)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[vhe.range(a.value.from,a.value.to)]}):a.is(D_)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function fhe(t,n){return t.field(Ym,!1)?n:n.concat(hr.appendConfig.of(ghe()))}function phe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var NZe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(hhe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=qS(t.state,i.from,i.to);if(r)return t.dispatch({effects:fhe(t.state,[XS.of(r),phe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Ym,!1))return!1;var n,e=[],i=Re(hhe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=YS(t.state,r.from,r.to);o&&e.push(D_.of(o),phe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},OZe),t),e=new $j(n,!0),i=new $j(n,!1),r=ka.fromClass(function(){function s(a){ke(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(xp)!=a.state.facet(xp)||a.startState.field(Ym,!1)!=a.state.field(Ym,!1)||hl(a.startState)!=hl(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new Gm,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=YS(a.state,d.from,d.to)?i:qS(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,$de({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Go.empty},initialSpacer:function(){return new $j(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=YS(s.state,a.from,a.to);if(c)return s.dispatch({effects:D_.of(c)}),!0;var u=qS(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:XS.of(u)}),!0)}})}),ghe()]}var PZe=Wn.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"}}),Bj=function(){function t(n,e){var i;function r(a){var l=pp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ke(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(j0)==s.data}:s?function(a){return a==s}:void 0,this.style=the(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new pp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),Vj=Qn.define(),yhe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function Hj(t){var n=t.facet(Vj);return n.length?n:t.facet(yhe)}function bhe(t,n){var e,i=[RZe];return t instanceof Bj&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?yhe.of(t):e?Vj.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):Vj.of(t)),i}var LZe=function(){function t(n){ke(this,t),this.markCache=Object.create(null),this.tree=hl(n.state),this.decorations=this.buildDeco(n,Hj(n.state))}return Se(t,[{key:"update",value:function(n){var e=hl(n.state),i=Hj(n.state),r=i!=Hj(n.startState);e.length0&&yh(n.state,s.head-1,1,r)||r.afterCursor&&(yh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),GZe]}var qZe=new gr;function zj(t,n,e){var i=t.prop(n<0?gr.openedBy:gr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function Uj(t){var n=t.type.prop(qZe);return n?n(t.node):t}function yh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=hl(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=zj(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return XZe(0,0,e,l,u,c,o)}}return function YZe(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function XZe(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(whe.push(t),console.warn(n))}function eet(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||fn[o];s?"function"==typeof s?i?i=s(i):Wj(o,"Modifier ".concat(o," used at start of tag")):i?Wj(o,"Tag ".concat(o," used as modifier")):i=s:Wj(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=au.define({id:xhe.length,name:a,props:[Zde(ql({},a,i))]});return xhe.push(l),l.id}function qj(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var tet=qj(function oet(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=Xj(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var re,L=[],X=Re(r);try{for(X.s();!(re=X.n()).done;){var Z=re.value,H=Z.line,he=Z.comment;if(he>=0){var N=H.from+he,F=N+Z.token.length;" "==H.text[F-H.from]&&F++,L.push({from:N,to:F})}}}catch(Y){X.e(Y)}finally{X.f()}return{changes:L}}return null},0),net=qj(She,0),iet=qj(function(t,n){return She(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function Xj(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function She(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return Xj(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function ret(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?Kj:"historyRedo"==n.inputType?KS:null;return!!i&&(n.preventDefault(),i(e))}})]}function JS(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(Jj,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var Kj=JS(0,!1),KS=JS(1,!1),uet=JS(0,!0),det=JS(1,!0);function The(t){return function(n){var e=n.field(Jj,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var het=The(0),fet=The(1),df=function(){function t(n,e,i,r,o){ke(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&C0.fromJSON(n.mapped),n.startSelection&&en.fromJSON(n.startSelection),n.selectionsAfter.map(en.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=lu,o=Re(n.startState.facet(aet));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,lu)}},{key:"selection",value:function(n){return new t(void 0,lu,void 0,void 0,n)}}]),t}();function QS(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Ehe(t,n){return t.length?n.length?t.concat(n):t:n}var lu=[];function Ahe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),QS(t,t.length-1,1e9,e.setSelAfter(i)))}return[df.selection([n])]}function pet(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Qj(t,n){if(!t.length)return t;for(var e=t.length,i=lu;e;){var r=met(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[df.selection(i)]:lu}function met(t,n,e){var i=Ehe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):lu,e);if(!t.changes)return df.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new df(r,hr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var get=/^(input\.type|delete)($|\.)/,T_=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ke(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||get.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?QS(s,s.length-1,r.minDepth,new df(n.changes.compose(a.changes),Ehe(n.effects,a.effects),a.mapped,a.startSelection,lu)):QS(s,s.length,r.minDepth,n),lu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:lu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function eD(t,n,e){for(var i=hl(t).resolveInner(n.head),r=e?gr.closedBy:gr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;yet(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?yh(t,i.from,1):yh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,en.cursor(l,e?-1:1)}function Ohe(t,n){return ld(t,function(e){if(!e.empty)return ZS(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var jhe=function(t){return Ohe(t,!1)},Phe=function(t){return Ohe(t,!0)};function Lhe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=nD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=nD(t,s,!1),a=nD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:en.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function nD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var efe=function(t,n){return tD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function ofe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(iD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(en.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(en.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:en.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function sfe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(iD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var bet=afe(!1),_et=afe(!0);function afe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=hl(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(gr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new WS(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=Rj(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:en.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var lfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){r.push({from:i.from,insert:n.facet(GS)})}),{userEvent:"input.indent"})),!0)},cfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=s_(o,n.tabSize),a=0,l=S_(n,Math.max(0,s-P0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:rfe}].concat(xet.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Cet=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return eD(t.state,n,!fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,!fl(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return eD(t.state,n,fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,fl(t))})}},{key:"Alt-ArrowUp",run:function(t){return ofe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return sfe(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return ofe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return sfe(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=en.create([i.main]):i.main.empty||(r=en.create([en.cursor(i.main.head)])),!!r&&(e(bh(n,r)),!0)}},{key:"Mod-Enter",run:_et},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=iD(n).map(function(r){return en.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:en.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=L0(n.selection,function(r){for(var o,s=hl(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return en.range(s.to,s.from)});return e(bh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:cfe},{key:"Mod-]",run:lfe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new WS(n,{overrideIndentation:function(s){return i[s]??-1}}),o=tP(n,function(s,a,l){var c=Rj(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=S_(n,c);(u!=d||l.from0?o--:s0&&yh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ke(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(dfe(a))}:dfe,this.query=this.normalize(e)}return Se(t,[{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 Ba(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=S4(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=Sc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ke(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=hfe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new mfe(n,e,i,r,o);this.re=new RegExp(e,nP+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=rD(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=rD(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return iP.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=rD(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pfe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function rD(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function rP(t){var n=Oo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Un(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:oD.of(!1),selection:en.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Oo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:oD.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Oo("label",t.state.phrase("Go to line"),": ",n)," ",Oo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(ffe.prototype[Symbol.iterator]=mfe.prototype[Symbol.iterator]=function(){return this});var oD=hr.define(),gfe=Va.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(oD)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n?rP:null})}}),Det=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Tet={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vfe=Qn.define({combine:function(t){return su(t,Tet,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Eet=yi.mark({class:"cm-selectionMatch"}),Aet=yi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yfe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==cs.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==cs.Word)}var Met=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(vfe),i=n.state,r=i.selection;if(r.ranges.length>1)return yi.none;var o,y,_,C,S,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return yi.none;var l=i.wordAt(s.head);if(!l)return yi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return yi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!yfe(a=i.charCategorizer(s.head),i,s.from,s.to)||(S=s.to,(y=a)((_=i).sliceDoc(C=s.from,C+1))!=cs.Word||y(_.sliceDoc(S-1,S))!=cs.Word))return yi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return yi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new R0(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||yfe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Aet.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Eet.range(g,v)),d.length>e.maxMatches))return yi.none}}catch(y){h.e(y)}finally{h.f()}return yi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Iet=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),sD=Qn.define({combine:function(t){return su(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Vet(n)}})}});function Net(t){return t?[sD.of(t),hP]:hP}var bfe=function(){function t(n){ke(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,nP),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Oet(this):new Fet(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Fo.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?B0(this,r,e,i):$0(this,r,e,i)}}]),t}(),_fe=Se(function t(n){ke(this,t),this.spec=n});function $0(t,n,e,i){return new R0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=$0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function B0(t,n,e,i){return new ffe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(aD(a.input,a.index))!=cs.Word||r(lD(a.input,a.index))!=cs.Word)&&(r(lD(a.input,a.index+a[0].length))!=cs.Word||r(aD(a.input,a.index+a[0].length))!=cs.Word)}):void 0},e,i);var r}function aD(t,n){return t.slice(Pl(t,n,!1),n)}function lD(t,n){return t.slice(n,Pl(t,n))}var Oet=function(t){wt(e,_fe);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=B0(this.spec,i,o,i.doc.length).next();return s.done&&(s=B0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=B0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=B0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),E_=hr.define(),oP=hr.define(),Cp=Va.define({create:function(t){return new sP(lP(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(E_)?t=new sP(r.value.create(),t.panel):r.is(oP)&&(t=new sP(t.query,r.value?aP:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n.panel})}}),sP=Se(function t(n,e){ke(this,t),this.query=n,this.panel=e}),jet=yi.mark({class:"cm-searchMatch"}),Pet=yi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Let=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Cp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Cp);(e!=n.startState.field(Cp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return yi.none;for(var i=this.view,r=new Gm,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Pet:jet)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function A_(t){return function(n){var e=n.state.field(Cp,!1);return e&&e.query.spec.valid?t(n,e):cP(n)}}var cD=A_(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:dP(t,r),userEvent:"select.search"}),!0)}),uD=A_(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:dP(t,o),userEvent:"select.search"}),!0)}),Ret=A_(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:en.create(e.map(function(i){return en.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),xfe=A_(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(dP(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),$et=A_(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function aP(t){return t.state.facet(sD).createPanel(t)}function lP(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(sD);return new bfe({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var cP=function(t){var n=t.state.field(Cp,!1);if(n&&n.panel){var e=y_(t,aP);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=lP(t.state,n.query.spec);r.valid&&t.dispatch({effects:E_.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[oP.of(!0),n?E_.of(lP(t.state,n.query.spec)):hr.appendConfig.of(hP)]});return!0},uP=function(t){var n=t.state.field(Cp,!1);if(!n||!n.panel)return!1;var e=y_(t,aP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:oP.of(!1)}),!0},Bet=[{key:"Mod-f",run:cP,scope:"editor search-panel"},{key:"F3",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:uP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new R0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(en.range(c.value.from,c.value.to))}return e(n.update({selection:en.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=y_(t,rP);if(!n){var e=[oD.of(!0)];null==t.state.field(gfe,!1)&&e.push(hr.appendConfig.of([gfe,Det])),t.dispatch({effects:e}),n=y_(t,rP)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=en.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||en.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var _=s.wordAt(y.value.from);if(!_||_.from!=y.value.from||_.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new R0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new R0(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===bn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(en.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Vet=function(){function t(n){var e=this;ke(this,t),this.view=n;var i=this.query=n.state.field(Cp).query.spec;function r(o,s,a){return Oo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Oo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Oo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Oo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Oo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Oo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Oo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return cD(n)},[Ac(n,"next")]),r("prev",function(){return uD(n)},[Ac(n,"previous")]),r("select",function(){return Ret(n)},[Ac(n,"all")]),Oo("label",null,[this.caseField,Ac(n,"match case")]),Oo("label",null,[this.reField,Ac(n,"regexp")]),Oo("label",null,[this.wordField,Ac(n,"by word")])].concat(si(n.state.readOnly?[]:[Oo("br"),this.replaceField,r("replace",function(){return xfe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return $et(n)},[Ac(n,"replace all")])]),[Oo("button",{name:"close",onclick:function(){return uP(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new bfe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:E_.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return bde(yde(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?uD:cD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),xfe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(E_)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(sD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var dD=/[\s\.,:;?!]/;function dP(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!dD.test(l[c+1])&&dD.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!dD.test(l[u-1])&&dD.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Het=Wn.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"}}),hP=[Cp,k0.lowest(Let),Het],wfe=function(){function t(n,e,i){ke(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=hl(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Sfe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Cfe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var kfe=Se(function t(n,e,i){ke(this,t),this.completion=n,this.source=e,this.match=i});function kp(t){return t.selection.main.head}function Sfe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Dfe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:en.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:en.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var Tfe=new WeakMap;function Uet(t){if(!Array.isArray(t))return t;var n=Tfe.get(t);return n||Tfe.set(t,n=function zet(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Un(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(z=S4(R))!=z.toLowerCase()?1:z!=z.toUpperCase()?2:0;(!M||1==U&&C||0==G&&0!=U)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=M:s.length&&(S=!1)),G=U,M+=Sc(R)}return m==c&&0==s[0]&&S?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,_]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,_]:m==c?this.result((g?-200:0)-100-700+(S?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?Sc(Ba(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_h=Qn.define({combine:function(t){return su(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Efe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Wet=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_h);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,si(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,_))),C.className="cm-completionMatchedText",g=_}return g=this.range.to)&&(this.range=Efe(i.options.length,i.selected,this.view.state.facet(_h).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Mfe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,_=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=[1e9-m++];if(_){var $,G=Re(_(S));try{for(G.s();!($=G.n()).done;)M.push($.value)}catch(F){G.e(F)}finally{G.f()}}p.push(new kfe(S,v,M))}}catch(F){C.e(F)}finally{C.f()}}else{var z,U=new Get(h.sliceDoc(v.from,v.to)),q=void 0,re=Re(v.result.options);try{for(re.s();!(z=re.n()).done;){var L=z.value;(q=U.match(L.label))&&(null!=L.boost&&(q[0]+=L.boost),p.push(new kfe(L,v,q)))}}catch(F){re.e(F)}finally{re.f()}}}}catch(F){g.e(F)}finally{g.f()}var X,Z=[],H=null,he=h.facet(_h).compareCompletions,E=Re(p.sort(function(F,Y){return Y.match[0]-F.match[0]||he(F.completion,Y.completion)}));try{for(E.s();!(X=E.n()).done;){var N=X.value;!H||H.label!=N.completion.label||H.detail!=N.completion.detail||null!=H.type&&null!=N.completion.type&&H.type!=N.completion.type||H.apply!=N.completion.apply?Z.push(N):Afe(N.completion)>Afe(H)&&(Z[Z.length-1]=N),H=N.completion}}catch(F){E.e(F)}finally{E.f()}return Z}(n,e);if(!s.length)return null;var a,l=e.facet(_h).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var Jet=[];function fP(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var Jm=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ke(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=fP(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(pP))r=new t(r.source,1,a.value?kp(n.state):-1);else if(a.is(hD))r=new t(r.source,0);else if(a.is(Ife)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(kp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),Ket=function(t){wt(e,Jm);var n=Ct(e);function e(i,r,o,s,a){var l;return ke(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=kp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&kp(i.startState)==this.from)return new Jm(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Sfe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new wfe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:kp(i.state)):new Jm(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new Jm(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),pP=hr.define(),hD=hr.define(),Ife=hr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),Nfe=hr.define(),uu=Va.define({create:function(){return Xet.start()},update:function(t,n){return t.update(n)},provide:function(t){return[NS.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function fD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(uu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function KQe(t,n){var e=t.plugin(Ode);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:Nfe.of(a)}),!0}}var Qet=Se(function t(n,e){ke(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),Zet=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(uu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(uu);if(n.selectionSet||n.docChanged||n.startState.field(uu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!fP(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,si(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==fP(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(uu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=kp(i),o=new wfe(i,r,n.explicitPos==r),s=new Qet(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:hD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_h),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new Ket(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:kp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(uu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new Jm(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),pD={brackets:["(","[","{","'",'"'],before:")]}:;>"},Km=hr.define({map:function(t,n){return n.mapPos(t,-1,Ll.TrackAfter)??void 0}}),mP=hr.define({map:function(t,n){return n.mapPos(t)}}),gP=new(function(t){wt(e,Um);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e)}());gP.startSide=1,gP.endSide=-1;var Ffe=Va.define({create:function(){return Go.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Go.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(Km)?t=t.update({add:[gP.range(a.value,a.value+1)]}):a.is(mP)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Ofe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return S4(t<128?t:t+1)}function jfe(t,n){return t.languageDataAt("closeBrackets",n)[0]||pD}var ttt="object"==(typeof navigator>"u"?"undefined":bn(navigator))&&/Android\b/.test(navigator.userAgent),ntt=Wn.inputHandler.of(function(t,n,e,i){if((ttt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==Sc(Ba(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=jfe(s,s.selection.main.head),u=c.brackets||pD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Ofe(Ba(h,0));if(a==h)return f==h?stt(s,h,u.indexOf(h+h+h)>-1):rtt(s,h,f,c.before||pD.before);if(a==f&&Pfe(s,s.selection.main.from))return ott(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),itt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=jfe(n,n.selection.main.head).brackets||pD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=Sc(Ba(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&mD(n.doc,s.head)==Ofe(Ba(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:en.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Pfe(t,n){var e=!1;return t.field(Ffe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function mD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,Sc(Ba(e,0)))}function rtt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Km.of(s.to+n.length),range:en.range(s.anchor+n.length,s.head+n.length)};var a=mD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Km.of(s.head+n.length),range:en.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function ott(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&mD(t.doc,o.head)==e?en.cursor(o.head+e.length):i=o});return i?null:t.update({selection:en.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return mP.of(o.from)})})}function stt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Km.of(o.to+n.length),range:en.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=mD(t.doc,s);if(a==n){if(Lfe(t,s))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(Pfe(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:en.cursor(s+n.length*(l?3:1)),effects:mP.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Lfe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=cs.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=cs.Word&&!function(u,d,h){for(var f=hl(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lfe(t,n){var e=hl(t).resolveInner(n+1);return e.parent&&e.from==n}function att(){return[uu,_h.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Zet,ltt,ett]}var Rfe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(uu,!1)&&(t.dispatch({effects:pP.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(uu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:hD.of(null)}),0))}},{key:"ArrowDown",run:fD(!0)},{key:"ArrowUp",run:fD(!1)},{key:"PageDown",run:fD(!0,"page")},{key:"PageUp",run:fD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(uu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Dfe(t,n.open.options[n.open.selected]),0))}}],ltt=k0.highest(AS.computeN([_h],function(t){return t.facet(_h).defaultKeymap?[Rfe]:[]})),ctt=Se(function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.diagnostic=i}),M_=function(){function t(n,e,i){ke(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Qm).markerFilter;o&&(r=o(r));var s=yi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?yi.widget({widget:new ptt(a),diagnostic:a}).range(a.from):yi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,V0(s))}}]),t}();function V0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new ctt(r,o,a.diagnostic),!1}),i}function $fe(t,n){return!(!t.effects.some(function(e){return e.is(gD)})&&!t.changes.touchesRange(n.pos))}function Bfe(t,n){return t.field(Mc,!1)?n:n.concat(hr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?yi.set([utt.range(r.from,r.to)]):yi.none}),JQe(dtt,{hideOn:$fe}),mtt]))}var gD=hr.define(),vP=hr.define(),Vfe=hr.define(),Mc=Va.define({create:function(){return new M_(yi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=V0(e,t.selected.diagnostic,r)||V0(e,null,r)}t=new M_(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(gD)?t=M_.init(a.value,t.panel,n.state):a.is(vP)?t=new M_(t.diagnostics,a.value?qfe.open:null,t.selected):a.is(Vfe)&&(t=new M_(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[b_.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),utt=yi.mark({class:"cm-lintRange cm-lintRange-active"});function dtt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=Ufe(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=V0(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Vfe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function vD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function yP(t){return vD(''),'width="6" height="3"')}var mtt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:yP("#d11")},".cm-lintRange-warning":{backgroundImage:yP("orange")},".cm-lintRange-info":{backgroundImage:yP("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gtt=function(t){wt(e,ph);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(yD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:bP.of({pos:f.from,above:!1,create:function(){return{dom:Hfe(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var _=m.getBoundingClientRect();if(!(y.clientX>_.left-10&&y.clientX<_.right+10&&y.clientY>_.top-10&&y.clientY<_.bottom+10)){for(var C=y.target;C;C=C.parentNode)if(1==C.nodeType&&C.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",v),p.state.field(Yfe)&&p.dispatch({effects:bP.of(null)})}})}var d=a.state.facet(yD).hoverTime,h=setTimeout(u,d);l.onmouseout=function(){clearTimeout(h),l.onmouseout=l.onmousemove=null},l.onmousemove=function(){clearTimeout(h),h=setTimeout(u,d)}}(i,r,o)}),r}}]),e}();function vtt(t,n){var e,i=Object.create(null),r=Re(n);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t.lineAt(o.from);(i[s.from]||(i[s.from]=[])).push(o)}}catch(c){r.e(c)}finally{r.f()}var a=[];for(var l in i)a.push(new gtt(i[l]).range(+l));return Go.of(a,!0)}var ytt=$de({class:"cm-gutter-lint",markers:function(t){return t.state.field(Xfe)}}),Xfe=Va.define({create:function(){return Go.empty},update:function(t,n){t=t.map(n.changes);var e,i=n.state.facet(yD).markerFilter,r=Re(n.effects);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.is(gD)){var s=o.value;i&&(s=i(s||[])),t=vtt(n.state.doc,s.slice(0))}}}catch(a){r.e(a)}finally{r.f()}return t}}),bP=hr.define(),Yfe=Va.define({create:function(){return null},update:function(t,n){return t&&n.docChanged&&(t=$fe(n,t)?null:Object.assign(Object.assign({},t),{pos:n.changes.mapPos(t.pos)})),n.effects.reduce(function(e,i){return i.is(bP)?i.value:e},t)},provide:function(t){return NS.from(t)}}),btt=Wn.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:vD('')},".cm-lint-marker-warning":{content:vD('')},".cm-lint-marker-error":{content:vD('')}}),yD=Qn.define({combine:function(t){return su(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function _tt(){return[yD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Xfe,ytt,btt,Yfe]}var Jfe,xtt=function(){return[rZe(),sZe,FQe(),cet(),jZe(),SQe(),[v_,AQe],Fo.allowMultipleSelections.of(!0),Fo.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=Rj(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=S_(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),bhe($Ze,{fallback:!0}),WZe(),[ntt,Ffe],att(),BQe(),zQe(),RQe,(n=[Iet,Met],n),AS.of([].concat(itt,si(Cet),Bet,vet,NZe,Rfe,htt))];var n}(),wtt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ke(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%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(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ctt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!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 n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Kfe(r,r.start):null,0,null)}}]),t}(),Kfe=Se(function t(n,e){ke(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Jfe||(Jfe={}));var Ctt=function(){function t(n){ke(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),ktt=function(){function t(n,e,i){ke(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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 t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),bD=Se(function t(){ke(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),Qfe=new bD,Stt=function(){function t(n,e){ke(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qfe,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=Qfe,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),_D=function(){function t(n,e){ke(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function xD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}_D.prototype.contextual=_D.prototype.fallback=_D.prototype.extend=!1;var Zfe,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),_P=null;function epe(t,n,e){var i=t.cursor(za.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Zfe||(Zfe={}));var tpe,Dtt=function(){function t(n,e){ke(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?epe(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?epe(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Ttt=function(){function t(n,e){ke(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new bD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new bD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new bD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Dtt(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,_=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=S.p.stoppedAt;(S.pos==S.p.stream.end||null!=M&&S.pos>M)&&S.p.parser.stateFlag(S.state,2)&&(!_||_.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(gr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(_):i.push(_)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return npe(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),npe(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],_=-v;_>0;_--)d(p[g++],m,y);g++}}}}catch(M){f.e(M)}finally{f.f()}}o.nodeSet=new cZe(s.map(function(M,$){return au.define({name:$>=o.minRepeatTerm?void 0:M,id:$,props:c[$],top:l.indexOf($)>-1,error:0==$,skipped:i.skippedNodes&&i.skippedNodes.indexOf($)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,si(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=xD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var S=0;S2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=hf(this.data,o+2)}if(r==hf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=hf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=ipe(this.data,this.tokenPrecTable,r);return o<0||ipe(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&ape(t);return{c:function(){n=be("div"),r&&r.c(),e=it(),o&&o.c(),i=it(),s&&s.c(),P(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),de(n,e),o&&o.m(n,null),de(n,i),s&&s.m(n,null)},p:function(a,l){var c=Un(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=ope(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=spe(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=ape(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:Lt,o:Lt,d:function(a){a&&je(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ptt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Ltt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ptt,jtt,ys,{editorState:3},Ott),r}return Se(e)}(),xP=Bj.define([{tag:fn.propertyName,color:"var(--jse-key-color)"},{tag:fn.number,color:"var(--jse-value-color-number)"},{tag:fn.bool,color:"var(--jse-value-color-boolean)"},{tag:fn.string,color:"var(--jse-value-color-string)"},{tag:fn.keyword,color:"var(--jse-value-color-null)"}]),Rtt=bhe(xP),$tt=xP.style;function wP(t){return t.doc.lineAt(t.selection.main.head)}function lpe(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=lpe(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=lpe(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=wP(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,_=g.from;_<=y;){var C=f.doc.lineAt(_);p.has(C)||p.add(C),_=C.to+1}}catch(S){m.e(S)}finally{m.f()}return p}(this.view,n),o=new Btt(r,n,this.unitWidth),s=n.facet(wD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Htt(c,this.unitWidth,s);i.add(l.from,l.from,yi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Utt(){return[wD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Vtt,ka.fromClass(ztt,{decorations:function(n){return n.decorations}})]}function Gtt(t){pi(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function CP(t){var n=t.slice();return n[93]=0===n[10].length,n}function cpe(t){var n,e;return n=new hKe({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wtt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function qtt(t){var n,e,i,r,o,s=t[92]&&upe(t),a=!t[92]&&dpe(t);return{c:function(){n=be("div"),e=it(),s&&s.c(),i=it(),a&&a.c(),r=_r(),P(n,"class","jse-contents svelte-1yqirn0"),Mt(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Mt(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&Q(s,1)):((s=upe(l)).c(),Q(s,1),s.m(i.parentNode,i)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),l[92]?a&&($t(),ce(a,1,1,function(){a=null}),Bt()):a?(a.p(l,c),1152&c[0]&&Q(a,1)):((a=dpe(l)).c(),Q(a,1),a.m(r.parentNode,r))},i:function(l){o||(Q(s),Q(a),o=!0)},o:function(l){ce(s),ce(a),o=!1},d:function(l){l&&je(n),t[50](null),l&&je(e),s&&s.d(l),l&&je(i),a&&a.d(l),l&&je(r)}}}function upe(t){var n,e,i,r,o,s=oh(t[10]||"",2e4)+"";return n=new nd({props:{icon:$m,type:"error",message:"The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=tn(s),P(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){ft(n,a,l),Pe(a,e,l),Pe(a,i,l),de(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=oh(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(Q(n.$$.fragment,a),o=!0)},o:function(a){ce(n.$$.fragment,a),o=!1},d:function(a){pt(n,a),a&&je(e),a&&je(i)}}}function dpe(t){var n,e,i,r,o,s=!t[13]&&t[8]&&hoe(t[10]),a=t[2]&&hpe(t),l=t[13]&&fpe(t),c=s&&ppe(t);return r=new l4({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=it(),l&&l.c(),e=it(),c&&c.c(),i=it(),mt(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),ft(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&Q(a,1)):((a=hpe(u)).c(),Q(a,1),a.m(n.parentNode,n)):a&&($t(),ce(a,1,1,function(){a=null}),Bt()),u[13]?l?(l.p(u,d),8192&d[0]&&Q(l,1)):((l=fpe(u)).c(),Q(l,1),l.m(e.parentNode,e)):l&&($t(),ce(l,1,1,function(){l=null}),Bt()),9472&d[0]&&(s=!u[13]&&u[8]&&hoe(u[10])),s?c?(c.p(u,d),9472&d[0]&&Q(c,1)):((c=ppe(u)).c(),Q(c,1),c.m(i.parentNode,i)):c&&($t(),ce(c,1,1,function(){c=null}),Bt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!0)},o:function(u){ce(a),ce(l),ce(c),ce(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&je(n),l&&l.d(u),u&&je(e),c&&c.d(u),u&&je(i),pt(r,u)}}}function hpe(t){var n,e;return n=new Ltt({props:{editorState:t[6]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fpe(t){var n,e;return n=new nd({props:{type:"error",icon:$m,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ppe(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Xtt(t){var n,e,i,r,o,s=t[1]&&cpe(CP(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[qtt,Wtt][i](c(t,i)),{c:function(){n=be("div"),s&&s.c(),e=it(),r.c(),P(n,"class","jse-text-mode svelte-1yqirn0"),Mt(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),de(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(CP(u),d),2&d[0]&&Q(s,1)):((s=cpe(CP(u))).c(),Q(s,1),s.m(n,e)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),r.p(c(u,i),d),(!o||2&d[0])&&Mt(n,"no-main-menu",!u[1])},i:function(u){o||(Q(s),Q(r),o=!0)},o:function(u){ce(s),ce(r),o=!1},d:function(u){u&&je(n),s&&s.d(),l[i].d(),t[52](null)}}}function mpe(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function Ytt(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,_=n.onChange,C=n.onChangeMode,S=n.onError,M=n.onFocus,$=n.onBlur,G=n.onRenderMenu,R=n.onSortModal,z=n.onTransformModal,U=wa("jsoneditor:TextMode"),q={key:"Mod-i",run:ie,shift:Ie,preventDefault:!0},re=typeof window>"u";U("isSSR:",re);var L=!1,X=!0,Z=[],H=new hp,he=new hp,E=new hp,N=new hp,F=new hp,Y=new hp,V=h,oe=Fk(V,f,g),fe=m;Wc(Zi(vn().mark(function gt(){return vn().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!re){On.next=2;break}return On.abrupt("return");case 2:try{s=ci({target:o,initialText:jo(oe,L)?"":i.escapeValue(oe),readOnly:c,indentation:f})}catch(ai){console.error(ai)}case 3:case"end":return On.stop()}},gt)}))),Hu(function(){s&&(U("Destroy CodeMirror editor"),s.destroy())});var Ne=!1,xe=!1,tt=ep(),ze=ep();function ot(){s&&(U("focus"),s.focus())}var B=!1;function ne(gt){U("patch",gt);var On=g.parse(oe),ai=Yu(On,gt),bi=NQ(On,gt);return Fr({text:g.stringify(ai,null,f)}),{json:ai,previousJson:On,undo:bi,redo:gt}}function ie(){if(U("format"),c)return!1;try{var gt=g.parse(oe);return Fr({text:g.stringify(gt,null,f)}),e(8,X=!0),!0}catch(On){S(On)}return!1}function Ie(){if(U("compact"),c)return!1;try{var gt=g.parse(oe);return Fr({text:g.stringify(gt)}),e(8,X=!1),!0}catch(On){S(On)}return!1}function Ye(){if(U("repair"),!c)try{Fr({text:Yd(oe)}),e(49,Fn="valid"),e(13,xt=null)}catch(gt){S(gt)}}function Le(gt){var On=gt.id,ai=gt.rootPath,bi=gt.onTransform,Er=gt.onClose;try{var qr=g.parse(oe);B=!0,z({id:On||ze,json:qr,rootPath:ai||[],onTransform:function(ao){bi?bi({operations:ao,json:qr,transformedJson:Yu(qr,ao)}):(U("onTransform",ao),ne(ao))},onClose:function(){B=!1,ot(),Er&&Er()}})}catch(ao){S(ao)}}function _t(gt,On){U("setSelection",{anchor:gt,head:On}),s&&s.dispatch(s.state.update({selection:{anchor:gt,head:On},scrollIntoView:!0}))}function At(gt,On){if(1===On.state.selection.ranges.length){var ai=On.state.selection.ranges[0],bi=oe.slice(ai.from,ai.to);if("{"===bi||"["===bi){var Er=O2.parse(oe),qr=Object.keys(Er.pointers).find(function(Js){var vr;return(null===(vr=Er.pointers[Js].value)||void 0===vr?void 0:vr.pos)===ai.from}),ao=Er.pointers[qr];qr&&ao&&ao.value&&ao.valueEnd&&(U("pointer found, selecting inner contents of path:",qr,ao),_t(ao.value.pos+1,ao.valueEnd.pos-1))}}}function _n(){return function(gt){return Qm.of({source:gt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ui,{delay:300})}function ci(gt){var On=gt.target,ai=gt.initialText,bi=gt.readOnly,Er=gt.indentation;U("Create CodeMirror editor",{readOnly:bi,indentation:Er});var qr=Fo.create({doc:ai,extensions:[AS.of([ket,q]),H.of(_n()),_tt(),xtt,Rtt,Utt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:At}),Wn.updateListener.of(function(ao){e(6,l=ao.state),ao.docChanged&&Ai()}),new SZe(Ftt),Net({top:!0}),E.of(Fo.readOnly.of(bi)),he.of(Wn.editable.of(!bi)),F.of(Fo.tabSize.of(p)),N.of(wr(Er)),Y.of(Wn.theme({},{dark:on()})),Wn.lineWrapping]});return s=new Wn({state:qr,parent:On})}function on(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Ni(gt){var On=gt.path,ai=gt.message,bi=function(Er,qr){try{var ao=O2.parse(Er),Js=ln(qr),vr=ao.pointers[Js];if(vr)return{path:qr,line:vr.key?vr.key.line:vr.value?vr.value.line:0,column:vr.key?vr.key.column:vr.value?vr.value.column:0,from:vr.key?vr.key.pos:vr.value?vr.value.pos:0,to:vr.keyEnd?vr.keyEnd.pos:vr.valueEnd?vr.valueEnd.pos:0}}catch(Ks){console.error(Ks)}return null}(i.escapeValue(oe),On);return{path:On,line:bi.line,column:bi.column,from:bi.from,to:bi.to,message:ai,severity:Xd.warning,actions:[]}}function pn(gt,On){var Er=gt.position;return{path:[],line:gt.line,column:gt.column,from:Er,to:Er,severity:Xd.error,message:gt.message,actions:On&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function Fr(gt){var On=arguments.length>1&&void 0!==arguments[1]&&arguments[1],ai=Fk(gt,f,g),bi=!or(gt,V),Er=V;V=gt,e(10,oe=ai),U("setCodeMirrorContent",{isChanged:bi,forceUpdate:On}),s&&(bi||On)&&(jo(oe,L)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}}),Or(),bi&&Wr(V,Er))}function $r(){if(s){var gt=s?i.unescapeValue(s.state.doc.toString()):"",On=gt!==oe;if(U("onChangeCodeMirrorValue",{isChanged:On}),On){var ai=V;e(10,oe=gt),V={text:oe},Or(),Wr(V,ai)}}}function wr(gt){return GS.of("number"==typeof gt?" ".repeat(gt):gt)}function Or(){e(11,Ne=het(s.state)>0),e(12,xe=fet(s.state)>0),U({canUndo:Ne,canRedo:xe})}a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(a)},hasFocus:function(){return B&&document.hasFocus()||jk(a)},onFocus:M,onBlur:$});var Ai=Gv($r,300);function Wr(gt,On){_&&_(gt,On,{contentErrors:Fi(),patchResult:null})}function jo(gt,On){return!!gt&>.length>10485760&&!On}var Fn="valid",xt=null;function ui(){if(jo(oe,L))return[];var gt=Fi();return Dae(gt)?[mpe(pn(gt.parseError,gt.isRepairable))]:function Jqe(t){return Io(t)&&Array.isArray(t.validationErrors)}(gt)?gt.validationErrors.map(Ni).map(mpe):[]}function Fi(){U("validate:start"),Ai.flush();var gt=Cr(i.escapeValue(oe),v,g,y);return Dae(gt)?(e(49,Fn=gt.isRepairable?"repairable":"invalid"),e(13,xt=gt.parseError),e(9,Z=[])):(e(49,Fn="valid"),e(13,xt=null),e(9,Z=gt?.validationErrors||[])),U("validate:end"),gt}var Cr=Zb(Oqe);function xo(){xt&&function(gt){U("select parse error",gt);var On=pn(gt,!1);_t(On.from,On.to),ot()}(xt)}var Qo={icon:xWe,text:"Show me",title:"Move to the parse error location",onClick:xo};return t.$$set=function(gt){"readOnly"in gt&&e(0,c=gt.readOnly),"mainMenuBar"in gt&&e(1,u=gt.mainMenuBar),"statusBar"in gt&&e(2,d=gt.statusBar),"externalContent"in gt&&e(29,h=gt.externalContent),"indentation"in gt&&e(30,f=gt.indentation),"tabSize"in gt&&e(31,p=gt.tabSize),"escapeUnicodeCharacters"in gt&&e(32,m=gt.escapeUnicodeCharacters),"parser"in gt&&e(33,g=gt.parser),"validator"in gt&&e(34,v=gt.validator),"validationParser"in gt&&e(35,y=gt.validationParser),"onChange"in gt&&e(36,_=gt.onChange),"onChangeMode"in gt&&e(37,C=gt.onChangeMode),"onError"in gt&&e(38,S=gt.onError),"onFocus"in gt&&e(39,M=gt.onFocus),"onBlur"in gt&&e(40,$=gt.onBlur),"onRenderMenu"in gt&&e(3,G=gt.onRenderMenu),"onSortModal"in gt&&e(41,R=gt.onSortModal),"onTransformModal"in gt&&e(42,z=gt.onTransformModal)},t.$$.update=function(){var gt;2&t.$$.dirty[1]&&(i=TO({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&Fr(h),8&t.$$.dirty[1]&&(U("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(_n())})),1073741824&t.$$.dirty[0]&&(gt=f,s&&(U("updateIndentation",gt),s.dispatch({effects:N.reconfigure(wr(gt))}))),1&t.$$.dirty[1]&&function(gt){s&&(U("updateTabSize",gt),s.dispatch({effects:F.reconfigure(Fo.tabSize.of(gt))}))}(p),1&t.$$.dirty[0]&&function(gt){s&&(U("updateReadOnly",gt),s.dispatch({effects:[E.reconfigure(Fo.readOnly.of(gt)),he.reconfigure(Wn.editable.of(!gt))]}))}(c),131074&t.$$.dirty[1]&&fe!==m&&(e(48,fe=m),U("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Fn||c?[Qo]:[{icon:zk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},Qo])},[c,u,d,G,o,a,l,L,X,Z,oe,Ne,xe,xt,r,re,ie,Ie,function(){var gt;if(!c)try{var On=g.parse(oe);B=!0,R({id:tt,json:On,rootPath:[],onSort:(gt=Zi(vn().mark(function ai(bi){var Er;return vn().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:U("onSort",Er=bi.operations),ne(Er);case 3:case"end":return qr.stop()}},ai)})),function(ai){return gt.apply(this,arguments)}),onClose:function(){B=!1,ot()}})}catch(ai){S(ai)}},function(){c||Le({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?uP(s):cP(s))},function(){c||s&&(Kj(s),ot())},function(){c||s&&(KS(s),ot())},function(){e(7,L=!0),Fr(h,!0)},function(){C(Jo.tree)},function(){$r()},function(gt){U("select validation error",gt);var On=Ni(gt);_t(On.from,On.to),ot()},jo,xo,h,f,p,m,g,v,y,_,C,S,M,$,R,z,ot,ne,Le,function(){U("refresh"),Xl().then(function(){if(s){var gt=on();U("updateTheme",{dark:gt}),s.dispatch({effects:[Y.reconfigure(Wn.theme({},{dark:gt}))]})}})},Fi,fe,Fn,function(gt){Vi[gt?"unshift":"push"](function(){e(4,o=gt)})},function(){return e(8,X=!1)},function(gt){Vi[gt?"unshift":"push"](function(){e(5,a=gt)})}]}var Jtt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ytt,Xtt,Ei,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Gtt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function Ktt(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Qtt(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:bse,title:xN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var Ztt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Qtt,Ktt,Ei,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function gpe(t,n,e){var i=t.slice();return i[9]=n[e],i}function vpe(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],_=Xi(v);_.length>0&&!Xc(m,_);)y.unshift({op:"add",path:ln(_),value:{}}),_=Xi(_);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&ip(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var nnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,tnt,ent,Ei,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function int(t){pi(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function rnt(t){var n,e,i,r,o=oh(t[2].stringify(t[1]),50)+"";return{c:function(){n=be("button"),e=tn(o),P(n,"type","button"),P(n,"class","jse-inline-value svelte-l28mqd"),Mt(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),de(n,e),i||(r=Ft(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Un(a,1)[0];6&l&&o!==(o=oh(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&Mt(n,"jse-selected",s[3])},i:Lt,o:Lt,d:function(s){s&&je(n),i=!1,r()}}}function ont(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=oo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var snt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ont,rnt,Ei,{path:0,value:1,parser:2,isSelected:3,onEdit:4},int),r}return Se(e)}();function ant(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function ype(t){var n,e,i,r;return e=new sr({props:{data:t[1]===qc.asc?ru:yse}}),{c:function(){n=be("span"),mt(e.$$.fragment),P(n,"class","jse-column-sort-icon svelte-h4fort"),P(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),ft(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===qc.asc?ru:yse),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&P(n,"title",i)},i:function(o){r||(Q(e.$$.fragment,o),r=!0)},o:function(o){ce(e.$$.fragment,o),r=!1},d:function(o){o&&je(n),pt(e)}}}function lnt(t){var n,e,i,r,o,s,a,l,c=oh(t[3],50)+"",u=void 0!==t[1]&&ype(t);return{c:function(){n=be("button"),e=be("span"),i=tn(c),r=it(),u&&u.c(),P(e,"class","jse-column-name"),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Mt(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),de(n,e),de(e,i),de(n,r),u&&u.m(n,null),s=!0,a||(l=Ft(n,"click",t[4]),a=!0)},p:function(d,h){var f=Un(h,1)[0];(!s||8&f)&&c!==(c=oh(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&Q(u,1)):((u=ype(d)).c(),Q(u,1),u.m(n,null)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&P(n,"title",o),(!s||1&f)&&Mt(n,"jse-readonly",d[0])},i:function(d){s||(Q(u),s=!0)},o:function(d){ce(u),s=!1},d:function(d){d&&je(n),u&&u.d(),a=!1,l()}}}function cnt(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Hi(s)?"values":tu(Kl(s))),96&t.$$.dirty&&e(1,r=or(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=H7e[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===qc.asc?qc.desc:qc.asc})},s,a,c]}var CD,kD,unt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cnt,lnt,Ei,{path:5,sortedColumn:6,readOnly:0,onSort:7},ant),r}return Se(e)}();function bpe(t,n){return CD||(kD=new WeakMap,CD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=kD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),kD.set(t,n),CD.observe(t),{destroy:function(){kD.delete(t),CD.unobserve(t)}}}function dnt(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,_=n.onEditValue,C=n.onEditRow,S=n.onToggleEnforceString,M=n.onCut,$=n.onCopy,G=n.onPaste,R=n.onRemove,z=n.onDuplicateRow,U=n.onInsertBeforeRow,q=n.onInsertAfterRow,re=n.onRemoveRow;function L(){y(),_()}function X(){y(),C()}function Z(){y(),S()}function H(){y(),M(!0)}function he(){y(),M(!1)}function E(){y(),$(!0)}function N(){y(),$(!1)}function F(){y(),G()}function Y(){y(),R()}function V(){y(),z()}function oe(){y(),U()}function fe(){y(),q()}function Ne(){y(),re()}return t.$$set=function(xe){"json"in xe&&e(2,p=xe.json),"documentState"in xe&&e(3,m=xe.documentState),"parser"in xe&&e(4,g=xe.parser),"showTip"in xe&&e(0,v=xe.showTip),"onCloseContextMenu"in xe&&e(5,y=xe.onCloseContextMenu),"onEditValue"in xe&&e(6,_=xe.onEditValue),"onEditRow"in xe&&e(7,C=xe.onEditRow),"onToggleEnforceString"in xe&&e(8,S=xe.onToggleEnforceString),"onCut"in xe&&e(9,M=xe.onCut),"onCopy"in xe&&e(10,$=xe.onCopy),"onPaste"in xe&&e(11,G=xe.onPaste),"onRemove"in xe&&e(12,R=xe.onRemove),"onDuplicateRow"in xe&&e(13,z=xe.onDuplicateRow),"onInsertBeforeRow"in xe&&e(14,U=xe.onInsertBeforeRow),"onInsertAfterRow"in xe&&e(15,q=xe.onInsertAfterRow),"onRemoveRow"in xe&&e(16,re=xe.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Hi(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Nr(i)||xs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Nr(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&zb(i)&&!s&&Array.isArray(Sn(p,Xi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&zb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!Ho(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Io(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Ho(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&lf(a,m.enforceStringMap,ln(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:L,icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:L,disabled:!c},{type:"button",icon:h?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Z,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:he,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:N,disabled:!l}]},{type:"button",onClick:F,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:Y,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:X,icon:h0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:wse,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:oe,icon:f0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:fe,icon:f0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Ne,icon:XO,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,_,C,S,M,$,G,R,z,U,q,re,o,l,u,h,c,i,a,d,r,s]}var fnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,hnt,dnt,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function pnt(t){pi(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function _pe(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function mnt(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&je(n),i&&je(e)}}}function gnt(t){var n;return{c:function(){n=tn("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,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function xpe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=tu(Kl(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=be("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=be("span"),a=tn("("),l=tn(m),c=it(),u=tn(g),d=tn(")"),P(s,"class","jse-nested-array-count svelte-1te5h1h"),P(n,"type","button"),P(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,_){Pe(y,n,_),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(s,u),de(s,d),h||(f=Ft(n,"click",v),h=!0)},p:function(y,_){t=y,64&_&&qn(e,t[6]),8&_&&p!==(p=tu(Kl(t[12]))+"")&&qn(r,p),9&_&&m!==(m=t[13]+"")&&qn(l,m),9&_&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&je(n),h=!1,f()}}}function vnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(G,R){return G[4]?gnt:mnt}for(var _=y(t),C=_(t),S=t[3],M=[],$=0;$1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Mo(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Hi(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Mo(l)?"An object":oo(l)?"An empty array":"A ".concat(VN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Jo.tree)}]}var bnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ynt,vnt,Ei,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},pnt),r}return Se(e)}();function _nt(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function xnt(t){var n,e,i,r,o,s;return e=new sr({props:{data:TWe}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=Ft(n,"click",t[3]),o=!0)},p:function(a,l){var c=Un(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&P(n,"title",i)},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,s()}}}function wnt(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Cnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,wnt,xnt,Ei,{count:0,maxSampleCount:1,onRefresh:2},_nt),r}return Se(e)}();function knt(t){pi(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function wpe(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Cpe(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function kpe(t,n,e){var i=t.slice();return i[125]=n[e],i}function Spe(t){var n,e;return n=new Ztt({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Snt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Dnt(t){var n,e,i,r,o,s,a,l,c,u=[Ant,Ent,Tnt],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-hs49xj"),P(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),de(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Ft(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[71](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function Tnt(t){var n,e;return n=new bnt({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Ent(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[35]}]}}),i=new tce({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function Ant(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R=!Hi(null===(n=t[21])||void 0===n?void 0:n.root),z=R&&Dpe(t),U=t[9],q=[],re=0;re"u";a("isSSR:",m);var g,v,y,_,C,S,M=n.readOnly,$=n.externalContent,G=n.mainMenuBar,R=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,U=n.flattenColumns,q=n.parser,re=n.parseMemoizeOne,L=n.validator,X=n.validationParser,Z=n.indentation,H=n.onChange,he=n.onChangeMode,E=n.onRenderValue,N=n.onRenderMenu,F=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(v)},hasFocus:function(){return ot&&document.hasFocus()||jk(v)},onFocus:function(){F&&F()},onBlur:function(){Y&&Y()}});var Ne,xe=void 0,tt=1e4,ze=[],ot=!1,B={},ne=600,ie=0;function Ie(Ee){a("updateSelection",Ee);var St="function"==typeof Ee?Ee(Le.selection):Ee;or(St,Le.selection)||e(10,Le=Ze(Ze({},Le),{},{selection:St}))}function Ye(Ee){void 0!==Le.selection&&void 0!==Ee&&(Le.selection&&Xc(Ee,Le.selection.anchorPath)&&Xc(Ee,Le.selection.focusPath)||(a("clearing selection: path does not exist anymore",Le.selection),e(10,Le=Ze(Ze({},Le),{},{selection:s0(Ee,Le)}))))}var At,Le=Lk(),_t=!1,_n=fae({onChange:function(Ee){e(19,ci=Ee)}}),ci=_n.getState();function Ni(Ee){var St=Ee.previousJson,Ht=Ee.previousState,sn=Ee.previousText,hn=Ee.previousTextIsRepaired;void 0===St&&void 0===sn||(void 0!==C?_n.add(void 0!==St?{undo:{patch:[{op:"replace",path:"",value:St}],state:ul(Ht),json:void 0,text:sn,textIsRepaired:hn},redo:{patch:[{op:"replace",path:"",value:C}],state:ul(Le),json:void 0,text:S,textIsRepaired:_t}}:{undo:{patch:void 0,json:void 0,text:sn,state:ul(Ht),textIsRepaired:hn},redo:{patch:void 0,json:C,state:ul(Le),text:S,textIsRepaired:_t}}):void 0!==St&&_n.add({undo:{patch:void 0,json:St,state:ul(Ht),text:sn,textIsRepaired:hn},redo:{patch:void 0,json:void 0,text:S,textIsRepaired:_t,state:ul(Le)}}))}var pn=[],Fr=Zb(pae);function $r(Ee,St,Ht,sn){g0(function(){var hn;try{hn=Fr(Ee,St,Ht,sn)}catch(ri){hn=[{path:[],message:"Failed to validate: "+ri.message,severity:Xd.warning}]}or(hn,pn)||(a("validationErrors changed:",hn),e(11,pn=hn))},function(hn){return a("validationErrors updated in ".concat(hn," ms"))})}function wr(){return a("validate"),xe?{parseError:xe,isRepairable:!1}:($r(C,L,q,X),Hi(pn)?null:{validationErrors:pn})}function Or(Ee,St){if(a("patch",Ee,St),void 0===C)throw new Error("Cannot apply patch: no JSON");var Ht={json:C},sn=C,hn=Le,ri=_t,Oi=ose(C,Ee),Bn=$oe(C,Le,Ee).json,ei=function MJe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=ou(Xu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return or(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ze(Ze({},t),{},{sortedColumn:void 0}):t}(Le,Ee,ze),Yn="function"==typeof St?St(Bn,ei):void 0;e(7,C=Yn&&void 0!==Yn.json?Yn.json:Bn);var br=Yn&&void 0!==Yn.state?Yn.state:ei;e(10,Le=br),e(15,S=void 0),e(18,_t=!1),e(17,Ne=void 0),_n.add({undo:{patch:Oi,json:void 0,text:void 0,state:ul(hn),textIsRepaired:ri},redo:{patch:Ee,json:void 0,state:ul(br),text:void 0,textIsRepaired:_t}});var Ar={json:C,previousJson:sn,undo:Oi,redo:Ee};return Wr(Ht,Ar),Ar}function Ai(Ee,St){if(!M)return Or(Ee,St)}function Wr(Ee,St){(void 0!==Ee.json||void 0!==Ee?.text)&&(void 0!==S?H({text:S,json:void 0},Ee,{contentErrors:wr(),patchResult:St}):void 0!==C&&H({text:void 0,json:C},Ee,{contentErrors:wr(),patchResult:St}))}function jo(Ee){a("handleFind",Ee)}function Fn(Ee){a("pasted json as text",Ee),e(17,Ne=Ee)}function xt(Ee){var St=parseInt(Ee[0]),Ht=[String(St+1)].concat(si(Ee.slice(1)));return Xc(C,Ht)?mr(Ht,!1):mr(Ee,!1)}function ui(){_&&(_.focus(),_.select())}function Fi(){Le.selection||Ie(function(){if(oo(C)&&!Hi(C)&&!Hi(ze))return mr(["0"].concat(si(ze[0])),!1)}())}function Cr(Ee){var St=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ht=b4(Ee,ze,B,18),sn=Ht-ie,hn=gt(Ee);a("scrollTo",{path:Ee,top:Ht,scrollTop:ie,elem:hn});var ri=y.getBoundingClientRect();if(hn&&!St){var Oi=hn.getBoundingClientRect();if(Oi.bottom>ri.top&&Oi.topHt.right&&e(13,y.scrollLeft+=sn.right-Ht.right,y),sn.left(Bn=ie+ri.height-18)&&e(13,y.scrollTop+=hn-Bn,y),sn0&&void 0!==Ht[0])||Ht[0],void 0!==C){sn.next=3;break}return sn.abrupt("return");case 3:return sn.next=5,Kle({json:C,documentState:Le,indentation:St?Z:void 0,parser:q});case 5:case"end":return sn.stop()}},Ee)})),Xa.apply(this,arguments)}function Ic(){Zle({json:C,text:S,documentState:Le,keepSelection:!0,readOnly:M,onChange:H,onPatch:Ai})}function we(){!function IJe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&c0(e.selection)){var s=ou(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;jl("duplicate row",{rowIndex:a});var c=[String(a)];o(nse(n,[c]),function(u,d){var h=mr(zm({rowIndex:a0?a-1:void 0,h=void 0!==d?mr(zm({rowIndex:d,columnIndex:l},i),!1):void 0;return jl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ze(Ze({},u),{},{selection:h})}})}}({json:C,documentState:Le,columns:ze,readOnly:M,onPatch:Ai})}function Ue(){return(Ue=Zi(vn().mark(function Ee(St){return vn().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ece({char:St,selectInside:!1,refJsonEditor:v,json:C,documentState:Le,readOnly:M,parser:q,onPatch:Ai,onReplaceJson:Dn,onSelect:Ie});case 2:case"end":return Ht.stop()}},Ee)}))).apply(this,arguments)}function Dn(Ee,St){var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t,Bn=nu(C,Le,[],sh),ei="function"==typeof St?St(Ee,Bn):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Ee),e(10,Le=ei&&void 0!==ei.state?ei.state:Bn),e(15,S=void 0),e(18,_t=!1),Ye(C),Ni({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function ii(Ee,St){a("handleChangeText");var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t;try{e(7,C=re(Ee)),e(10,Le=nu(C,Le,[],sh)),e(15,S=void 0),e(18,_t=!1)}catch{try{e(7,C=re(Yd(Ee))),e(10,Le=nu(C,Le,[],sh)),e(15,S=Ee),e(18,_t=!0)}catch{e(7,C=void 0),e(10,Le=Lk({json:C,expand:sh})),e(15,S=Ee),e(18,_t=!1)}}if("function"==typeof St){var Bn=St(C,Le);e(7,C=Bn&&Bn.json?Bn.json:C),e(10,Le=Bn&&Bn.state?Bn.state:Le)}Ye(C),Ni({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function hi(Ee){var Ht=Ee.rootPath,sn=Ee.onTransform,hn=Ee.onClose;M||void 0===C||(ot=!0,oe({id:Ee.id||p,json:C,rootPath:Ht||[],onTransform:sn?function(ri){sn({operations:ri,json:C,transformedJson:Yu(C,ri)})}:function(ri){a("onTransform",Ht,ri),Ai(ri)},onClose:function(){ot=!1,ui(),hn&&hn()}}))}function di(Ee){a("openJSONEditorModal",{path:Ee}),ot=!0,fe({content:{json:Sn(C,Ee)},path:Ee,onPatch:At.onPatch,onClose:function(){ot=!1,ui()}})}function kr(Ee,St){l(jae,{text:Ee,onParse:Ik,onRepair:soe,onApply:St},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ui()}})}function Qr(){if(!M&&_n.getState().canUndo){var Ee=_n.undo();if(Ee){var St={json:C,text:S};e(7,C=Ee.undo.patch?Yu(C,Ee.undo.patch):Ee.undo.json),e(10,Le=Ee.undo.state),e(15,S=Ee.undo.text),e(18,_t=Ee.undo.textIsRepaired),a("undo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.undo.patch,undo:Ee.redo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function gi(){if(!M&&_n.getState().canRedo){var Ee=_n.redo();if(Ee){var St={json:C,text:S};e(7,C=Ee.redo.patch?Yu(C,Ee.redo.patch):Ee.redo.json),e(10,Le=Ee.redo.state),e(15,S=Ee.redo.text),e(18,_t=Ee.redo.textIsRepaired),a("redo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.redo.patch,undo:Ee.undo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function yr(Ee,St){e(68,B[St]=Ee.getBoundingClientRect().height,B)}return t.$$set=function(Ee){"readOnly"in Ee&&e(0,M=Ee.readOnly),"externalContent"in Ee&&e(47,$=Ee.externalContent),"mainMenuBar"in Ee&&e(1,G=Ee.mainMenuBar),"escapeControlCharacters"in Ee&&e(48,R=Ee.escapeControlCharacters),"escapeUnicodeCharacters"in Ee&&e(49,z=Ee.escapeUnicodeCharacters),"flattenColumns"in Ee&&e(50,U=Ee.flattenColumns),"parser"in Ee&&e(2,q=Ee.parser),"parseMemoizeOne"in Ee&&e(51,re=Ee.parseMemoizeOne),"validator"in Ee&&e(52,L=Ee.validator),"validationParser"in Ee&&e(53,X=Ee.validationParser),"indentation"in Ee&&e(3,Z=Ee.indentation),"onChange"in Ee&&e(54,H=Ee.onChange),"onChangeMode"in Ee&&e(4,he=Ee.onChangeMode),"onRenderValue"in Ee&&e(55,E=Ee.onRenderValue),"onRenderMenu"in Ee&&e(5,N=Ee.onRenderMenu),"onFocus"in Ee&&e(56,F=Ee.onFocus),"onBlur"in Ee&&e(57,Y=Ee.onBlur),"onSortModal"in Ee&&e(58,V=Ee.onSortModal),"onTransformModal"in Ee&&e(59,oe=Ee.onTransformModal),"onJSONEditorModal"in Ee&&e(60,fe=Ee.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=TO({escapeControlCharacters:R,escapeUnicodeCharacters:z})),65536&t.$$.dirty[1]&&function on(Ee){var St=C,Ht=Qv(Ee)?Ee.text!==S:!or(St,Ee.json);if(a("update external content",{isChanged:Ht}),Ht){var sn={json:C,text:S},hn=C,ri=Le,Oi=S,Bn=_t;if(Qv(Ee))try{e(7,C=re(Ee.text)),e(15,S=Ee.text),e(18,_t=!1),e(16,xe=void 0)}catch(ei){try{e(7,C=re(Yd(Ee.text))),e(15,S=Ee.text),e(18,_t=!0),e(16,xe=void 0)}catch{e(7,C=void 0),e(15,S=$.text),e(18,_t=!1),e(16,xe=Nk(S,ei.message||ei.toString()))}}else e(7,C=Ee.json),e(15,S=void 0),e(18,_t=!1),e(16,xe=void 0);Ye(C),Le.sortedColumn&&e(10,Le=Ze(Ze({},Le),{},{sortedColumn:void 0})),Ni({previousJson:hn,previousState:ri,previousText:Oi,previousTextIsRepaired:Bn}),Wr(sn,null)}}($),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,ze=oo(C)?function(Ee,St){var Ht,sn=new Set(St.map(ln)),hn=new Set(Ee.map(ln)),ri=Re(sn);try{for(ri.s();!(Ht=ri.n()).done;){var Oi=Ht.value;hn.has(Oi)||sn.delete(Oi)}}catch(br){ri.e(br)}finally{ri.f()}var Bn,ei=Re(hn);try{for(ei.s();!(Bn=ei.n()).done;){var Yn=Bn.value;sn.has(Yn)||sn.add(Yn)}}catch(br){ei.e(br)}finally{ei.f()}return si(sn).map(Xu)}(function(Ee,St){var Ht=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,sn={};Array.isArray(Ee)&&function LUe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rtt),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Ee,St,Ht,sn,hn){for(var ri=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Oi=oo(Ht)?Ht.length:0,Bn=function TJe(t,n){var e=Object.values(t);return Hi(e)?n:e.reduce(function(r,o){return r+o})/e.length}(sn,hn),ei=Ee-ri,Yn=St+2*ri,br=function(gd){return sn[gd]||hn},Ar=0,Po=0;Po0&&(Po-=br(--Ar));for(var ca=Ar,md=0;md0?mr(zm({rowIndex:br.rowIndex,columnIndex:Po-1},ei),!1):Yn;Ie(Ht),Qo(Ht.focusPath)}if("ArrowRight"===St&&(Ee.preventDefault(),Fi(),Le.selection)){var sn=function(ei,Yn){var br=ou(Yn.focusPath,ei),Po=br.columnIndex;return Po0?mr(zm({rowIndex:Ar-1,columnIndex:br.columnIndex},ei),!1):Yn}(ze,Le.selection);Ie(hn),Qo(hn.focusPath)}if("ArrowDown"===St&&(Ee.preventDefault(),Fi(),Le.selection)){var ri=function(ei,Yn,br){var Ar=ou(br.focusPath,Yn),Po=Ar.rowIndex;return Po1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Rpe({props:{mode:Ln(t[18]).mode,content:Ln(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:dh,onBlur:dh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&$pe(t),S=t[18].length>1&&Bpe(t);function M(R,z){return R[0]?Vnt:Hnt}var $=M(t),G=$(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).innerHTML='
    Path
    ',s=it(),a=be("input"),l=it(),(c=be("div")).innerHTML='
    Contents
    ',u=it(),d=be("div"),mt(h.$$.fragment),f=it(),p=be("div"),C&&C.c(),m=it(),S&&S.c(),g=it(),G.c(),P(o,"class","jse-label svelte-1hibiw3"),P(a,"class","jse-path svelte-1hibiw3"),P(a,"type","text"),a.readOnly=!0,P(a,"title","Selected path"),a.value=t[21],P(c,"class","jse-label svelte-1hibiw3"),P(d,"class","jse-modal-inline-editor svelte-1hibiw3"),P(p,"class","jse-actions svelte-1hibiw3"),P(r,"class","jse-modal-contents svelte-1hibiw3"),P(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(r,l),de(r,c),de(r,u),de(r,d),ft(h,d,null),de(r,f),de(r,p),C&&C.m(p,null),de(p,m),S&&S.m(p,null),de(p,g),G.m(p,null),v=!0,y||(_=_a(iS.call(null,n,t[23])),y=!0)},p:function(R,z){var U={};262144&z[0]&&(U.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(U),(!v||2097152&z[0]&&a.value!==R[21])&&(a.value=R[21]);var q={};262144&z[0]&&(q.mode=Ln(R[18]).mode),262144&z[0]&&(q.content=Ln(R[18]).content),1&z[0]&&(q.readOnly=R[0]),2&z[0]&&(q.indentation=R[1]),4&z[0]&&(q.tabSize=R[2]),32&z[0]&&(q.statusBar=R[5]),8&z[0]&&(q.mainMenuBar=R[3]),16&z[0]&&(q.navigationBar=R[4]),64&z[0]&&(q.escapeControlCharacters=R[6]),128&z[0]&&(q.escapeUnicodeCharacters=R[7]),256&z[0]&&(q.flattenColumns=R[8]),512&z[0]&&(q.parser=R[9]),1048576&z[0]&&(q.parseMemoizeOne=R[20]),1024&z[0]&&(q.validator=R[10]),2048&z[0]&&(q.validationParser=R[11]),4096&z[0]&&(q.pathParser=R[12]),8192&z[0]&&(q.onRenderValue=R[13]),16384&z[0]&&(q.onClassName=R[14]),32768&z[0]&&(q.onRenderMenu=R[15]),65536&z[0]&&(q.onSortModal=R[16]),131072&z[0]&&(q.onTransformModal=R[17]),h.$set(q),R[19]?C?C.p(R,z):((C=$pe(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?S?(S.p(R,z),262144&z[0]&&Q(S,1)):((S=Bpe(R)).c(),Q(S,1),S.m(p,g)):S&&($t(),ce(S,1,1,function(){S=null}),Bt()),$===($=M(R))&&G?G.p(R,z):(G.d(1),(G=$(R))&&(G.c(),G.m(p,null)))},i:function(R){v||(Q(e.$$.fragment,R),Q(h.$$.fragment,R),Q(S),v=!0)},o:function(R){ce(e.$$.fragment,R),ce(h.$$.fragment,R),ce(S),v=!1},d:function(R){R&&je(n),pt(e),pt(h),C&&C.d(),S&&S.d(),G.d(),y=!1,_()}}}function Vpe(t){t.focus()}function Unt(t,n,e){var i,r,o,s=wa("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,_=n.parser,C=n.validator,S=n.validationParser,M=n.pathParser,$=n.onRenderValue,G=n.onClassName,R=n.onRenderMenu,z=n.onSortModal,U=n.onTransformModal,q=xa("simple-modal").close,re=[{mode:X(a),content:a,relativePath:l}],L=void 0;function X(H){return DO(H)&&oo(H.json)?Jo.table:Jo.tree}function Z(H){s("handleChange",H);var he=Ze(Ze({},Ln(re)),{},{content:H});e(18,re=[].concat(si(Xi(re)),[he]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,_=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,S=H.validationParser),"pathParser"in H&&e(12,M=H.pathParser),"onRenderValue"in H&&e(13,$=H.onRenderValue),"onClassName"in H&&e(14,G=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,z=H.onSortModal),"onTransformModal"in H&&e(17,U=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=re.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Hi(i)?"(whole document)":tu(Kl(i))),512&t.$$.dirty[0]&&e(20,o=Zb(_.parse))},[u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,re,L,o,r,function(){if(s("handleApply"),!u)try{e(19,L=void 0);var H=[{op:"replace",path:ln(Ln(re).relativePath),value:loe(Ln(re).content,_).json}];if(re.length>1){var he={json:Yu(loe(re[re.length-2].content,_).json,H)};e(18,re=Xi(re)),Z(he)}else c(H),q()}catch(E){e(19,L=E.toString())}},function(){s("handleClose"),re.length>1?(e(18,re=Xi(re)),e(19,L=void 0)):q()},Z,function(H){s("handleChangeMode",H);var he=Ze(Ze({},Ln(re)),{},{mode:H});e(18,re=[].concat(si(Xi(re)),[he]))},function(H){e(19,L=H.toString()),console.error(H)},function(H){var he=H.content,E=H.path;s("handleJSONEditorModal",{content:he,path:E});var N={mode:X(he),content:he,relativePath:E};e(18,re=[].concat(si(re),[N]))},a,l,c,i]}var Gnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Unt,znt,Ei,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Bnt,[-1,-1]),r}return Se(e)}();function Wnt(t,n,e){var i=xa("simple-modal");return[i.open,i.close]}var qnt=function(t){wt(e,Nn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wnt,null,Ei,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Xnt(t){pi(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function Hpe(t){var n,e;return n=new Rpe({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){mt(n.$$.fragment)},m:function(r,o){ft(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(Q(n.$$.fragment,r),e=!0)},o:function(r){ce(n.$$.fragment,r),e=!1},d:function(r){t[56](null),pt(n,r)}}}function Ynt(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new qnt({props:l}),Vi.push(function(){return Uu(n,"open",a)});var c=Hpe(t);return{c:function(){mt(n.$$.fragment),i=it(),r=be("div"),c.c(),P(r,"class","jse-main svelte-sxaskb"),Mt(r,"jse-focus",t[20])},m:function(u,d){ft(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],zu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ei(s,s=u[19])?($t(),ce(c,1,1,Lt),Bt(),(c=Hpe(u)).c(),Q(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Mt(r,"jse-focus",u[20])},i:function(u){o||(Q(n.$$.fragment,u),Q(c),o=!0)},o:function(u){ce(n.$$.fragment,u),ce(c),o=!1},d:function(u){pt(n,u),u&&je(i),u&&je(r),c.d(u)}}}function Jnt(t){var n,e;return n=new CQ({props:{closeOnEsc:!1,$$slots:{default:[Ynt]},$$scope:{ctx:t}}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Knt(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},kQ,{closeOnEsc:!1}],o={$$slots:{default:[Jnt]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ke(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return ke(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(RW||(RW=Ae([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)($W||($W=Ae(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return ke(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ze(Ze({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var _=this._scope[m]||(this._scope[m]=[]),C=_.length;return _[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(BW||(BW=Ae(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(_){var C=d[_];if(!C)return"continue";var S=p[_]=p[_]||new Map;C.forEach(function(M){if(!S.has(M)){S.set(M,n.Started);var $=h(M);if($){var G=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(VW||(VW=Ae(["",""," "," = ",";",""])),g,G,M,$,f.opts._n)}else{if(!($=m?.(M)))throw new i(M);g=(0,e._)(HW||(HW=Ae(["","","",""])),g,$,f.opts._n)}S.set(M,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(eme)),eme}function xr(){return Zpe||(Zpe=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=DD(),e=tme(),i=DD();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=tme();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function F(){ke(this,F)}return Se(F,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(Y,V){return this}}]),F}(),s=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).varKind=oe,xe.name=fe,xe.rhs=Ne,xe}return Se(V,[{key:"render",value:function(oe){var Ne=oe._n,xe=oe.es5?e.varKinds.var:this.varKind,tt=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(xe," ").concat(this.name).concat(tt,";")+Ne}},{key:"optimizeNames",value:function(oe,fe){if(oe[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,oe,fe)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).lhs=oe,xe.rhs=fe,xe.sideEffects=Ne,xe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+fe}},{key:"optimizeNames",value:function(oe,fe){if(!(this.lhs instanceof n.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,oe,fe),this}},{key:"names",get:function(){return re(this.lhs instanceof n.Name?{}:Ze({},this.lhs.names),this.rhs)}}]),V}(o),l=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this,oe,Ne,xe)).op=fe,tt}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+fe}}]),V}(a),c=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.label,":")+fe}}]),V}(o),u=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n,Ne=this.label?" ".concat(this.label):"";return"break".concat(Ne,";")+fe}}]),V}(o),d=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"throw ".concat(this.error,";")+fe}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).code=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.code,";")+fe}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(oe,fe){return this.code=L(this.code,oe,fe),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(F){wt(V,F);var Y=Ct(V);function V(){var oe,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ke(this,V),(oe=Y.call(this)).nodes=fe,oe}return Se(V,[{key:"render",value:function(oe){return this.nodes.reduce(function(fe,Ne){return fe+Ne.render(oe)},"")}},{key:"optimizeNodes",value:function(){for(var oe=this.nodes,fe=oe.length;fe--;){var Ne=oe[fe].optimizeNodes();Array.isArray(Ne)?oe.splice.apply(oe,[fe,1].concat(si(Ne))):Ne?oe[fe]=Ne:oe.splice(fe,1)}return oe.length>0?this:void 0}},{key:"optimizeNames",value:function(oe,fe){for(var Ne=this.nodes,xe=Ne.length;xe--;){var tt=Ne[xe];tt.optimizeNames(oe,fe)||(X(oe,tt.names),Ne.splice(xe,1))}return Ne.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(oe,fe){return q(oe,fe.names)},{})}}]),V}(o),p=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"{"+oe._n+pr(qi(V.prototype),"render",this).call(this,oe)+"}"+oe._n}}]),V}(f),m=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(f),g=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe){var Ne;return ke(this,V),(Ne=Y.call(this,fe)).condition=oe,Ne}return Se(V,[{key:"render",value:function(oe){var fe="if(".concat(this.condition,")")+pr(qi(V.prototype),"render",this).call(this,oe);return this.else&&(fe+="else "+this.else.render(oe)),fe}},{key:"optimizeNodes",value:function(){pr(qi(V.prototype),"optimizeNodes",this).call(this);var oe=this.condition;if(!0===oe)return this.nodes;var fe=this.else;if(fe){var Ne=fe.optimizeNodes();fe=this.else=Array.isArray(Ne)?new g(Ne):Ne}return fe?!1===oe?fe instanceof V?fe:fe.nodes:this.nodes.length?this:new V(Z(oe),fe instanceof V?[fe]:fe.nodes):!1!==oe&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(oe,fe){var Ne;if(this.else=null===(Ne=this.else)||void 0===Ne?void 0:Ne.optimizeNames(oe,fe),pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe)||this.else)return this.condition=L(this.condition,oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return re(oe,this.condition),this.else&&q(oe,this.else.names),oe}}]),V}(p);v.kind="if";var y=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);y.kind="for";var _=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).iteration=oe,fe}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.iteration,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iteration=L(this.iteration,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this)).varKind=oe,tt.name=fe,tt.from=Ne,tt.to=xe,tt}return Se(V,[{key:"render",value:function(oe){var Ne=this.name,xe=this.from,tt=this.to;return"for(".concat(oe.es5?e.varKinds.var:this.varKind," ").concat(Ne,"=").concat(xe,"; ").concat(Ne,"<").concat(tt,"; ").concat(Ne,"++)")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"names",get:function(){var oe=re(pr(qi(V.prototype),"names",this),this.from);return re(oe,this.to)}}]),V}(y),S=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne,xe){var tt;return ke(this,V),(tt=Y.call(this)).loop=oe,tt.varKind=fe,tt.name=Ne,tt.iterable=xe,tt}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iterable=L(this.iterable,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),M=function(F){wt(V,F);var Y=Ct(V);function V(oe,fe,Ne){var xe;return ke(this,V),(xe=Y.call(this)).name=oe,xe.args=fe,xe.async=Ne,xe}return Se(V,[{key:"render",value:function(oe){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);M.kind="func";var $=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"return "+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(f);$.kind="return";var G=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){var fe="try"+pr(qi(V.prototype),"render",this).call(this,oe);return this.catch&&(fe+=this.catch.render(oe)),this.finally&&(fe+=this.finally.render(oe)),fe}},{key:"optimizeNodes",value:function(){var oe,fe;return pr(qi(V.prototype),"optimizeNodes",this).call(this),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(fe=this.finally)||void 0===fe||fe.optimizeNodes(),this}},{key:"optimizeNames",value:function(oe,fe){var Ne,xe;return pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe),null===(Ne=this.catch)||void 0===Ne||Ne.optimizeNames(oe,fe),null===(xe=this.finally)||void 0===xe||xe.optimizeNames(oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return this.catch&&q(oe,this.catch.names),this.finally&&q(oe,this.finally.names),oe}}]),V}(p),R=function(F){wt(V,F);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){return"catch(".concat(this.error,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);R.kind="catch";var z=function(F){wt(V,F);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"finally"+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);z.kind="finally";var U=function(){function F(Y){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ke(this,F),this._values={},this._blockStarts=[],this._constants={},this.opts=Ze(Ze({},V),{},{_n:V.lines?"\n":""}),this._extScope=Y,this._scope=new e.Scope({parent:Y}),this._nodes=[new m]}return Se(F,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(Y){return this._scope.name(Y)}},{key:"scopeName",value:function(Y){return this._extScope.name(Y)}},{key:"scopeValue",value:function(Y,V){var oe=this._extScope.value(Y,V);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}},{key:"getScopeValue",value:function(Y,V){return this._extScope.getValue(Y,V)}},{key:"scopeRefs",value:function(Y){return this._extScope.scopeRefs(Y,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(Y,V,oe,fe){var Ne=this._scope.toName(V);return void 0!==oe&&fe&&(this._constants[Ne.str]=oe),this._leafNode(new s(Y,Ne,oe)),Ne}},{key:"const",value:function(Y,V,oe){return this._def(e.varKinds.const,Y,V,oe)}},{key:"let",value:function(Y,V,oe){return this._def(e.varKinds.let,Y,V,oe)}},{key:"var",value:function(Y,V,oe){return this._def(e.varKinds.var,Y,V,oe)}},{key:"assign",value:function(Y,V,oe){return this._leafNode(new a(Y,V,oe))}},{key:"add",value:function(Y,V){return this._leafNode(new l(Y,t.operators.ADD,V))}},{key:"code",value:function(Y){return"function"==typeof Y?Y():Y!==n.nil&&this._leafNode(new h(Y)),this}},{key:"object",value:function(){for(var Y=["{"],V=arguments.length,oe=new Array(V),fe=0;fe1&&Y.push(","),Y.push(ze),(ze!==ot||this.opts.es5)&&(Y.push(":"),(0,n.addCodeArg)(Y,ot))}return Y.push("}"),new n._Code(Y)}},{key:"if",value:function(Y,V,oe){if(this._blockNode(new v(Y)),V&&oe)this.code(V).else().code(oe).endIf();else if(V)this.code(V).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(Y){return this._elseNode(new v(Y))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(Y,V){return this._blockNode(Y),V&&this.code(V).endFor(),this}},{key:"for",value:function(Y,V){return this._for(new _(Y),V)}},{key:"forRange",value:function(Y,V,oe,fe){var Ne=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,xe=this._scope.toName(Y);return this._for(new C(Ne,xe,V,oe),function(){return fe(xe)})}},{key:"forOf",value:function(Y,V,oe){var fe=this,Ne=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,xe=this._scope.toName(Y);if(this.opts.es5){var tt=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(zW||(zW=Ae(["",".length"])),tt),function(ze){fe.var(xe,(0,n._)(UW||(UW=Ae(["","[","]"])),tt,ze)),oe(xe)})}return this._for(new S("of",Ne,xe,V),function(){return oe(xe)})}},{key:"forIn",value:function(Y,V,oe){var fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(Y,(0,n._)(GW||(GW=Ae(["Object.keys(",")"])),V),oe);var Ne=this._scope.toName(Y);return this._for(new S("in",fe,Ne,V),function(){return oe(Ne)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(Y){return this._leafNode(new c(Y))}},{key:"break",value:function(Y){return this._leafNode(new u(Y))}},{key:"return",value:function(Y){var V=new $;if(this._blockNode(V),this.code(Y),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}},{key:"try",value:function(Y,V,oe){if(!V&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');var fe=new G;if(this._blockNode(fe),this.code(Y),V){var Ne=this.name("e");this._currNode=fe.catch=new R(Ne),V(Ne)}return oe&&(this._currNode=fe.finally=new z,this.code(oe)),this._endBlockNode(R,z)}},{key:"throw",value:function(Y){return this._leafNode(new d(Y))}},{key:"block",value:function(Y,V){return this._blockStarts.push(this._nodes.length),Y&&this.code(Y).endBlock(V),this}},{key:"endBlock",value:function(Y){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var oe=this._nodes.length-V;if(oe<0||void 0!==Y&&oe!==Y)throw new Error("CodeGen: wrong number of nodes: ".concat(oe," vs ").concat(Y," expected"));return this._nodes.length=V,this}},{key:"func",value:function(Y){var fe=arguments.length>3?arguments[3]:void 0;return this._blockNode(new M(Y,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),fe&&this.code(fe).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(M)}},{key:"optimize",value:function(){for(var Y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(Y){return this._currNode.nodes.push(Y),this}},{key:"_blockNode",value:function(Y){this._currNode.nodes.push(Y),this._nodes.push(Y)}},{key:"_endBlockNode",value:function(Y,V){var oe=this._currNode;if(oe instanceof Y||V&&oe instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(Y.kind,"/").concat(V.kind):Y.kind,'"'))}},{key:"_elseNode",value:function(Y){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=Y,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var Y=this._nodes;return Y[Y.length-1]},set:function(Y){var V=this._nodes;V[V.length-1]=Y}}]),F}();function q(F,Y){for(var V in Y)F[V]=(F[V]||0)+(Y[V]||0);return F}function re(F,Y){return Y instanceof n._CodeOrName?q(F,Y.names):F}function L(F,Y,V){return F instanceof n.Name?oe(F):(fe=F)instanceof n._Code&&fe._items.some(function(Ne){return Ne instanceof n.Name&&1===Y[Ne.str]&&void 0!==V[Ne.str]})?new n._Code(F._items.reduce(function(fe,Ne){return Ne instanceof n.Name&&(Ne=oe(Ne)),Ne instanceof n._Code?fe.push.apply(fe,si(Ne._items)):fe.push(Ne),fe},[])):F;var fe;function oe(fe){var Ne=V[fe.str];return void 0===Ne||1!==Y[fe.str]?fe:(delete Y[fe.str],Ne)}}function X(F,Y){for(var V in Y)F[V]=(F[V]||0)-(Y[V]||0)}function Z(F){return"boolean"==typeof F||"number"==typeof F||null===F?!F:(0,n._)(WW||(WW=Ae(["!",""])),N(F))}t.CodeGen=U,t.not=Z;var H=E(t.operators.AND);t.and=function(){for(var F=arguments.length,Y=new Array(F),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,_,C,S){var M=void 0===C?_:C instanceof n.Name?(_ instanceof n.Name?p(y,_,C):m(y,_,C),C):_ instanceof n.Name?(m(y,C,_),_):g(_,C);return S!==n.Name||M instanceof n.Name?M:v(y,M)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(aq||(aq=Ae(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(lq||(lq=Ae(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(YW||(YW=Ae(["",""])),p)}return(0,n._)(JW||(JW=Ae(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(KW||(KW=Ae([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(QW||(QW=Ae([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(ZW||(ZW=Ae([""," || {}"])),m)).code((0,n._)(eq||(eq=Ae(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(tq||(tq=Ae([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(nq||(nq=Ae([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Ze(Ze({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(iq||(iq=Ae([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(rq||(rq=Ae([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(oq||(oq=Ae([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(sq||(sq=Ae([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?cq||(cq=Ae(['"[" + ',' + "]"'])):uq||(uq=Ae(['"[\'" + ',' + "\']"'])):g?dq||(dq=Ae(['"/" + ',""])):hq||(hq=Ae(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Hr);var nme,ime,rme,TD={};function Sp(){if(nme)return TD;nme=1,Object.defineProperty(TD,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return TD.default=n,TD}function ED(){return ime||(ime=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Hr,i=Sp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(Dq||(Dq=Ae([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(Tq||(Tq=Ae(["[","]"])),f))},(0,n._)(Eq||(Eq=Ae(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(Aq||(Aq=Ae(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(Mq||(Mq=Ae(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(Iq||(Iq=Ae(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(fq||(fq=Ae(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(pq||(pq=Ae(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(mq||(mq=Ae(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,_=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,_):o(m,(0,n._)(gq||(gq=Ae(["[","]"])),_))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(vq||(vq=Ae([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(yq||(yq=Ae(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(_){h.const(y,(0,n._)(bq||(bq=Ae(["","[","]"])),i.default.vErrors,_)),h.if((0,n._)(_q||(_q=Ae(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(xq||(xq=Ae(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(wq||(wq=Ae(["",".schemaPath"])),y),(0,n.str)(Cq||(Cq=Ae(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(kq||(kq=Ae(["",".schema"])),y),p),h.assign((0,n._)(Sq||(Sq=Ae(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(Nq||(Nq=Ae(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,_=d.it,C=_.opts,S=_.propertyName,M=_.topSchemaRef,$=_.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(Pq||(Pq=Ae(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(Lq||(Lq=Ae(["","",""])),M,$)],[i.default.data,v]),S&&f.push([s.propertyName,S])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(Fq||(Fq=Ae(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(Oq||(Oq=Ae(["","/",""])),p,f);return m&&(g=(0,n.str)(jq||(jq=Ae(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(Ype)),Ype}var I_={},tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.getRules=tg.isJSONType=void 0;var ait=new Set(["string","number","integer","boolean","null","object","array"]);tg.isJSONType=function(t){return"string"==typeof t&&ait.has(t)},tg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ze(Ze({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var ome,pf={};function sme(){if(ome)return pf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return ome=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.shouldUseRule=pf.shouldUseGroup=pf.schemaHasRulesForType=void 0,pf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},pf.shouldUseGroup=t,pf.shouldUseRule=n,pf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=tg,i=sme(),r=ED(),o=xr(),s=Hr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var M,m=f.gen,g=f.data,v=f.opts,y=(M=v.coerceTypes)?p.filter(function($){return l.has($)||"array"===M&&"array"===$}):[],_=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(_){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(S,M,$){var G=S.gen,R=S.data,z=S.opts,U=G.let("dataType",(0,o._)($q||($q=Ae(["typeof ",""])),R)),q=G.let("coerced",(0,o._)(Bq||(Bq=Ae(["undefined"]))));"array"===z.coerceTypes&&G.if((0,o._)(Vq||(Vq=Ae([""," == 'object' && Array.isArray(",") && ",".length == 1"])),U,R,R),function(){return G.assign(R,(0,o._)(Hq||(Hq=Ae(["","[0]"])),R)).assign(U,(0,o._)(zq||(zq=Ae(["typeof ",""])),R)).if(u(M,R,z.strictNumbers),function(){return G.assign(q,R)})}),G.if((0,o._)(Uq||(Uq=Ae([""," !== undefined"])),q));var re,L=Re($);try{for(L.s();!(re=L.n()).done;){var X=re.value;(l.has(X)||"array"===X&&"array"===z.coerceTypes)&&Z(X)}}catch(H){L.e(H)}finally{L.f()}function Z(H){switch(H){case"string":return void G.elseIf((0,o._)(Wq||(Wq=Ae(["",' == "number" || ',' == "boolean"'])),U,U)).assign(q,(0,o._)(qq||(qq=Ae(['"" + ',""])),R)).elseIf((0,o._)(Xq||(Xq=Ae([""," === null"])),R)).assign(q,(0,o._)(Yq||(Yq=Ae(['""']))));case"number":return void G.elseIf((0,o._)(Jq||(Jq=Ae(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),U,R,U,R,R,R)).assign(q,(0,o._)(Kq||(Kq=Ae(["+",""])),R));case"integer":return void G.elseIf((0,o._)(Qq||(Qq=Ae(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),U,R,U,R,R,R,R)).assign(q,(0,o._)(Zq||(Zq=Ae(["+",""])),R));case"boolean":return void G.elseIf((0,o._)(eX||(eX=Ae(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(q,!1).elseIf((0,o._)(tX||(tX=Ae(["",' === "true" || '," === 1"])),R,R)).assign(q,!0);case"null":return G.elseIf((0,o._)(nX||(nX=Ae(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void G.assign(q,null);case"array":G.elseIf((0,o._)(iX||(iX=Ae(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),U,U,U,R)).assign(q,(0,o._)(rX||(rX=Ae(["[","]"])),R))}}G.else(),h(S),G.endIf(),G.if((0,o._)(Gq||(Gq=Ae([""," !== undefined"])),q),function(){var H,he,E,N,F;G.assign(R,q),he=q,N=(H=S).parentData,F=H.parentDataProperty,(E=H.gen).if((0,o._)(oX||(oX=Ae([""," !== undefined"])),N),function(){return E.assign((0,o._)(sX||(sX=Ae(["","[","]"])),N,F),he)})})}(f,p,y):h(f)})}return _};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(aX||(aX=Ae([""," "," null"])),p,y);case"array":g=(0,o._)(lX||(lX=Ae(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(cX||(cX=Ae([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=_((0,o._)(uX||(uX=Ae(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=_();break;default:return(0,o._)(dX||(dX=Ae(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function _(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(hX||(hX=Ae(["typeof ",' == "number"'])),p),C,m?(0,o._)(fX||(fX=Ae(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var _=(0,o._)(pX||(pX=Ae(["typeof ",' != "object"'])),p);v=y.null?_:(0,o._)(mX||(mX=Ae(["!"," || ",""])),p,_),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(gX||(gX=Ae(["{type: ","}"])),p):(0,o._)(vX||(vX=Ae(["{type: ","}"])),m)}};function h(f){var m,g,v,y,_,p=(g=(m=f).gen,v=m.data,_=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:_,schemaValue:_,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(I_);var ame,lme,cme,N_={},ud={},po={};function dd(){if(lme)return po;lme=1,Object.defineProperty(po,"__esModule",{value:!0}),po.validateUnion=po.validateArray=po.usePattern=po.callValidateCode=po.schemaProperties=po.allSchemaProperties=po.noPropertyInData=po.propertyInData=po.isOwnProperty=po.hasPropFunc=po.reportMissingProp=po.checkMissingProp=po.checkReportMissingProp=void 0;var t=xr(),n=Hr,e=Sp(),i=Hr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(kX||(kX=Ae(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(SX||(SX=Ae(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(EX||(EX=Ae(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}po.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(wX||(wX=Ae(["",""])),u)},!0),c.error()})},po.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,si(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(CX||(CX=Ae([""," = ",""])),d,m))})))},po.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},po.hasPropFunc=r,po.isOwnProperty=o,po.propertyInData=function(c,u,d,h){var f=(0,t._)(DX||(DX=Ae(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(TX||(TX=Ae([""," && ",""])),f,o(c,u,d)):f},po.noPropertyInData=s,po.allSchemaProperties=a,po.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},po.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,_=m.errorPath,C=c.it,S=h?(0,t._)(AX||(AX=Ae(["",", ",", ","",""])),f,p,v,y):p,M=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,_)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&M.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var $=(0,t._)(MX||(MX=Ae(["",", ",""])),S,g.object.apply(g,M));return d!==t.nil?(0,t._)(IX||(IX=Ae(["",".call(",", ",")"])),u,d,$):(0,t._)(NX||(NX=Ae(["","(",")"])),u,$)};var l=(0,t._)(FX||(FX=Ae(["new RegExp"])));return po.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(OX||(OX=Ae(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},po.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(jX||(jX=Ae(["",".length"])),d));u.forRange("i",0,y,function(_){c.subschema({keyword:h,dataProp:_,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},po.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(PX||(PX=Ae([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},po}var ume,mf={},Ga={},dme=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==bn(n)&&"object"==bn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},kP={},cit={get exports(){return kP},set exports(t){kP=t}},Dp=cit.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),AD(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function AD(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==bn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Dp.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!SP(t):!!n&&hme(t)<=n)};var pit=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function SP(t){for(var n in t){if(pit.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(SP)||"object"==bn(e)&&SP(e))return!0}return!1}function hme(t){var n=0;for(var e in t)if("$ref"===e||(n++,!fit.has(e)&&("object"==bn(t[e])&&(0,uit.eachItem)(t[e],function(i){return n+=hme(i)}),n===1/0)))return 1/0;return n}function fme(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=z0(n));var i=t.parse(n);return pme(t,i)}function pme(t,n){return t.serialize(n).split("#")[0]+"#"}Ga.getFullPath=fme,Ga._getFullPath=pme;var mit=/#\/?$/;function z0(t){return t?t.replace(mit,""):""}Ga.normalizeId=z0,Ga.resolveUrl=function(t,n,e){return e=z0(e),t.resolve(n,e)};var mme,git=/^[a-z_][-a-z0-9._]*$/i;function MD(){if(mme)return ff;mme=1,Object.defineProperty(ff,"__esModule",{value:!0}),ff.getData=ff.KeywordCxt=ff.validateFunctionCode=void 0;var t=function(){if(rme)return eg;rme=1,Object.defineProperty(eg,"__esModule",{value:!0}),eg.boolOrEmptySchema=eg.topBoolOrEmptySchema=void 0;var L=ED(),X=xr(),Z=Sp(),H={message:"boolean schema is false"};function he(E,N){(0,L.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,N)}return eg.topBoolOrEmptySchema=function(E){var N=E.gen,F=E.schema,Y=E.validateName;!1===F?he(E,!1):"object"==bn(F)&&!0===F.$async?N.return(Z.default.data):(N.assign((0,X._)(Rq||(Rq=Ae(["",".errors"])),Y),null),N.return(!0))},eg.boolOrEmptySchema=function(E,N){var F=E.gen;!1===E.schema?(F.var(N,!1),he(E)):F.var(N,!0)},eg}(),n=I_,e=sme(),i=I_,r=function(){if(ame)return N_;ame=1,Object.defineProperty(N_,"__esModule",{value:!0}),N_.assignDefaults=void 0;var L=xr(),X=Hr;function Z(H,he,E){var N=H.gen,F=H.compositeRule,Y=H.data,V=H.opts;if(void 0!==E){var oe=(0,L._)(yX||(yX=Ae(["","",""])),Y,(0,L.getProperty)(he));if(F)(0,X.checkStrictMode)(H,"default is ignored for: ".concat(oe));else{var fe=(0,L._)(bX||(bX=Ae([""," === undefined"])),oe);"empty"===V.useDefaults&&(fe=(0,L._)(_X||(_X=Ae([""," || "," === null || ",' === ""'])),fe,oe,oe)),N.if(fe,(0,L._)(xX||(xX=Ae([""," = ",""])),oe,(0,L.stringify)(E)))}}}return N_.assignDefaults=function(H,he){var E=H.schema,N=E.properties,F=E.items;if("object"===he&&N)for(var Y in N)Z(H,Y,N[Y].default);else"array"===he&&Array.isArray(F)&&F.forEach(function(V,oe){return Z(H,oe,V.default)})},N_}(),o=function lit(){if(cme)return ud;cme=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Sp(),e=dd(),i=ED();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(zX||(zX=Ae(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,S){if(S.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(VX||(VX=Ae(["await "]))):t.nil,S=p.opts.passContext?n.default.this:n.default.self,M=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(HX||(HX=Ae(["","",""])),C,(0,e.callValidateCode)(s,g,S,M)),a.modifying)}function _(C){var S;c.if((0,t.not)(null!==(S=a.valid)&&void 0!==S?S:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),_(function(){return s.error()});else{var C=a.async?(M=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(LX||(LX=Ae(["await "]))))},function($){return c.assign(v,!1).if((0,t._)(RX||(RX=Ae([""," instanceof ",""])),$,p.ValidationError),function(){return c.assign(M,(0,t._)($X||($X=Ae(["",".errors"])),$))},function(){return c.throw($)})}),M):(S=(0,t._)(BX||(BX=Ae(["",".errors"])),g),c.assign(S,null),y(t.nil),S);a.modifying&&r(s),_(function(){return function(M,$){var G=M.gen;G.if((0,t._)(UX||(UX=Ae(["Array.isArray(",")"])),$),function(){G.assign(n.default.vErrors,(0,t._)(GX||(GX=Ae([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,$,n.default.vErrors,$)).assign(n.default.errors,(0,t._)(WX||(WX=Ae(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(M)},function(){return M.error()})}(s,C)})}var M,S}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==bn(s)&&!Array.isArray(s):bn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(ume)return mf;ume=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.extendSubschemaMode=mf.extendSubschemaData=mf.getSubschema=void 0;var L=xr(),X=Hr;return mf.getSubschema=function(Z,H){var he=H.keyword,E=H.schemaProp,N=H.schema,F=H.schemaPath,Y=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==he&&void 0!==N)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==he){var oe=Z.schema[he];return void 0===E?{schema:oe,schemaPath:(0,L._)(qX||(qX=Ae(["","",""])),Z.schemaPath,(0,L.getProperty)(he)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he)}:{schema:oe[E],schemaPath:(0,L._)(XX||(XX=Ae(["","","",""])),Z.schemaPath,(0,L.getProperty)(he),(0,L.getProperty)(E)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he,"/").concat((0,X.escapeFragment)(E))}}if(void 0!==N){if(void 0===F||void 0===Y||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:N,schemaPath:F,topSchemaRef:V,errSchemaPath:Y}}throw new Error('either "keyword" or "schema" must be passed')},mf.extendSubschemaData=function(Z,H,he){var E=he.dataProp,N=he.dataPropType,F=he.data,Y=he.dataTypes,V=he.propertyName;if(void 0!==F&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var oe=H.gen;if(void 0!==E){var fe=H.errorPath,Ne=H.dataPathArr,xe=H.opts;tt(oe.let("data",(0,L._)(YX||(YX=Ae(["","",""])),H.data,(0,L.getProperty)(E)),!0)),Z.errorPath=(0,L.str)(JX||(JX=Ae(["","",""])),fe,(0,X.getErrorPath)(E,N,xe.jsPropertySyntax)),Z.parentDataProperty=(0,L._)(KX||(KX=Ae(["",""])),E),Z.dataPathArr=[].concat(si(Ne),[Z.parentDataProperty])}function tt(ze){Z.data=ze,Z.dataLevel=H.dataLevel+1,Z.dataTypes=[],H.definedProperties=new Set,Z.parentData=H.data,Z.dataNames=[].concat(si(H.dataNames),[ze])}void 0!==F&&(tt(F instanceof L.Name?F:oe.let("data",F,!0)),void 0!==V&&(Z.propertyName=V)),Y&&(Z.dataTypes=Y)},mf.extendSubschemaMode=function(Z,H){var he=H.jtdDiscriminator,E=H.jtdMetadata,N=H.compositeRule,F=H.createErrors,Y=H.allErrors;void 0!==N&&(Z.compositeRule=N),void 0!==F&&(Z.createErrors=F),void 0!==Y&&(Z.allErrors=Y),Z.jtdDiscriminator=he,Z.jtdMetadata=E},mf}(),a=xr(),l=Sp(),c=Ga,u=Hr,d=ED();function h(L,X){var F,Z=L.gen,H=L.validateName,he=L.schema,E=L.schemaEnv,N=L.opts;N.code.es5?Z.func(H,(0,a._)(QX||(QX=Ae(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var F,Y;Z.code((0,a._)(ZX||(ZX=Ae(['"use strict"; ',""])),f(he,N))),Y=N,(F=Z).if(l.default.valCxt,function(){F.var(l.default.instancePath,(0,a._)(iY||(iY=Ae(["",".",""])),l.default.valCxt,l.default.instancePath)),F.var(l.default.parentData,(0,a._)(rY||(rY=Ae(["",".",""])),l.default.valCxt,l.default.parentData)),F.var(l.default.parentDataProperty,(0,a._)(oY||(oY=Ae(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),F.var(l.default.rootData,(0,a._)(sY||(sY=Ae(["",".",""])),l.default.valCxt,l.default.rootData)),Y.dynamicRef&&F.var(l.default.dynamicAnchors,(0,a._)(aY||(aY=Ae(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){F.var(l.default.instancePath,(0,a._)(lY||(lY=Ae(['""'])))),F.var(l.default.parentData,(0,a._)(cY||(cY=Ae(["undefined"])))),F.var(l.default.parentDataProperty,(0,a._)(uY||(uY=Ae(["undefined"])))),F.var(l.default.rootData,l.default.data),Y.dynamicRef&&F.var(l.default.dynamicAnchors,(0,a._)(dY||(dY=Ae(["{}"]))))}),Z.code(X)}):Z.func(H,(0,a._)(eY||(eY=Ae(["",", ",""])),l.default.data,(F=N,(0,a._)(tY||(tY=Ae(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,F.dynamicRef?(0,a._)(nY||(nY=Ae([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return Z.code(f(he,N)).code(X)})}function f(L,X){var Z="object"==bn(L)&&L[X.schemaId];return Z&&(X.code.source||X.code.process)?(0,a._)(bY||(bY=Ae(["/*# sourceURL="," */"])),Z):a.nil}function m(L){var X=L.schema,Z=L.self;if("boolean"==typeof X)return!X;for(var H in X)if(Z.RULES.all[H])return!0;return!1}function g(L){return"boolean"!=typeof L.schema}function v(L){var X,Z,H,E;(0,u.checkUnknownRules)(L),H=(X=L).errSchemaPath,E=X.self,(Z=X.schema).$ref&&X.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(Z,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(L,X){if(L.opts.jtd)return C(L,[],!1,X);var Z=(0,n.getSchemaTypes)(L.schema);C(L,Z,!(0,n.coerceAndCheckDataType)(L,Z),X)}function _(L){var X=L.gen,Z=L.schemaEnv,he=L.errSchemaPath,E=L.opts,N=L.schema.$comment;if(!0===E.$comment)X.code((0,a._)(xY||(xY=Ae(["",".logger.log(",")"])),l.default.self,N));else if("function"==typeof E.$comment){var F=(0,a.str)(wY||(wY=Ae(["","/$comment"])),he),Y=X.scopeValue("root",{ref:Z.root});X.code((0,a._)(CY||(CY=Ae(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,N,F,Y))}}function C(L,X,Z,H){var fe,Ne,xe,tt,he=L.gen,E=L.schema,N=L.data,F=L.allErrors,Y=L.opts,V=L.self.RULES;function oe(fe){(0,e.shouldUseGroup)(E,fe)&&(fe.type?(he.if((0,i.checkDataType)(fe.type,N,Y.strictNumbers)),S(L,fe),1===X.length&&X[0]===fe.type&&Z&&(he.else(),(0,i.reportTypeError)(L)),he.endIf()):S(L,fe),F||he.if((0,a._)(MY||(MY=Ae([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(Y.jtd||(Ne=X,(fe=L).schemaEnv.meta||!fe.opts.strictTypes||(function(xe,tt){if(tt.length){if(!xe.dataTypes.length)return void(xe.dataTypes=tt);tt.forEach(function(ze){$(xe.dataTypes,ze)||G(xe,'type "'.concat(ze,'" not allowed by context "').concat(xe.dataTypes.join(","),'"'))}),function(ze,ot){var B,ne=[],ie=Re(ze.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Ie=B.value;$(ot,Ie)?ne.push(Ie):ot.includes("integer")&&"number"===Ie&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}ze.dataTypes=ne}(xe,tt)}}(fe,Ne),fe.opts.allowUnionTypes||(xe=fe,(tt=Ne).length>1&&(2!==tt.length||!tt.includes("null"))&&G(xe,"use allowUnionTypes to allow union type keyword")),function(xe,tt){var ze=xe.self.RULES.all;for(var ot in ze){var B=ze[ot];if("object"==bn(B)&&(0,e.shouldUseRule)(xe.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return M(tt,ie)})&&G(xe,'missing type "'.concat(ne.join(","),'" for keyword "').concat(ot,'"'))}}}(fe,fe.dataTypes))),he.block(function(){var fe,Ne=Re(V.rules);try{for(Ne.s();!(fe=Ne.n()).done;)oe(fe.value)}catch(xe){Ne.e(xe)}finally{Ne.f()}oe(V.post)})):he.block(function(){return z(L,"$ref",V.all.$ref.definition)})}function S(L,X){var Z=L.gen,H=L.schema;L.opts.useDefaults&&(0,r.assignDefaults)(L,X.type),Z.block(function(){var he,E=Re(X.rules);try{for(E.s();!(he=E.n()).done;){var N=he.value;(0,e.shouldUseRule)(H,N)&&z(L,N.keyword,N.definition,X.type)}}catch(F){E.e(F)}finally{E.f()}})}function M(L,X){return L.includes(X)||"number"===X&&L.includes("integer")}function $(L,X){return L.includes(X)||"integer"===X&&L.includes("number")}function G(L,X){X+=' at "'.concat(L.schemaEnv.baseId+L.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(L,X,L.opts.strictTypes)}ff.validateFunctionCode=function(L){var X,Z,H,he;g(L)&&(v(L),m(L))?(Z=(X=L).schema,H=X.opts,he=X.gen,h(X,function(){var E,F;H.$comment&&Z.$comment&&_(X),F=(E=X).opts,void 0!==E.schema.default&&F.useDefaults&&F.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),he.let(l.default.vErrors,null),he.let(l.default.errors,0),H.unevaluated&&function(E){var N=E.gen,F=E.validateName;E.evaluated=N.const("evaluated",(0,a._)(hY||(hY=Ae(["",".evaluated"])),F)),N.if((0,a._)(fY||(fY=Ae(["",".dynamicProps"])),E.evaluated),function(){return N.assign((0,a._)(pY||(pY=Ae(["",".props"])),E.evaluated),(0,a._)(mY||(mY=Ae(["undefined"]))))}),N.if((0,a._)(gY||(gY=Ae(["",".dynamicItems"])),E.evaluated),function(){return N.assign((0,a._)(vY||(vY=Ae(["",".items"])),E.evaluated),(0,a._)(yY||(yY=Ae(["undefined"]))))})}(X),y(X),function(E){var fe,Ne,xe,tt,ze,N=E.gen,Y=E.validateName,V=E.ValidationError,oe=E.opts;E.schemaEnv.$async?N.if((0,a._)(kY||(kY=Ae([""," === 0"])),l.default.errors),function(){return N.return(l.default.data)},function(){return N.throw((0,a._)(SY||(SY=Ae(["new ","(",")"])),V,l.default.vErrors))}):(N.assign((0,a._)(DY||(DY=Ae(["",".errors"])),Y),l.default.vErrors),oe.unevaluated&&(Ne=(fe=E).gen,xe=fe.evaluated,ze=fe.items,(tt=fe.props)instanceof a.Name&&Ne.assign((0,a._)(EY||(EY=Ae(["",".props"])),xe),tt),ze instanceof a.Name&&Ne.assign((0,a._)(AY||(AY=Ae(["",".items"])),xe),ze)),N.return((0,a._)(TY||(TY=Ae([""," === 0"])),l.default.errors)))}(X)})):h(L,function(){return(0,t.topBoolOrEmptySchema)(L)})};var R=function(){function L(X,Z,H){if(ke(this,L),(0,o.validateKeywordUsage)(X,Z,H),this.gen=X.gen,this.allErrors=X.allErrors,this.keyword=H,this.data=X.data,this.schema=X.schema[H],this.$data=Z.$data&&X.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(X,this.schema,H,this.$data),this.schemaType=Z.schemaType,this.parentSchema=X.schema,this.params={},this.it=X,this.def=Z,this.$data)this.schemaCode=X.gen.const("vSchema",re(this.$data,X));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,Z.schemaType,Z.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(Z.schemaType)));("code"in Z?Z.trackErrors:!1!==Z.errors)&&(this.errsCount=X.gen.const("_errs",l.default.errors))}return Se(L,[{key:"result",value:function(X,Z,H){this.failResult((0,a.not)(X),Z,H)}},{key:"failResult",value:function(X,Z,H){this.gen.if(X),H?H():this.error(),Z?(this.gen.else(),Z(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(X,Z){this.failResult((0,a.not)(X),void 0,Z)}},{key:"fail",value:function(X){if(void 0===X)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(X),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(X){if(!this.$data)return this.fail(X);var Z=this.schemaCode;this.fail((0,a._)(IY||(IY=Ae([""," !== undefined && (",")"])),Z,(0,a.or)(this.invalid$data(),X)))}},{key:"error",value:function(X,Z,H){if(Z)return this.setParams(Z),this._error(X,H),void this.setParams({});this._error(X,H)}},{key:"_error",value:function(X,Z){(X?d.reportExtraError:d.reportError)(this,this.def.error,Z)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(X){this.allErrors||this.gen.if(X)}},{key:"setParams",value:function(X,Z){Z?Object.assign(this.params,X):this.params=X}},{key:"block$data",value:function(X,Z){var H=this,he=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(X,he),Z()})}},{key:"check$data",value:function(){var X=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,Z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,he=this.schemaCode,E=this.schemaType,N=this.def;H.if((0,a.or)((0,a._)(NY||(NY=Ae([""," === undefined"])),he),Z)),X!==a.nil&&H.assign(X,!0),(E.length||N.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),X!==a.nil&&H.assign(X,!1)),H.else()}}},{key:"invalid$data",value:function(){var X=this.gen,Z=this.schemaCode,H=this.schemaType,he=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(Z instanceof a.Name))throw new Error("ajv implementation error");var N=Array.isArray(H)?H:[H];return(0,a._)(FY||(FY=Ae(["",""])),(0,i.checkDataTypes)(N,Z,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(he.validateSchema){var N=X.scopeValue("validate$data",{ref:he.validateSchema});return(0,a._)(OY||(OY=Ae(["!","(",")"])),N,Z)}return a.nil}())}},{key:"subschema",value:function(X,Z){var H=(0,s.getSubschema)(this.it,X);(0,s.extendSubschemaData)(H,this.it,X),(0,s.extendSubschemaMode)(H,X);var he=Ze(Ze(Ze({},this.it),H),{},{items:void 0,props:void 0});return function p(L,X){g(L)&&(v(L),m(L))?function(Z,H){var F,Y,E=Z.gen;Z.opts.$comment&&Z.schema.$comment&&_(Z),(Y=(F=Z).schema[F.opts.schemaId])&&(F.baseId=(0,c.resolveUrl)(F.opts.uriResolver,F.baseId,Y)),function(F){if(F.schema.$async&&!F.schemaEnv.$async)throw new Error("async schema in sync schema")}(Z);var N=E.const("_errs",l.default.errors);y(Z,N),E.var(H,(0,a._)(_Y||(_Y=Ae([""," === ",""])),N,l.default.errors))}(L,X):(0,t.boolOrEmptySchema)(L,X)}(he,Z),he}},{key:"mergeEvaluated",value:function(X,Z){var H=this.it,he=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==X.props&&(H.props=u.mergeEvaluated.props(he,X.props,H.props,Z)),!0!==H.items&&void 0!==X.items&&(H.items=u.mergeEvaluated.items(he,X.items,H.items,Z)))}},{key:"mergeValidEvaluated",value:function(X,Z){var H=this,he=this.it;if(he.opts.unevaluated&&(!0!==he.props||!0!==he.items))return this.gen.if(Z,function(){return H.mergeEvaluated(X,a.Name)}),!0}}]),L}();function z(L,X,Z,H){var he=new R(L,Z,X);"code"in Z?Z.code(he,H):he.$data&&Z.validate?(0,o.funcKeywordCode)(he,Z):"macro"in Z?(0,o.macroKeywordCode)(he,Z):(Z.compile||Z.validate)&&(0,o.funcKeywordCode)(he,Z)}ff.KeywordCxt=R;var U=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(L,X){var Z,H,he=X.dataLevel,E=X.dataNames,N=X.dataPathArr;if(""===L)return l.default.rootData;if("/"===L[0]){if(!U.test(L))throw new Error("Invalid JSON-pointer: ".concat(L));Z=L,H=l.default.rootData}else{var F=q.exec(L);if(!F)throw new Error("Invalid JSON-pointer: ".concat(L));var Y=+F[1];if("#"===(Z=F[2])){if(Y>=he)throw new Error(xe("property/index",Y));return N[he-Y]}if(Y>he)throw new Error(xe("data",Y));if(H=E[he-Y],!Z)return H}var V,oe=H,fe=Re(Z.split("/"));try{for(fe.s();!(V=fe.n()).done;){var Ne=V.value;Ne&&(H=(0,a._)(jY||(jY=Ae(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Ne))),oe=(0,a._)(PY||(PY=Ae([""," && ",""])),oe,H))}}catch(tt){fe.e(tt)}finally{fe.f()}return oe;function xe(tt,ze){return"Cannot access ".concat(tt," ").concat(ze," levels up, current level is ").concat(he)}}return ff.getData=re,ff}Ga.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=z0(t[r]||n),a={"":s},l=fme(o,s,!1),c={},u=new Set;return hit(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=_.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function _(S){if(S=z0(y?(0,this.opts.uriResolver.resolve)(y,S):S),u.has(S))throw h(S);u.add(S);var $=this.refs[S];return"string"==typeof $&&($=this.refs[$]),"object"==bn($)?d(f,$.schema,S):S!==z0(v)&&("#"===S[0]?(d(f,c[S],S),c[S]=f):this.refs[S]=v),S}function C(S){if("string"==typeof S){if(!git.test(S))throw new Error('invalid anchor "'.concat(S,'"'));_.call(this,"#".concat(S))}}}),c;function d(f,p,m){if(void 0!==p&&!dit(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var gme,ID={};function DP(){if(gme)return ID;gme=1,Object.defineProperty(ID,"__esModule",{value:!0});var t=function(n){wt(i,lb(Error));var e=Ct(i);function i(r){var o;return ke(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return ID.default=t,ID}var vme,ND={};function TP(){if(vme)return ND;vme=1,Object.defineProperty(ND,"__esModule",{value:!0});var t=Ga,n=function(e){wt(r,lb(Error));var i=Ct(r);function r(o,s,a,l){var c;return ke(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return ND.default=n,ND}var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.resolveSchema=Zl.getCompilingSchema=Zl.resolveRef=Zl.compileSchema=Zl.SchemaEnv=void 0;var hd=xr(),vit=DP(),ng=Sp(),fd=Ga,yme=Hr,yit=MD(),FD=Se(function t(n){var e,i;ke(this,t),this.refs={},this.dynamicAnchors={},"object"==bn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function EP(t){var n=bme.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:vit.default,code:(0,hd._)(LY||(LY=Ae(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:ng.default.data,parentData:ng.default.parentData,parentDataProperty:ng.default.parentDataProperty,dataNames:[ng.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(RY||(RY=Ae(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,yit.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(ng.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(ng.default.self),"".concat(ng.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function bit(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:EP.call(this,t)}function bme(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function _it(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||OD.call(this,t,n)}function OD(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return AP.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=OD.call(this,t,s);return"object"!==bn(a?.schema)?void 0:AP.call(this,e,a)}if("object"===bn(s?.schema)){if(s.validate||EP.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new FD({schema:l,schemaId:c,root:t,baseId:r})}return AP.call(this,e,s)}}Zl.SchemaEnv=FD,Zl.compileSchema=EP,Zl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=_it.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new FD({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=bit.call(this,o):void 0},Zl.getCompilingSchema=bme,Zl.resolveSchema=OD;var xit=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function AP(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,yme.unescapeFragment)(c)];if(void 0===u)return;var d="object"===bn(r=u)&&r[this.opts.schemaId];!xit.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,yme.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=OD.call(this,o,h)}return(a=a||new FD({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var wit={$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},MP={},_me={};(function(t){function n(){for(var we=arguments.length,He=Array(we),qe=0;qe1){He[0]=He[0].slice(0,-1);for(var ut=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,U=String.fromCharCode;function q(we){throw new RangeError(G[we])}function L(we,He){var qe=we.split("@"),ut="";return qe.length>1&&(ut=qe[0]+"@",we=qe[1]),ut+function re(we,He){for(var qe=[],ut=we.length;ut--;)qe[ut]=He(we[ut]);return qe}((we=we.replace($,".")).split("."),He).join(".")}function X(we){for(var He=[],qe=0,ut=we.length;qe=55296&&Ue<=56319&&qe>1,we+=z(we/He);we>455;ut+=f)we=z(we/35);return z(ut+36*we/(we+38))},N=function(we){var He=[],qe=we.length,ut=0,Ue=128,Dn=72,ii=we.lastIndexOf("-");ii<0&&(ii=0);for(var hi=0;hi=128&&q("not-basic"),He.push(we.charCodeAt(hi));for(var di=ii>0?ii+1:0;di=qe&&q("invalid-input");var yr=H(we.charCodeAt(di++));(yr>=f||yr>z((h-ut)/Qr))&&q("overflow"),ut+=yr*Qr;var Ee=gi<=Dn?1:gi>=Dn+26?26:gi-Dn;if(yrz(h/St)&&q("overflow"),Qr*=St}var Ht=He.length+1;Dn=E(ut-kr,Ht,0==kr),z(ut/Ht)>h-Ue&&q("overflow"),Ue+=z(ut/Ht),ut%=Ht,He.splice(ut++,0,Ue)}return String.fromCodePoint.apply(String,He)},F=function(we){var He=[],qe=(we=X(we)).length,ut=128,Ue=0,Dn=72,ii=!0,hi=!1,di=void 0;try{for(var kr,Qr=we[Symbol.iterator]();!(ii=(kr=Qr.next()).done);ii=!0){var gi=kr.value;gi<128&&He.push(U(gi))}}catch(vd){hi=!0,di=vd}finally{try{!ii&&Qr.return&&Qr.return()}finally{if(hi)throw di}}var yr=He.length,Ee=yr;for(yr&&He.push("-");Ee=ut&&Bnz((h-Ue)/ei)&&q("overflow"),Ue+=(St-ut)*ei,ut=St;var Yn=!0,br=!1,Ar=void 0;try{for(var Po,ca=we[Symbol.iterator]();!(Yn=(Po=ca.next()).done);Yn=!0){var md=Po.value;if(mdh&&q("overflow"),md==ut){for(var hu=Ue,ua=f;;ua+=f){var Rl=ua<=Dn?1:ua>=Dn+26?26:ua-Dn;if(hu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function xe(we){for(var He="",qe=0,ut=we.length;qe=194&&Ue<224){if(ut-qe>=6){var Dn=parseInt(we.substr(qe+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&Dn)}else He+=we.substr(qe,6);qe+=6}else if(Ue>=224){if(ut-qe>=9){var ii=parseInt(we.substr(qe+4,2),16),hi=parseInt(we.substr(qe+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ii)<<6|63&hi)}else He+=we.substr(qe,9);qe+=9}else He+=we.substr(qe,3),qe+=3}return He}function tt(we,He){function qe(ut){var Ue=xe(ut);return Ue.match(He.UNRESERVED)?Ue:ut}return we.scheme&&(we.scheme=String(we.scheme).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==we.userinfo&&(we.userinfo=String(we.userinfo).replace(He.PCT_ENCODED,qe).replace(He.NOT_USERINFO,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.host&&(we.host=String(we.host).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_HOST,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.path&&(we.path=String(we.path).replace(He.PCT_ENCODED,qe).replace(we.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.query&&(we.query=String(we.query).replace(He.PCT_ENCODED,qe).replace(He.NOT_QUERY,Ne).replace(He.PCT_ENCODED,r)),void 0!==we.fragment&&(we.fragment=String(we.fragment).replace(He.PCT_ENCODED,qe).replace(He.NOT_FRAGMENT,Ne).replace(He.PCT_ENCODED,r)),we}function ze(we){return we.replace(/^0*(.*)/,"$1")||"0"}function ot(we,He){var qe=we.match(He.IPV4ADDRESS)||[],ut=u(qe,2)[1];return ut?ut.split(".").map(ze).join("."):we}function B(we,He){var qe=we.match(He.IPV6ADDRESS)||[],ut=u(qe,3),Ue=ut[1],Dn=ut[2];if(Ue){for(var ii=Ue.toLowerCase().split("::").reverse(),hi=u(ii,2),di=hi[0],kr=hi[1],Qr=kr?kr.split(":").map(ze):[],gi=di.split(":").map(ze),yr=He.IPV4ADDRESS.test(gi[gi.length-1]),Ee=yr?7:8,St=gi.length-Ee,Ht=Array(Ee),sn=0;sn1){var Oi=Ht.slice(0,hn.index),Bn=Ht.slice(hn.index+hn.length);ri=Oi.join(":")+"::"+Bn.join(":")}else ri=Ht.join(":");return Dn&&(ri+="%"+Dn),ri}return we}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Ie(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe={},ut=!1!==He.iri?c:l;"suffix"===He.reference&&(we=(He.scheme?He.scheme+":":"")+"//"+we);var Ue=we.match(ne);if(Ue){ie?(qe.scheme=Ue[1],qe.userinfo=Ue[3],qe.host=Ue[4],qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=Ue[7],qe.fragment=Ue[8],isNaN(qe.port)&&(qe.port=Ue[5])):(qe.scheme=Ue[1]||void 0,qe.userinfo=-1!==we.indexOf("@")?Ue[3]:void 0,qe.host=-1!==we.indexOf("//")?Ue[4]:void 0,qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=-1!==we.indexOf("?")?Ue[7]:void 0,qe.fragment=-1!==we.indexOf("#")?Ue[8]:void 0,isNaN(qe.port)&&(qe.port=we.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),qe.host&&(qe.host=B(ot(qe.host,ut),ut)),qe.reference=void 0!==qe.scheme||void 0!==qe.userinfo||void 0!==qe.host||void 0!==qe.port||qe.path||void 0!==qe.query?void 0===qe.scheme?"relative":void 0===qe.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==qe.reference&&(qe.error=qe.error||"URI is not a "+He.reference+" reference.");var Dn=fe[(He.scheme||qe.scheme||"").toLowerCase()];if(He.unicodeSupport||Dn&&Dn.unicodeSupport)tt(qe,ut);else{if(qe.host&&(He.domainHost||Dn&&Dn.domainHost))try{qe.host=oe.toASCII(qe.host.replace(ut.PCT_ENCODED,xe).toLowerCase())}catch(ii){qe.error=qe.error||"Host's domain name can not be converted to ASCII via punycode: "+ii}tt(qe,l)}Dn&&Dn.parse&&Dn.parse(qe,He)}else qe.error=qe.error||"URI can not be parsed.";return qe}var Le=/^\.\.?\//,_t=/^\/\.(\/|$)/,At=/^\/\.\.(\/|$)/,_n=/^\/?(?:.|\n)*?(?=\/|$)/;function ci(we){for(var He=[];we.length;)if(we.match(Le))we=we.replace(Le,"");else if(we.match(_t))we=we.replace(_t,"/");else if(we.match(At))we=we.replace(At,"/"),He.pop();else if("."===we||".."===we)we="";else{var qe=we.match(_n);if(!qe)throw new Error("Unexpected dot segment condition");var ut=qe[0];we=we.slice(ut.length),He.push(ut)}return He.join("")}function on(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe=He.iri?c:l,ut=[],Ue=fe[(He.scheme||we.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(we,He),we.host&&!qe.IPV6ADDRESS.test(we.host)&&(He.domainHost||Ue&&Ue.domainHost))try{we.host=He.iri?oe.toUnicode(we.host):oe.toASCII(we.host.replace(qe.PCT_ENCODED,xe).toLowerCase())}catch(hi){we.error=we.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+hi}tt(we,qe),"suffix"!==He.reference&&we.scheme&&(ut.push(we.scheme),ut.push(":"));var Dn=function Ye(we,He){var qe=!1!==He.iri?c:l,ut=[];return void 0!==we.userinfo&&(ut.push(we.userinfo),ut.push("@")),void 0!==we.host&&ut.push(B(ot(String(we.host),qe),qe).replace(qe.IPV6ADDRESS,function(Ue,Dn,ii){return"["+Dn+(ii?"%25"+ii:"")+"]"})),"number"!=typeof we.port&&"string"!=typeof we.port||(ut.push(":"),ut.push(String(we.port))),ut.length?ut.join(""):void 0}(we,He);if(void 0!==Dn&&("suffix"!==He.reference&&ut.push("//"),ut.push(Dn),we.path&&"/"!==we.path.charAt(0)&&ut.push("/")),void 0!==we.path){var ii=we.path;He.absolutePath||Ue&&Ue.absolutePath||(ii=ci(ii)),void 0===Dn&&(ii=ii.replace(/^\/\//,"/%2F")),ut.push(ii)}return void 0!==we.query&&(ut.push("?"),ut.push(we.query)),void 0!==we.fragment&&(ut.push("#"),ut.push(we.fragment)),ut.join("")}function Ni(we,He){var qe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ut={};return arguments[3]||(we=Ie(on(we,qe),qe),He=Ie(on(He,qe),qe)),!(qe=qe||{}).tolerant&&He.scheme?(ut.scheme=He.scheme,ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(He.path?("/"===He.path.charAt(0)?ut.path=ci(He.path):(ut.path=void 0===we.userinfo&&void 0===we.host&&void 0===we.port||we.path?we.path?we.path.slice(0,we.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,ut.path=ci(ut.path)),ut.query=He.query):(ut.path=we.path,ut.query=void 0!==He.query?He.query:we.query),ut.userinfo=we.userinfo,ut.host=we.host,ut.port=we.port),ut.scheme=we.scheme),ut.fragment=He.fragment,ut}function Or(we,He){return we&&we.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,xe)}var Ai={scheme:"http",domainHost:!0,parse:function(we,He){return we.host||(we.error=we.error||"HTTP URIs must have a host."),we},serialize:function(we,He){var qe="https"===String(we.scheme).toLowerCase();return we.port!==(qe?443:80)&&""!==we.port||(we.port=void 0),we.path||(we.path="/"),we}},Wr={scheme:"https",domainHost:Ai.domainHost,parse:Ai.parse,serialize:Ai.serialize};function jo(we){return"boolean"==typeof we.secure?we.secure:"wss"===String(we.scheme).toLowerCase()}var Fn={scheme:"ws",domainHost:!0,parse:function(we,He){var qe=we;return qe.secure=jo(qe),qe.resourceName=(qe.path||"/")+(qe.query?"?"+qe.query:""),qe.path=void 0,qe.query=void 0,qe},serialize:function(we,He){if(we.port!==(jo(we)?443:80)&&""!==we.port||(we.port=void 0),"boolean"==typeof we.secure&&(we.scheme=we.secure?"wss":"ws",we.secure=void 0),we.resourceName){var qe=we.resourceName.split("?"),ut=u(qe,2),Ue=ut[0],Dn=ut[1];we.path=Ue&&"/"!==Ue?Ue:void 0,we.query=Dn,we.resourceName=void 0}return we.fragment=void 0,we}},xt={scheme:"wss",domainHost:Fn.domainHost,parse:Fn.parse,serialize:Fn.serialize},ui={},Fi="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",xo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),gt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ai=new RegExp(Fi,"g"),bi=new RegExp(xo,"g"),Er=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',gt),"g"),qr=new RegExp(n("[^]",Fi,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ao=qr;function Js(we){var He=xe(we);return He.match(ai)?He:we}var vr={scheme:"mailto",parse:function(we,He){var qe=we,ut=qe.to=qe.path?qe.path.split(","):[];if(qe.path=void 0,qe.query){for(var Ue=!1,Dn={},ii=qe.query.split("&"),hi=0,di=ii.length;hi 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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=function(){function E(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts=Ze(Ze({},N),function y(E){var N,F,Y,V,oe,fe,Ne,xe,tt,ze,ot,B,ne,ie,Ie,Ye,Le,_t,At,_n,ci,on,Ni,pn,Fr,$r=E.strict,wr=null===(N=E.code)||void 0===N?void 0:N.optimize,Or=!0===wr||void 0===wr?1:wr||0,Ai=null!==(Y=null===(F=E.code)||void 0===F?void 0:F.regExp)&&void 0!==Y?Y:f,Wr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(fe=null!==(oe=E.strictSchema)&&void 0!==oe?oe:$r)||void 0===fe||fe,strictNumbers:null===(xe=null!==(Ne=E.strictNumbers)&&void 0!==Ne?Ne:$r)||void 0===xe||xe,strictTypes:null!==(ze=null!==(tt=E.strictTypes)&&void 0!==tt?tt:$r)&&void 0!==ze?ze:"log",strictTuples:null!==(B=null!==(ot=E.strictTuples)&&void 0!==ot?ot:$r)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:$r)&&void 0!==ie&&ie,code:E.code?Ze(Ze({},E.code),{},{optimize:Or,regExp:Ai}):{optimize:Or,regExp:Ai},loopRequired:null!==(Ie=E.loopRequired)&&void 0!==Ie?Ie:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(Le=E.meta)||void 0===Le||Le,messages:null===(_t=E.messages)||void 0===_t||_t,inlineRefs:null===(At=E.inlineRefs)||void 0===At||At,schemaId:null!==(_n=E.schemaId)&&void 0!==_n?_n:"$id",addUsedSchema:null===(ci=E.addUsedSchema)||void 0===ci||ci,validateSchema:null===(on=E.validateSchema)||void 0===on||on,validateFormats:null===(Ni=E.validateFormats)||void 0===Ni||Ni,unicodeRegExp:null===(pn=E.unicodeRegExp)||void 0===pn||pn,int32range:null===(Fr=E.int32range)||void 0===Fr||Fr,uriResolver:Wr}}(N));var F=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:F.es5,lines:F.lines}),this.logger=function U(E){if(!1===E)return z;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")}(N.logger);var oe=N.validateFormats;N.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,N,"NOT SUPPORTED"),C.call(this,v,N,"DEPRECATED","warn"),this._metaOpts=R.call(this),N.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&G.call(this,N.keywords),"object"==bn(N.meta)&&this.addMetaSchema(N.meta),M.call(this),N.validateFormats=oe}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var N=this.opts,F=N.$data,Y=N.meta,V=N.schemaId,oe=d;"id"===V&&((oe=Ze({},d)).id=oe.$id,delete oe.$id),Y&&F&&this.addMetaSchema(oe,oe[V],!1)}},{key:"defaultMeta",value:function(){var N=this.opts,F=N.meta,Y=N.schemaId;return this.opts.defaultMeta="object"==bn(F)?F[Y]||F:void 0}},{key:"validate",value:function(N,F){var Y;if("string"==typeof N){if(!(Y=this.getSchema(N)))throw new Error('no schema with key or ref "'.concat(N,'"'))}else Y=this.compile(N);var V=Y(F);return"$async"in Y||(this.errors=Y.errors),V}},{key:"compile",value:function(N,F){var Y=this._addSchema(N,F);return Y.validate||this._compileSchemaEnv(Y)}},{key:"compileAsync",value:function(N,F){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var Y=this.opts.loadSchema;return V.call(this,N,F);function V(Ie,Ye){return oe.apply(this,arguments)}function oe(){return(oe=Zi(vn().mark(function Ie(Ye,Le){var _t;return vn().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,fe.call(this,Ye.$schema);case 2:return _t=this._addSchema(Ye,Le),At.abrupt("return",_t.validate||xe.call(this,_t));case 4:case"end":return At.stop()}},Ie,this)}))).apply(this,arguments)}function fe(Ie){return Ne.apply(this,arguments)}function Ne(){return(Ne=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!Ye||this.getSchema(Ye)){Le.next=3;break}return Le.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return Le.stop()}},Ie,this)}))).apply(this,arguments)}function xe(Ie){return tt.apply(this,arguments)}function tt(){return(tt=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.prev=0,Le.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(Le.prev=4,Le.t0=Le.catch(0),Le.t0 instanceof r.default){Le.next=8;break}throw Le.t0;case 8:return ze.call(this,Le.t0),Le.next=11,ot.call(this,Le.t0.missingSchema);case 11:return Le.abrupt("return",xe.call(this,Ye));case 12:case"end":return Le.stop()}},Ie,this,[[0,4]])}))).apply(this,arguments)}function ze(Ie){var Ye=Ie.missingSchema,Le=Ie.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(Le," cannot be resolved"))}function ot(Ie){return B.apply(this,arguments)}function B(){return(B=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,ne.call(this,Ye);case 2:if(Le=_t.sent,this.refs[Ye]){_t.next=6;break}return _t.next=6,fe.call(this,Le.$schema);case 6:this.refs[Ye]||this.addSchema(Le,Ye,F);case 7:case"end":return _t.stop()}},Ie,this)}))).apply(this,arguments)}function ne(Ie){return ie.apply(this,arguments)}function ie(){return(ie=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(!(Le=this._loading[Ye])){_t.next=3;break}return _t.abrupt("return",Le);case 3:return _t.prev=3,_t.next=6,this._loading[Ye]=Y(Ye);case 6:return _t.abrupt("return",_t.sent);case 7:return _t.prev=7,delete this._loading[Ye],_t.finish(7);case 10:case"end":return _t.stop()}},Ie,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(N,F,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(N)){var fe,Ne=Re(N);try{for(Ne.s();!(fe=Ne.n()).done;)this.addSchema(fe.value,void 0,Y,oe)}catch(ze){Ne.e(ze)}finally{Ne.f()}return this}if("object"===bn(N)){var tt=this.opts.schemaId;if(void 0!==(V=N[tt])&&"string"!=typeof V)throw new Error("schema ".concat(tt," must be string"))}return F=(0,l.normalizeId)(F||V),this._checkUnique(F),this.schemas[F]=this._addSchema(N,Y,F,oe,!0),this}},{key:"addMetaSchema",value:function(N,F){return this.addSchema(N,F,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(N,F){if("boolean"==typeof N)return!0;var Y;if(void 0!==(Y=N.$schema)&&"string"!=typeof Y)throw new Error("$schema must be a string");if(!(Y=Y||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(Y,N);if(!V&&F){var oe="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(oe);this.logger.error(oe)}return V}},{key:"getSchema",value:function(N){for(var F;"string"==typeof(F=S.call(this,N));)N=F;if(void 0===F){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(F=s.resolveSchema.call(this,V,N)))return;this.refs[N]=F}return F.validate||this._compileSchemaEnv(F)}},{key:"removeSchema",value:function(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(bn(N)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var F=S.call(this,N);return"object"==bn(F)&&this._cache.delete(F.schema),delete this.schemas[N],delete this.refs[N],this;case"object":this._cache.delete(N);var V=N[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(N){var F,Y=Re(N);try{for(Y.s();!(F=Y.n()).done;)this.addKeyword(F.value)}catch(oe){Y.e(oe)}finally{Y.f()}return this}},{key:"addKeyword",value:function(N,F){var Y,V=this;if("string"==typeof N)Y=N,"object"==bn(F)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=Y);else{if("object"!=bn(N)||void 0!==F)throw new Error("invalid addKeywords parameters");if(Y=(F=N).keyword,Array.isArray(Y)&&!Y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(re.call(this,Y,F),!F)return(0,u.eachItem)(Y,function(fe){return L.call(V,fe)}),this;Z.call(this,F);var oe=Ze(Ze({},F),{},{type:(0,c.getJSONTypes)(F.type),schemaType:(0,c.getJSONTypes)(F.schemaType)});return(0,u.eachItem)(Y,0===oe.type.length?function(fe){return L.call(V,fe,oe)}:function(fe){return oe.type.forEach(function(Ne){return L.call(V,fe,oe,Ne)})}),this}},{key:"getKeyword",value:function(N){var F=this.RULES.all[N];return"object"==bn(F)?F.definition:!!F}},{key:"removeKeyword",value:function(N){var F=this.RULES;delete F.keywords[N],delete F.all[N];var Y,V=Re(F.rules);try{for(V.s();!(Y=V.n()).done;){var oe=Y.value,fe=oe.rules.findIndex(function(Ne){return Ne.keyword===N});fe>=0&&oe.rules.splice(fe,1)}}catch(Ne){V.e(Ne)}finally{V.f()}return this}},{key:"addFormat",value:function(N,F){return"string"==typeof F&&(F=new RegExp(F)),this.formats[N]=F,this}},{key:"errorsText",value:function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,F=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Y=F.separator,V=void 0===Y?", ":Y,oe=F.dataVar,fe=void 0===oe?"data":oe;return N&&0!==N.length?N.map(function(Ne){return"".concat(fe).concat(Ne.instancePath," ").concat(Ne.message)}).reduce(function(Ne,xe){return Ne+V+xe}):"No errors"}},{key:"$dataMetaSchema",value:function(N,F){var Y=this.RULES.all;N=JSON.parse(JSON.stringify(N));var V,oe=Re(F);try{for(oe.s();!(V=oe.n()).done;){var fe,Ne=V.value.split("/").slice(1),xe=N,tt=Re(Ne);try{for(tt.s();!(fe=tt.n()).done;)xe=xe[fe.value]}catch(ie){tt.e(ie)}finally{tt.f()}for(var ze in Y){var ot=Y[ze];if("object"==bn(ot)){var ne=xe[ze];ot.definition.$data&&ne&&(xe[ze]=he(ne))}}}}catch(ie){oe.e(ie)}finally{oe.f()}return N}},{key:"_removeAllSchemas",value:function(N,F){for(var Y in N){var V=N[Y];F&&!F.test(Y)||("string"==typeof V?delete N[Y]:V&&!V.meta&&(this._cache.delete(V.schema),delete N[Y]))}}},{key:"_addSchema",value:function(N,F,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Ne=this.opts.schemaId;if("object"==bn(N))V=N[Ne];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof N)throw new Error("schema must be object or boolean")}var xe=this._cache.get(N);if(void 0!==xe)return xe;Y=(0,l.normalizeId)(V||Y);var tt=l.getSchemaRefs.call(this,N,Y);return xe=new s.SchemaEnv({schema:N,schemaId:Ne,meta:F,baseId:Y,localRefs:tt}),this._cache.set(xe.schema,xe),fe&&!Y.startsWith("#")&&(Y&&this._checkUnique(Y),this.refs[Y]=xe),oe&&this.validateSchema(N,!0),xe}},{key:"_checkUnique",value:function(N){if(this.schemas[N]||this.refs[N])throw new Error('schema with key or id "'.concat(N,'" already exists'))}},{key:"_compileSchemaEnv",value:function(N){if(N.meta?this._compileMetaSchema(N):s.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}},{key:"_compileMetaSchema",value:function(N){var F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,N)}finally{this.opts=F}}}]),E}();function C(E,N,F){var Y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var oe=V;oe in N&&this.logger[Y]("".concat(F,": option ").concat(V,". ").concat(E[oe]))}}function S(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function M(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var N in E)this.addSchema(E[N],N)}function $(){for(var E in this.opts.formats){var N=this.opts.formats[E];N&&this.addFormat(E,N)}}function G(E){if(Array.isArray(E))this.addVocabulary(E);else for(var N in this.logger.warn("keywords option as map is deprecated, pass array"),E){var F=E[N];F.keyword||(F.keyword=N),this.addKeyword(F)}}function R(){var E,N=Ze({},this.opts),F=Re(p);try{for(F.s();!(E=F.n()).done;)delete N[E.value]}catch(Y){F.e(Y)}finally{F.f()}return N}t.default=_,_.ValidationError=i.default,_.MissingRefError=r.default;var z={log:function(){},warn:function(){},error:function(){}},q=/^[a-z_$][a-z0-9_$:-]*$/i;function re(E,N){var F=this.RULES;if((0,u.eachItem)(E,function(Y){if(F.keywords[Y])throw new Error("Keyword ".concat(Y," is already defined"));if(!q.test(Y))throw new Error("Keyword ".concat(Y," has invalid name"))}),N&&N.$data&&!("code"in N)&&!("validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function L(E,N,F){var Y,V=this,oe=N?.post;if(F&&oe)throw new Error('keyword with "post" flag cannot have "type"');var fe=this.RULES,Ne=oe?fe.post:fe.rules.find(function(tt){return tt.type===F});if(Ne||fe.rules.push(Ne={type:F,rules:[]}),fe.keywords[E]=!0,N){var xe={keyword:E,definition:Ze(Ze({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)})};N.before?X.call(this,Ne,xe,N.before):Ne.rules.push(xe),fe.all[E]=xe,null===(Y=N.implements)||void 0===Y||Y.forEach(function(tt){return V.addKeyword(tt)})}}function X(E,N,F){var Y=E.rules.findIndex(function(V){return V.keyword===F});Y>=0?E.rules.splice(Y,0,N):(E.rules.push(N),this.logger.warn("rule ".concat(F," is not defined")))}function Z(E){var N=E.metaSchema;void 0!==N&&(E.$data&&this.opts.$data&&(N=he(N)),E.validateSchema=this.compile(N,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(E){return{anyOf:[E,H]}}}(Xpe);var IP={},NP={},FP={};Object.defineProperty(FP,"__esModule",{value:!0}),FP.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.callRef=ig.getValidate=void 0;var kit=TP(),wme=dd(),ec=xr(),U0=Sp(),Cme=Zl,jD=Hr,Sit={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return PD(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return PD(t,(0,ec._)($Y||($Y=Ae(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Cme.resolveRef.call(l,c,r,e);if(void 0===p)throw new kit.default(i.opts.uriResolver,r,e);return p instanceof Cme.SchemaEnv?(g=kme(t,m=p),void PD(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,ec.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:ec.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function kme(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,ec._)(BY||(BY=Ae(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function PD(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?U0.default.this:ec.nil;function c(d){var h=(0,ec._)(zY||(zY=Ae(["",".errors"])),d);r.assign(U0.default.vErrors,(0,ec._)(UY||(UY=Ae([""," === null ? "," : ",".concat(",")"])),U0.default.vErrors,h,U0.default.vErrors,h)),r.assign(U0.default.errors,(0,ec._)(GY||(GY=Ae(["",".length"])),U0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=jD.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,ec._)(WY||(WY=Ae(["",".evaluated.props"])),d));o.props=jD.mergeEvaluated.props(r,p,o.props,ec.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=jD.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,ec._)(qY||(qY=Ae(["",".evaluated.items"])),d));o.items=jD.mergeEvaluated.items(r,m,o.items,ec.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,ec._)(VY||(VY=Ae(["await ",""])),(0,wme.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,ec._)(HY||(HY=Ae(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,wme.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}ig.getValidate=kme,ig.callRef=PD,ig.default=Sit,Object.defineProperty(NP,"__esModule",{value:!0}),NP.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",FP.default,ig.default];var OP={},jP={};Object.defineProperty(jP,"__esModule",{value:!0});var LD=xr(),Tp=LD.operators,RD={maximum:{okStr:"<=",ok:Tp.LTE,fail:Tp.GT},minimum:{okStr:">=",ok:Tp.GTE,fail:Tp.LT},exclusiveMaximum:{okStr:"<",ok:Tp.LT,fail:Tp.GTE},exclusiveMinimum:{okStr:">",ok:Tp.GT,fail:Tp.LTE}},Eit={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD.str)(XY||(XY=Ae(["must be "," ",""])),RD[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD._)(YY||(YY=Ae(["{comparison: ",", limit: ","}"])),RD[n].okStr,e)}},Ait={keyword:Object.keys(RD),type:"number",schemaType:"number",$data:!0,error:Eit,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,LD._)(JY||(JY=Ae([""," "," "," || isNaN(",")"])),e,RD[n].fail,i,e))}};jP.default=Ait;var PP={};Object.defineProperty(PP,"__esModule",{value:!0});var F_=xr(),Mit={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,F_.str)(KY||(KY=Ae(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,F_._)(QY||(QY=Ae(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,F_._)(ZY||(ZY=Ae(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,F_._)(eJ||(eJ=Ae([""," !== parseInt(",")"])),o,o);t.fail$data((0,F_._)(tJ||(tJ=Ae(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};PP.default=Mit;var LP={},RP={};function Sme(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(P_.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,j_.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:_=v}),void n.forOf(_,i,function(){n.assign(C,(0,j_.propertyInData)(n,r,_,a.ownProperties)),n.if((0,P_.not)(C),function(){t.error(),n.break()})},P_.nil);var _,C}),t.ok(y)}else n.if((0,j_.checkMissingProp)(t,e,v)),(0,j_.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,$it.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,j_.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};VP.default=Bit;var HP={};Object.defineProperty(HP,"__esModule",{value:!0});var L_=xr(),Vit={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,L_.str)(gJ||(gJ=Ae(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,L_._)(vJ||(vJ=Ae(["{limit: ","}"])),n)}},Hit={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Vit,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?L_.operators.GT:L_.operators.LT;t.fail$data((0,L_._)(yJ||(yJ=Ae(["",".length "," ",""])),e,r,i))}};HP.default=Hit;var zP={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});var Dme=dme;Dme.code='require("ajv/dist/runtime/equal").default',R_.default=Dme,Object.defineProperty(zP,"__esModule",{value:!0});var UP=I_,Wa=xr(),zit=Hr,Uit=R_,Git={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa.str)(bJ||(bJ=Ae(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa._)(_J||(_J=Ae(["{i: ",", j: ","}"])),e,i)}},Wit={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Git,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,UP.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Wa._)(wJ||(wJ=Ae(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Wa._)(CJ||(CJ=Ae([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Wa._)(xJ||(xJ=Ae([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,UP.checkDataTypes)(c,p,a.opts.strictNumbers,UP.DataType.Wrong),g=n.const("indices",(0,Wa._)(kJ||(kJ=Ae(["{}"]))));n.for((0,Wa._)(SJ||(SJ=Ae([";","--;"])),h),function(){n.let(p,(0,Wa._)(DJ||(DJ=Ae(["","[","]"])),e,h)),n.if(m,(0,Wa._)(TJ||(TJ=Ae(["continue"])))),c.length>1&&n.if((0,Wa._)(EJ||(EJ=Ae(["typeof ",' == "string"'])),p),(0,Wa._)(AJ||(AJ=Ae(["",' += "_"'])),p)),n.if((0,Wa._)(MJ||(MJ=Ae(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Wa._)(IJ||(IJ=Ae(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Wa._)(NJ||(NJ=Ae(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,zit.useFunc)(n,Uit.default),m=n.name("outer");n.label(m).for((0,Wa._)(FJ||(FJ=Ae([";","--;"])),h),function(){return n.for((0,Wa._)(OJ||(OJ=Ae([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Wa._)(jJ||(jJ=Ae(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};zP.default=Wit;var GP={};Object.defineProperty(GP,"__esModule",{value:!0});var WP=xr(),qit=Hr,Xit=R_,Yit={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,WP._)(PJ||(PJ=Ae(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==bn(o)?t.fail$data((0,WP._)(LJ||(LJ=Ae(["!","(",", ",")"])),(0,qit.useFunc)(n,Xit.default),e,r)):t.fail((0,WP._)(RJ||(RJ=Ae([""," !== ",""])),o,e))}};GP.default=Yit;var qP={};Object.defineProperty(qP,"__esModule",{value:!0});var $_=xr(),Jit=Hr,Kit=R_,Qit={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,$_._)($J||($J=Ae(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,Jit.useFunc)(n,Kit.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,$_._)(BJ||(BJ=Ae(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=$_.or.apply(void 0,si(r.map(function(h,f){return p=d,"object"===bn(g=r[m=f])&&null!==g?(0,$_._)(VJ||(VJ=Ae(["","(",", ","[","])"])),u(),e,p,m):(0,$_._)(HJ||(HJ=Ae([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};qP.default=Qit,Object.defineProperty(OP,"__esModule",{value:!0}),OP.default=[jP.default,PP.default,LP.default,$P.default,BP.default,VP.default,HP.default,zP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},GP.default,qP.default];var XP={},G0={};Object.defineProperty(G0,"__esModule",{value:!0}),G0.validateAdditionalItems=void 0;var og=xr(),YP=Hr,crt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,og.str)(zJ||(zJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,og._)(UJ||(UJ=Ae(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?Tme(t,i):(0,YP.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function Tme(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,og._)(GJ||(GJ=Ae(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,og._)(WJ||(WJ=Ae([""," <= ",""])),a,n.length));else if("object"==bn(i)&&!(0,YP.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,og._)(qJ||(qJ=Ae([""," <= ",""])),a,n.length));e.if((0,og.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:YP.Type.Num},c),s.allErrors||e.if((0,og.not)(c),function(){return e.break()})});var c}),t.ok(l)}}G0.validateAdditionalItems=Tme,G0.default=crt;var JP={},W0={};Object.defineProperty(W0,"__esModule",{value:!0}),W0.validateTuple=void 0;var Eme=xr(),BD=Hr,urt=dd(),drt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Ame(t,"additionalItems",n);e.items=!0,(0,BD.alwaysValidSchema)(e,n)||t.ok((0,urt.validateArray)(t))}};function Ame(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,BD.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=BD.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Eme._)(XJ||(XJ=Ae(["",".length"])),o));e.forEach(function(d,h){(0,BD.alwaysValidSchema)(a,d)||(i.if((0,Eme._)(YJ||(YJ=Ae([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}W0.validateTuple=Ame,W0.default=drt,Object.defineProperty(JP,"__esModule",{value:!0});var hrt=W0,frt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,hrt.validateTuple)(t,"items")}};JP.default=frt;var KP={};Object.defineProperty(KP,"__esModule",{value:!0});var Mme=xr(),prt=Hr,mrt=dd(),grt=G0,vrt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Mme.str)(JJ||(JJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Mme._)(KJ||(KJ=Ae(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,prt.alwaysValidSchema)(i,n)||(r?(0,grt.validateAdditionalItems)(t,r):t.ok((0,mrt.validateArray)(t)))}};KP.default=vrt;var QP={};Object.defineProperty(QP,"__esModule",{value:!0});var du=xr(),VD=Hr,yrt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du.str)(QJ||(QJ=Ae(["must contain at least "," valid item(s)"])),e):(0,du.str)(ZJ||(ZJ=Ae(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du._)(eK||(eK=Ae(["{minContains: ","}"])),e):(0,du._)(tK||(tK=Ae(["{minContains: ",", maxContains: ","}"])),e,i)}},brt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:yrt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,du._)(nK||(nK=Ae(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,VD.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,VD.alwaysValidSchema)(a,r)){var d=(0,du._)(iK||(iK=Ae([""," >= ",""])),u,n);return void 0!==e&&(d=(0,du._)(rK||(rK=Ae([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,du._)(oK||(oK=Ae(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,VD.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,du._)(sK||(sK=Ae(["","++"])),v)),void(void 0===e?i.if((0,du._)(aK||(aK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,du._)(lK||(lK=Ae([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,du._)(cK||(cK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:VD.Type.Num,compositeRule:!0},m),g()})}}};QP.default=brt;var Ime={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Hr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(uK||(uK=Ae(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(dK||(dK=Ae(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Un(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,_=Re(g);try{for(_.s();!(y=_.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(S){_.e(S)}finally{_.f()}}):(c.if((0,n._)(hK||(hK=Ae([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Ime);var ZP={};Object.defineProperty(ZP,"__esModule",{value:!0});var Nme=xr(),_rt=Hr,xrt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,Nme._)(fK||(fK=Ae(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,_rt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,Nme.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};ZP.default=xrt;var HD={};Object.defineProperty(HD,"__esModule",{value:!0});var zD=dd(),pd=xr(),wrt=Sp(),UD=Hr,Crt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(pK||(pK=Ae(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,UD.alwaysValidSchema)(s,e)){var c=(0,zD.allSchemaProperties)(i.properties),u=(0,zD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,UD.schemaRefOrVal)(s,i.properties,"properties");g=(0,zD.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,si(c.map(function(y){return(0,pd._)(gK||(gK=Ae([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(si(u.map(function(y){return(0,pd._)(vK||(vK=Ae(["",".test(",")"])),(0,zD.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(mK||(mK=Ae([""," === ",""])),o,wrt.default.errors))}function d(p){n.code((0,pd._)(yK||(yK=Ae(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==bn(e)&&!(0,UD.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:UD.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};HD.default=Crt;var eL={};Object.defineProperty(eL,"__esModule",{value:!0});var krt=MD(),Fme=dd(),tL=Hr,Ome=HD,Srt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Ome.default.code(new krt.KeywordCxt(o,Ome.default,"additionalProperties"));var s,a=(0,Fme.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=tL.mergeEvaluated.props(n,(0,tL.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,tL.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Fme.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};eL.default=Srt;var nL={};Object.defineProperty(nL,"__esModule",{value:!0});var jme=dd(),GD=xr(),Pme=Hr,Lme=Hr,Drt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,jme.allSchemaProperties)(e),l=a.filter(function(p){return(0,Pme.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof GD.Name||(o.props=(0,Lme.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Pme.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,GD._)(bK||(bK=Ae(["",".test(",")"])),(0,jme.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Lme.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,GD._)(_K||(_K=Ae(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,GD.not)(u),function(){return n.break()})})})}}};nL.default=Drt;var iL={};Object.defineProperty(iL,"__esModule",{value:!0});var Trt=Hr,Ert={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Trt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};iL.default=Ert;var rL={};Object.defineProperty(rL,"__esModule",{value:!0});var Art={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};rL.default=Art;var oL={};Object.defineProperty(oL,"__esModule",{value:!0});var WD=xr(),Mrt=Hr,Irt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,WD._)(xK||(xK=Ae(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Mrt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,WD._)(wK||(wK=Ae([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,WD._)(CK||(CK=Ae(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,WD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};oL.default=Irt;var sL={};Object.defineProperty(sL,"__esModule",{value:!0});var Nrt=Hr,Frt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Nrt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};sL.default=Frt;var aL={};Object.defineProperty(aL,"__esModule",{value:!0});var qD=xr(),Rme=Hr,Ort={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,qD.str)(kK||(kK=Ae(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,qD._)(SK||(SK=Ae(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Rme.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=$me(i,"then"),o=$me(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,qD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,qD._)(DK||(DK=Ae(["",""])),d)):t.setParams({ifClause:d})}}}};function $me(t,n){var e=t.schema[n];return void 0!==e&&!(0,Rme.alwaysValidSchema)(t,e)}aL.default=Ort;var lL={};Object.defineProperty(lL,"__esModule",{value:!0});var jrt=Hr,Prt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,jrt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};lL.default=Prt,Object.defineProperty(XP,"__esModule",{value:!0});var Lrt=G0,Rrt=JP,$rt=W0,Brt=KP,Vrt=QP,Hrt=Ime,zrt=ZP,Urt=HD,Grt=eL,Wrt=nL,qrt=iL,Xrt=rL,Yrt=oL,Jrt=sL,Krt=aL,Qrt=lL;XP.default=function(){var n=[qrt.default,Xrt.default,Yrt.default,Jrt.default,Krt.default,Qrt.default,zrt.default,Urt.default,Hrt.default,Grt.default,Wrt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Rrt.default,Brt.default):n.push(Lrt.default,$rt.default),n.push(Vrt.default),n};var cL={},uL={};Object.defineProperty(uL,"__esModule",{value:!0});var js=xr(),Zrt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,js.str)(TK||(TK=Ae(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,js._)(EK||(EK=Ae(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,js._)(AK||(AK=Ae(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,js._)(MK||(MK=Ae(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,js._)(IK||(IK=Ae(["",'.type || "string"'])),f)).assign(m,(0,js._)(NK||(NK=Ae(["",".validate"])),f))},function(){return e.assign(p,(0,js._)(FK||(FK=Ae(['"string"'])))).assign(m,f)}),t.fail$data((0,js.or)(!1===l.strictSchema?js.nil:(0,js._)(OK||(OK=Ae([""," && !",""])),s,m),(g=u.$async?(0,js._)(jK||(jK=Ae(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,js._)(PK||(PK=Ae(["","(",")"])),m,i),v=(0,js._)(LK||(LK=Ae(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,js._)(RK||(RK=Ae([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Un(function(v){var y=v instanceof RegExp?(0,js.regexpCode)(v):l.code.formats?(0,js._)($K||($K=Ae(["","",""])),l.code.formats,(0,js.getProperty)(o)):void 0,_=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=bn(v)||v instanceof RegExp?["string",v,_]:[v.type||"string",v.validate,(0,js._)(BK||(BK=Ae(["",".validate"])),_)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==bn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,js._)(VK||(VK=Ae(["await ","(",")"])),g,i)}return(0,js._)("function"==typeof m?HK||(HK=Ae(["","(",")"])):zK||(zK=Ae(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};uL.default=Zrt,Object.defineProperty(cL,"__esModule",{value:!0}),cL.default=[uL.default];var q0={};Object.defineProperty(q0,"__esModule",{value:!0}),q0.contentVocabulary=q0.metadataVocabulary=void 0,q0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],q0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(IP,"__esModule",{value:!0});var iot=cL,Bme=q0,rot=[NP.default,OP.default,(0,XP.default)(),iot.default,Bme.metadataVocabulary,Bme.contentVocabulary];IP.default=rot;var dL={},Vme={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Vme),Object.defineProperty(dL,"__esModule",{value:!0});var X0=xr(),hL=Vme,Hme=Zl,oot=Hr,sot={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===hL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,X0._)(UK||(UK=Ae(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,X0._)(GK||(GK=Ae(["","",""])),e,(0,X0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,X0.Name),h}n.if((0,X0._)(WK||(WK=Ae(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",_="Expref",C="Pipe",$="EQ",G="GT",R="LT",z="GTE",U="LTE",q="NE",re="Flatten",L="Star",X="Filter",Z="Dot",he="Lbrace",E="Lbracket",N="Lparen",F="Literal",Y={".":Z,"*":L,",":p,":":m,"{":he,"}":g,"]":h,"(":N,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},oe={" ":!0,"\t":!0,"\n":!0};function fe(B){return B>="0"&&B<="9"||"-"===B}function Ne(){}Ne.prototype={tokenize:function(B){var ne,ie,Ie,Ye,Le=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),Le.push({type:u,value:ie,start:ne});else if(void 0!==Y[B[this._current]])Le.push({type:Y[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(fe(B[this._current]))Ie=this._consumeNumber(B),Le.push(Ie);else if("["===B[this._current])Ie=this._consumeLBracket(B),Le.push(Ie);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),Le.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),Le.push({type:F,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var _t=this._consumeLiteral(B);Le.push({type:F,value:_t,start:ne})}else if(void 0!==V[B[this._current]])Le.push(this._consumeOperator(B));else if(void 0!==oe[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,Le.push({type:"And",value:"&&",start:ne})):Le.push({type:_,value:"&",start:ne});else{if("|"!==B[this._current]){var At=new Error("Unknown character:"+B[this._current]);throw At.name="LexerError",At}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,Le.push({type:"Or",value:"||",start:ne})):Le.push({type:C,value:"|",start:ne})}return Le},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:z,value:">=",start:ne}):{type:G,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:$,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Ie=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var xe={};function tt(){}function ze(B){this.runtime=B}function ot(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}xe.EOF=0,xe.UnquotedIdentifier=0,xe.QuotedIdentifier=0,xe.Rbracket=0,xe.Rparen=0,xe.Comma=0,xe.Rbrace=0,xe.Number=0,xe.Current=0,xe.Expref=0,xe.Pipe=1,xe.Or=2,xe.And=3,xe.EQ=5,xe.GT=5,xe.LT=5,xe.GTE=5,xe.LTE=5,xe.NE=5,xe.Flatten=9,xe.Star=20,xe.Filter=21,xe.Dot=40,xe.Not=45,xe.Lbrace=50,xe.Lbracket=55,xe.Lparen=60,tt.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Ie=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Ie.name="ParserError",Ie}return ne},_loadTokens:function(B){var ne=(new Ne).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Ie=this._lookahead(0);B=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===he?(this._match(he),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(xe[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===X)ne=this.expression(B);else{if(this._lookahead(0)!==Z){var ie=this._lookaheadToken(0),Ie=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Ie.name="ParserError",Ie}this._match(Z),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Ie=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Ie.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Ie}}},ze.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Ie,Ye,Le,_t,At,_n,ci,on;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(At=ne[B.name])?null:At:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),on=1;on0)for(on=$r;onwr;on+=Or)Ye.push(ne[on]);return Ye;case"Projection":var Ai=this.visit(B.children[0],ne);if(!n(Ai))return null;for(ci=[],on=0;on_t;break;case z:Ye=Le>=_t;break;case R:Ye=Le<_t;break;case U:Ye=Le<=_t;break;default:throw new Error("Unknown comparator: "+B.name)}return Ye;case re:var ui=this.visit(B.children[0],ne);if(!n(ui))return null;var Fi=[];for(on=0;on=B&&(ne=ie<0?B-1:B),ne}},ot.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Ie,Ye,Le,_t;if(ie[ie.length-1].variadic){if(ne.length=0;Ie--)ie+=ne[Ie];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Ie=0;Ie=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Ie=B[0],Ye=B[1],Le=0;Le0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Ie0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Iepn?1:Ni_t&&(_t=ie,ne=Ye[At]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],Le=this.createKeyFunction(B[1],[s,a]),_t=1/0,At=0;At1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var dot=function(){function t(n,e,i,r){fL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=XD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=XD(p,4),_=m[3];void 0===_&&(_=1),o.rgba=[m[0],m[1],m[2],_]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return pL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return Gme(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return Gme(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.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=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,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=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=uot[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=XD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),hot=function(){function t(){fL(this,t),this._events=[]}return pL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function mL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function xh(t,n){return(n||document).querySelector(t)}function Wme(t){t.preventDefault(),t.stopPropagation()}function gL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&Wme(o),i(o))})}var qme=function(){function t(n){fL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new hot,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return pL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),gL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(Wme(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new dot(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=xh(".picker_hue",o),this._domSL=xh(".picker_sl",o),this._domA=xh(".picker_alpha",o),this._domEdit=xh(".picker_editor input",o),this._domSample=xh(".picker_sample",o),this._domOkay=xh(".picker_done button",o),this._domCancel=xh(".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 n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),mL(r,this._domH,function(l,c){return e._setHSLA(l)}),mL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&mL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),gL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),gL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=xh(".picker_selector",this._domH),d=xh(".picker_selector",l),h=xh(".picker_selector",c);_(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,_(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), 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",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function _(S,M,$){M.style.left=100*$+"%"}function C(S,M,$){M.style.top=100*$+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),vL=document.createElement("style");vL.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(vL),qme.StyleElement=vL;var fot=Object.freeze({__proto__:null,default:qme});const pot=["editor"];function mot(t,n){if(1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",39),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while modifying storage object: ",e.error,"")}}function got(t,n){1&t&&(b(0,"ngb-alert",40),ge(1,"img",41),b(2,"h6",39),I(3,"Storage object was modified successfully."),x()()),2&t&&k("dismissible",!1)}function vot(t,n){1&t&&(b(0,"span"),I(1,"Save as a copy"),x())}function yot(t,n){1&t&&I(0,"Save")}function bot(t,n){if(1&t&&(b(0,"button",42),J(1,vot,2,0,"span",43),J(2,yot,1,0,"ng-template",null,44,Ur),x()),2&t){const e=uo(3),i=j();k("disabled",i.updating),w(1),k("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const yL=function(){return["/storage"]},_ot=function(t){return{collection:t}},xot=function(t,n){return{collection:t,key:n}},wot=function(t,n,e){return{collection:t,key:n,user_id:e}},bL=function(t){return{"is-invalid":t}};let Cot=(()=>{class t{ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Do.required],keyname:["",Do.required],user_id:["",Do.required],permission_read:[0,Do.required],permission_write:[0,Do.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"object",void 0),K(this,"objectForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(pot,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Object"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),I(6,"Storage"),x(),b(7,"li",4)(8,"a",5),I(9),x()(),b(10,"li",4)(11,"a",5),I(12),x()(),b(13,"li",4)(14,"a",5),I(15),x()()()()(),J(16,mot,4,2,"ngb-alert",6),J(17,got,4,1,"ngb-alert",7),b(18,"form",8),ye("ngSubmit",function(){return i.updateObject()}),b(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),I(23,"Collection"),x()(),ge(24,"input",13),b(25,"div",14),I(26,"Collection is required"),x()(),b(27,"div",10)(28,"div",11)(29,"label",15),I(30,"Key"),x()(),ge(31,"input",16),b(32,"div",14),I(33,"Key is required"),x()()(),b(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),I(38,"User ID"),x()(),ge(39,"input",18),b(40,"div",14),I(41,"User ID is required"),x()(),b(42,"div",19)(43,"div",11)(44,"label",20),I(45,"Read Permission"),x()(),b(46,"div",21)(47,"label",22),ge(48,"input",23),I(49," No Read "),x(),b(50,"label",22),ge(51,"input",23),I(52," Owner Read "),x(),b(53,"label",22),ge(54,"input",23),I(55," Public Read "),x()()()(),b(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),I(60,"Version"),x()(),ge(61,"input",25),x(),b(62,"div",19)(63,"div",11)(64,"label",26),I(65,"Write Permission"),x()(),b(66,"div",27)(67,"label",22),ge(68,"input",23),I(69," No Write "),x(),b(70,"label",22),ge(71,"input",23),I(72," Owner Write "),x()()()(),b(73,"div",28)(74,"div",10)(75,"div",11)(76,"label",29),I(77,"Create Time"),x()(),ge(78,"input",30),x(),b(79,"div",10)(80,"div",11)(81,"label",31),I(82,"Update Time"),x()(),ge(83,"input",32),x()(),b(84,"div",33),ge(85,"div",34,35),x(),J(87,bot,4,3,"button",36),x()),2&e&&(w(8),k("routerLink",wl(32,yL))("queryParams",lr(33,_ot,i.object.collection)),w(1),Dt(i.object.collection),w(2),k("routerLink",wl(35,yL))("queryParams",Sr(36,xot,i.object.collection,i.object.key)),w(1),Dt(i.object.key),w(2),k("routerLink",wl(39,yL))("queryParams",Ug(40,wot,i.object.collection,i.object.key,i.object.user_id)),w(1),Dt(i.object.user_id),w(1),k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.objectForm),w(6),k("ngClass",lr(44,bL,i.f.collection.dirty&&i.f.collection.errors)),w(1),k("hidden",i.f.collection.disabled||i.f.collection.valid||i.f.collection.pristine),w(6),k("ngClass",lr(46,bL,i.f.keyname.dirty&&i.f.keyname.errors)),w(1),k("hidden",i.f.keyname.disabled||i.f.keyname.valid||i.f.keyname.pristine),w(7),k("ngClass",lr(48,bL,i.f.user_id.dirty&&i.f.user_id.errors)),w(1),k("hidden",i.f.user_id.disabled||i.f.user_id.valid||i.f.user_id.pristine),w(8),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(3),k("disabled",!i.updateAllowed())("value",2),w(7),k("value",i.object.version),w(7),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(7),k("value",i.object.create_time),w(5),k("value",i.object.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Nu,Rh,gn,To,AC,N3,IH,sl,Fa,rl,ol,Nf,fa,ja],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),kot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sot(t,n){if(1&t&&(b(0,"ngb-alert",18),ge(1,"img",19),b(2,"h6",20),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Dot(t,n){1&t&&(b(0,"th",21),I(1,"Remove"),x())}function Tot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Eot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Aot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Mot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Iot(t,n){if(1&t){const e=vt();b(0,"td",26)(1,"button",27),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLeaderboard(r,s,a))}),I(2,"Delete"),x()()}}function Not(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(2),x(),b(3,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(4),x(),b(5,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(6),x(),b(7,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(8),x(),J(9,Tot,2,0,"td",23),J(10,Eot,2,0,"td",23),J(11,Aot,2,0,"td",23),J(12,Mot,2,0,"td",23),J(13,Iot,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(i.orderString[e.sort_order]),w(2),Dt(i.operatorString[e.operator]),w(2),Dt(""===e.reset_schedule?"-":e.reset_schedule),w(1),k("ngIf",e.authoritative),w(1),k("ngIf",!e.authoritative),w(1),k("ngIf",e.tournament),w(1),k("ngIf",!e.tournament),w(1),k("ngIf",i.deleteAllowed())}}function Fot(t,n){1&t&&(b(0,"tr")(1,"td",28),I(2,"No leaderboards were found."),x()())}let Oot=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"authService",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"leaderboards",[]),K(this,"nextCursor",""),K(this,"leaderboardsCount",0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),this.route=e,this.router=i,this.authService=r,this.consoleService=o}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Xo),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),I(4,"Leaderboards"),x(),b(5,"h6",4),I(6),x()(),b(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return i.search(0)}),ge(10,"img",8),x(),b(11,"button",7),ye("click",function(){return i.search(1)}),ge(12,"img",9),x()()()()(),J(13,Sot,4,2,"ngb-alert",10),b(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),I(18,"Leaderboard ID"),x(),b(19,"th",13),I(20,"Sort Order"),x(),b(21,"th",13),I(22,"Operator"),x(),b(23,"th",13),I(24,"Reset Schedule"),x(),b(25,"th",14),I(26,"Authoritative"),x(),b(27,"th",14),I(28,"Tournament"),x(),J(29,Dot,2,0,"th",15),x()(),b(30,"tbody"),J(31,Not,14,9,"tr",16),J(32,Fot,3,0,"tr",17),x()()),2&e&&(w(6),xn("",i.leaderboardsCount," leaderboards found."),w(3),k("disabled",0===i.leaderboards.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(16),k("ngIf",i.deleteAllowed()),w(2),k("ngForOf",i.leaderboards),w(1),k("ngIf",0===i.leaderboards.length))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),jot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Pot(t,n){if(1&t&&(b(0,"ngb-alert",31),ge(1,"img",32),b(2,"h6",33),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying accounts: ",e.error,"")}}function Lot(t,n){1&t&&(b(0,"th",34),I(1,"Remove"),x())}function Rot(t,n){1&t&&(b(0,"tr")(1,"td",35),I(2,"No users found - change the filter criteria or add new user accounts."),x()())}function $ot(t,n){1&t&&ge(0,"td")}function Bot(t,n){if(1&t){const e=vt();b(0,"td",38)(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteAccount(r,s,a))}),I(2,"Delete"),x()()}}function Vot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(8),x(),J(9,$ot,1,0,"td",29),J(10,Bot,3,0,"td",37),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.username),w(2),Dt(e.display_name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Hot=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"accountsCount",0),K(this,"accounts",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"})},o=>{this.error=o})}deleteAccount(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Accounts"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"span",9),ye("click",function(){return i.f.filter.setValue(i.systemUserId)}),ge(12,"img",10),x()(),b(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return i.f.filter_type.setValue(0),i.search(0)}),I(16,"Search"),x(),b(17,"div",13),ge(18,"button",14),b(19,"div",15)(20,"button",16),ye("click",function(){return i.f.filter_type.setValue(1),i.search(0)}),I(21,"Tombstones"),x()()()()()()()(),b(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return i.search(0)}),ge(25,"img",20),x(),b(26,"button",19),ye("click",function(){return i.search(1)}),ge(27,"img",21),x()()()()(),J(28,Pot,4,2,"ngb-alert",22),b(29,"div",23)(30,"table",24)(31,"thead",25)(32,"tr")(33,"th",26),I(34,"User ID"),x(),b(35,"th"),I(36,"Username"),x(),b(37,"th"),I(38,"Display Name"),x(),b(39,"th",27),I(40,"Last Update"),x(),J(41,Lot,2,0,"th",28),x()(),b(42,"tbody"),J(43,Rot,3,0,"tr",29),J(44,Vot,11,6,"tr",30),x()()()),2&e&&(w(3),xn("",i.accountsCount," accounts found."),w(4),k("formGroup",i.searchForm),w(11),k("disabled",!i.f.filter.value||""===i.f.filter.value),w(6),k("disabled",0===i.accounts.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.accounts.length),w(1),k("ngForOf",i.accounts))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),zot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Uot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().exportAccount(r))}),ge(1,"img",16),I(2,"Export"),x()}}function Got(t,n){1&t&&(b(0,"span"),I(1,"Unban"),x())}function Wot(t,n){1&t&&(b(0,"span"),I(1,"Ban"),x())}function qot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().banUnbanAccount(r))}),ge(1,"img",17),J(2,Got,2,0,"span",18),J(3,Wot,2,0,"span",18),x()}if(2&t){const e=j();w(2),k("ngIf",e.account.disable_time),w(1),k("ngIf",!e.account.disable_time)}}function Xot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!1))}),ge(1,"img",20),I(2,"Delete"),x()}}function Yot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!0))}),ge(1,"img",21),I(2,"Recorded delete"),x()}}function Jot(t,n){if(1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const Kot=function(t,n){return["/accounts",t,n]};function Qot(t,n){if(1&t&&(b(0,"div"),ta(1,25),b(2,"a",26),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,Kot,i.account.user.id,e.path)),w(1),Dt(e.label)}}const Zot=function(){return["/accounts"]},est=function(){return["/storage"]},tst=function(t){return{user_id:t}};let nst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"account",void 0),K(this,"error",""),K(this,"views",[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rN.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Account"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Account"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,Uot,3,0,"button",7),J(12,qot,4,2,"button",7),J(13,Xot,3,0,"button",8),J(14,Yot,3,0,"button",8),x()(),J(15,Jot,4,2,"ngb-alert",9),b(16,"nav",10,11),J(18,Qot,4,6,"div",12),b(19,"div"),ta(20,13),b(21,"a",14),I(22," Storage "),x(),na(),x()(),ge(23,"router-outlet")),2&e&&(w(6),k("routerLink",wl(10,Zot)),w(3),Dt(i.account.user.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.banAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views),w(3),k("routerLink",wl(11,est))("queryParams",lr(12,tst,i.account.user.id)))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),ist=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const rst=["editor"];function ost(t,n){if(1&t&&(b(0,"ngb-alert",29),ge(1,"img",30),b(2,"h6",31),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function sst(t,n){1&t&&(b(0,"ngb-alert",32),ge(1,"img",33),b(2,"h6",31),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function ast(t,n){1&t&&(b(0,"button",34),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const lst=function(t){return{"is-invalid":t}};let cst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Do.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(rst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ost,4,2,"ngb-alert",0),J(1,sst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"User ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Username"),x()(),ge(13,"input",9),b(14,"div",10),I(15,"Username is required"),x()()(),b(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),I(20,"Display Name"),x()(),ge(21,"input",12),x(),b(22,"div",13)(23,"div",5)(24,"label",14),I(25,"Avatar URL"),x()(),ge(26,"input",15),x()(),b(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),I(31,"Location"),x()(),ge(32,"input",17),x(),b(33,"div",13)(34,"div",5)(35,"label",18),I(36,"Timezone"),x()(),ge(37,"input",19),x()(),b(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),I(42,"Create Time"),x()(),ge(43,"input",22),x(),b(44,"div",4)(45,"div",5)(46,"label",23),I(47,"Update Time"),x()(),ge(48,"input",24),x()(),b(49,"div",25),ge(50,"div",26,27),x(),J(52,ast,2,1,"button",28),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(6),k("value",i.account.user.id),w(5),k("ngClass",lr(9,lst,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(29),k("value",i.account.user.create_time),w(5),k("value",i.account.user.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Rh,gn,To,sl,Fa,rl,ol,Nf,fa,ja]})),t})();function ust(t,n){if(1&t&&(b(0,"ngb-alert",36),ge(1,"img",37),b(2,"h6",38),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function dst(t,n){1&t&&(b(0,"ngb-alert",39),ge(1,"img",40),b(2,"h6",38),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function hst(t,n){if(1&t&&(b(0,"option",41),I(1),x()),2&t){const e=n.$implicit,i=n.index;Fh("value",i),k("selected",0===i),w(1),Dt(e.id)}}function fst(t,n){1&t&&(b(0,"button",42),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}let pst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ust,4,2,"ngb-alert",0),J(1,dst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Device IDs"),x()(),b(8,"div",7)(9,"button",8),ye("click",function(){return i.copyDeviceIdToClipboard(i.f.selected_device_id_index.value)}),ge(10,"img",9),I(11," Copy "),x(),b(12,"select",10),J(13,hst,2,3,"option",11),x(),b(14,"div",12)(15,"button",13),ye("click",function(o){return i.unlinkDeviceId(o)}),I(16,"Unlink"),x()()()(),b(17,"div",4)(18,"div",5)(19,"label",14),I(20,"Custom ID"),x()(),b(21,"div",7),ge(22,"input",15),b(23,"div",12)(24,"button",13),ye("click",function(o){return i.unlinkCustomID(o)}),I(25,"Unlink"),x()()()()(),b(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),I(30,"Facebook ID"),x()(),b(31,"div",7),ge(32,"input",17),b(33,"div",12)(34,"button",13),ye("click",function(o){return i.unlinkFacebook(o)}),I(35,"Unlink"),x()()()(),b(36,"div",18)(37,"div",5)(38,"label",19),I(39,"FB Instant Game ID"),x()(),b(40,"div",7),ge(41,"input",20),b(42,"div",12)(43,"button",13),ye("click",function(o){return i.unlinkFacebookInstantGames(o)}),I(44,"Unlink"),x()()()()(),b(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),I(49,"Apple ID"),x()(),b(50,"div",7),ge(51,"input",22),b(52,"div",12)(53,"button",13),ye("click",function(o){return i.unlinkApple(o)}),I(54,"Unlink"),x()()()(),b(55,"div",18)(56,"div",5)(57,"label",23),I(58,"GameCenter ID"),x()(),b(59,"div",7),ge(60,"input",24),b(61,"div",12)(62,"button",13),ye("click",function(o){return i.unlinkGameCenter(o)}),I(63,"Unlink"),x()()()()(),b(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),I(68,"Google ID"),x()(),b(69,"div",7),ge(70,"input",26),b(71,"div",12)(72,"button",13),ye("click",function(o){return i.unlinkGoogle(o)}),I(73,"Unlink"),x()()()(),b(74,"div",4)(75,"div",5)(76,"label",27),I(77,"Steam ID"),x()(),b(78,"div",7),ge(79,"input",28),b(80,"div",12)(81,"button",13),ye("click",function(o){return i.unlinkSteam(o)}),I(82,"Unlink"),x()()()()(),b(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),I(87,"Email"),x(),ge(88,"br"),x(),ge(89,"input",30),x(),b(90,"div",4)(91,"div",5)(92,"label",31),I(93,"Password"),x()(),ge(94,"input",32),x()(),b(95,"div",33)(96,"div",4),ge(97,"div",5),b(98,"span",34),I(99),x()(),ge(100,"div",4),x(),J(101,fst,2,1,"button",35),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(11),k("ngForOf",i.account.devices),w(2),k("disabled",!i.updateAllowed()||0===i.account.devices.length),w(7),k("value",i.account.custom_id),w(2),k("disabled",!i.updateAllowed()||!i.account.custom_id||""===i.account.custom_id),w(8),k("value",i.account.user.facebook_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_id||""===i.account.user.facebook_id),w(7),k("value",i.account.user.facebook_instant_game_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_instant_game_id||""===i.account.user.facebook_instant_game_id),w(8),k("value",i.account.user.apple_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.apple_id||""===i.account.user.apple_id),w(7),k("value",i.account.user.gamecenter_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.gamecenter_id||""===i.account.user.gamecenter_id),w(8),k("value",i.account.user.google_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.google_id||""===i.account.user.google_id),w(7),k("value",i.account.user.steam_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.steam_id||""===i.account.user.steam_id),w(18),xn("Verification Status: ",null===i.account.verify_time?"Not Verified":"Verified",""),w(2),k("ngIf",i.updateAllowed()))},dependencies:[jn,gn,To,sl,xy,wy,Fa,ov,rl,ol,fa,ja],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})),t})();const mst=["editor"];function gst(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vst(t,n){1&t&&(b(0,"ngb-alert",27),ge(1,"img",28),b(2,"h6",26),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function yst(t,n){if(1&t){const e=vt();b(0,"button",29),ye("click",function(){return $e(e),Be(j().updateWallet())}),I(1,"Save"),x()}2&t&&k("disabled",j().updating)}function bst(t,n){1&t&&(b(0,"th",30),I(1,"Remove"),x())}function _st(t,n){1&t&&(b(0,"tr")(1,"td",31),I(2,"No wallet ledger items found."),x()())}function xst(t,n){1&t&&ge(0,"div",37)}function wst(t,n){1&t&&ge(0,"div",38)}function Cst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLedgerItem(r,s,a))}),I(2,"Delete"),x()()}}function kst(t,n){if(1&t&&(b(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Sst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=$e(e).index,s=j();return Be(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),J(3,xst,1,0,"div",33),J(4,wst,1,0,"div",34),x(),I(5),x(),b(6,"td",35)(7,"pre",36),I(8),x()(),b(9,"td"),I(10),x(),J(11,Cst,3,0,"td",22),x(),J(12,kst,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),k("ngIf",r.walletLedgerMetadataOpen[e]),w(1),xn(" ",i.id," "),w(3),Dt(i.changeset),w(2),Dt(i.update_time),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.walletLedgerMetadataOpen[e])}}let Dst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"walletLedger",[]),K(this,"walletLedgerMetadataOpen",[]),K(this,"updating",!1),K(this,"updated",!1),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"limit",100),K(this,"userID",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,gst,4,2,"ngb-alert",0),J(1,vst,4,1,"ngb-alert",1),b(2,"div",2),ge(3,"div",3,4),x(),J(5,yst,2,1,"button",5),ge(6,"hr",6),b(7,"div",7)(8,"div",8),ge(9,"div",9),b(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return i.loadData("")}),ge(13,"img",13),x(),b(14,"button",12),ye("click",function(){return i.loadData(i.prevCursor)}),ge(15,"img",14),x(),b(16,"button",12),ye("click",function(){return i.loadData(i.nextCursor)}),ge(17,"img",15),x()()()()(),b(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),I(23,"ID"),x(),b(24,"th"),I(25,"Changeset"),x(),b(26,"th",20),I(27,"Update Time"),x(),J(28,bst,2,0,"th",21),x()(),b(29,"tbody"),J(30,_st,3,0,"tr",22),J(31,Sst,13,7,"ng-template",23),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(4),k("ngIf",i.updateAllowed()),w(7),k("disabled",0===i.walletLedger.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(12),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.walletLedger.length),w(1),k("ngForOf",i.walletLedger))},dependencies:[jn,gn,To],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})),t})(),Tst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Est(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Ast(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Mst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No friends found."),x()())}function Ist(t,n){1&t&&(b(0,"span"),I(1,"Friend (0)"),x())}function Nst(t,n){1&t&&(b(0,"span"),I(1,"Invite Sent (1)"),x())}function Fst(t,n){1&t&&(b(0,"span"),I(1,"Invite Received (2)"),x())}function Ost(t,n){1&t&&(b(0,"span"),I(1,"Blocked (3)"),x())}function jst(t,n){if(1&t){const e=vt();b(0,"td",16)(1,"button",17),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteFriend(r,s,a))}),I(2,"Delete"),x()()}}function Pst(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),J(6,Ist,2,0,"span",8),J(7,Nst,2,0,"span",8),J(8,Fst,2,0,"span",8),J(9,Ost,2,0,"span",8),x(),b(10,"td"),I(11),x(),J(12,jst,3,0,"td",15),x()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Lst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"friends",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,Est,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"User ID"),x(),b(7,"th"),I(8,"Username"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Ast,2,0,"th",7),x()(),b(14,"tbody"),J(15,Mst,3,0,"tr",8),J(16,Pst,13,8,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.friends.length),w(1),k("ngForOf",i.friends))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Rst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function $st(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Bst(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Vst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No group membership found."),x()())}function Hst(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function zst(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function Ust(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function Gst(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function Wst(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function qst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",16),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function Xst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,Hst,2,0,"span",8),J(7,zst,2,0,"span",8),J(8,Ust,2,0,"span",8),J(9,Gst,2,0,"span",8),J(10,Wst,2,0,"span",8),x(),b(11,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,qst,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.group.id),w(2),Dt(e.group.name),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.group.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Yst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"groups",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,$st,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"Group ID"),x(),b(7,"th"),I(8,"Name"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Bst,2,0,"th",7),x()(),b(14,"tbody"),J(15,Vst,3,0,"tr",8),J(16,Xst,14,9,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Jst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Kst=["editor"];function Qst(t,n){if(1&t&&(b(0,"ngb-alert",34),ge(1,"img",35),b(2,"h6",36),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Zst(t,n){1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",36),I(3,"Group was modified successfully."),x()()),2&t&&k("dismissible",!1)}function eat(t,n){1&t&&(b(0,"button",39),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const tat=function(t){return["/accounts",t]},nat=function(t){return{"is-invalid":t}};let iat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"groupForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Do.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(Kst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,Qst,4,2,"ngb-alert",0),J(1,Zst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateGroup()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Group ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Creator ID"),x()(),b(13,"a",9),ge(14,"input",10),x()()(),b(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),I(19,"Name"),x()(),ge(20,"input",12),b(21,"div",13),I(22,"Name is required"),x()(),b(23,"div",4)(24,"div",5)(25,"label",14),I(26,"Description"),x()(),ge(27,"input",15),x()(),b(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),I(32,"Avatar URL"),x()(),ge(33,"input",18),x(),b(34,"div",4)(35,"div",5)(36,"label",19),I(37,"Language"),x()(),ge(38,"input",20),x()(),b(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),I(43,"Members"),x()(),ge(44,"input",21),x(),b(45,"div",16)(46,"div",5)(47,"label",22),I(48,"Max Count"),x()(),ge(49,"input",23),x()(),b(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),I(54,"Open"),x()(),ge(55,"input",24),x()(),b(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),I(60,"Create Time"),x()(),ge(61,"input",27),x(),b(62,"div",4)(63,"div",5)(64,"label",28),I(65,"Update Time"),x()(),ge(66,"input",29),x()(),b(67,"div",30),ge(68,"div",31,32),x(),J(70,eat,2,1,"button",33),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.groupForm),w(6),k("value",i.group.id),w(5),k("routerLink",lr(12,tat,i.group.creator_id)),w(1),k("value",i.group.creator_id),w(6),k("ngClass",lr(14,nat,i.f.name.dirty&&i.f.name.errors)),w(1),k("hidden",i.f.name.disabled||i.f.name.valid||i.f.name.pristine),w(23),k("value",i.group.edge_count),w(17),k("value",i.group.create_time),w(5),k("value",i.group.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Nu,Rh,gn,To,sl,Fa,aC,rl,ol,Nf,fa,ja]})),t})();function rat(t,n){if(1&t&&(b(0,"ngb-alert",13),ge(1,"img",14),b(2,"h6",15),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function oat(t,n){1&t&&(b(0,"span"),I(1,"Add by membership state"),x())}function sat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j(2);w(1),Dt(e.activeState)}}function aat(t,n){if(1&t){const e=vt();b(0,"button",20),ye("click",function(){const o=$e(e).$implicit;return Be(j(2).activeState=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function lat(t,n){if(1&t&&(b(0,"div",16)(1,"button",17),J(2,oat,2,0,"span",11),J(3,sat,2,1,"span",11),x(),b(4,"div",18),J(5,aat,2,1,"button",19),x()()),2&t){const e=j();w(2),k("ngIf",!e.activeState||""===e.activeState),w(1),k("ngIf",e.activeState&&""!==e.activeState),w(2),k("ngForOf",e.states)}}function cat(t,n){if(1&t){const e=vt();b(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ge(5,"input",26),b(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return $e(e),Be(j().add())}),I(9,"Add"),x()()()()()()()()}if(2&t){const e=j();w(3),k("formGroup",e.addForm)}}function uat(t,n){1&t&&(b(0,"th",30),I(1,"Demote"),x())}function dat(t,n){1&t&&(b(0,"th",30),I(1,"Promote"),x())}function hat(t,n){1&t&&(b(0,"th",31),I(1,"Remove"),x())}function fat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No group membership found."),x()())}function pat(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function mat(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function gat(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function vat(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function yat(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function bat(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().demoteGroupUser(r,s,a))}),at(),b(2,"svg",38),ge(3,"path",39),x()()()}}function _at(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().promoteGroupUser(r,s,a))}),at(),b(2,"svg",40),ge(3,"path",41),x()()()}}function xat(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function wat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,pat,2,0,"span",11),J(7,mat,2,0,"span",11),J(8,gat,2,0,"span",11),J(9,vat,2,0,"span",11),J(10,yat,2,0,"span",11),x(),b(11,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,bat,4,0,"td",34),J(14,_at,4,0,"td",34),J(15,xat,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.user.update_time),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed())}}let Cat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"members",[]),K(this,"activeState","Add Member"),K(this,"states",["Add Member","Join"]),K(this,"addForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,rat,4,2,"ngb-alert",0),J(1,lat,6,3,"div",1),J(2,cat,10,1,"div",2),b(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),I(8,"User ID"),x(),b(9,"th"),I(10,"Name"),x(),b(11,"th",7),I(12,"State"),x(),b(13,"th",8),I(14,"Update Time"),x(),J(15,uat,2,0,"th",9),J(16,dat,2,0,"th",9),J(17,hat,2,0,"th",10),x()(),b(18,"tbody"),J(19,fat,3,0,"tr",11),J(20,wat,16,11,"tr",12),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",!i.group.open&&i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(13),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(2),k("ngIf",0===i.members.length),w(1),k("ngForOf",i.members))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),kat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sat(t,n){if(1&t&&(b(0,"ngb-alert",28),ge(1,"img",29),b(2,"h6",30),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Dat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeType)}}function Tat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeType=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Eat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeNode)}}function Aat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeNode=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Mat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No realtime matches were found."),x()())}function Iat(t,n){1&t&&ge(0,"div",40)}function Nat(t,n){1&t&&ge(0,"div",41)}function Fat(t,n){if(1&t){const e=vt();b(0,"div",37),ye("click",function(){$e(e);const r=j(),o=r.index,s=r.$implicit,a=j();return a.getMatchState(o,s),Be(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),J(1,Iat,1,0,"div",38),J(2,Nat,1,0,"div",39),x()}if(2&t){const e=j().index,i=j();w(1),k("ngIf",!i.matchStatesOpen[e]),w(1),k("ngIf",i.matchStatesOpen[e])}}function Oat(t,n){1&t&&ge(0,"div",42)}function jat(t,n){1&t&&(b(0,"span"),I(1,"Yes"),x())}function Pat(t,n){1&t&&(b(0,"span"),I(1,"No"),x())}function Lat(t,n){1&t&&ge(0,"img",51)}function Rat(t,n){if(1&t&&(b(0,"div")(1,"small")(2,"b"),I(3,"Current Tick"),x()(),b(4,"pre",47)(5,"small"),I(6),x()(),b(7,"small")(8,"b"),I(9,"Match State"),x()(),b(10,"pre",47)(11,"small"),I(12),x()()()),2&t){const e=j(2).index,i=j();w(6),Dt(i.matchStates[e].tick),w(6),Dt(i.matchStates[e].state)}}function $at(t,n){1&t&&ge(0,"img",51)}function Bat(t,n){if(1&t&&(b(0,"pre",47)(1,"small"),I(2),x()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.getMatchPresencesString(i.matchStates[e].presences))}}function Vat(t,n){if(1&t&&(b(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),I(6,"Match Label"),x()(),b(7,"pre",47)(8,"small"),I(9),x()()(),b(10,"div",48),J(11,Lat,1,0,"img",49),J(12,Rat,13,2,"div",7),x(),b(13,"div",48)(14,"small")(15,"b"),I(16,"Match Presences"),x()(),J(17,$at,1,0,"img",49),J(18,Bat,3,1,"pre",50),x()()()()),2&t){const e=j(),i=e.$implicit,r=e.index,o=j();w(9),Dt(i.api_match.label),w(2),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r]),w(5),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r])}}function Hat(t,n){if(1&t&&(b(0,"tr")(1,"td"),J(2,Fat,3,2,"div",33),J(3,Oat,1,0,"div",34),I(4),x(),b(5,"td"),I(6),x(),b(7,"td",35),J(8,jat,2,0,"span",7),J(9,Pat,2,0,"span",7),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x()(),J(16,Vat,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=j();w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(1),xn(" ",i.api_match.match_id," "),w(2),Dt(i.api_match.size),w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(2),Dt(i.node),w(2),Dt(i.api_match.handler_name),w(2),Dt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),k("ngIf",r.matchStatesOpen[e])}}let zat=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"formBuilder",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"matches",[]),K(this,"matchStates",[]),K(this,"matchStatesOpen",[]),K(this,"updated",!1),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"activeType","All"),K(this,"types",["All","Authoritative","Relayed"]),K(this,"activeNode","All Nodes"),K(this,"nodes",["All Nodes"]),this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));let i=e.get("type");this.type=Number(i);let r=e.get("node");if(this.route.data.subscribe(o=>{console.log(o),o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1==this.type||2==this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,Xme(this.consoleService,e,0==e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Tl),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Active Matches"),x(),b(2,"h6",1),I(3),x(),J(4,Sat,4,2,"ngb-alert",2),b(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),J(9,Dat,2,1,"span",7),x(),b(10,"div",8),J(11,Tat,2,1,"button",9),x()()(),b(12,"div",10)(13,"button",11),ye("click",function(){return i.search()}),I(14,"Search"),x()()(),b(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return i.search()}),b(19,"div",16),ge(20,"input",17),x()(),b(21,"form",15),ye("ngSubmit",function(){return i.search()}),b(22,"div",16),ge(23,"input",17),x()(),b(24,"form",15),ye("ngSubmit",function(){return i.search()}),b(25,"div",16),ge(26,"input",18),b(27,"div",10)(28,"div",5)(29,"button",19),J(30,Eat,2,1,"span",7),x(),b(31,"div",8),J(32,Aat,2,1,"button",9),x()()()()()()()(),b(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),I(39,"Match ID"),x()(),b(40,"th",23),I(41,"Presence Count"),x(),b(42,"th",24),I(43,"Authoritative"),x(),b(44,"th",24),I(45,"Node"),x(),b(46,"th",25),I(47,"Handler Name"),x(),b(48,"th",26),I(49,"Tick Rate"),x()()(),b(50,"tbody"),J(51,Mat,3,0,"tr",7),J(52,Hat,17,10,"ng-template",27),x()()()),2&e&&(w(3),xn("",i.matches.length," running matches found."),w(1),k("ngIf",i.error),w(5),k("ngIf",i.activeType&&""!==i.activeType),w(2),k("ngForOf",i.types),w(7),k("hidden","All"!==i.activeType)("formGroup",i.searchForm1),w(3),k("hidden","Relayed"!==i.activeType)("formGroup",i.searchForm2),w(3),k("hidden","Authoritative"!==i.activeType)("formGroup",i.searchForm3),w(6),k("ngIf",i.activeNode&&""!==i.activeNode),w(2),k("ngForOf",i.nodes),w(6),Mn("pl-3",i.matches.length>0),w(13),k("ngIf",0===i.matches.length),w(1),k("ngForOf",i.matches))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Fa,rl,ol,fa,ja],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),Uat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));return Xme(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Xme(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $n(null)}let Gat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Wat(t,n){if(1&t&&(b(0,"ngb-alert",25),ge(1,"img",26),b(2,"h6",27),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying groups: ",e.error,"")}}function qat(t,n){1&t&&(b(0,"th",28),I(1,"Remove"),x())}function Xat(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No groups found - change the filter criteria or add new user groups."),x()())}function Yat(t,n){1&t&&ge(0,"td")}function Jat(t,n){if(1&t){const e=vt();b(0,"td",32)(1,"button",33),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroup(r,s,a))}),I(2,"Delete"),x()()}}function Kat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(2),x(),b(3,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(4),x(),b(5,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(6),x(),J(7,Yat,1,0,"td",23),J(8,Jat,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Qat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"groupsCount",0),K(this,"groups",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Groups"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return i.search(0)}),I(13,"Search"),x()()()()()(),b(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return i.search(0)}),ge(17,"img",14),x(),b(18,"button",13),ye("click",function(){return i.search(1)}),ge(19,"img",15),x()()()()(),J(20,Wat,4,2,"ngb-alert",16),b(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),I(26,"Group ID"),x(),b(27,"th"),I(28,"Name"),x(),b(29,"th",21),I(30,"Last Update"),x(),J(31,qat,2,0,"th",22),x()(),b(32,"tbody"),J(33,Xat,3,0,"tr",23),J(34,Kat,9,5,"tr",24),x()()()),2&e&&(w(3),xn("",i.groupsCount," groups found."),w(4),k("formGroup",i.searchForm),w(9),k("disabled",0===i.groups.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(11),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To,sl,Fa,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Zat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function elt(t,n){if(1&t){const e=vt();b(0,"button",13),ye("click",function(r){return $e(e),Be(j().exportGroup(r))}),ge(1,"img",14),I(2,"Export"),x()}}function tlt(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().deleteGroup(r,!1))}),ge(1,"img",16),I(2,"Delete"),x()}}function nlt(t,n){if(1&t&&(b(0,"ngb-alert",17),ge(1,"img",18),b(2,"h6",19),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ilt=function(t,n){return["/groups",t,n]};function rlt(t,n){if(1&t&&(b(0,"div"),ta(1,20),b(2,"a",21),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ilt,i.group.id,e.path)),w(1),Dt(e.label)}}const olt=function(){return["/groups"]};let slt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"group",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Members",path:"members"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rN.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Group"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Group"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,elt,3,0,"button",7),J(12,tlt,3,0,"button",8),x()(),J(13,nlt,4,2,"ngb-alert",9),b(14,"nav",10,11),J(16,rlt,4,6,"div",12),x(),ge(17,"router-outlet")),2&e&&(w(6),k("routerLink",wl(6,olt)),w(3),Dt(i.group.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),alt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function llt(t,n){if(1&t){const e=vt();b(0,"button",12),ye("click",function(r){return $e(e),Be(j().deleteLeaderboard(r))}),ge(1,"img",13),I(2,"Delete Leaderboard"),x()}}function clt(t,n){if(1&t&&(b(0,"ngb-alert",14),ge(1,"img",15),b(2,"h6",16),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ult=function(t,n){return["/leaderboards",t,n]};function dlt(t,n){if(1&t&&(b(0,"div"),ta(1,17),b(2,"a",18),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ult,i.leaderboard.id,e.path)),w(1),Dt(e.label)}}const hlt=function(){return["/leaderboards"]};let flt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"leaderboard",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Records",path:"records"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Leaderboard"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Leaderboards"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,llt,3,0,"button",7),x()(),J(12,clt,4,2,"ngb-alert",8),b(13,"nav",9,10),J(15,dlt,4,6,"div",11),x(),ge(16,"router-outlet")),2&e&&(w(6),k("routerLink",wl(5,hlt)),w(3),Dt(i.leaderboard.id),w(2),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Nu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),plt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const mlt=["editor"];function glt(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vlt(t,n){if(1&t&&(b(0,"div",27)(1,"h6"),I(2,"Tournament"),x(),ge(3,"hr",28),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),I(8,"Title"),x()(),ge(9,"input",30),x(),b(10,"div",3)(11,"div",4)(12,"label",31),I(13,"Description"),x()(),ge(14,"input",32),x()(),b(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),I(19,"Category"),x()(),ge(20,"input",34),x(),b(21,"div",3)(22,"div",4)(23,"label",35),I(24,"Max Num Score"),x()(),ge(25,"input",36),x()(),b(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),I(30,"Size"),x()(),ge(31,"input",38),x(),b(32,"div",3)(33,"div",4)(34,"label",39),I(35,"Max Size"),x()(),ge(36,"input",40),x()(),b(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),I(41,"Duration"),x()(),ge(42,"input",42),x(),b(43,"div",3)(44,"div",4)(45,"label",43),I(46,"Join Required"),x()(),ge(47,"input",44),x()(),b(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),I(52,"Start Time"),x()(),ge(53,"input",46),x(),b(54,"div",3)(55,"div",4)(56,"label",47),I(57,"End Time"),x()(),ge(58,"input",48),x()(),b(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),I(63,"Start Active"),x()(),ge(64,"input",50),x(),b(65,"div",3)(66,"div",4)(67,"label",51),I(68,"End Active"),x()(),ge(69,"input",52),x()()()),2&t){const e=j();w(9),k("value",e.leaderboard.title),w(5),k("value",e.leaderboard.description),w(6),k("value",e.leaderboard.category),w(5),k("value",e.leaderboard.max_num_score),w(6),k("value",e.leaderboard.size),w(5),k("value",e.leaderboard.max_size),w(6),k("value",e.leaderboard.duration),w(5),k("value",e.leaderboard.join_required),w(6),k("value",e.leaderboard.start_time),w(5),k("value",e.leaderboard.end_time),w(6),k("value",e.leaderboard.start_active),w(5),k("value",e.leaderboard.end_active)}}let ylt=(()=>{class t{constructor(e){K(this,"route",void 0),K(this,"editor",void 0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),K(this,"jsonEditor",void 0),K(this,"leaderboard",void 0),K(this,"error",""),this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mlt,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(e,i){1&e&&(J(0,glt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),I(6,"ID"),x()(),ge(7,"input",6),x(),b(8,"div",3)(9,"div",4)(10,"label",7),I(11,"Authoritative"),x()(),ge(12,"input",8),x()(),b(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),I(17,"Sort Order"),x()(),ge(18,"input",10),x(),b(19,"div",3)(20,"div",4)(21,"label",11),I(22,"Operator"),x()(),ge(23,"input",12),x()(),b(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),I(28,"Reset Schedule"),x()(),ge(29,"input",14),x(),b(30,"div",3)(31,"div",4)(32,"label",15),I(33,"Create Time"),x()(),ge(34,"input",16),x()(),b(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),I(39,"Prev Reset"),x()(),ge(40,"input",18),x(),b(41,"div",3)(42,"div",4)(43,"label",15),I(44,"Next Reset"),x()(),ge(45,"input",19),x()()(),J(46,vlt,70,12,"div",20),b(47,"div",21),ge(48,"div",22,23),x()),2&e&&(k("ngIf",i.error),w(7),k("value",i.leaderboard.id),w(5),k("value",i.leaderboard.authoritative),w(6),k("value",i.orderString[i.leaderboard.sort_order]),w(5),k("value",i.operatorString[i.leaderboard.operator]),w(6),k("value",i.leaderboard.reset_schedule),w(5),k("value",i.leaderboard.create_time),w(6),k("value",i.leaderboard.prev_reset),w(5),k("value",i.leaderboard.next_reset),w(1),k("ngIf",i.leaderboard.tournament))},dependencies:[gn,To],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})();function blt(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function _lt(t,n){1&t&&(b(0,"th",22),I(1,"Remove"),x())}function xlt(t,n){1&t&&(b(0,"tr")(1,"td",23),I(2,"No records found."),x()())}function wlt(t,n){1&t&&ge(0,"div",28)}function Clt(t,n){1&t&&ge(0,"div",29)}function klt(t,n){if(1&t){const e=vt();b(0,"td",30)(1,"button",31),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteRecord(r,s,a))}),I(2,"Delete"),x()()}}function Slt(t,n){if(1&t&&(b(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Dlt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=$e(e).index,s=j();return Be(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),J(3,wlt,1,0,"div",25),J(4,Clt,1,0,"div",26),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x(),b(16,"td"),I(17),x(),J(18,klt,3,0,"td",27),x(),J(19,Slt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.recordsMetadataOpen[e]),w(1),k("ngIf",r.recordsMetadataOpen[e]),w(1),xn(" ",i.owner_id," "),w(2),Dt(i.username),w(2),Dt(i.score),w(2),Dt(i.subscore),w(2),Dt(i.rank),w(2),Dt(i.num_score),w(2),Dt(i.expiry_time?i.expiry_time:"-"),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.recordsMetadataOpen[e])}}let Tlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"leaderboard",void 0),K(this,"records",[]),K(this,"recordsMetadataOpen",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),this.route=e,this.consoleService=i,this.authService=r}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,blt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadRecords(0)}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadRecords(-1)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadRecords(1)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),I(17,"Owner ID"),x(),b(18,"th"),I(19,"Username"),x(),b(20,"th",14),I(21,"Score"),x(),b(22,"th",14),I(23,"Subscore"),x(),b(24,"th",14),I(25,"Rank"),x(),b(26,"th",14),I(27,"No. of scores"),x(),b(28,"th",15),I(29,"Expiry Time"),x(),J(30,_lt,2,0,"th",16),x()(),b(31,"tbody"),J(32,xlt,3,0,"tr",17),J(33,Dlt,20,11,"ng-template",18),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.records.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(20),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.records.length),w(1),k("ngForOf",i.records))},dependencies:[jn,gn,To]})),t})(),Elt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Alt=["editor"],Mlt=["editorResponse"];function Ilt(t,n){if(1&t&&(b(0,"ngb-alert",23),ge(1,"img",24),b(2,"h6",25),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error whilst making RPC call: ",e.error,"")}}function Nlt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Fh("value",e.method),w(1),Dt(e.method)}}function Flt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Fh("value",e.method),w(1),Dt(e.method)}}let Olt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"editorResponse",void 0),K(this,"jsonEditor",void 0),K(this,"jsonEditorResponse",void 0),K(this,"error",""),K(this,"rpcEndpoints",[]),K(this,"endpoints",[]),K(this,"endpointCallForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Do.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0}}),this.jsonEditorResponse=new Zm({target:this.editorResponse.nativeElement,props:{mode:Jo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return void(this.error=o)}const i={user_id:this.f.user_id.value,body:e};let r=null;r=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,i):this.consoleService.callApiEndpoint("",this.f.method.value,i),r.subscribe(o=>{if(o.error_message&&""!==o.error_message)this.jsonEditorResponse.set({json:o.error_message});else{e="";try{e=JSON.stringify(JSON.parse(o.body),null,2)}catch(s){return void(this.error=s)}this.jsonEditorResponse.set({text:e})}},o=>{this.jsonEditorResponse.set({text:""}),this.error=o})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditor){if(!e||""===e)return this.jsonEditor.set({text:""}),void this.jsonEditor.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditor.set({text:i}),this.jsonEditor.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}else console.log("problem?")}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&(io(Alt,5),io(Mlt,5)),2&e){let r;cn(r=un())&&(i.editor=r.first),cn(r=un())&&(i.editorResponse=r.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"API Explorer"),x(),J(2,Ilt,4,2,"ngb-alert",1),b(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return i.sendRequest()}),b(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),I(11,"Select Endpoint"),x(),J(12,Nlt,2,2,"option",10),b(13,"option",11),I(14,"----"),x(),J(15,Flt,2,2,"option",10),x()(),ge(16,"input",12),b(17,"div",13)(18,"button",14),I(19,"Send Request"),x()()()()()()(),b(20,"div",15)(21,"div",16)(22,"h5"),I(23,"Request Body"),x(),ge(24,"hr",17),b(25,"div",18),ge(26,"div",19,20),x()(),b(28,"div",21)(29,"h5"),I(30,"Response"),x(),ge(31,"hr",17),b(32,"div",18),ge(33,"div",19,22),x()()()),2&e&&(w(2),k("ngIf",i.error),w(4),k("formGroup",i.endpointCallForm),w(4),k("value",""),w(2),k("ngForOf",i.rpcEndpoints),w(3),k("ngForOf",i.endpoints),w(3),k("disabled",i.f.method.invalid))},dependencies:[jn,gn,To,sl,xy,wy,Fa,ov,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})),t})(),jlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Plt(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Llt(t,n){1&t&&ge(0,"div",23)}function Rlt(t,n){1&t&&ge(0,"div",24)}function $lt(t,n){if(1&t&&(b(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),I(6,"Provider Response"),x()()(),b(7,"div")(8,"pre",28)(9,"small"),I(10),x()()()()()()),2&t){const e=j().$implicit;w(10),Dt(e.provider_response)}}function Blt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=$e(e).index,s=j();return Be(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),J(3,Llt,1,0,"div",20),J(4,Rlt,1,0,"div",21),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x()(),J(14,$lt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.purchasesRowsOpen[e]),w(1),k("ngIf",r.purchasesRowsOpen[e]),w(1),xn(" ",i.product_id," "),w(2),Dt(i.transaction_id),w(2),Dt(r.getStoreText(i.store)),w(2),Dt(i.purchase_time),w(2),Dt(i.create_time),w(1),k("ngIf",r.purchasesRowsOpen[e])}}function Vlt(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No purchases were found."),x()())}let Hlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"purchases",[]),K(this,"purchasesRowsOpen",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.purchases=e[0].validated_purchases,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listPurchases("",this.userID,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-purchases"]],decls:29,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"]],template:function(e,i){1&e&&(J(0,Plt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Create Time"),x()()(),b(26,"tbody"),J(27,Blt,15,8,"ng-template",14),J(28,Vlt,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.purchases.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(17),k("ngForOf",i.purchases),w(1),k("ngIf",0===i.purchases.length))},dependencies:[jn,gn,To]})),t})(),zlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listPurchases("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Ult(t,n){1&t&&(b(0,"span"),I(1,"Filter by type"),x())}function Glt(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeFilter)}}function Wlt(t,n){if(1&t){const e=vt();b(0,"button",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeFilter=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function qlt(t,n){if(1&t&&(b(0,"h6"),I(1),x()),2&t){const e=j();w(1),xn("Showing results for chat room label: ",e.f1.label.value,"")}}const Xlt=function(t){return["/groups",t]};function Ylt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for group ID: "),b(2,"a",41),I(3),x()()),2&t){const e=j();w(2),k("routerLink",lr(2,Xlt,e.route.snapshot.queryParamMap.get("group_id"))),w(1),Dt(e.f2.group_id.value)}}const Yme=function(t){return["/accounts",t]};function Jlt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for user IDs: "),b(2,"a",41),I(3),x(),I(4,", "),b(5,"a",41),I(6),x()()),2&t){const e=j();w(2),k("routerLink",lr(4,Yme,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),Dt(e.f3.user_id_one.value),w(2),k("routerLink",lr(6,Yme,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),Dt(e.f3.user_id_two.value)}}function Klt(t,n){if(1&t&&(b(0,"ngb-alert",42),ge(1,"img",43),b(2,"h6",44),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying messages: ",e.error,"")}}function Qlt(t,n){1&t&&(b(0,"th",45),I(1,"Remove"),x())}function Zlt(t,n){if(1&t&&(b(0,"tr")(1,"td",46),I(2,"No messages found."),x()()),2&t){const e=j();w(1),ht("colspan",e.deleteAllowed()?6:5)}}function ect(t,n){1&t&&ge(0,"div",55)}function tct(t,n){1&t&&ge(0,"div",56)}function nct(t,n){1&t&&ge(0,"td")}function ict(t,n){if(1&t){const e=vt();b(0,"td",57)(1,"button",58),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteMessage(r,s,a))}),I(2,"Delete"),x()()}}function rct(t,n){if(1&t&&(b(0,"tr",59)(1,"td"),I(2),x()()),2&t){const e=j().$implicit,i=j();w(1),ht("colspan",i.deleteAllowed()?6:5),w(1),xn(" ",e.content," ")}}function oct(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td",47),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",48),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",49)(8,"div",50),ye("click",function(){const o=$e(e).index,s=j();return Be(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),J(9,ect,1,0,"div",51),J(10,tct,1,0,"div",52),x(),I(11),x(),b(12,"td"),I(13),x(),J(14,nct,1,0,"td",3),J(15,ict,3,0,"td",53),x(),J(16,rct,3,2,"tr",54)}if(2&t){const e=n.$implicit,i=n.index,r=j();w(2),Dt(e.code),w(2),Dt(e.sender_id),w(2),Dt(e.username),w(3),k("ngIf",!r.messageStatesOpen[i]),w(1),k("ngIf",r.messageStatesOpen[i]),w(1),xn(" ",e.content," "),w(2),Dt(e.create_time),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),k("ngIf",r.messageStatesOpen[i])}}function sct(t,n){if(1&t&&(b(0,"ngb-alert",60),ge(1,"img",43),b(2,"h6",44),I(3,"Failed to delete data."),x(),b(4,"p",61),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.deleteError)}}function act(t,n){if(1&t){const e=vt();b(0,"ngb-alert",62),ye("close",function(){return $e(e),Be(j().deleteSuccess=!1)}),ge(1,"img",63),b(2,"h6",44),I(3),x()()}if(2&t){const e=j();k("dismissible",!0),w(3),Ld("",e.total_deleted," messages ",e.total_deleted>0?"successfully":""," deleted.")}}const lct=function(t){return{"is-invalid":t}};function cct(t,n){if(1&t){const e=vt();b(0,"div",64)(1,"h5",65),I(2,"Delete messages"),x(),b(3,"button",66),ye("click",function(){return Be($e(e).$implicit.dismiss())}),b(4,"span",67),I(5,"\xd7"),x()()(),b(6,"div",68)(7,"div",69)(8,"form",70)(9,"div",71)(10,"p")(11,"b"),I(12,"Choose how many days to retain: "),x(),ge(13,"input",72),x()(),ge(14,"input",73),x()()(),b(15,"div",74)(16,"button",75),ye("click",function(){return Be($e(e).$implicit.dismiss())}),I(17,"Cancel"),x(),b(18,"button",76),ye("click",function(){return Be($e(e).$implicit.close())}),I(19,"DELETE"),x()()}if(2&t){const e=j();w(8),k("formGroup",e.confirmDeleteForm),w(6),k("ngClass",lr(3,lct,e.f.delete.touched&&e.f.delete.invalid)),w(4),k("disabled",e.f.delete.invalid)}}function uct(t,n){if(1&t){const e=vt();b(0,"button",76),ye("click",function(){$e(e);const r=j(),o=uo(68);return Be(r.openDeleteDataModal(o))}),I(1,"Delete messages"),x()}2&t&&k("disabled",j().deleting)}let dct=(()=>{class t{constructor(e,i,r,o,s,a){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"modalService",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"messages",[]),K(this,"nextCursor",""),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"confirmDeleteForm",void 0),K(this,"deleteError",""),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"total_deleted",0),K(this,"activeFilter",""),K(this,"filters",["Chat Room","Group Chat","Direct Chat"]),K(this,"messageStatesOpen",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])],days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");let i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2==this.type||3==this.type||4==this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}deleteData(){this.deleteError="",this.deleting=!0;let e=new Date;e.setDate(e.getDate()-this.f.days.value),this.consoleService.deleteChannelMessages("",e.toISOString(),null).subscribe(i=>{this.total_deleted=Number(i.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const r=this.route.snapshot.queryParamMap;let o=r.get("type"),s=r.get("label");s||(s="0");let a=r.get("group_id"),l=r.get("user_id_one"),c=r.get("user_id_two"),u=r.get("cursor");u||(u=""),o&&this.updateMessages(Number(o),s,a,l,c,u)},i=>{this.deleting=!1,this.deleteError=i})}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl),le(H3))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:70,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["confirmDelete",""],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],[1,"mt-2"],["type","number","value","30","min","0","formControlName","days",2,"width","80px"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Chat Messages"),x(),b(2,"div",1)(3,"button",2),J(4,Ult,2,0,"span",3),J(5,Glt,2,1,"span",3),x(),b(6,"div",4),J(7,Wlt,2,1,"button",5),x()(),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ge(13,"input",11),b(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return i.type=2,i.search(0)}),I(17,"Search"),x()()()()(),b(18,"form",9)(19,"div",10),ge(20,"input",15),b(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return i.type=3,i.search(0)}),I(24,"Search "),x()()()()(),b(25,"form",9)(26,"div",10),ge(27,"input",16),b(28,"div",12)(29,"span",17),ye("click",function(){return i.f3.user_id_one.setValue(i.systemUserId)}),ge(30,"img",18),x()(),ge(31,"input",19),b(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return i.type=4,i.search(0)}),I(35,"Search "),x()()()()()(),b(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return i.search(0)}),ge(39,"img",23),x(),b(40,"button",22),ye("click",function(){return i.search(1)}),ge(41,"img",24),x()()()()(),J(42,qlt,2,1,"h6",3),J(43,Ylt,4,4,"h6",3),J(44,Jlt,7,8,"h6",3),J(45,Klt,4,2,"ngb-alert",25),b(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),I(51,"Code"),x(),b(52,"th",30),I(53,"Sender ID"),x(),b(54,"th",31),I(55,"Username"),x(),b(56,"th"),I(57,"Content"),x(),b(58,"th",32),I(59,"Create Time"),x(),J(60,Qlt,2,0,"th",33),x()(),b(61,"tbody"),J(62,Zlt,3,1,"tr",3),J(63,oct,17,10,"ng-template",34),x()()(),J(64,sct,6,2,"ngb-alert",35),J(65,act,4,3,"ngb-alert",36),b(66,"div",37),J(67,cct,20,5,"ng-template",null,38,Ur),J(69,uct,2,1,"button",39),x()),2&e&&(w(4),k("ngIf",!i.activeFilter||""===i.activeFilter),w(1),k("ngIf",i.activeFilter&&""!==i.activeFilter),w(2),k("ngForOf",i.filters),w(4),k("hidden","Chat Room"!==i.activeFilter)("formGroup",i.searchForm1),w(7),k("hidden","Group Chat"!==i.activeFilter)("formGroup",i.searchForm2),w(7),k("hidden","Direct Chat"!==i.activeFilter)("formGroup",i.searchForm3),w(13),k("disabled",0===i.messages.length),w(2),k("disabled",""===i.nextCursor||null===i.nextCursor),w(2),k("ngIf",0!=i.messages.length&&""===i.error&&2==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&3==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&4==i.type),w(1),k("ngIf",i.error),w(15),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.messages.length),w(1),k("ngForOf",i.messages),w(1),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(4),k("ngIf",i.deleteMessagesAllowed()))},dependencies:[Nu,Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Fa,c3,rl,ol,p3,fa,ja],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})),t})(),hct=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));default:return $n(null)}}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function fct(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function pct(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),I(6),x(),b(7,"td"),I(8),x(),b(9,"td"),I(10),x(),b(11,"td"),I(12),x()()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.product_id),w(2),Dt(e.original_transaction_id),w(2),Dt(i.getStoreText(e.store)),w(2),Dt(e.purchase_time),w(2),Dt(e.expiry_time),w(2),Dt(e.create_time)}}function mct(t,n){1&t&&(b(0,"tr")(1,"td",19),I(2,"No purchases were found."),x()())}const gct=[{path:"",component:yFe,canActivate:[tMe],canActivateChild:[bFe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:rBe,resolve:[oBe]},{path:"config",component:OBe,resolve:[jBe]},{path:"users",component:BBe,resolve:[VBe]},{path:"modules",component:t7e,resolve:[n7e]},{path:"storage",component:d7e,resolve:[h7e,f7e],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Cot,resolve:[kot],pathMatch:"full"},{path:"leaderboards",component:Oot,resolve:[jot]},{path:"leaderboards/:id",component:flt,resolve:[plt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:ylt,resolve:[]},{path:"records",component:Tlt,resolve:[Elt]}]},{path:"matches",component:zat,resolve:[Uat,Gat]},{path:"groups",component:Qat,resolve:[Zat]},{path:"groups/:id",component:slt,resolve:[alt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:iat,resolve:[]},{path:"members",component:Cat,resolve:[kat],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Hot,resolve:[zot]},{path:"accounts/:id",component:nst,resolve:[ist],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:cst,resolve:[]},{path:"authentication",component:pst,resolve:[]},{path:"wallet",component:Dst,resolve:[Tst]},{path:"friends",component:Lst,resolve:[Rst]},{path:"groups",component:Yst,resolve:[Jst]},{path:"purchases",component:Hlt,resolve:[zlt]},{path:"subscriptions",component:(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"subscriptions",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.subscriptions=e[0].validated_subscriptions,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listSubscriptions("",this.userID,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-subscriptions"]],decls:31,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colspan","6",1,"text-muted"]],template:function(e,i){1&e&&(J(0,fct,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Original Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Expiry Time"),x(),b(26,"th",13),I(27,"Create Time"),x()()(),b(28,"tbody"),J(29,pct,13,6,"ng-template",14),J(30,mct,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.subscriptions.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(19),k("ngForOf",i.subscriptions),w(1),k("ngIf",0===i.subscriptions.length))},dependencies:[jn,gn,To]})),t})(),resolve:[(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listSubscriptions("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})()]}]},{path:"apiexplorer",component:Olt,resolve:[jlt]},{path:"chat",component:dct,resolve:[hct]}]},{path:"login",component:ZAe,canActivate:[eMe]},{path:"**",redirectTo:""}];let vct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t})),K(t,"\u0275inj",Ci({imports:[J9.forRoot(gct,{useHash:!0}),J9]})),t})(),yct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp]})),t})();new class kct extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Dct=1;const Tct=Promise.resolve(),YD={};function Jme(t){return t in YD&&(delete YD[t],!0)}const Kme={setImmediate(t){const n=Dct++;return YD[n]=!0,Tct.then(()=>Jme(n)&&t()),n},clearImmediate(t){Jme(t)}};new class Act extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=Kme.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(Kme.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const Cs={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};Cs[Cs.Tab]="Tab",Cs[Cs.Enter]="Enter",Cs[Cs.Esc]="Esc",Cs[Cs.Space]="Space",Cs[Cs.ArrowUp]="ArrowUp",Cs[Cs.ArrowDown]="ArrowDown",Cs[Cs.Backspace]="Backspace";const ige=new zn("ng-select-selection-model");class jut{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}const Put=function Out(){return new jut};let Lut=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:ige,useValue:Put}],imports:[Vs]}),t})(),Rut=(()=>{class t{constructor(e){K(this,"authenticationService",void 0),this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),$ut=(()=>{class t{constructor(e,i){K(this,"authenticationService",void 0),K(this,"router",void 0),this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ul(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),qp(r.error.message||r.statusText))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),But=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t,bootstrap:[yct]})),K(t,"\u0275inj",Ci({providers:[JAe,Iz,{provide:C3,useValue:{host:document.location.origin,timeout:15e3}},{provide:x3,useClass:Rut,multi:!0},{provide:x3,useClass:$ut,multi:!0}],imports:[pBe,vct,qA,SSe,qAe,cFe,L$e,SAe.forRoot({apiKey:"",debug:!1,loadOnInitialization:!1}),DSe,wAe,ZV,Lut]})),t})();g2e().bootstrapModule(But).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Tn)=>{"use strict";Tn.byteLength=function Ve(T){var O=et(T),Me=O[1];return 3*(O[0]+Me)/4-Me},Tn.toByteArray=function se(T){var O,wn,te=et(T),Me=te[0],Je=te[1],kt=new Oe(function ve(T,O,te){return 3*(O+te)/4-te}(0,Me,Je)),jt=0,Wt=Je>0?Me-4:Me;for(wn=0;wn>16&255,kt[jt++]=O>>8&255,kt[jt++]=255&O;return 2===Je&&(O=rt[T.charCodeAt(wn)]<<2|rt[T.charCodeAt(wn+1)]>>4,kt[jt++]=255&O),1===Je&&(O=rt[T.charCodeAt(wn)]<<10|rt[T.charCodeAt(wn+1)]<<4|rt[T.charCodeAt(wn+2)]>>2,kt[jt++]=O>>8&255,kt[jt++]=255&O),kt},Tn.fromByteArray=function D(T){for(var O,te=T.length,Me=te%3,Je=[],jt=0,Wt=te-Me;jtWt?Wt:jt+16383));return 1===Me?Je.push(De[(O=T[te-1])>>2]+De[O<<4&63]+"=="):2===Me&&Je.push(De[(O=(T[te-2]<<8)+T[te-1])>>10]+De[O>>4&63]+De[O<<2&63]+"="),Je.join("")};for(var De=[],rt=[],Oe=typeof Uint8Array<"u"?Uint8Array:Array,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=0,_e=dt.length;Ge<_e;++Ge)De[Ge]=dt[Ge],rt[dt.charCodeAt(Ge)]=Ge;function et(T){var O=T.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var te=T.indexOf("=");return-1===te&&(te=O),[te,te===O?0:4-te%4]}function ue(T){return De[T>>18&63]+De[T>>12&63]+De[T>>6&63]+De[63&T]}function ae(T,O,te){for(var Je=[],kt=O;kt{"use strict";var Oe=De(343),dt=De(461),Ge="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Tn.lW=ve,Tn.h2=50;var _e=2147483647;function Ve(Te){if(Te>_e)throw new RangeError('The value "'+Te+'" is invalid for option "size"');var W=new Uint8Array(Te);return Object.setPrototypeOf(W,ve.prototype),W}function ve(Te,W,ee){if("number"==typeof Te){if("string"==typeof W)throw new TypeError('The "string" argument must be of type string. Received type number');return D(Te)}return se(Te,W,ee)}function se(Te,W,ee){if("string"==typeof Te)return function T(Te,W){if(("string"!=typeof W||""===W)&&(W="utf8"),!ve.isEncoding(W))throw new TypeError("Unknown encoding: "+W);var ee=0|Wt(Te,W),Fe=Ve(ee),nt=Fe.write(Te,W);return nt!==ee&&(Fe=Fe.slice(0,nt)),Fe}(Te,W);if(ArrayBuffer.isView(Te))return function te(Te){if(da(Te,Uint8Array)){var W=new Uint8Array(Te);return Me(W.buffer,W.byteOffset,W.byteLength)}return O(Te)}(Te);if(null==Te)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te);if(da(Te,ArrayBuffer)||Te&&da(Te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(da(Te,SharedArrayBuffer)||Te&&da(Te.buffer,SharedArrayBuffer)))return Me(Te,W,ee);if("number"==typeof Te)throw new TypeError('The "value" argument must not be of type number. Received type number');var Fe=Te.valueOf&&Te.valueOf();if(null!=Fe&&Fe!==Te)return ve.from(Fe,W,ee);var nt=function Je(Te){if(ve.isBuffer(Te)){var W=0|kt(Te.length),ee=Ve(W);return 0===ee.length||Te.copy(ee,0,0,W),ee}return void 0!==Te.length?"number"!=typeof Te.length||co(Te.length)?Ve(0):O(Te):"Buffer"===Te.type&&Array.isArray(Te.data)?O(Te.data):void 0}(Te);if(nt)return nt;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Te[Symbol.toPrimitive])return ve.from(Te[Symbol.toPrimitive]("string"),W,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te)}function ue(Te){if("number"!=typeof Te)throw new TypeError('"size" argument must be of type number');if(Te<0)throw new RangeError('The value "'+Te+'" is invalid for option "size"')}function D(Te){return ue(Te),Ve(Te<0?0:0|kt(Te))}function O(Te){for(var W=Te.length<0?0:0|kt(Te.length),ee=Ve(W),Fe=0;Fe=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return 0|Te}function Wt(Te,W){if(ve.isBuffer(Te))return Te.length;if(ArrayBuffer.isView(Te)||da(Te,ArrayBuffer))return Te.byteLength;if("string"!=typeof Te)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Te);var ee=Te.length,Fe=arguments.length>2&&!0===arguments[2];if(!Fe&&0===ee)return 0;for(var nt=!1;;)switch(W){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return Fc(Te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return vu(Te).length;default:if(nt)return Fe?-1:Fc(Te).length;W=(""+W).toLowerCase(),nt=!0}}function wn(Te,W,ee){var Fe=!1;if((void 0===W||W<0)&&(W=0),W>this.length||((void 0===ee||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(W>>>=0))return"";for(Te||(Te="utf8");;)switch(Te){case"hex":return gu(this,W,ee);case"utf8":case"utf-8":return yn(this,W,ee);case"ascii":return Kn(this,W,ee);case"latin1":case"binary":return Nc(this,W,ee);case"base64":return Sa(this,W,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ro(this,W,ee);default:if(Fe)throw new TypeError("Unknown encoding: "+Te);Te=(Te+"").toLowerCase(),Fe=!0}}function rn(Te,W,ee){var Fe=Te[W];Te[W]=Te[ee],Te[ee]=Fe}function Mi(Te,W,ee,Fe,nt){if(0===Te.length)return-1;if("string"==typeof ee?(Fe=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),co(ee=+ee)&&(ee=nt?0:Te.length-1),ee<0&&(ee=Te.length+ee),ee>=Te.length){if(nt)return-1;ee=Te.length-1}else if(ee<0){if(!nt)return-1;ee=0}if("string"==typeof W&&(W=ve.from(W,Fe)),ve.isBuffer(W))return 0===W.length?-1:zr(Te,W,ee,Fe,nt);if("number"==typeof W)return W&=255,"function"==typeof Uint8Array.prototype.indexOf?nt?Uint8Array.prototype.indexOf.call(Te,W,ee):Uint8Array.prototype.lastIndexOf.call(Te,W,ee):zr(Te,[W],ee,Fe,nt);throw new TypeError("val must be string, number or Buffer")}function zr(Te,W,ee,Fe,nt){var st,zt=1,Qt=Te.length,nr=W.length;if(void 0!==Fe&&("ucs2"===(Fe=String(Fe).toLowerCase())||"ucs-2"===Fe||"utf16le"===Fe||"utf-16le"===Fe)){if(Te.length<2||W.length<2)return-1;zt=2,Qt/=2,nr/=2,ee/=2}function A(mn,pe){return 1===zt?mn[pe]:mn.readUInt16BE(pe*zt)}if(nt){var Tt=-1;for(st=ee;stQt&&(ee=Qt-nr),st=ee;st>=0;st--){for(var Ut=!0,Vt=0;Vtnt&&(Fe=nt):Fe=nt;var zt=W.length;Fe>zt/2&&(Fe=zt/2);for(var Qt=0;Qt>8,zt.push(ee%256),zt.push(Fe);return zt}(W,Te.length-ee),Te,ee,Fe)}function Sa(Te,W,ee){return Oe.fromByteArray(0===W&&ee===Te.length?Te:Te.slice(W,ee))}function yn(Te,W,ee){ee=Math.min(Te.length,ee);for(var Fe=[],nt=W;nt239?4:zt>223?3:zt>191?2:1;if(nt+nr<=ee)switch(nr){case 1:zt<128&&(Qt=zt);break;case 2:128==(192&(A=Te[nt+1]))&&(Ut=(31&zt)<<6|63&A)>127&&(Qt=Ut);break;case 3:st=Te[nt+2],128==(192&(A=Te[nt+1]))&&128==(192&st)&&(Ut=(15&zt)<<12|(63&A)<<6|63&st)>2047&&(Ut<55296||Ut>57343)&&(Qt=Ut);break;case 4:st=Te[nt+2],Tt=Te[nt+3],128==(192&(A=Te[nt+1]))&&128==(192&st)&&128==(192&Tt)&&(Ut=(15&zt)<<18|(63&A)<<12|(63&st)<<6|63&Tt)>65535&&Ut<1114112&&(Qt=Ut)}null===Qt?(Qt=65533,nr=1):Qt>65535&&(Fe.push((Qt-=65536)>>>10&1023|55296),Qt=56320|1023&Qt),Fe.push(Qt),nt+=nr}return function kd(Te){var W=Te.length;if(W<=Cd)return String.fromCharCode.apply(String,Te);for(var ee="",Fe=0;Fent.length?ve.from(Qt).copy(nt,zt):Uint8Array.prototype.set.call(nt,Qt,zt);else{if(!ve.isBuffer(Qt))throw new TypeError('"list" argument must be an Array of Buffers');Qt.copy(nt,zt)}zt+=Qt.length}return nt},ve.byteLength=Wt,ve.prototype._isBuffer=!0,ve.prototype.swap16=function(){var W=this.length;if(W%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ee=0;eeee&&(W+=" ... "),""},Ge&&(ve.prototype[Ge]=ve.prototype.inspect),ve.prototype.compare=function(W,ee,Fe,nt,zt){if(da(W,Uint8Array)&&(W=ve.from(W,W.offset,W.byteLength)),!ve.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(void 0===ee&&(ee=0),void 0===Fe&&(Fe=W?W.length:0),void 0===nt&&(nt=0),void 0===zt&&(zt=this.length),ee<0||Fe>W.length||nt<0||zt>this.length)throw new RangeError("out of range index");if(nt>=zt&&ee>=Fe)return 0;if(nt>=zt)return-1;if(ee>=Fe)return 1;if(this===W)return 0;for(var Qt=(zt>>>=0)-(nt>>>=0),nr=(Fe>>>=0)-(ee>>>=0),A=Math.min(Qt,nr),st=this.slice(nt,zt),Tt=W.slice(ee,Fe),Ut=0;Ut>>=0,isFinite(Fe)?(Fe>>>=0,void 0===nt&&(nt="utf8")):(nt=Fe,Fe=void 0)}var zt=this.length-ee;if((void 0===Fe||Fe>zt)&&(Fe=zt),W.length>0&&(Fe<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");nt||(nt="utf8");for(var Qt=!1;;)switch(nt){case"hex":return Xr(this,W,ee,Fe);case"utf8":case"utf-8":return hs(this,W,ee,Fe);case"ascii":case"latin1":case"binary":return Ya(this,W,ee,Fe);case"base64":return tr(this,W,ee,Fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mu(this,W,ee,Fe);default:if(Qt)throw new TypeError("Unknown encoding: "+nt);nt=(""+nt).toLowerCase(),Qt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(Te,W,ee){var Fe="";ee=Math.min(Te.length,ee);for(var nt=W;ntFe)&&(ee=Fe);for(var nt="",zt=W;ztee)throw new RangeError("Trying to access beyond buffer length")}function lo(Te,W,ee,Fe,nt,zt){if(!ve.isBuffer(Te))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>nt||WTe.length)throw new RangeError("Index out of range")}function Da(Te,W,ee,Fe,nt,zt){if(ee+Fe>Te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Zr(Te,W,ee,Fe,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,4),dt.write(Te,W,ee,Fe,23,4),ee+4}function pl(Te,W,ee,Fe,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,8),dt.write(Te,W,ee,Fe,52,8),ee+8}ve.prototype.slice=function(W,ee){var Fe=this.length;(W=~~W)<0?(W+=Fe)<0&&(W=0):W>Fe&&(W=Fe),(ee=void 0===ee?Fe:~~ee)<0?(ee+=Fe)<0&&(ee=0):ee>Fe&&(ee=Fe),ee>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W+--ee],zt=1;ee>0&&(zt*=256);)nt+=this[W+--ee]*zt;return nt},ve.prototype.readUint8=ve.prototype.readUInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),this[W]},ve.prototype.readUint16LE=ve.prototype.readUInt16LE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]|this[W+1]<<8},ve.prototype.readUint16BE=ve.prototype.readUInt16BE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]<<8|this[W+1]},ve.prototype.readUint32LE=ve.prototype.readUInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+16777216*this[W+3]},ve.prototype.readUint32BE=ve.prototype.readUInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),16777216*this[W]+(this[W+1]<<16|this[W+2]<<8|this[W+3])},ve.prototype.readIntLE=function(W,ee,Fe){W>>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt=(zt*=128)&&(nt-=Math.pow(2,8*ee)),nt},ve.prototype.readIntBE=function(W,ee,Fe){W>>>=0,ee>>>=0,Fe||Co(W,ee,this.length);for(var nt=ee,zt=1,Qt=this[W+--nt];nt>0&&(zt*=256);)Qt+=this[W+--nt]*zt;return Qt>=(zt*=128)&&(Qt-=Math.pow(2,8*ee)),Qt},ve.prototype.readInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),128&this[W]?-1*(255-this[W]+1):this[W]},ve.prototype.readInt16LE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Fe=this[W]|this[W+1]<<8;return 32768&Fe?4294901760|Fe:Fe},ve.prototype.readInt16BE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Fe=this[W+1]|this[W]<<8;return 32768&Fe?4294901760|Fe:Fe},ve.prototype.readInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},ve.prototype.readInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},ve.prototype.readFloatLE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!0,23,4)},ve.prototype.readFloatBE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!1,23,4)},ve.prototype.readDoubleLE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!0,52,8)},ve.prototype.readDoubleBE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!1,52,8)},ve.prototype.writeUintLE=ve.prototype.writeUIntLE=function(W,ee,Fe,nt){W=+W,ee>>>=0,Fe>>>=0,nt||lo(this,W,ee,Fe,Math.pow(2,8*Fe)-1,0);var Qt=1,nr=0;for(this[ee]=255&W;++nr>>=0,Fe>>>=0,nt||lo(this,W,ee,Fe,Math.pow(2,8*Fe)-1,0);var Qt=Fe-1,nr=1;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)this[ee+Qt]=W/nr&255;return ee+Fe},ve.prototype.writeUint8=ve.prototype.writeUInt8=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,1,255,0),this[ee]=255&W,ee+1},ve.prototype.writeUint16LE=ve.prototype.writeUInt16LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,65535,0),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeUint16BE=ve.prototype.writeUInt16BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,65535,0),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeUint32LE=ve.prototype.writeUInt32LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,4294967295,0),this[ee+3]=W>>>24,this[ee+2]=W>>>16,this[ee+1]=W>>>8,this[ee]=255&W,ee+4},ve.prototype.writeUint32BE=ve.prototype.writeUInt32BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,4294967295,0),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeIntLE=function(W,ee,Fe,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Fe-1);lo(this,W,ee,Fe,zt-1,-zt)}var Qt=0,nr=1,A=0;for(this[ee]=255&W;++Qt>0)-A&255;return ee+Fe},ve.prototype.writeIntBE=function(W,ee,Fe,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Fe-1);lo(this,W,ee,Fe,zt-1,-zt)}var Qt=Fe-1,nr=1,A=0;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)W<0&&0===A&&0!==this[ee+Qt+1]&&(A=1),this[ee+Qt]=(W/nr>>0)-A&255;return ee+Fe},ve.prototype.writeInt8=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,1,127,-128),W<0&&(W=255+W+1),this[ee]=255&W,ee+1},ve.prototype.writeInt16LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,32767,-32768),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeInt16BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,2,32767,-32768),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeInt32LE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,2147483647,-2147483648),this[ee]=255&W,this[ee+1]=W>>>8,this[ee+2]=W>>>16,this[ee+3]=W>>>24,ee+4},ve.prototype.writeInt32BE=function(W,ee,Fe){return W=+W,ee>>>=0,Fe||lo(this,W,ee,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeFloatLE=function(W,ee,Fe){return Zr(this,W,ee,!0,Fe)},ve.prototype.writeFloatBE=function(W,ee,Fe){return Zr(this,W,ee,!1,Fe)},ve.prototype.writeDoubleLE=function(W,ee,Fe){return pl(this,W,ee,!0,Fe)},ve.prototype.writeDoubleBE=function(W,ee,Fe){return pl(this,W,ee,!1,Fe)},ve.prototype.copy=function(W,ee,Fe,nt){if(!ve.isBuffer(W))throw new TypeError("argument should be a Buffer");if(Fe||(Fe=0),!nt&&0!==nt&&(nt=this.length),ee>=W.length&&(ee=W.length),ee||(ee=0),nt>0&&nt=this.length)throw new RangeError("Index out of range");if(nt<0)throw new RangeError("sourceEnd out of bounds");nt>this.length&&(nt=this.length),W.length-ee>>=0,Fe=void 0===Fe?this.length:Fe>>>0,W||(W=0),"number"==typeof W)for(Qt=ee;Qt55295&&ee<57344){if(!nt){if(ee>56319){(W-=3)>-1&&zt.push(239,191,189);continue}if(Qt+1===Fe){(W-=3)>-1&&zt.push(239,191,189);continue}nt=ee;continue}if(ee<56320){(W-=3)>-1&&zt.push(239,191,189),nt=ee;continue}ee=65536+(nt-55296<<10|ee-56320)}else nt&&(W-=3)>-1&&zt.push(239,191,189);if(nt=null,ee<128){if((W-=1)<0)break;zt.push(ee)}else if(ee<2048){if((W-=2)<0)break;zt.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((W-=3)<0)break;zt.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;zt.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return zt}function vu(Te){return Oe.toByteArray(function Sd(Te){if((Te=(Te=Te.split("=")[0]).trim().replace(nc,"")).length<2)return"";for(;Te.length%4!=0;)Te+="=";return Te}(Te))}function Ja(Te,W,ee,Fe){for(var nt=0;nt=W.length||nt>=Te.length);++nt)W[nt+ee]=Te[nt];return nt}function da(Te,W){return Te instanceof W||null!=Te&&null!=Te.constructor&&null!=Te.constructor.name&&Te.constructor.name===W.name}function co(Te){return Te!=Te}var ml=function(){for(var Te="0123456789abcdef",W=new Array(256),ee=0;ee<16;++ee)for(var Fe=16*ee,nt=0;nt<16;++nt)W[Fe+nt]=Te[ee]+Te[nt];return W}()},797:function(Yt){Yt.exports=function(Tn){var De={};function rt(Oe){if(De[Oe])return De[Oe].exports;var dt=De[Oe]={exports:{},id:Oe,loaded:!1};return Tn[Oe].call(dt.exports,dt,dt.exports,rt),dt.loaded=!0,dt.exports}return rt.m=Tn,rt.c=De,rt.p="",rt(0)}([function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(1),dt=rt(3),Ge=rt(8),_e=rt(15);function et(ae,D,T){var O=null,te=function(Mi,zr){T&&T(Mi,zr),O&&O.visit(Mi,zr)},Me="function"==typeof T?te:null,Je=!1;if(D){var kt="boolean"==typeof D.attachComment&&D.attachComment;((Je="boolean"==typeof D.comment&&D.comment)||kt)&&((O=new Oe.CommentHandler).attach=kt,D.comment=!0,Me=te)}var Wt,jt=!1;D&&"string"==typeof D.sourceType&&(jt="module"===D.sourceType),Wt=D&&"boolean"==typeof D.jsx&&D.jsx?new dt.JSXParser(ae,D,Me):new Ge.Parser(ae,D,Me);var rn=jt?Wt.parseModule():Wt.parseScript();return Je&&O&&(rn.comments=O.comments),Wt.config.tokens&&(rn.tokens=Wt.tokens),Wt.config.tolerant&&(rn.errors=Wt.errorHandler.errors),rn}De.parse=et,De.parseModule=function Ve(ae,D,T){var O=D||{};return O.sourceType="module",et(ae,O,T)},De.parseScript=function ve(ae,D,T){var O=D||{};return O.sourceType="script",et(ae,O,T)},De.tokenize=function se(ae,D,T){var te,O=new _e.Tokenizer(ae,D);te=[];try{for(;;){var Me=O.getNextToken();if(!Me)break;T&&(Me=T(Me)),te.push(Me)}}catch(Je){O.errorHandler.tolerate(Je)}return O.errorHandler.tolerant&&(te.errors=O.errors()),te};var ue=rt(2);De.Syntax=ue.Syntax,De.version="4.0.1"},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2),dt=function(){function Ge(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return Ge.prototype.insertInnerComments=function(_e,et){if(_e.type===Oe.Syntax.BlockStatement&&0===_e.body.length){for(var Ve=[],ve=this.leading.length-1;ve>=0;--ve){var se=this.leading[ve];et.end.offset>=se.start&&(Ve.unshift(se.comment),this.leading.splice(ve,1),this.trailing.splice(ve,1))}Ve.length&&(_e.innerComments=Ve)}},Ge.prototype.findTrailingComments=function(_e){var et=[];if(this.trailing.length>0){for(var Ve=this.trailing.length-1;Ve>=0;--Ve){var ve=this.trailing[Ve];ve.start>=_e.end.offset&&et.unshift(ve.comment)}return this.trailing.length=0,et}var se=this.stack[this.stack.length-1];if(se&&se.node.trailingComments){var ue=se.node.trailingComments[0];ue&&ue.range[0]>=_e.end.offset&&(et=se.node.trailingComments,delete se.node.trailingComments)}return et},Ge.prototype.findLeadingComments=function(_e){for(var Ve,et=[];this.stack.length>0&&(ve=this.stack[this.stack.length-1])&&ve.start>=_e.start.offset;)Ve=ve.node,this.stack.pop();if(Ve){for(var ue=(Ve.leadingComments?Ve.leadingComments.length:0)-1;ue>=0;--ue){var ae=Ve.leadingComments[ue];ae.range[1]<=_e.start.offset&&(et.unshift(ae),Ve.leadingComments.splice(ue,1))}return Ve.leadingComments&&0===Ve.leadingComments.length&&delete Ve.leadingComments,et}for(ue=this.leading.length-1;ue>=0;--ue){var ve;(ve=this.leading[ue]).start<=_e.start.offset&&(et.unshift(ve.comment),this.leading.splice(ue,1))}return et},Ge.prototype.visitNode=function(_e,et){if(!(_e.type===Oe.Syntax.Program&&_e.body.length>0)){this.insertInnerComments(_e,et);var Ve=this.findTrailingComments(et),ve=this.findLeadingComments(et);ve.length>0&&(_e.leadingComments=ve),Ve.length>0&&(_e.trailingComments=Ve),this.stack.push({node:_e,start:et.start.offset})}},Ge.prototype.visitComment=function(_e,et){var Ve="L"===_e.type[0]?"Line":"Block",ve={type:Ve,value:_e.value};if(_e.range&&(ve.range=_e.range),_e.loc&&(ve.loc=_e.loc),this.comments.push(ve),this.attach){var se={comment:{type:Ve,value:_e.value,range:[et.start.offset,et.end.offset]},start:et.start.offset};_e.loc&&(se.comment.loc=_e.loc),_e.type=Ve,this.leading.push(se),this.trailing.push(se)}},Ge.prototype.visit=function(_e,et){"LineComment"===_e.type||"BlockComment"===_e.type?this.visitComment(_e,et):this.attach&&this.visitNode(_e,et)},Ge}();De.CommentHandler=dt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Tn,De,rt){"use strict";var D,Oe=this&&this.__extends||(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,O){T.__proto__=O}||function(T,O){for(var te in O)O.hasOwnProperty(te)&&(T[te]=O[te])},function(T,O){function te(){this.constructor=T}D(T,O),T.prototype=null===O?Object.create(O):(te.prototype=O.prototype,new te)});Object.defineProperty(De,"__esModule",{value:!0});var dt=rt(4),Ge=rt(5),_e=rt(6),et=rt(7),Ve=rt(8),ve=rt(13),se=rt(14);function ue(D){var T;switch(D.type){case _e.JSXSyntax.JSXIdentifier:T=D.name;break;case _e.JSXSyntax.JSXNamespacedName:var te=D;T=ue(te.namespace)+":"+ue(te.name);break;case _e.JSXSyntax.JSXMemberExpression:var Me=D;T=ue(Me.object)+"."+ue(Me.property)}return T}ve.TokenName[100]="JSXIdentifier",ve.TokenName[101]="JSXText";var ae=function(D){function T(O,te,Me){return D.call(this,O,te,Me)||this}return Oe(T,D),T.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():D.prototype.parsePrimaryExpression.call(this)},T.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},T.prototype.finishJSX=function(){this.nextToken()},T.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},T.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.scanXHTMLEntity=function(O){for(var te="&",Me=!0,Je=!1,kt=!1,jt=!1;!this.scanner.eof()&&Me&&!Je;){var Wt=this.scanner.source[this.scanner.index];if(Wt===O)break;if(Je=";"===Wt,te+=Wt,++this.scanner.index,!Je)switch(te.length){case 2:kt="#"===Wt;break;case 3:kt&&(Me=(jt="x"===Wt)||dt.Character.isDecimalDigit(Wt.charCodeAt(0)),kt=kt&&!jt);break;default:Me=(Me=Me&&!(kt&&!dt.Character.isDecimalDigit(Wt.charCodeAt(0))))&&!(jt&&!dt.Character.isHexDigit(Wt.charCodeAt(0)))}}if(Me&&Je&&te.length>2){var wn=te.substr(1,te.length-2);kt&&wn.length>1?te=String.fromCharCode(parseInt(wn.substr(1),10)):jt&&wn.length>2?te=String.fromCharCode(parseInt("0"+wn.substr(1),16)):!kt&&!jt&&se.XHTMLEntities[wn]&&(te=se.XHTMLEntities[wn])}return te},T.prototype.lexJSX=function(){var O=this.scanner.source.charCodeAt(this.scanner.index);if(60===O||62===O||47===O||58===O||61===O||123===O||125===O)return{type:7,value:te=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===O||39===O){for(var Me=this.scanner.index,Je=this.scanner.source[this.scanner.index++],kt="";!this.scanner.eof()&&(jt=this.scanner.source[this.scanner.index++])!==Je;)kt+="&"===jt?this.scanXHTMLEntity(Je):jt;return{type:8,value:kt,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(46===O){var te,Wt=this.scanner.source.charCodeAt(this.scanner.index+1),wn=this.scanner.source.charCodeAt(this.scanner.index+2);return Me=this.scanner.index,this.scanner.index+=(te=46===Wt&&46===wn?"...":".").length,{type:7,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(96===O)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(dt.Character.isIdentifierStart(O)&&92!==O){for(Me=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var jt=this.scanner.source.charCodeAt(this.scanner.index);if(dt.Character.isIdentifierPart(jt)&&92!==jt)++this.scanner.index;else{if(45!==jt)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Me,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}return this.scanner.lex()},T.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var O=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(O)),O},T.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var O=this.scanner.index,te="";!this.scanner.eof();){var Me=this.scanner.source[this.scanner.index];if("{"===Me||"<"===Me)break;++this.scanner.index,te+=Me,dt.Character.isLineTerminator(Me.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Me&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:O,end:this.scanner.index};return te.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},T.prototype.peekJSXToken=function(){var O=this.scanner.saveState();this.scanner.scanComments();var te=this.lexJSX();return this.scanner.restoreState(O),te},T.prototype.expectJSX=function(O){var te=this.nextJSXToken();(7!==te.type||te.value!==O)&&this.throwUnexpectedToken(te)},T.prototype.matchJSX=function(O){var te=this.peekJSXToken();return 7===te.type&&te.value===O},T.prototype.parseJSXIdentifier=function(){var O=this.createJSXNode(),te=this.nextJSXToken();return 100!==te.type&&this.throwUnexpectedToken(te),this.finalize(O,new Ge.JSXIdentifier(te.value))},T.prototype.parseJSXElementName=function(){var O=this.createJSXNode(),te=this.parseJSXIdentifier();if(this.matchJSX(":")){var Me=te;this.expectJSX(":");var Je=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Me,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var kt=te;this.expectJSX(".");var jt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXMemberExpression(kt,jt))}return te},T.prototype.parseJSXAttributeName=function(){var te,O=this.createJSXNode(),Me=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Me;this.expectJSX(":");var kt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Je,kt))}else te=Me;return te},T.prototype.parseJSXStringLiteralAttribute=function(){var O=this.createJSXNode(),te=this.nextJSXToken();8!==te.type&&this.throwUnexpectedToken(te);var Me=this.getTokenRaw(te);return this.finalize(O,new et.Literal(te.value,Me))},T.prototype.parseJSXExpressionAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},T.prototype.parseJSXNameValueAttribute=function(){var O=this.createJSXNode(),te=this.parseJSXAttributeName(),Me=null;return this.matchJSX("=")&&(this.expectJSX("="),Me=this.parseJSXAttributeValue()),this.finalize(O,new Ge.JSXAttribute(te,Me))},T.prototype.parseJSXSpreadAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXSpreadAttribute(te))},T.prototype.parseJSXAttributes=function(){for(var O=[];!this.matchJSX("/")&&!this.matchJSX(">");){var te=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();O.push(te)}return O},T.prototype.parseJSXOpeningElement=function(){var O=this.createJSXNode();this.expectJSX("<");var te=this.parseJSXElementName(),Me=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(te,Je,Me))},T.prototype.parseJSXBoundaryElement=function(){var O=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var te=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(O,new Ge.JSXClosingElement(te))}var Me=this.parseJSXElementName(),Je=this.parseJSXAttributes(),kt=this.matchJSX("/");return kt&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(Me,kt,Je))},T.prototype.parseJSXEmptyExpression=function(){var O=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(O,new Ge.JSXEmptyExpression)},T.prototype.parseJSXExpressionContainer=function(){var te,O=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(te=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),te=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXChildren=function(){for(var O=[];!this.scanner.eof();){var te=this.createJSXChildNode(),Me=this.nextJSXText();if(Me.start0))break;jt=this.finalize(O.node,new Ge.JSXElement(O.opening,O.children,O.closing)),(O=te[te.length-1]).children.push(jt),te.pop()}}return O},T.prototype.parseJSXElement=function(){var O=this.createJSXNode(),te=this.parseJSXOpeningElement(),Me=[],Je=null;if(!te.selfClosing){var kt=this.parseComplexJSXElement({node:O,opening:te,closing:Je,children:Me});Me=kt.children,Je=kt.closing}return this.finalize(O,new Ge.JSXElement(te,Me,Je))},T.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var O=this.parseJSXElement();return this.finishJSX(),O},T.prototype.isStartOfExpression=function(){return D.prototype.isStartOfExpression.call(this)||this.match("<")},T}(Ve.Parser);De.JSXParser=ae},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};De.Character={fromCodePoint:function(Oe){return Oe<65536?String.fromCharCode(Oe):String.fromCharCode(55296+(Oe-65536>>10))+String.fromCharCode(56320+(Oe-65536&1023))},isWhiteSpace:function(Oe){return 32===Oe||9===Oe||11===Oe||12===Oe||160===Oe||Oe>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Oe)>=0},isLineTerminator:function(Oe){return 10===Oe||13===Oe||8232===Oe||8233===Oe},isIdentifierStart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||92===Oe||Oe>=128&&rt.NonAsciiIdentifierStart.test(De.Character.fromCodePoint(Oe))},isIdentifierPart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||Oe>=48&&Oe<=57||92===Oe||Oe>=128&&rt.NonAsciiIdentifierPart.test(De.Character.fromCodePoint(Oe))},isDecimalDigit:function(Oe){return Oe>=48&&Oe<=57},isHexDigit:function(Oe){return Oe>=48&&Oe<=57||Oe>=65&&Oe<=70||Oe>=97&&Oe<=102},isOctalDigit:function(Oe){return Oe>=48&&Oe<=55}}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(6);De.JSXClosingElement=function O(te){this.type=Oe.JSXSyntax.JSXClosingElement,this.name=te},De.JSXElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXElement,this.openingElement=te,this.children=Me,this.closingElement=Je},De.JSXEmptyExpression=function O(){this.type=Oe.JSXSyntax.JSXEmptyExpression},De.JSXExpressionContainer=function O(te){this.type=Oe.JSXSyntax.JSXExpressionContainer,this.expression=te},De.JSXIdentifier=function O(te){this.type=Oe.JSXSyntax.JSXIdentifier,this.name=te},De.JSXMemberExpression=function O(te,Me){this.type=Oe.JSXSyntax.JSXMemberExpression,this.object=te,this.property=Me},De.JSXAttribute=function O(te,Me){this.type=Oe.JSXSyntax.JSXAttribute,this.name=te,this.value=Me},De.JSXNamespacedName=function O(te,Me){this.type=Oe.JSXSyntax.JSXNamespacedName,this.namespace=te,this.name=Me},De.JSXOpeningElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXOpeningElement,this.name=te,this.selfClosing=Me,this.attributes=Je},De.JSXSpreadAttribute=function O(te){this.type=Oe.JSXSyntax.JSXSpreadAttribute,this.argument=te},De.JSXText=function O(te,Me){this.type=Oe.JSXSyntax.JSXText,this.value=te,this.raw=Me}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2);De.ArrayExpression=function We(Xe){this.type=Oe.Syntax.ArrayExpression,this.elements=Xe},De.ArrayPattern=function We(Xe){this.type=Oe.Syntax.ArrayPattern,this.elements=Xe},De.ArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!1},De.AssignmentExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.AssignmentExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.AssignmentPattern=function We(Xe,bt){this.type=Oe.Syntax.AssignmentPattern,this.left=Xe,this.right=bt},De.AsyncArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!0},De.AsyncFunctionDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AsyncFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AwaitExpression=function We(Xe){this.type=Oe.Syntax.AwaitExpression,this.argument=Xe},De.BinaryExpression=function We(Xe,bt,Cn){this.type="||"===Xe||"&&"===Xe?Oe.Syntax.LogicalExpression:Oe.Syntax.BinaryExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.BlockStatement=function We(Xe){this.type=Oe.Syntax.BlockStatement,this.body=Xe},De.BreakStatement=function We(Xe){this.type=Oe.Syntax.BreakStatement,this.label=Xe},De.CallExpression=function We(Xe,bt){this.type=Oe.Syntax.CallExpression,this.callee=Xe,this.arguments=bt},De.CatchClause=function We(Xe,bt){this.type=Oe.Syntax.CatchClause,this.param=Xe,this.body=bt},De.ClassBody=function We(Xe){this.type=Oe.Syntax.ClassBody,this.body=Xe},De.ClassDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassDeclaration,this.id=Xe,this.superClass=bt,this.body=Cn},De.ClassExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassExpression,this.id=Xe,this.superClass=bt,this.body=Cn},De.ComputedMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!0,this.object=Xe,this.property=bt},De.ConditionalExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ConditionalExpression,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ContinueStatement=function We(Xe){this.type=Oe.Syntax.ContinueStatement,this.label=Xe},De.DebuggerStatement=function We(){this.type=Oe.Syntax.DebuggerStatement},De.Directive=function We(Xe,bt){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe,this.directive=bt},De.DoWhileStatement=function We(Xe,bt){this.type=Oe.Syntax.DoWhileStatement,this.body=Xe,this.test=bt},De.EmptyStatement=function We(){this.type=Oe.Syntax.EmptyStatement},De.ExportAllDeclaration=function We(Xe){this.type=Oe.Syntax.ExportAllDeclaration,this.source=Xe},De.ExportDefaultDeclaration=function We(Xe){this.type=Oe.Syntax.ExportDefaultDeclaration,this.declaration=Xe},De.ExportNamedDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ExportNamedDeclaration,this.declaration=Xe,this.specifiers=bt,this.source=Cn},De.ExportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ExportSpecifier,this.exported=bt,this.local=Xe},De.ExpressionStatement=function We(Xe){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe},De.ForInStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForInStatement,this.left=Xe,this.right=bt,this.body=Cn,this.each=!1},De.ForOfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForOfStatement,this.left=Xe,this.right=bt,this.body=Cn},De.ForStatement=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.ForStatement,this.init=Xe,this.test=bt,this.update=Cn,this.body=jr},De.FunctionDeclaration=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.FunctionExpression=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.Identifier=function We(Xe){this.type=Oe.Syntax.Identifier,this.name=Xe},De.IfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.IfStatement,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ImportDeclaration=function We(Xe,bt){this.type=Oe.Syntax.ImportDeclaration,this.specifiers=Xe,this.source=bt},De.ImportDefaultSpecifier=function We(Xe){this.type=Oe.Syntax.ImportDefaultSpecifier,this.local=Xe},De.ImportNamespaceSpecifier=function We(Xe){this.type=Oe.Syntax.ImportNamespaceSpecifier,this.local=Xe},De.ImportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ImportSpecifier,this.local=Xe,this.imported=bt},De.LabeledStatement=function We(Xe,bt){this.type=Oe.Syntax.LabeledStatement,this.label=Xe,this.body=bt},De.Literal=function We(Xe,bt){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt},De.MetaProperty=function We(Xe,bt){this.type=Oe.Syntax.MetaProperty,this.meta=Xe,this.property=bt},De.MethodDefinition=function We(Xe,bt,Cn,jr,Y0){this.type=Oe.Syntax.MethodDefinition,this.key=Xe,this.computed=bt,this.value=Cn,this.kind=jr,this.static=Y0},De.Module=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="module"},De.NewExpression=function We(Xe,bt){this.type=Oe.Syntax.NewExpression,this.callee=Xe,this.arguments=bt},De.ObjectExpression=function We(Xe){this.type=Oe.Syntax.ObjectExpression,this.properties=Xe},De.ObjectPattern=function We(Xe){this.type=Oe.Syntax.ObjectPattern,this.properties=Xe},De.Property=function We(Xe,bt,Cn,jr,Y0,Gi){this.type=Oe.Syntax.Property,this.key=bt,this.computed=Cn,this.value=jr,this.kind=Xe,this.method=Y0,this.shorthand=Gi},De.RegexLiteral=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt,this.regex={pattern:Cn,flags:jr}},De.RestElement=function We(Xe){this.type=Oe.Syntax.RestElement,this.argument=Xe},De.ReturnStatement=function We(Xe){this.type=Oe.Syntax.ReturnStatement,this.argument=Xe},De.Script=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="script"},De.SequenceExpression=function We(Xe){this.type=Oe.Syntax.SequenceExpression,this.expressions=Xe},De.SpreadElement=function We(Xe){this.type=Oe.Syntax.SpreadElement,this.argument=Xe},De.StaticMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!1,this.object=Xe,this.property=bt},De.Super=function We(){this.type=Oe.Syntax.Super},De.SwitchCase=function We(Xe,bt){this.type=Oe.Syntax.SwitchCase,this.test=Xe,this.consequent=bt},De.SwitchStatement=function We(Xe,bt){this.type=Oe.Syntax.SwitchStatement,this.discriminant=Xe,this.cases=bt},De.TaggedTemplateExpression=function We(Xe,bt){this.type=Oe.Syntax.TaggedTemplateExpression,this.tag=Xe,this.quasi=bt},De.TemplateElement=function We(Xe,bt){this.type=Oe.Syntax.TemplateElement,this.value=Xe,this.tail=bt},De.TemplateLiteral=function We(Xe,bt){this.type=Oe.Syntax.TemplateLiteral,this.quasis=Xe,this.expressions=bt},De.ThisExpression=function We(){this.type=Oe.Syntax.ThisExpression},De.ThrowStatement=function We(Xe){this.type=Oe.Syntax.ThrowStatement,this.argument=Xe},De.TryStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.TryStatement,this.block=Xe,this.handler=bt,this.finalizer=Cn},De.UnaryExpression=function We(Xe,bt){this.type=Oe.Syntax.UnaryExpression,this.operator=Xe,this.argument=bt,this.prefix=!0},De.UpdateExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.UpdateExpression,this.operator=Xe,this.argument=bt,this.prefix=Cn},De.VariableDeclaration=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclaration,this.declarations=Xe,this.kind=bt},De.VariableDeclarator=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclarator,this.id=Xe,this.init=bt},De.WhileStatement=function We(Xe,bt){this.type=Oe.Syntax.WhileStatement,this.test=Xe,this.body=bt},De.WithStatement=function We(Xe,bt){this.type=Oe.Syntax.WithStatement,this.object=Xe,this.body=bt},De.YieldExpression=function We(Xe,bt){this.type=Oe.Syntax.YieldExpression,this.argument=Xe,this.delegate=bt}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(10),Ge=rt(11),_e=rt(7),et=rt(12),Ve=rt(2),ve=rt(13),se="ArrowParameterPlaceHolder",ue=function(){function ae(D,T,O){void 0===T&&(T={}),this.config={range:"boolean"==typeof T.range&&T.range,loc:"boolean"==typeof T.loc&&T.loc,source:null,tokens:"boolean"==typeof T.tokens&&T.tokens,comment:"boolean"==typeof T.comment&&T.comment,tolerant:"boolean"==typeof T.tolerant&&T.tolerant},this.config.loc&&T.source&&null!==T.source&&(this.config.source=String(T.source)),this.delegate=O,this.errorHandler=new dt.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new et.Scanner(D,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return ae.prototype.throwError=function(D){for(var T=[],O=1;O0&&this.delegate)for(var T=0;T>="===D||">>>="===D||"&="===D||"^="===D||"|="===D},ae.prototype.isolateCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=T,this.context.isAssignmentTarget=O,this.context.firstCoverInitializedNameError=te,Me},ae.prototype.inheritCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return this.context.isBindingElement=this.context.isBindingElement&&T,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&O,this.context.firstCoverInitializedNameError=te||this.context.firstCoverInitializedNameError,Me},ae.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},ae.prototype.parsePrimaryExpression=function(){var T,O,te,D=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),T=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(D,new _e.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(O.value,te));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal("true"===O.value,te));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(null,te));break;case 10:T=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,T=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":T=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":T=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,O=this.nextRegexToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.RegexLiteral(O.regex,te,O.pattern,O.flags));break;default:T=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?T=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?T=this.finalize(D,new _e.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?T=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),T=this.finalize(D,new _e.ThisExpression)):T=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:T=this.throwUnexpectedToken(this.nextToken())}return T},ae.prototype.parseSpreadElement=function(){var D=this.createNode();this.expect("...");var T=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(D,new _e.SpreadElement(T))},ae.prototype.parseArrayInitializer=function(){var D=this.createNode(),T=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),T.push(null);else if(this.match("...")){var O=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),T.push(O)}else T.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(D,new _e.ArrayExpression(T))},ae.prototype.parsePropertyMethod=function(D){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var T=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=D.simple;var te=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&D.firstRestricted&&this.tolerateUnexpectedToken(D.firstRestricted,D.message),this.context.strict&&D.stricted&&this.tolerateUnexpectedToken(D.stricted,D.message),this.context.strict=T,this.context.allowStrictDirective=O,te},ae.prototype.parsePropertyMethodFunction=function(){var T=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(T,new _e.FunctionExpression(null,te.params,Me,!1))},ae.prototype.parsePropertyMethodAsyncFunction=function(){var D=this.createNode(),T=this.context.allowYield,O=this.context.await;this.context.allowYield=!1,this.context.await=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=T,this.context.await=O,this.finalize(D,new _e.AsyncFunctionExpression(null,te.params,Me))},ae.prototype.parseObjectPropertyKey=function(){var O,D=this.createNode(),T=this.nextToken();switch(T.type){case 8:case 6:this.context.strict&&T.octal&&this.tolerateUnexpectedToken(T,Ge.Messages.StrictOctalLiteral);var te=this.getTokenRaw(T);O=this.finalize(D,new _e.Literal(T.value,te));break;case 3:case 1:case 5:case 4:O=this.finalize(D,new _e.Identifier(T.value));break;case 7:"["===T.value?(O=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):O=this.throwUnexpectedToken(T);break;default:O=this.throwUnexpectedToken(T)}return O},ae.prototype.isPropertyKey=function(D,T){return D.type===Ve.Syntax.Identifier&&D.name===T||D.type===Ve.Syntax.Literal&&D.value===T},ae.prototype.parseObjectProperty=function(D){var te,T=this.createNode(),O=this.lookahead,Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(3===O.type){var rn=O.value;this.nextToken(),kt=this.match("["),Me=(wn=!(this.hasLineTerminator||"async"!==rn||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(T,new _e.Identifier(rn))}else this.match("*")?this.nextToken():(kt=this.match("["),Me=this.parseObjectPropertyKey());var Mi=this.qualifiedPropertyName(this.lookahead);if(3===O.type&&!wn&&"get"===O.value&&Mi)te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===O.type&&!wn&&"set"===O.value&&Mi)te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===O.type&&"*"===O.value&&Mi)te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0;else if(Me||this.throwUnexpectedToken(this.lookahead),te="init",this.match(":")&&!wn)!kt&&this.isPropertyKey(Me,"__proto__")&&(D.value&&this.tolerateError(Ge.Messages.DuplicateProtoProperty),D.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0;else if(3===O.type)if(rn=this.finalize(T,new _e.Identifier(O.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Wt=!0;var zr=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(T,new _e.AssignmentPattern(rn,zr))}else Wt=!0,Je=rn;else this.throwUnexpectedToken(this.nextToken());return this.finalize(T,new _e.Property(te,Me,kt,Je,jt,Wt))},ae.prototype.parseObjectInitializer=function(){var D=this.createNode();this.expect("{");for(var T=[],O={value:!1};!this.match("}");)T.push(this.parseObjectProperty(O)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(D,new _e.ObjectExpression(T))},ae.prototype.parseTemplateHead=function(){Oe.assert(this.lookahead.head,"Template literal must start with a template head");var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateLiteral=function(){var D=this.createNode(),T=[],O=[],te=this.parseTemplateHead();for(O.push(te);!te.tail;)T.push(this.parseExpression()),te=this.parseTemplateElement(),O.push(te);return this.finalize(D,new _e.TemplateLiteral(O,T))},ae.prototype.reinterpretExpressionAsPattern=function(D){switch(D.type){case Ve.Syntax.Identifier:case Ve.Syntax.MemberExpression:case Ve.Syntax.RestElement:case Ve.Syntax.AssignmentPattern:break;case Ve.Syntax.SpreadElement:D.type=Ve.Syntax.RestElement,this.reinterpretExpressionAsPattern(D.argument);break;case Ve.Syntax.ArrayExpression:D.type=Ve.Syntax.ArrayPattern;for(var T=0;T")||this.expect("=>"),D={type:se,params:[],async:!1};else{var T=this.lookahead,O=[];if(this.match("..."))D=this.parseRestElement(O),this.expect(")"),this.match("=>")||this.expect("=>"),D={type:se,params:[D],async:!1};else{var te=!1;if(this.context.isBindingElement=!0,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Me=[];for(this.context.isAssignmentTarget=!1,Me.push(D);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(D.type===Ve.Syntax.Identifier&&"yield"===D.name&&(te=!0,D={type:se,params:[D],async:!1}),!te)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),D.type===Ve.Syntax.SequenceExpression)for(Je=0;Je")){for(var jt=0;jt0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Me=[D,this.lookahead],Je=T,kt=this.isolateCoverGrammar(this.parseExponentiationExpression),jt=[Je,O.value,kt],Wt=[te];!((te=this.binaryPrecedence(this.lookahead))<=0);){for(;jt.length>2&&te<=Wt[Wt.length-1];){kt=jt.pop();var wn=jt.pop();Wt.pop(),Je=jt.pop(),Me.pop();var rn=this.startNode(Me[Me.length-1]);jt.push(this.finalize(rn,new _e.BinaryExpression(wn,Je,kt)))}jt.push(this.nextToken().value),Wt.push(te),Me.push(this.lookahead),jt.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Mi=jt.length-1;T=jt[Mi];for(var zr=Me.pop();Mi>1;){var Xr=Me.pop();rn=this.startNode(Xr,zr&&zr.lineStart),T=this.finalize(rn,new _e.BinaryExpression(wn=jt[Mi-1],jt[Mi-2],T)),Mi-=2,zr=Xr}}return T},ae.prototype.parseConditionalExpression=function(){var D=this.lookahead,T=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var O=this.context.allowIn;this.context.allowIn=!0;var te=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=O,this.expect(":");var Me=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(D),new _e.ConditionalExpression(T,te,Me)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return T},ae.prototype.checkPatternParam=function(D,T){switch(T.type){case Ve.Syntax.Identifier:this.validateParam(D,T,T.name);break;case Ve.Syntax.RestElement:this.checkPatternParam(D,T.argument);break;case Ve.Syntax.AssignmentPattern:this.checkPatternParam(D,T.left);break;case Ve.Syntax.ArrayPattern:for(var O=0;O")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Me=D.async,Je=this.reinterpretAsCoverFormalsList(D);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var kt=this.context.strict,jt=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Wt=this.context.allowYield,wn=this.context.await;this.context.allowYield=!0,this.context.await=Me;var rn=this.startNode(T);this.expect("=>");var Mi=void 0;if(this.match("{")){var zr=this.context.allowIn;this.context.allowIn=!0,Mi=this.parseFunctionSourceElements(),this.context.allowIn=zr}else Mi=this.isolateCoverGrammar(this.parseAssignmentExpression);var Xr=Mi.type!==Ve.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),D=this.finalize(rn,Me?new _e.AsyncArrowFunctionExpression(Je.params,Mi,Xr):new _e.ArrowFunctionExpression(Je.params,Mi,Xr)),this.context.strict=kt,this.context.allowStrictDirective=jt,this.context.allowYield=Wt,this.context.await=wn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Ge.Messages.InvalidLHSInAssignment),this.context.strict&&D.type===Ve.Syntax.Identifier){var hs=D;this.scanner.isRestrictedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(D):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(O=this.nextToken()).value,tr=this.isolateCoverGrammar(this.parseAssignmentExpression);D=this.finalize(this.startNode(T),new _e.AssignmentExpression(Ya,D,tr)),this.context.firstCoverInitializedNameError=null}}return D},ae.prototype.parseExpression=function(){var D=this.lookahead,T=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var O=[];for(O.push(T);2!==this.lookahead.type&&this.match(",");)this.nextToken(),O.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(D),new _e.SequenceExpression(O))}return T},ae.prototype.parseStatementListItem=function(){var D;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalExportDeclaration),D=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalImportDeclaration),D=this.parseImportDeclaration();break;case"const":D=this.parseLexicalDeclaration({inFor:!1});break;case"function":D=this.parseFunctionDeclaration();break;case"class":D=this.parseClassDeclaration();break;case"let":D=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:D=this.parseStatement()}else D=this.parseStatement();return D},ae.prototype.parseBlock=function(){var D=this.createNode();this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseStatementListItem());return this.expect("}"),this.finalize(D,new _e.BlockStatement(T))},ae.prototype.parseLexicalBinding=function(D,T){var O=this.createNode(),Me=this.parsePattern([],D);this.context.strict&&Me.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(Me.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Je=null;return"const"===D?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Ge.Messages.DeclarationMissingInitializer,"const")):(!T.inFor&&Me.type!==Ve.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(O,new _e.VariableDeclarator(Me,Je))},ae.prototype.parseBindingList=function(D,T){for(var O=[this.parseLexicalBinding(D,T)];this.match(",");)this.nextToken(),O.push(this.parseLexicalBinding(D,T));return O},ae.prototype.isLexicalDeclaration=function(){var D=this.scanner.saveState();this.scanner.scanComments();var T=this.scanner.lex();return this.scanner.restoreState(D),3===T.type||7===T.type&&"["===T.value||7===T.type&&"{"===T.value||4===T.type&&"let"===T.value||4===T.type&&"yield"===T.value},ae.prototype.parseLexicalDeclaration=function(D){var T=this.createNode(),O=this.nextToken().value;Oe.assert("let"===O||"const"===O,"Lexical declaration must be either let or const");var te=this.parseBindingList(O,D);return this.consumeSemicolon(),this.finalize(T,new _e.VariableDeclaration(te,O))},ae.prototype.parseBindingRestElement=function(D,T){var O=this.createNode();this.expect("...");var te=this.parsePattern(D,T);return this.finalize(O,new _e.RestElement(te))},ae.prototype.parseArrayPattern=function(D,T){var O=this.createNode();this.expect("[");for(var te=[];!this.match("]");)if(this.match(","))this.nextToken(),te.push(null);else{if(this.match("...")){te.push(this.parseBindingRestElement(D,T));break}te.push(this.parsePatternWithDefault(D,T)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(O,new _e.ArrayPattern(te))},ae.prototype.parsePropertyPattern=function(D,T){var kt,jt,O=this.createNode(),te=!1,Me=!1;if(3===this.lookahead.type){var Wt=this.lookahead;kt=this.parseVariableIdentifier();var wn=this.finalize(O,new _e.Identifier(Wt.value));if(this.match("=")){D.push(Wt),Me=!0,this.nextToken();var rn=this.parseAssignmentExpression();jt=this.finalize(this.startNode(Wt),new _e.AssignmentPattern(wn,rn))}else this.match(":")?(this.expect(":"),jt=this.parsePatternWithDefault(D,T)):(D.push(Wt),Me=!0,jt=wn)}else te=this.match("["),kt=this.parseObjectPropertyKey(),this.expect(":"),jt=this.parsePatternWithDefault(D,T);return this.finalize(O,new _e.Property("init",kt,te,jt,!1,Me))},ae.prototype.parseObjectPattern=function(D,T){var O=this.createNode(),te=[];for(this.expect("{");!this.match("}");)te.push(this.parsePropertyPattern(D,T)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(O,new _e.ObjectPattern(te))},ae.prototype.parsePattern=function(D,T){var O;return this.match("[")?O=this.parseArrayPattern(D,T):this.match("{")?O=this.parseObjectPattern(D,T):(this.matchKeyword("let")&&("const"===T||"let"===T)&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.LetInLexicalBinding),D.push(this.lookahead),O=this.parseVariableIdentifier(T)),O},ae.prototype.parsePatternWithDefault=function(D,T){var O=this.lookahead,te=this.parsePattern(D,T);if(this.match("=")){this.nextToken();var Me=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Me,te=this.finalize(this.startNode(O),new _e.AssignmentPattern(te,Je))}return te},ae.prototype.parseVariableIdentifier=function(D){var T=this.createNode(),O=this.nextToken();return 4===O.type&&"yield"===O.value?this.context.strict?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(O):3!==O.type?this.context.strict&&4===O.type&&this.scanner.isStrictModeReservedWord(O.value)?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):(this.context.strict||"let"!==O.value||"var"!==D)&&this.throwUnexpectedToken(O):(this.context.isModule||this.context.await)&&3===O.type&&"await"===O.value&&this.tolerateUnexpectedToken(O),this.finalize(T,new _e.Identifier(O.value))},ae.prototype.parseVariableDeclaration=function(D){var T=this.createNode(),te=this.parsePattern([],"var");this.context.strict&&te.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(te.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Me=null;return this.match("=")?(this.nextToken(),Me=this.isolateCoverGrammar(this.parseAssignmentExpression)):te.type!==Ve.Syntax.Identifier&&!D.inFor&&this.expect("="),this.finalize(T,new _e.VariableDeclarator(te,Me))},ae.prototype.parseVariableDeclarationList=function(D){var T={inFor:D.inFor},O=[];for(O.push(this.parseVariableDeclaration(T));this.match(",");)this.nextToken(),O.push(this.parseVariableDeclaration(T));return O},ae.prototype.parseVariableStatement=function(){var D=this.createNode();this.expectKeyword("var");var T=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(D,new _e.VariableDeclaration(T,"var"))},ae.prototype.parseEmptyStatement=function(){var D=this.createNode();return this.expect(";"),this.finalize(D,new _e.EmptyStatement)},ae.prototype.parseExpressionStatement=function(){var D=this.createNode(),T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ExpressionStatement(T))},ae.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Ge.Messages.StrictFunction),this.parseStatement()},ae.prototype.parseIfStatement=function(){var T,D=this.createNode(),O=null;this.expectKeyword("if"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),O=this.parseIfClause())),this.finalize(D,new _e.IfStatement(te,T,O))},ae.prototype.parseDoWhileStatement=function(){var D=this.createNode();this.expectKeyword("do");var T=this.context.inIteration;this.context.inIteration=!0;var O=this.parseStatement();this.context.inIteration=T,this.expectKeyword("while"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(D,new _e.DoWhileStatement(O,te))},ae.prototype.parseWhileStatement=function(){var T,D=this.createNode();this.expectKeyword("while"),this.expect("(");var O=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var te=this.context.inIteration;this.context.inIteration=!0,T=this.parseStatement(),this.context.inIteration=te}return this.finalize(D,new _e.WhileStatement(O,T))},ae.prototype.parseForStatement=function(){var Me,Je,Xr,D=null,T=null,O=null,te=!0,kt=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){D=this.createNode(),this.nextToken();var jt=this.context.allowIn;this.context.allowIn=!1;var Wt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=jt,1===Wt.length&&this.matchKeyword("in")){var wn=Wt[0];wn.init&&(wn.id.type===Ve.Syntax.ArrayPattern||wn.id.type===Ve.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(Ge.Messages.ForInOfLoopInitializer,"for-in"),D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseExpression(),D=null}else 1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){D=this.createNode();var rn=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(jt=this.context.allowIn,this.context.allowIn=!1,Wt=this.parseBindingList(rn,{inFor:!0}),this.context.allowIn=jt,1===Wt.length&&null===Wt[0].init&&this.matchKeyword("in")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null):1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(this.consumeSemicolon(),D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)))):(D=this.finalize(D,new _e.Identifier(rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null)}else{var Mi=this.lookahead;if(jt=this.context.allowIn,this.context.allowIn=!1,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=jt,this.matchKeyword("in"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseExpression(),D=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1;else{if(this.match(",")){for(var zr=[D];this.match(",");)this.nextToken(),zr.push(this.isolateCoverGrammar(this.parseAssignmentExpression));D=this.finalize(this.startNode(Mi),new _e.SequenceExpression(zr))}this.expect(";")}}if(typeof Me>"u"&&(this.match(";")||(T=this.parseExpression()),this.expect(";"),this.match(")")||(O=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Xr=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var hs=this.context.inIteration;this.context.inIteration=!0,Xr=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=hs}return this.finalize(kt,typeof Me>"u"?new _e.ForStatement(D,T,O,Xr):te?new _e.ForInStatement(Me,Je,Xr):new _e.ForOfStatement(Me,Je,Xr))},ae.prototype.parseContinueStatement=function(){var D=this.createNode();this.expectKeyword("continue");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();T=O,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name)}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&this.throwError(Ge.Messages.IllegalContinue),this.finalize(D,new _e.ContinueStatement(T))},ae.prototype.parseBreakStatement=function(){var D=this.createNode();this.expectKeyword("break");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name),T=O}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(Ge.Messages.IllegalBreak),this.finalize(D,new _e.BreakStatement(T))},ae.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Ge.Messages.IllegalReturn);var D=this.createNode();this.expectKeyword("return");var O=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ReturnStatement(O))},ae.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Ge.Messages.StrictModeWith);var T,D=this.createNode();this.expectKeyword("with"),this.expect("(");var O=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseStatement()),this.finalize(D,new _e.WithStatement(O,T))},ae.prototype.parseSwitchCase=function(){var T,D=this.createNode();this.matchKeyword("default")?(this.nextToken(),T=null):(this.expectKeyword("case"),T=this.parseExpression()),this.expect(":");for(var O=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)O.push(this.parseStatementListItem());return this.finalize(D,new _e.SwitchCase(T,O))},ae.prototype.parseSwitchStatement=function(){var D=this.createNode();this.expectKeyword("switch"),this.expect("(");var T=this.parseExpression();this.expect(")");var O=this.context.inSwitch;this.context.inSwitch=!0;var te=[],Me=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Me&&this.throwError(Ge.Messages.MultipleDefaultsInSwitch),Me=!0),te.push(Je)}return this.expect("}"),this.context.inSwitch=O,this.finalize(D,new _e.SwitchStatement(T,te))},ae.prototype.parseLabelledStatement=function(){var O,D=this.createNode(),T=this.parseExpression();if(T.type===Ve.Syntax.Identifier&&this.match(":")){this.nextToken();var te=T,Me="$"+te.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Me)&&this.throwError(Ge.Messages.Redeclaration,"Label",te.name),this.context.labelSet[Me]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var kt=this.lookahead,jt=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(kt,Ge.Messages.StrictFunction):jt.generator&&this.tolerateUnexpectedToken(kt,Ge.Messages.GeneratorInLegacyContext),Je=jt}else Je=this.parseStatement();delete this.context.labelSet[Me],O=new _e.LabeledStatement(te,Je)}else this.consumeSemicolon(),O=new _e.ExpressionStatement(T);return this.finalize(D,O)},ae.prototype.parseThrowStatement=function(){var D=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Ge.Messages.NewlineAfterThrow);var T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ThrowStatement(T))},ae.prototype.parseCatchClause=function(){var D=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var T=[],O=this.parsePattern(T),te={},Me=0;Me0&&this.tolerateError(Ge.Messages.BadGetterArity);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseSetterMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();1!==te.params.length?this.tolerateError(Ge.Messages.BadSetterArity):te.params[0]instanceof _e.RestElement&&this.tolerateError(Ge.Messages.BadSetterRestParameter);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseGeneratorMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();this.context.allowYield=!1;var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,!0))},ae.prototype.isStartOfExpression=function(){var D=!0,T=this.lookahead.value;switch(this.lookahead.type){case 7:D="["===T||"("===T||"{"===T||"+"===T||"-"===T||"!"===T||"~"===T||"++"===T||"--"===T||"/"===T||"/="===T;break;case 4:D="class"===T||"delete"===T||"function"===T||"let"===T||"new"===T||"super"===T||"this"===T||"typeof"===T||"void"===T||"yield"===T}return D},ae.prototype.parseYieldExpression=function(){var D=this.createNode();this.expectKeyword("yield");var T=null,O=!1;if(!this.hasLineTerminator){var te=this.context.allowYield;this.context.allowYield=!1,(O=this.match("*"))?(this.nextToken(),T=this.parseAssignmentExpression()):this.isStartOfExpression()&&(T=this.parseAssignmentExpression()),this.context.allowYield=te}return this.finalize(D,new _e.YieldExpression(T,O))},ae.prototype.parseClassElement=function(D){var T=this.lookahead,O=this.createNode(),te="",Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(this.match("*"))this.nextToken();else if(kt=this.match("["),"static"===(Me=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(T=this.lookahead,Wt=!0,kt=this.match("["),this.match("*")?this.nextToken():Me=this.parseObjectPropertyKey()),3===T.type&&!this.hasLineTerminator&&"async"===T.value){var Mi=this.lookahead.value;":"!==Mi&&"("!==Mi&&"*"!==Mi&&(wn=!0,T=this.lookahead,Me=this.parseObjectPropertyKey(),3===T.type&&"constructor"===T.value&&this.tolerateUnexpectedToken(T,Ge.Messages.ConstructorIsAsync))}var zr=this.qualifiedPropertyName(this.lookahead);return 3===T.type?"get"===T.value&&zr?(te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===T.value&&zr&&(te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===T.type&&"*"===T.value&&zr&&(te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0),!te&&Me&&this.match("(")&&(te="init",Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0),te||this.throwUnexpectedToken(this.lookahead),"init"===te&&(te="method"),kt||(Wt&&this.isPropertyKey(Me,"prototype")&&this.throwUnexpectedToken(T,Ge.Messages.StaticPrototype),!Wt&&this.isPropertyKey(Me,"constructor")&&(("method"!==te||!jt||Je&&Je.generator)&&this.throwUnexpectedToken(T,Ge.Messages.ConstructorSpecialMethod),D.value?this.throwUnexpectedToken(T,Ge.Messages.DuplicateConstructor):D.value=!0,te="constructor")),this.finalize(O,new _e.MethodDefinition(Me,kt,Je,te,Wt))},ae.prototype.parseClassElementList=function(){var D=[],T={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():D.push(this.parseClassElement(T));return this.expect("}"),D},ae.prototype.parseClassBody=function(){var D=this.createNode(),T=this.parseClassElementList();return this.finalize(D,new _e.ClassBody(T))},ae.prototype.parseClassDeclaration=function(D){var T=this.createNode(),O=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var te=D&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Me=null;this.matchKeyword("extends")&&(this.nextToken(),Me=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=O,this.finalize(T,new _e.ClassDeclaration(te,Me,Je))},ae.prototype.parseClassExpression=function(){var D=this.createNode(),T=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var O=3===this.lookahead.type?this.parseVariableIdentifier():null,te=null;this.matchKeyword("extends")&&(this.nextToken(),te=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Me=this.parseClassBody();return this.context.strict=T,this.finalize(D,new _e.ClassExpression(O,te,Me))},ae.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Module(T))},ae.prototype.parseScript=function(){for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Script(T))},ae.prototype.parseModuleSpecifier=function(){var D=this.createNode();8!==this.lookahead.type&&this.throwError(Ge.Messages.InvalidModuleSpecifier);var T=this.nextToken(),O=this.getTokenRaw(T);return this.finalize(D,new _e.Literal(T.value,O))},ae.prototype.parseImportSpecifier=function(){var T,O,D=this.createNode();return 3===this.lookahead.type?(O=T=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseVariableIdentifier())):(O=T=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),O=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(D,new _e.ImportSpecifier(O,T))},ae.prototype.parseNamedImports=function(){this.expect("{");for(var D=[];!this.match("}");)D.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),D},ae.prototype.parseImportDefaultSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName();return this.finalize(D,new _e.ImportDefaultSpecifier(T))},ae.prototype.parseImportNamespaceSpecifier=function(){var D=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Ge.Messages.NoAsAfterImportNamespace),this.nextToken();var T=this.parseIdentifierName();return this.finalize(D,new _e.ImportNamespaceSpecifier(T))},ae.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalImportDeclaration);var D=this.createNode();this.expectKeyword("import");var T,O=[];return 8===this.lookahead.type||(this.match("{")?O=O.concat(this.parseNamedImports()):this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(O.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.match("{")?O=O.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),T=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(D,new _e.ImportDeclaration(O,T))},ae.prototype.parseExportSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName(),O=T;return this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseIdentifierName()),this.finalize(D,new _e.ExportSpecifier(T,O))},ae.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalExportDeclaration);var T,D=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var O=this.parseFunctionDeclaration(!0);T=this.finalize(D,new _e.ExportDefaultDeclaration(O))}else this.matchKeyword("class")?(O=this.parseClassDeclaration(!0),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):this.matchContextualKeyword("async")?(O=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):(this.matchContextualKeyword("from")&&this.throwError(Ge.Messages.UnexpectedToken,this.lookahead.value),O=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Me=this.parseModuleSpecifier();this.consumeSemicolon(),T=this.finalize(D,new _e.ExportAllDeclaration(Me))}else if(4===this.lookahead.type){switch(O=void 0,this.lookahead.value){case"let":case"const":O=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":O=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null))}else if(this.matchAsyncFunction())O=this.parseFunctionDeclaration(),T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null));else{var Je=[],kt=null,jt=!1;for(this.expect("{");!this.match("}");)jt=jt||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),kt=this.parseModuleSpecifier(),this.consumeSemicolon()):jt?this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),T=this.finalize(D,new _e.ExportNamedDeclaration(null,Je,kt))}return T},ae}();De.Parser=ue},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.assert=function rt(Oe,dt){if(!Oe)throw new Error("ASSERT: "+dt)}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt=function(){function Oe(){this.errors=[],this.tolerant=!1}return Oe.prototype.recordError=function(dt){this.errors.push(dt)},Oe.prototype.tolerate=function(dt){if(!this.tolerant)throw dt;this.recordError(dt)},Oe.prototype.constructError=function(dt,Ge){var _e=new Error(dt);try{throw _e}catch(et){Object.create&&Object.defineProperty&&(_e=Object.create(et),Object.defineProperty(_e,"column",{value:Ge}))}return _e},Oe.prototype.createError=function(dt,Ge,_e,et){var ve=this.constructError("Line "+Ge+": "+et,_e);return ve.index=dt,ve.lineNumber=Ge,ve.description=et,ve},Oe.prototype.throwError=function(dt,Ge,_e,et){throw this.createError(dt,Ge,_e,et)},Oe.prototype.tolerateError=function(dt,Ge,_e,et){var Ve=this.createError(dt,Ge,_e,et);if(!this.tolerant)throw Ve;this.recordError(Ve)},Oe}();De.ErrorHandler=rt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(4),Ge=rt(11);function _e(ve){return"0123456789abcdef".indexOf(ve.toLowerCase())}function et(ve){return"01234567".indexOf(ve)}var Ve=function(){function ve(se,ue){this.source=se,this.errorHandler=ue,this.trackComment=!1,this.isModule=!1,this.length=se.length,this.index=0,this.lineNumber=se.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ve.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ve.prototype.restoreState=function(se){this.index=se.index,this.lineNumber=se.lineNumber,this.lineStart=se.lineStart},ve.prototype.eof=function(){return this.index>=this.length},ve.prototype.throwUnexpectedToken=function(se){return void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.tolerateUnexpectedToken=function(se){void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.skipSingleLineComment=function(se){var ae,D,ue=[];for(this.trackComment&&(ue=[],ae=this.index-se,D={start:{line:this.lineNumber,column:this.index-this.lineStart-se},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(++this.index,dt.Character.isLineTerminator(T))return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart-1},ue.push({multiLine:!1,slice:[ae+se,this.index-1],range:[ae,this.index-1],loc:D})),13===T&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue}return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart},ue.push({multiLine:!1,slice:[ae+se,this.index],range:[ae,this.index],loc:D})),ue},ve.prototype.skipMultiLineComment=function(){var ue,ae,se=[];for(this.trackComment&&(se=[],ue=this.index-2,ae={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var D=this.source.charCodeAt(this.index);if(dt.Character.isLineTerminator(D))13===D&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===D){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index-2],range:[ue,this.index],loc:ae})),se;++this.index}else++this.index}return this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index],range:[ue,this.index],loc:ae})),this.tolerateUnexpectedToken(),se},ve.prototype.scanComments=function(){var se;this.trackComment&&(se=[]);for(var ue=0===this.index;!this.eof();){var ae=this.source.charCodeAt(this.index);if(dt.Character.isWhiteSpace(ae))++this.index;else if(dt.Character.isLineTerminator(ae))++this.index,13===ae&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue=!0;else if(47===ae)if(47===(ae=this.source.charCodeAt(this.index+1))){this.index+=2;var D=this.skipSingleLineComment(2);this.trackComment&&(se=se.concat(D)),ue=!0}else{if(42!==ae)break;this.index+=2,D=this.skipMultiLineComment(),this.trackComment&&(se=se.concat(D))}else if(ue&&45===ae){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,D=this.skipSingleLineComment(3),this.trackComment&&(se=se.concat(D))}else{if(60!==ae||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,D=this.skipSingleLineComment(4),this.trackComment&&(se=se.concat(D))}}return se},ve.prototype.isFutureReservedWord=function(se){switch(se){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ve.prototype.isStrictModeReservedWord=function(se){switch(se){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ve.prototype.isRestrictedWord=function(se){return"eval"===se||"arguments"===se},ve.prototype.isKeyword=function(se){switch(se.length){case 2:return"if"===se||"in"===se||"do"===se;case 3:return"var"===se||"for"===se||"new"===se||"try"===se||"let"===se;case 4:return"this"===se||"else"===se||"case"===se||"void"===se||"with"===se||"enum"===se;case 5:return"while"===se||"break"===se||"catch"===se||"throw"===se||"const"===se||"yield"===se||"class"===se||"super"===se;case 6:return"return"===se||"typeof"===se||"delete"===se||"switch"===se||"export"===se||"import"===se;case 7:return"default"===se||"finally"===se||"extends"===se;case 8:return"function"===se||"continue"===se||"debugger"===se;case 10:return"instanceof"===se;default:return!1}},ve.prototype.codePointAt=function(se){var ue=this.source.charCodeAt(se);if(ue>=55296&&ue<=56319){var ae=this.source.charCodeAt(se+1);ae>=56320&&ae<=57343&&(ue=1024*(ue-55296)+ae-56320+65536)}return ue},ve.prototype.scanHexEscape=function(se){for(var ue="u"===se?4:2,ae=0,D=0;D1114111||"}"!==se)&&this.throwUnexpectedToken(),dt.Character.fromCodePoint(ue)},ve.prototype.getIdentifier=function(){for(var se=this.index++;!this.eof();){var ue=this.source.charCodeAt(this.index);if(92===ue)return this.index=se,this.getComplexIdentifier();if(ue>=55296&&ue<57343)return this.index=se,this.getComplexIdentifier();if(!dt.Character.isIdentifierPart(ue))break;++this.index}return this.source.slice(se,this.index)},ve.prototype.getComplexIdentifier=function(){var ae,se=this.codePointAt(this.index),ue=dt.Character.fromCodePoint(se);for(this.index+=ue.length,92===se&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierStart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue=ae);!this.eof()&&(se=this.codePointAt(this.index),dt.Character.isIdentifierPart(se));)ue+=ae=dt.Character.fromCodePoint(se),this.index+=ae.length,92===se&&(ue=ue.substr(0,ue.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierPart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue+=ae);return ue},ve.prototype.octalToDecimal=function(se){var ue="0"!==se,ae=et(se);return!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ue=!0,ae=8*ae+et(this.source[this.index++]),"0123".indexOf(se)>=0&&!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ae=8*ae+et(this.source[this.index++]))),{code:ae,octal:ue}},ve.prototype.scanIdentifier=function(){var se,ue=this.index,ae=92===this.source.charCodeAt(ue)?this.getComplexIdentifier():this.getIdentifier();if(3!=(se=1===ae.length?3:this.isKeyword(ae)?4:"null"===ae?5:"true"===ae||"false"===ae?1:3)&&ue+ae.length!==this.index){var D=this.index;this.index=ue,this.tolerateUnexpectedToken(Ge.Messages.InvalidEscapedReservedWord),this.index=D}return{type:se,value:ae,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.scanPunctuator=function(){var se=this.index,ue=this.source[this.index];switch(ue){case"(":case"{":"{"===ue&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ue="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ue=this.source.substr(this.index,4))?this.index+=4:"==="===(ue=ue.substr(0,3))||"!=="===ue||">>>"===ue||"<<="===ue||">>="===ue||"**="===ue?this.index+=3:"&&"===(ue=ue.substr(0,2))||"||"===ue||"=="===ue||"!="===ue||"+="===ue||"-="===ue||"*="===ue||"/="===ue||"++"===ue||"--"===ue||"<<"===ue||">>"===ue||"&="===ue||"|="===ue||"^="===ue||"%="===ue||"<="===ue||">="===ue||"=>"===ue||"**"===ue?this.index+=2:"<>=!+-*%&|^/".indexOf(ue=this.source[this.index])>=0&&++this.index}return this.index===se&&this.throwUnexpectedToken(),{type:7,value:ue,lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanHexLiteral=function(se){for(var ue="";!this.eof()&&dt.Character.isHexDigit(this.source.charCodeAt(this.index));)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ue,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanBinaryLiteral=function(se){for(var ae,ue="";!this.eof()&&("0"===(ae=this.source[this.index])||"1"===ae);)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),this.eof()||(ae=this.source.charCodeAt(this.index),(dt.Character.isIdentifierStart(ae)||dt.Character.isDecimalDigit(ae))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ue,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanOctalLiteral=function(se,ue){var ae="",D=!1;for(dt.Character.isOctalDigit(se.charCodeAt(0))?(D=!0,ae="0"+this.source[this.index++]):++this.index;!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index));)ae+=this.source[this.index++];return!D&&0===ae.length&&this.throwUnexpectedToken(),(dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))||dt.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(ae,8),octal:D,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.isImplicitOctalLiteral=function(){for(var se=this.index+1;se=0&&(D=D.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(O,te,Me){var Je=parseInt(te||Me,16);return Je>1114111&&T.throwUnexpectedToken(Ge.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(D)}catch{this.throwUnexpectedToken(Ge.Messages.InvalidRegExp)}try{return new RegExp(se,ue)}catch{return null}},ve.prototype.scanRegExpBody=function(){var se=this.source[this.index];Oe.assert("/"===se,"Regular expression literal must start with a slash");for(var ue=this.source[this.index++],ae=!1,D=!1;!this.eof();)if(ue+=se=this.source[this.index++],"\\"===se)se=this.source[this.index++],dt.Character.isLineTerminator(se.charCodeAt(0))&&this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue+=se;else if(dt.Character.isLineTerminator(se.charCodeAt(0)))this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp);else if(ae)"]"===se&&(ae=!1);else{if("/"===se){D=!0;break}"["===se&&(ae=!0)}return D||this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue.substr(1,ue.length-2)},ve.prototype.scanRegExpFlags=function(){for(var ue="";!this.eof();){var ae=this.source[this.index];if(!dt.Character.isIdentifierPart(ae.charCodeAt(0)))break;if(++this.index,"\\"!==ae||this.eof())ue+=ae;else if("u"===(ae=this.source[this.index])){++this.index;var D=this.index,T=this.scanHexEscape("u");if(null!==T)for(ue+=T;D=55296&&se<57343&&dt.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ve}();De.Scanner=Ve},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.TokenName={},De.TokenName[1]="Boolean",De.TokenName[2]="",De.TokenName[3]="Identifier",De.TokenName[4]="Keyword",De.TokenName[5]="Null",De.TokenName[6]="Numeric",De.TokenName[7]="Punctuator",De.TokenName[8]="String",De.TokenName[9]="RegularExpression",De.TokenName[10]="Template"},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(10),dt=rt(12),Ge=rt(13),_e=function(){function Ve(){this.values=[],this.curly=this.paren=-1}return Ve.prototype.beforeFunctionExpression=function(ve){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ve)>=0},Ve.prototype.isRegexStart=function(){var ve=this.values[this.values.length-1],se=null!==ve;switch(ve){case"this":case"]":se=!1;break;case")":var ue=this.values[this.paren-1];se="if"===ue||"while"===ue||"for"===ue||"with"===ue;break;case"}":if(se=!1,"function"===this.values[this.curly-3])se=!!(ae=this.values[this.curly-4])&&!this.beforeFunctionExpression(ae);else if("function"===this.values[this.curly-4]){var ae;se=!(ae=this.values[this.curly-5])||!this.beforeFunctionExpression(ae)}}return se},Ve.prototype.push=function(ve){7===ve.type||4===ve.type?("{"===ve.value?this.curly=this.values.length:"("===ve.value&&(this.paren=this.values.length),this.values.push(ve.value)):this.values.push(null)},Ve}(),et=function(){function Ve(ve,se){this.errorHandler=new Oe.ErrorHandler,this.errorHandler.tolerant=!!se&&"boolean"==typeof se.tolerant&&se.tolerant,this.scanner=new dt.Scanner(ve,this.errorHandler),this.scanner.trackComment=!!se&&"boolean"==typeof se.comment&&se.comment,this.trackRange=!!se&&"boolean"==typeof se.range&&se.range,this.trackLoc=!!se&&"boolean"==typeof se.loc&&se.loc,this.buffer=[],this.reader=new _e}return Ve.prototype.errors=function(){return this.errorHandler.errors},Ve.prototype.getNextToken=function(){if(0===this.buffer.length){var ve=this.scanner.scanComments();if(this.scanner.trackComment)for(var se=0;se=ae.status}function et(ue){try{ue.dispatchEvent(new MouseEvent("click"))}catch{var ae=document.createEvent("MouseEvents");ae.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ue.dispatchEvent(ae)}}var Ve="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ve=Ve.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),se=Ve.saveAs||("object"!=typeof window||window!==Ve?function(){}:"download"in HTMLAnchorElement.prototype&&!ve?function(ue,ae,D){var T=Ve.URL||Ve.webkitURL,O=document.createElement("a");O.download=ae=ae||ue.name||"download",O.rel="noopener","string"==typeof ue?(O.href=ue,O.origin===location.origin?et(O):_e(O.href)?Ge(ue,ae,D):et(O,O.target="_blank")):(O.href=T.createObjectURL(ue),setTimeout(function(){T.revokeObjectURL(O.href)},4e4),setTimeout(function(){et(O)},0))}:"msSaveOrOpenBlob"in navigator?function(ue,ae,D){if(ae=ae||ue.name||"download","string"!=typeof ue)navigator.msSaveOrOpenBlob(function dt(ue,ae){return typeof ae>"u"?ae={autoBom:!1}:"object"!=typeof ae&&(console.warn("Deprecated: Expected third argument to be a object"),ae={autoBom:!ae}),ae.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ue.type)?new Blob(["\ufeff",ue],{type:ue.type}):ue}(ue,D),ae);else if(_e(ue))Ge(ue,ae,D);else{var T=document.createElement("a");T.href=ue,T.target="_blank",setTimeout(function(){et(T)})}}:function(ue,ae,D,T){if((T=T||open("","_blank"))&&(T.document.title=T.document.body.innerText="downloading..."),"string"==typeof ue)return Ge(ue,ae,D);var O="application/octet-stream"===ue.type,te=/constructor/i.test(Ve.HTMLElement)||Ve.safari,Me=/CriOS\/[\d]+/.test(navigator.userAgent);if((Me||O&&te||ve)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Wt=Je.result;Wt=Me?Wt:Wt.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=Wt:location=Wt,T=null},Je.readAsDataURL(ue)}else{var kt=Ve.URL||Ve.webkitURL,jt=kt.createObjectURL(ue);T?T.location=jt:location.href=jt,T=null,setTimeout(function(){kt.revokeObjectURL(jt)},4e4)}});Ve.saveAs=se.saveAs=se,Yt.exports=se})?De.apply(Tn,[]):De)&&(Yt.exports=Oe)},461:(Yt,Tn)=>{Tn.read=function(De,rt,Oe,dt,Ge){var _e,et,Ve=8*Ge-dt-1,ve=(1<>1,ue=-7,ae=Oe?Ge-1:0,D=Oe?-1:1,T=De[rt+ae];for(ae+=D,_e=T&(1<<-ue)-1,T>>=-ue,ue+=Ve;ue>0;_e=256*_e+De[rt+ae],ae+=D,ue-=8);for(et=_e&(1<<-ue)-1,_e>>=-ue,ue+=dt;ue>0;et=256*et+De[rt+ae],ae+=D,ue-=8);if(0===_e)_e=1-se;else{if(_e===ve)return et?NaN:1/0*(T?-1:1);et+=Math.pow(2,dt),_e-=se}return(T?-1:1)*et*Math.pow(2,_e-dt)},Tn.write=function(De,rt,Oe,dt,Ge,_e){var et,Ve,ve,se=8*_e-Ge-1,ue=(1<>1,D=23===Ge?Math.pow(2,-24)-Math.pow(2,-77):0,T=dt?0:_e-1,O=dt?1:-1,te=rt<0||0===rt&&1/rt<0?1:0;for(rt=Math.abs(rt),isNaN(rt)||rt===1/0?(Ve=isNaN(rt)?1:0,et=ue):(et=Math.floor(Math.log(rt)/Math.LN2),rt*(ve=Math.pow(2,-et))<1&&(et--,ve*=2),(rt+=et+ae>=1?D/ve:D*Math.pow(2,1-ae))*ve>=2&&(et++,ve/=2),et+ae>=ue?(Ve=0,et=ue):et+ae>=1?(Ve=(rt*ve-1)*Math.pow(2,Ge),et+=ae):(Ve=rt*Math.pow(2,ae-1)*Math.pow(2,Ge),et=0));Ge>=8;De[Oe+T]=255&Ve,T+=O,Ve/=256,Ge-=8);for(et=et<0;De[Oe+T]=255&et,T+=O,et/=256,se-=8);De[Oe+T-O]|=128*te}},870:(Yt,Tn,De)=>{"use strict";var rt=De(133);Yt.exports=rt},133:(Yt,Tn,De)=>{"use strict";var rt=De(840),Oe=De(34);function dt(Ge){return function(){throw new Error("Function "+Ge+" is deprecated and cannot be used.")}}Yt.exports.Type=De(647),Yt.exports.Schema=De(372),Yt.exports.FAILSAFE_SCHEMA=De(746),Yt.exports.JSON_SCHEMA=De(147),Yt.exports.CORE_SCHEMA=De(192),Yt.exports.DEFAULT_SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_FULL_SCHEMA=De(94),Yt.exports.load=rt.load,Yt.exports.loadAll=rt.loadAll,Yt.exports.safeLoad=rt.safeLoad,Yt.exports.safeLoadAll=rt.safeLoadAll,Yt.exports.dump=Oe.dump,Yt.exports.safeDump=Oe.safeDump,Yt.exports.YAMLException=De(314),Yt.exports.MINIMAL_SCHEMA=De(746),Yt.exports.SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_SCHEMA=De(94),Yt.exports.scan=dt("scan"),Yt.exports.parse=dt("parse"),Yt.exports.compose=dt("compose"),Yt.exports.addConstructor=dt("addConstructor")},997:Yt=>{"use strict";function Tn(_e){return typeof _e>"u"||null===_e}Yt.exports.isNothing=Tn,Yt.exports.isObject=function De(_e){return"object"==typeof _e&&null!==_e},Yt.exports.toArray=function rt(_e){return Array.isArray(_e)?_e:Tn(_e)?[]:[_e]},Yt.exports.repeat=function dt(_e,et){var ve,Ve="";for(ve=0;ve{"use strict";var rt=De(997),Oe=De(314),dt=De(94),Ge=De(31),_e=Object.prototype.toString,et=Object.prototype.hasOwnProperty,Ve=9,ve=10,se=13,ue=32,ae=33,D=34,T=35,O=37,te=38,Me=39,Je=42,kt=44,jt=45,Wt=58,wn=61,rn=62,Mi=63,zr=64,Xr=91,hs=93,Ya=96,tr=123,mu=124,Sa=125,yn={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(pe){var yt,Nt,Kt;if(yt=pe.toString(16).toUpperCase(),pe<=255)Nt="x",Kt=2;else if(pe<=65535)Nt="u",Kt=4;else{if(!(pe<=4294967295))throw new Oe("code point within a string may not be greater than 0xFFFFFFFF");Nt="U",Kt=8}return"\\"+Nt+rt.repeat("0",Kt-yt.length)+yt}function Nc(pe){this.schema=pe.schema||dt,this.indent=Math.max(1,pe.indent||2),this.noArrayIndent=pe.noArrayIndent||!1,this.skipInvalid=pe.skipInvalid||!1,this.flowLevel=rt.isNothing(pe.flowLevel)?-1:pe.flowLevel,this.styleMap=function kd(pe,yt){var Nt,Kt,Xt,Pt,dn,qt,We;if(null===yt)return{};for(Nt={},Xt=0,Pt=(Kt=Object.keys(yt)).length;Xt0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}else{for(Pt=0;PtKt&&" "!==pe[Cn+1],Cn=Pt);else if(!Da(dn))return Ja;qt=Pt>0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}Xe=Xe||bt&&Pt-Cn-1>Kt&&" "!==pe[Cn+1]}return We||Xe?Nt>9&&Sd(pe)?Ja:Xe?vu:Dd:jr&&!Xt(pe)?Fc:Oc}(yt,Kt||pe.flowLevel>-1&&Nt>=pe.flowLevel,pe.indent,Pt,function qt(We){return function Co(pe,yt){var Nt,Kt;for(Nt=0,Kt=pe.implicitTypes.length;Nt"+ml(yt,pe.indent)+Te(gu(function W(pe,yt){for(var Pt,dn,Nt=/(\n+)([^\n]*)/g,Kt=(Xe=void 0,Xe=pe.indexOf("\n"),Nt.lastIndex=Xe=-1!==Xe?Xe:pe.length,ee(pe.slice(0,Xe),yt)),Xt="\n"===pe[0]||" "===pe[0];dn=Nt.exec(pe);){var We=dn[2];Pt=" "===We[0],Kt+=dn[1]+(Xt||Pt||""===We?"":"\n")+ee(We,yt),Xt=Pt}var Xe;return Kt}(yt,Pt),Xt));case Ja:return'"'+function Fe(pe){for(var Nt,Kt,Xt,yt="",Pt=0;Pt=55296&&Nt<=56319&&(Kt=pe.charCodeAt(Pt+1))>=56320&&Kt<=57343?(yt+=Kn(1024*(Nt-55296)+Kt-56320+65536),Pt++):yt+=!(Xt=yn[Nt])&&Da(Nt)?pe[Pt]:Xt||Kn(Nt);return yt}(yt)+'"';default:throw new Oe("impossible error: invalid scalar style")}}()}function ml(pe,yt){var Nt=Sd(pe)?String(yt):"",Kt="\n"===pe[pe.length-1];return Nt+(!Kt||"\n"!==pe[pe.length-2]&&"\n"!==pe?Kt?"":"-":"+")+"\n"}function Te(pe){return"\n"===pe[pe.length-1]?pe.slice(0,-1):pe}function ee(pe,yt){if(""===pe||" "===pe[0])return pe;for(var Kt,Pt,Nt=/ [^ ]/g,Xt=0,dn=0,qt=0,We="";Kt=Nt.exec(pe);)(qt=Kt.index)-Xt>yt&&(We+="\n"+pe.slice(Xt,Pt=dn>Xt?dn:qt),Xt=Pt+1),dn=qt;return We+="\n",(We+=pe.length-Xt>yt&&dn>Xt?pe.slice(Xt,dn)+"\n"+pe.slice(dn+1):pe.slice(Xt)).slice(1)}function A(pe,yt,Nt){var Kt,Xt,Pt,dn,qt,We;for(Pt=0,dn=(Xt=Nt?pe.explicitTypes:pe.implicitTypes).length;Pt tag resolver accepts not "'+We+'" style');Kt=qt.represent[We](yt,We)}pe.dump=Kt}return!0}return!1}function st(pe,yt,Nt,Kt,Xt,Pt){pe.tag=null,pe.dump=Nt,A(pe,Nt,!1)||A(pe,Nt,!0);var dn=_e.call(pe.dump);Kt&&(Kt=pe.flowLevel<0||pe.flowLevel>yt);var We,Xe,qt="[object Object]"===dn||"[object Array]"===dn;if(qt&&(Xe=-1!==(We=pe.duplicates.indexOf(Nt))),(null!==pe.tag&&"?"!==pe.tag||Xe||2!==pe.indent&&yt>0)&&(Xt=!1),Xe&&pe.usedDuplicates[We])pe.dump="*ref_"+We;else{if(qt&&Xe&&!pe.usedDuplicates[We]&&(pe.usedDuplicates[We]=!0),"[object Object]"===dn)Kt&&0!==Object.keys(pe.dump).length?(function nr(pe,yt,Nt,Kt){var qt,We,Xe,bt,Cn,jr,Xt="",Pt=pe.tag,dn=Object.keys(Nt);if(!0===pe.sortKeys)dn.sort();else if("function"==typeof pe.sortKeys)dn.sort(pe.sortKeys);else if(pe.sortKeys)throw new Oe("sortKeys must be a boolean or a function");for(qt=0,We=dn.length;qt1024)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+="?":jr+="? "),jr+=pe.dump,Cn&&(jr+=Ro(pe,yt)),st(pe,yt+1,bt,!0,Cn)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+=":":jr+=": ",Xt+=jr+=pe.dump));pe.tag=Pt,pe.dump=Xt||"{}"}(pe,yt,pe.dump,Xt),Xe&&(pe.dump="&ref_"+We+pe.dump)):(function Qt(pe,yt,Nt){var dn,qt,We,Xe,bt,Kt="",Xt=pe.tag,Pt=Object.keys(Nt);for(dn=0,qt=Pt.length;dn1024&&(bt+="? "),bt+=pe.dump+(pe.condenseFlow?'"':"")+":"+(pe.condenseFlow?"":" "),st(pe,yt,Xe,!1,!1)&&(Kt+=bt+=pe.dump));pe.tag=Xt,pe.dump="{"+Kt+"}"}(pe,yt,pe.dump),Xe&&(pe.dump="&ref_"+We+" "+pe.dump));else if("[object Array]"===dn){var bt=pe.noArrayIndent&&yt>0?yt-1:yt;Kt&&0!==pe.dump.length?(function zt(pe,yt,Nt,Kt){var dn,qt,Xt="",Pt=pe.tag;for(dn=0,qt=Nt.length;dn "+pe.dump)}return!0}function Tt(pe,yt){var Xt,Pt,Nt=[],Kt=[];for(Ut(pe,Nt,Kt),Xt=0,Pt=Kt.length;Xt{"use strict";function Tn(De,rt){Error.call(this),this.name="YAMLException",this.reason=De,this.mark=rt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Tn.prototype=Object.create(Error.prototype)).constructor=Tn,Tn.prototype.toString=function(rt){var Oe=this.name+": ";return Oe+=this.reason||"(unknown reason)",!rt&&this.mark&&(Oe+=" "+this.mark.toString()),Oe},Yt.exports=Tn},840:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(48),Ge=De(31),_e=De(94),et=Object.prototype.hasOwnProperty,Ve=1,ve=2,se=3,ue=4,ae=1,D=2,T=3,O=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,te=/[\x85\u2028\u2029]/,Me=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,kt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jt(A){return Object.prototype.toString.call(A)}function Wt(A){return 10===A||13===A}function wn(A){return 9===A||32===A}function rn(A){return 9===A||32===A||10===A||13===A}function Mi(A){return 44===A||91===A||93===A||123===A||125===A}function zr(A){var st;return 48<=A&&A<=57?A-48:97<=(st=32|A)&&st<=102?st-97+10:-1}function Xr(A){return 120===A?2:117===A?4:85===A?8:0}function hs(A){return 48<=A&&A<=57?A-48:-1}function Ya(A){return 48===A?"\0":97===A?"\x07":98===A?"\b":116===A||9===A?"\t":110===A?"\n":118===A?"\v":102===A?"\f":114===A?"\r":101===A?"\x1b":32===A?" ":34===A?'"':47===A?"/":92===A?"\\":78===A?"\x85":95===A?"\xa0":76===A?"\u2028":80===A?"\u2029":""}function tr(A){return A<=65535?String.fromCharCode(A):String.fromCharCode(55296+(A-65536>>10),56320+(A-65536&1023))}for(var mu=new Array(256),Sa=new Array(256),yn=0;yn<256;yn++)mu[yn]=Ya(yn)?1:0,Sa[yn]=Ya(yn);function Cd(A,st){this.input=A,this.filename=st.filename||null,this.schema=st.schema||_e,this.onWarning=st.onWarning||null,this.legacy=st.legacy||!1,this.json=st.json||!1,this.listener=st.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=A.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function kd(A,st){return new Oe(st,new dt(A.filename,A.input,A.position,A.line,A.position-A.lineStart))}function Kn(A,st){throw kd(A,st)}function Nc(A,st){A.onWarning&&A.onWarning.call(null,kd(A,st))}var gu={YAML:function(st,Tt,Ut){var Vt,mn,pe;null!==st.version&&Kn(st,"duplication of %YAML directive"),1!==Ut.length&&Kn(st,"YAML directive accepts exactly one argument"),null===(Vt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(st,"ill-formed argument of the YAML directive"),mn=parseInt(Vt[1],10),pe=parseInt(Vt[2],10),1!==mn&&Kn(st,"unacceptable YAML version of the document"),st.version=Ut[0],st.checkLineBreaks=pe<2,1!==pe&&2!==pe&&Nc(st,"unsupported YAML version of the document")},TAG:function(st,Tt,Ut){var Vt,mn;2!==Ut.length&&Kn(st,"TAG directive accepts exactly two arguments"),mn=Ut[1],Je.test(Vt=Ut[0])||Kn(st,"ill-formed tag handle (first argument) of the TAG directive"),et.call(st.tagMap,Vt)&&Kn(st,'there is a previously declared suffix for "'+Vt+'" tag handle'),kt.test(mn)||Kn(st,"ill-formed tag prefix (second argument) of the TAG directive"),st.tagMap[Vt]=mn}};function Ro(A,st,Tt,Ut){var Vt,mn,pe,yt;if(st1&&(A.result+=rt.repeat("\n",st-1))}function Ja(A,st){var Tt,Nt,Ut=A.tag,Vt=A.anchor,mn=[],yt=!1;for(null!==A.anchor&&(A.anchorMap[A.anchor]=mn),Nt=A.input.charCodeAt(A.position);0!==Nt&&45===Nt&&rn(A.input.charCodeAt(A.position+1));)if(yt=!0,A.position++,Zr(A,!0,-1)&&A.lineIndent<=st)mn.push(null),Nt=A.input.charCodeAt(A.position);else if(Tt=A.line,W(A,st,se,!1,!0),mn.push(A.result),Zr(A,!0,-1),Nt=A.input.charCodeAt(A.position),(A.line===Tt||A.lineIndent>st)&&0!==Nt)Kn(A,"bad indentation of a sequence entry");else if(A.lineIndentst?Nt=1:A.lineIndent===st?Nt=0:A.lineIndentst?Nt=1:A.lineIndent===st?Nt=0:A.lineIndentst)&&(W(A,st,ue,!0,Vt)&&(We?dn=A.result:qt=A.result),We||(lo(A,Kt,Xt,Pt,dn,qt,mn,pe),Pt=dn=qt=null),Zr(A,!0,-1),bt=A.input.charCodeAt(A.position)),A.lineIndent>st&&0!==bt)Kn(A,"bad indentation of a mapping entry");else if(A.lineIndent=0))break;0===Xt?Kn(A,"bad explicit indentation width of a block scalar; it cannot be less than one"):pe?Kn(A,"repeat of an indentation width identifier"):(yt=st+Xt-1,pe=!0)}if(wn(Pt)){do{Pt=A.input.charCodeAt(++A.position)}while(wn(Pt));if(35===Pt)do{Pt=A.input.charCodeAt(++A.position)}while(!Wt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Da(A),A.lineIndent=0,Pt=A.input.charCodeAt(A.position);(!pe||A.lineIndentyt&&(yt=A.lineIndent),Wt(Pt))Nt++;else{if(A.lineIndent0){for(Vt=pe,mn=0;Vt>0;Vt--)(pe=zr(yt=A.input.charCodeAt(++A.position)))>=0?mn=(mn<<4)+pe:Kn(A,"expected hexadecimal character");A.result+=tr(mn),A.position++}else Kn(A,"unknown escape sequence");Tt=Ut=A.position}else Wt(yt)?(Ro(A,Tt,Ut,!0),nc(A,Zr(A,!1,st)),Tt=Ut=A.position):A.position===A.lineStart&&pl(A)?Kn(A,"unexpected end of the document within a double quoted scalar"):(A.position++,Ut=A.position)}Kn(A,"unexpected end of the stream within a double quoted scalar")}(A,We)?Xt=!0:function Te(A){var st,Tt,Ut;if(42!==(Ut=A.input.charCodeAt(A.position)))return!1;for(Ut=A.input.charCodeAt(++A.position),st=A.position;0!==Ut&&!rn(Ut)&&!Mi(Ut);)Ut=A.input.charCodeAt(++A.position);return A.position===st&&Kn(A,"name of an alias node must contain at least one character"),Tt=A.input.slice(st,A.position),A.anchorMap.hasOwnProperty(Tt)||Kn(A,'unidentified alias "'+Tt+'"'),A.result=A.anchorMap[Tt],Zr(A,!0,-1),!0}(A)?(Xt=!0,(null!==A.tag||null!==A.anchor)&&Kn(A,"alias node should not have any properties")):function Sd(A,st,Tt){var Vt,mn,pe,yt,Nt,Kt,Xt,qt,Pt=A.kind,dn=A.result;if(rn(qt=A.input.charCodeAt(A.position))||Mi(qt)||35===qt||38===qt||42===qt||33===qt||124===qt||62===qt||39===qt||34===qt||37===qt||64===qt||96===qt||(63===qt||45===qt)&&(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt)))return!1;for(A.kind="scalar",A.result="",mn=pe=A.position,yt=!1;0!==qt;){if(58===qt){if(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt))break}else if(35===qt){if(rn(A.input.charCodeAt(A.position-1)))break}else{if(A.position===A.lineStart&&pl(A)||Tt&&Mi(qt))break;if(Wt(qt)){if(Nt=A.line,Kt=A.lineStart,Xt=A.lineIndent,Zr(A,!1,-1),A.lineIndent>=st){yt=!0,qt=A.input.charCodeAt(A.position);continue}A.position=pe,A.line=Nt,A.lineStart=Kt,A.lineIndent=Xt;break}}yt&&(Ro(A,mn,pe,!1),nc(A,A.line-Nt),mn=pe=A.position,yt=!1),wn(qt)||(pe=A.position+1),qt=A.input.charCodeAt(++A.position)}return Ro(A,mn,pe,!1),!!A.result||(A.kind=Pt,A.result=dn,!1)}(A,We,Ve===Tt)&&(Xt=!0,null===A.tag&&(A.tag="?")),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):0===Nt&&(Xt=yt&&Ja(A,Xe))),null!==A.tag&&"!"!==A.tag)if("?"===A.tag){for(null!==A.result&&"scalar"!==A.kind&&Kn(A,'unacceptable node kind for ! tag; it should be "scalar", not "'+A.kind+'"'),Pt=0,dn=A.implicitTypes.length;Pt tag; it should be "'+qt.kind+'", not "'+A.kind+'"'),qt.resolve(A.result)?(A.result=qt.construct(A.result),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):Kn(A,"cannot resolve a node with !<"+A.tag+"> explicit tag")):Kn(A,"unknown tag !<"+A.tag+">");return null!==A.listener&&A.listener("close",A),null!==A.tag||null!==A.anchor||Xt}function ee(A){var Tt,Ut,Vt,pe,st=A.position,mn=!1;for(A.version=null,A.checkLineBreaks=A.legacy,A.tagMap={},A.anchorMap={};0!==(pe=A.input.charCodeAt(A.position))&&(Zr(A,!0,-1),pe=A.input.charCodeAt(A.position),!(A.lineIndent>0||37!==pe));){for(mn=!0,pe=A.input.charCodeAt(++A.position),Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);for(Vt=[],(Ut=A.input.slice(Tt,A.position)).length<1&&Kn(A,"directive name must not be less than one character in length");0!==pe;){for(;wn(pe);)pe=A.input.charCodeAt(++A.position);if(35===pe){do{pe=A.input.charCodeAt(++A.position)}while(0!==pe&&!Wt(pe));break}if(Wt(pe))break;for(Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);Vt.push(A.input.slice(Tt,A.position))}0!==pe&&Da(A),et.call(gu,Ut)?gu[Ut](A,Ut,Vt):Nc(A,'unknown document directive "'+Ut+'"')}Zr(A,!0,-1),0===A.lineIndent&&45===A.input.charCodeAt(A.position)&&45===A.input.charCodeAt(A.position+1)&&45===A.input.charCodeAt(A.position+2)?(A.position+=3,Zr(A,!0,-1)):mn&&Kn(A,"directives end mark is expected"),W(A,A.lineIndent-1,ue,!1,!0),Zr(A,!0,-1),A.checkLineBreaks&&te.test(A.input.slice(st,A.position))&&Nc(A,"non-ASCII line breaks are interpreted as content"),A.documents.push(A.result),A.position===A.lineStart&&pl(A)?46===A.input.charCodeAt(A.position)&&(A.position+=3,Zr(A,!0,-1)):A.position"u"&&(Tt=st,st=null);var Ut=Fe(A,Tt);if("function"!=typeof st)return Ut;for(var Vt=0,mn=Ut.length;Vt"u"&&(Tt=st,st=null),nt(A,st,rt.extend({schema:Ge},Tt))},Yt.exports.safeLoad=function nr(A,st){return zt(A,rt.extend({schema:Ge},st))}},48:(Yt,Tn,De)=>{"use strict";var rt=De(997);function Oe(dt,Ge,_e,et,Ve){this.name=dt,this.buffer=Ge,this.position=_e,this.line=et,this.column=Ve}Oe.prototype.getSnippet=function(Ge,_e){var et,Ve,ve,se,ue;if(!this.buffer)return null;for(Ge=Ge||4,_e=_e||75,et="",Ve=this.position;Ve>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(Ve-1));)if(this.position-(Ve-=1)>_e/2-1){et=" ... ",Ve+=5;break}for(ve="",se=this.position;se_e/2-1){ve=" ... ",se-=5;break}return ue=this.buffer.slice(Ve,se),rt.repeat(" ",Ge)+et+ue+ve+"\n"+rt.repeat(" ",Ge+this.position-Ve+et.length)+"^"},Oe.prototype.toString=function(Ge){var _e,et="";return this.name&&(et+='in "'+this.name+'" '),et+="at line "+(this.line+1)+", column "+(this.column+1),Ge||(_e=this.getSnippet())&&(et+=":\n"+_e),et},Yt.exports=Oe},372:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(647);function Ge(Ve,ve,se){var ue=[];return Ve.include.forEach(function(ae){se=Ge(ae,ve,se)}),Ve[ve].forEach(function(ae){se.forEach(function(D,T){D.tag===ae.tag&&D.kind===ae.kind&&ue.push(T)}),se.push(ae)}),se.filter(function(ae,D){return-1===ue.indexOf(D)})}function et(Ve){this.include=Ve.include||[],this.implicit=Ve.implicit||[],this.explicit=Ve.explicit||[],this.implicit.forEach(function(ve){if(ve.loadKind&&"scalar"!==ve.loadKind)throw new Oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ge(this,"implicit",[]),this.compiledExplicit=Ge(this,"explicit",[]),this.compiledTypeMap=function _e(){var ve,se,Ve={scalar:{},sequence:{},mapping:{},fallback:{}};function ue(ae){Ve[ae.kind][ae.tag]=Ve.fallback[ae.tag]=ae}for(ve=0,se=arguments.length;ve{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(147)]})},94:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=rt.DEFAULT=new rt({include:[De(31)],explicit:[De(771),De(632),De(716)]})},31:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(192)],implicit:[De(934),De(996)],explicit:[De(486),De(166),De(711),De(738)]})},746:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({explicit:[De(464),De(322),De(71)]})},147:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(746)],implicit:[De(568),De(911),De(877),De(615)]})},647:(Yt,Tn,De)=>{"use strict";var rt=De(314),Oe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dt=["scalar","sequence","mapping"];Yt.exports=function _e(et,Ve){if(Ve=Ve||{},Object.keys(Ve).forEach(function(ve){if(-1===Oe.indexOf(ve))throw new rt('Unknown option "'+ve+'" is met in definition of "'+et+'" YAML type.')}),this.tag=et,this.kind=Ve.kind||null,this.resolve=Ve.resolve||function(){return!0},this.construct=Ve.construct||function(ve){return ve},this.instanceOf=Ve.instanceOf||null,this.predicate=Ve.predicate||null,this.represent=Ve.represent||null,this.defaultStyle=Ve.defaultStyle||null,this.styleAliases=function Ge(et){var Ve={};return null!==et&&Object.keys(et).forEach(function(ve){et[ve].forEach(function(se){Ve[String(se)]=ve})}),Ve}(Ve.styleAliases||null),-1===dt.indexOf(this.kind))throw new rt('Unknown kind "'+this.kind+'" is specified for "'+et+'" YAML type.')}},486:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(172).lW}catch{}var dt=De(647),Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function _e(se){if(null===se)return!1;var ue,ae,D=0,T=se.length,O=Ge;for(ae=0;ae64)){if(ue<0)return!1;D+=6}return D%8==0},construct:function et(se){var ue,ae,D=se.replace(/[\r\n=]/g,""),T=D.length,O=Ge,te=0,Me=[];for(ue=0;ue>16&255),Me.push(te>>8&255),Me.push(255&te)),te=te<<6|O.indexOf(D.charAt(ue));return 0==(ae=T%4*6)?(Me.push(te>>16&255),Me.push(te>>8&255),Me.push(255&te)):18===ae?(Me.push(te>>10&255),Me.push(te>>2&255)):12===ae&&Me.push(te>>4&255),rt?rt.from?rt.from(Me):new rt(Me):Me},predicate:function ve(se){return rt&&rt.isBuffer(se)},represent:function Ve(se){var D,T,ue="",ae=0,O=se.length,te=Ge;for(D=0;D>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]),ae=(ae<<8)+se[D];return 0==(T=O%3)?(ue+=te[ae>>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]):2===T?(ue+=te[ae>>10&63],ue+=te[ae>>4&63],ue+=te[ae<<2&63],ue+=te[64]):1===T&&(ue+=te[ae>>2&63],ue+=te[ae<<4&63],ue+=te[64],ue+=te[64]),ue}})},911:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!1;var et=_e.length;return 4===et&&("true"===_e||"True"===_e||"TRUE"===_e)||5===et&&("false"===_e||"False"===_e||"FALSE"===_e)},construct:function dt(_e){return"true"===_e||"True"===_e||"TRUE"===_e},predicate:function Ge(_e){return"[object Boolean]"===Object.prototype.toString.call(_e)},represent:{lowercase:function(_e){return _e?"true":"false"},uppercase:function(_e){return _e?"TRUE":"FALSE"},camelcase:function(_e){return _e?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647),dt=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),et=/^[-+]?[0-9]+e/;Yt.exports=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:function Ge(se){return!(null===se||!dt.test(se)||"_"===se[se.length-1])},construct:function _e(se){var ue,ae,D,T;return ae="-"===(ue=se.replace(/_/g,"").toLowerCase())[0]?-1:1,T=[],"+-".indexOf(ue[0])>=0&&(ue=ue.slice(1)),".inf"===ue?1===ae?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ue?NaN:ue.indexOf(":")>=0?(ue.split(":").forEach(function(O){T.unshift(parseFloat(O,10))}),ue=0,D=1,T.forEach(function(O){ue+=O*D,D*=60}),ae*ue):ae*parseFloat(ue,10)},predicate:function ve(se){return"[object Number]"===Object.prototype.toString.call(se)&&(se%1!=0||rt.isNegativeZero(se))},represent:function Ve(se,ue){var ae;if(isNaN(se))switch(ue){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===se)switch(ue){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===se)switch(ue){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(rt.isNegativeZero(se))return"-0.0";return ae=se.toString(10),et.test(ae)?ae.replace("e",".e"):ae},defaultStyle:"lowercase"})},877:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647);function dt(se){return 48<=se&&se<=57||65<=se&&se<=70||97<=se&&se<=102}function Ge(se){return 48<=se&&se<=55}function _e(se){return 48<=se&&se<=57}Yt.exports=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:function et(se){if(null===se)return!1;var T,ue=se.length,ae=0,D=!1;if(!ue)return!1;if(("-"===(T=se[ae])||"+"===T)&&(T=se[++ae]),"0"===T){if(ae+1===ue)return!0;if("b"===(T=se[++ae])){for(ae++;ae=0?"0b"+se.toString(2):"-0b"+se.toString(2).slice(1)},octal:function(se){return se>=0?"0"+se.toString(8):"-0"+se.toString(8).slice(1)},decimal:function(se){return se.toString(10)},hexadecimal:function(se){return se>=0?"0x"+se.toString(16).toUpperCase():"-0x"+se.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(797)}catch{typeof window<"u"&&(rt=window.esprima)}var dt=De(647);Yt.exports=new dt("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function Ge(ve){if(null===ve)return!1;try{var ue=rt.parse("("+ve+")",{range:!0});return!("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)}catch{return!1}},construct:function _e(ve){var D,se="("+ve+")",ue=rt.parse(se,{range:!0}),ae=[];if("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)throw new Error("Failed to resolve function");return ue.body[0].expression.params.forEach(function(T){ae.push(T.name)}),D=ue.body[0].expression.body.range,new Function(ae,"BlockStatement"===ue.body[0].expression.body.type?se.slice(D[0]+1,D[1]-1):"return "+se.slice(D[0],D[1]))},predicate:function Ve(ve){return"[object Function]"===Object.prototype.toString.call(ve)},represent:function et(ve){return ve.toString()}})},632:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Oe(et){if(null===et||0===et.length)return!1;var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return!("/"===Ve[0]&&(ve&&(se=ve[1]),se.length>3||"/"!==Ve[Ve.length-se.length-1]))},construct:function dt(et){var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return"/"===Ve[0]&&(ve&&(se=ve[1]),Ve=Ve.slice(1,Ve.length-se.length-1)),new RegExp(Ve,se)},predicate:function _e(et){return"[object RegExp]"===Object.prototype.toString.call(et)},represent:function Ge(et){var Ve="/"+et.source+"/";return et.global&&(Ve+="g"),et.multiline&&(Ve+="m"),et.ignoreCase&&(Ve+="i"),Ve}})},771:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Oe(){return!0},construct:function dt(){},predicate:function _e(et){return typeof et>"u"},represent:function Ge(){return""}})},71:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Oe){return null!==Oe?Oe:{}}})},996:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Oe(dt){return"<<"===dt||null===dt}})},568:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!0;var et=_e.length;return 1===et&&"~"===_e||4===et&&("null"===_e||"Null"===_e||"NULL"===_e)},construct:function dt(){return null},predicate:function Ge(_e){return null===_e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function Ge(et){if(null===et)return!0;var ve,se,ue,ae,D,Ve=[],T=et;for(ve=0,se=T.length;ve{"use strict";var rt=De(647),Oe=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function dt(_e){if(null===_e)return!0;var et,Ve,ve,se,ue,ae=_e;for(ue=new Array(ae.length),et=0,Ve=ae.length;et{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Oe){return null!==Oe?Oe:[]}})},738:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty;Yt.exports=new rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function dt(_e){if(null===_e)return!0;var et,Ve=_e;for(et in Ve)if(Oe.call(Ve,et)&&null!==Ve[et])return!1;return!0},construct:function Ge(_e){return null!==_e?_e:{}}})},464:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Oe){return null!==Oe?Oe:""}})},934:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function Ge(Ve){return null!==Ve&&(null!==Oe.exec(Ve)||null!==dt.exec(Ve))},construct:function _e(Ve){var ve,se,ue,ae,D,T,O,jt,te=0,Me=null;if(null===(ve=Oe.exec(Ve))&&(ve=dt.exec(Ve)),null===ve)throw new Error("Date resolve error");if(se=+ve[1],ue=+ve[2]-1,ae=+ve[3],!ve[4])return new Date(Date.UTC(se,ue,ae));if(D=+ve[4],T=+ve[5],O=+ve[6],ve[7]){for(te=ve[7].slice(0,3);te.length<3;)te+="0";te=+te}return ve[9]&&(Me=6e4*(60*+ve[10]+ +(ve[11]||0)),"-"===ve[9]&&(Me=-Me)),jt=new Date(Date.UTC(se,ue,ae,D,T,O,te)),Me&&jt.setTime(jt.getTime()-Me),jt},instanceOf:Date,represent:function et(Ve){return Ve.toISOString()}})}},Yt=>{Yt(Yt.s=440)}]); \ No newline at end of file diff --git a/console/ui/dist/prod/index.html b/console/ui/dist/prod/index.html index 8962dc9ce6..0e517ed342 100644 --- a/console/ui/dist/prod/index.html +++ b/console/ui/dist/prod/index.html @@ -2,12 +2,12 @@ Nakama Console - + - + - + \ No newline at end of file diff --git a/console/ui/dist/prod/static/main.1201486d215da8ad.js b/console/ui/dist/prod/static/main.1201486d215da8ad.js new file mode 100644 index 0000000000..2b635ab7d0 --- /dev/null +++ b/console/ui/dist/prod/static/main.1201486d215da8ad.js @@ -0,0 +1 @@ +(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{440:(Yt,Tn,De)=>{"use strict";function rt(t){return"function"==typeof t}let Oe=!1;const dt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Oe&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Oe=t},get useDeprecatedSynchronousErrorHandling(){return Oe}};function Ge(t){setTimeout(()=>{throw t},0)}const _e={closed:!0,next(t){},error(t){if(dt.useDeprecatedSynchronousErrorHandling)throw t;Ge(t)},complete(){}},et=Array.isArray||(t=>t&&"number"==typeof t.length);function Ve(t){return null!==t&&"object"==typeof t}const se=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ue{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ue)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof se?e.errors:e),[])}ue.EMPTY=((t=new ue).closed=!0,t);const D="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class O extends ue{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_e;break;case 1:if(!n){this.destination=_e;break}if("object"==typeof n){n instanceof O?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new te(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new te(this,n,e,i)}}[D](){return this}static create(n,e,i){const r=new O(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class te extends O{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;rt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==_e&&(s=Object.create(e),rt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;dt.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=dt;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Ge(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Ge(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);dt.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),dt.useDeprecatedSynchronousErrorHandling)throw i;Ge(i)}}__tryOrSetError(n,e,i){if(!dt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return dt.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Ge(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const kt="function"==typeof Symbol&&Symbol.observable||"@@observable";function jt(t){return t}function wn(t){return 0===t.length?jt:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let rn=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof O)return t;if(t[D])return t[D]()}return t||n||e?new O(t,n,e):new O(_e)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||dt.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),dt.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){dt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Me(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof O?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Mi(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[kt](){return this}pipe(...e){return 0===e.length?this:wn(e)(this)}toPromise(e){return new(e=Mi(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Mi(t){if(t||(t=dt.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Xr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class hs extends ue{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends O{constructor(n){super(n),this.destination=n}}let tr=(()=>{class t extends rn{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[D](){return new Ya(this)}lift(e){const i=new mu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Xr;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mu(n,e),t})();class mu extends tr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ue.EMPTY}}function Sa(t){return t&&"function"==typeof t.schedule}function yn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new kd(n,this.project,this.thisArg))}}class kd extends O{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function pl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const nc=t=>{if(t&&"function"==typeof t[kt])return(t=>n=>{const e=t[kt]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Zr(t))return Kn(t);if(pl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ge),n))(t);if(t&&"function"==typeof t[Ro])return(t=>n=>{const e=t[Ro]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Ve(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Oc(t,n){return new rn(e=>{const i=new ue;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function co(t,n){return n?function da(t,n){if(null!=t){if(function vu(t){return t&&"function"==typeof t[kt]}(t))return function Sd(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>{const r=t[kt]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(pl(t))return function Nc(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Zr(t))return Oc(t,n);if(function Ja(t){return t&&"function"==typeof t[Ro]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new rn(e=>{const i=new ue;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Ro](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof rn?t:new rn(nc(t))}class ml extends O{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class W extends O{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Ne(t,n){if(!n.closed)return t instanceof rn?t.subscribe(n):nc(t)(n)}function nt(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(nt((r,o)=>co(t(r,o)).pipe(yn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new zt(t,e)))}class zt{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Qt(n,this.project,this.concurrent))}}class Qt extends W{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function A(t=Number.POSITIVE_INFINITY){return nt(jt,t)}function st(t,n){return n?Oc(t,n):new rn(Kn(t))}function Tt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Sa(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof rn?t[0]:A(n)(st(t,e))}function Ut(){return function(n){return n.lift(new Vt(n))}}class Vt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new mn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class mn extends O{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class pe extends rn{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ue,n.add(this.source.subscribe(new Ft(this.getSubject(),this))),n.closed&&(this._connection=null,n=ue.EMPTY)),n}refCount(){return Ut()(this)}}const yt=(()=>{const t=pe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Ft extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class dn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function qt(){return new tr}function We(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new dn(r,n));const o=Object.create(i,yt);return o.source=i,o.subjectFactory=r,o}}(qt)(t))}function Xe(t){for(let n in t)if(t[n]===Xe)return n;throw Error("Could not find renamed property on target object.")}function bt(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Cn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Cn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function jr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const Y0=Xe({__forward_ref__:Xe});function Gi(t){return t.__forward_ref__=Gi,t.toString=function(){return Cn(this())},t}function wi(t){return tT(t)?t():t}function tT(t){return"function"==typeof t&&t.hasOwnProperty(Y0)&&t.__forward_ref__===Gi}function nT(t){return t&&!!t.\u0275providers}const U_="https://g.co/ng/security#xss";class Ot extends Error{constructor(n,e){super(G_(n,e)),this.code=n}}function G_(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Ri(t){return"string"==typeof t?t:null==t?"":String(t)}function W_(t,n){throw new Ot(-201,!1)}function jc(t,n){null==t&&function to(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ci(t){return{providers:t.providers||[],imports:t.imports||[]}}function q_(t){return _L(t,X_)||_L(t,wL)}function _L(t,n){return t.hasOwnProperty(n)?t[n]:null}function xL(t){return t&&(t.hasOwnProperty(iT)||t.hasOwnProperty(hge))?t[iT]:null}const X_=Xe({\u0275prov:Xe}),iT=Xe({\u0275inj:Xe}),wL=Xe({ngInjectableDef:Xe}),hge=Xe({ngInjectorDef:Xe});var ki=(()=>((ki=ki||{})[ki.Default=0]="Default",ki[ki.Host=1]="Host",ki[ki.Self=2]="Self",ki[ki.SkipSelf=4]="SkipSelf",ki[ki.Optional=8]="Optional",ki))();let rT;function Pc(t){const n=rT;return rT=t,n}function CL(t,n,e){const i=q_(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ki.Optional?null:void 0!==n?n:void W_(Cn(t))}const $o=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),J0={},oT="__NG_DI_FLAG__",Y_="ngTempTokenPath",pge="ngTokenPath",mge=/\n/gm,gge="\u0275",kL="__source";let K0;function sg(t){const n=K0;return K0=t,n}function vge(t,n=ki.Default){if(void 0===K0)throw new Ot(-203,!1);return null===K0?CL(t,void 0,n):K0.get(t,n&ki.Optional?null:void 0,n)}function ct(t,n=ki.Default){return(function fge(){return rT}()||vge)(wi(t),n)}function ar(t,n=ki.Default){return ct(t,J_(n))}function J_(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function sT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),yu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(yu||(yu={})),yu))();const kh={},Yr=[],K_=Xe({\u0275cmp:Xe}),aT=Xe({\u0275dir:Xe}),lT=Xe({\u0275pipe:Xe}),DL=Xe({\u0275mod:Xe}),Sh=Xe({\u0275fac:Xe}),Z0=Xe({__NG_ELEMENT_ID__:Xe});let xge=0;function Rt(t){return vf(()=>{const e=!0===t.standalone,i={},r={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&t.dependencies||null,getStandaloneInjector:null,selectors:t.selectors||Yr,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||yu.Emulated,id:"c"+xge++,styles:t.styles||Yr,_:null,setInput:null,schemas:t.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=t.dependencies,s=t.features;return r.inputs=AL(t.inputs,i),r.outputs=AL(t.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(TL).filter(EL):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(vl).filter(EL):null,r})}function TL(t){return no(t)||Ka(t)}function EL(t){return null!==t}function Di(t){return vf(()=>({type:t.type,bootstrap:t.bootstrap||Yr,declarations:t.declarations||Yr,imports:t.imports||Yr,exports:t.exports||Yr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AL(t,n){if(null==t)return kh;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const Zt=Rt;function gl(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function no(t){return t[K_]||null}function Ka(t){return t[aT]||null}function vl(t){return t[lT]||null}function rc(t,n){const e=t[DL]||null;if(!e&&!0===n)throw new Error(`Type ${Cn(t)} does not have '\u0275mod' property.`);return e}const Dh=0,Rn=1,Ji=2,fs=3,bu=4,Ep=5,Qa=6,lg=7,ks=8,Q_=9,Z_=10,ir=11,cT=12,e1=13,ML=14,cg=15,Za=16,t1=17,ug=18,Ed=19,n1=20,IL=21,Bo=22,uT=1,FL=2,ex=7,tx=8,dg=9,yl=10;function oc(t){return Array.isArray(t)&&"object"==typeof t[uT]}function _u(t){return Array.isArray(t)&&!0===t[uT]}function dT(t){return 0!=(4&t.flags)}function i1(t){return t.componentOffset>-1}function nx(t){return 1==(1&t.flags)}function xu(t){return null!==t.template}function kge(t){return 0!=(256&t[Ji])}function Ap(t,n){return t.hasOwnProperty(Sh)?t[Sh]:null}class Tge{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Hn(){return jL}function jL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Age),Ege}function Ege(){const t=LL(this),n=t?.current;if(n){const e=t.previous;if(e===kh)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Age(t,n,e,i){const r=this.declaredInputs[e],o=LL(t)||function Mge(t,n){return t[PL]=n}(t,{previous:kh,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Tge(l&&l.currentValue,n,a===kh),t[i]=n}Hn.ngInherit=!0;const PL="__ngSimpleChanges__";function LL(t){return t[PL]||null}const Lc=function(t,n,e){},RL="svg";function Ta(t){for(;Array.isArray(t);)t=t[Dh];return t}function ix(t,n){return Ta(n[t])}function sc(t,n){return Ta(n[t.index])}function BL(t,n){return t.data[n]}function hg(t,n){return t[n]}function ac(t,n){const e=n[t];return oc(e)?e:e[Dh]}function rx(t){return 64==(64&t[Ji])}function yf(t,n){return null==n?null:t[n]}function VL(t){t[ug]=0}function fT(t,n){t[Ep]+=n;let e=t,i=t[fs];for(;null!==i&&(1===n&&1===e[Ep]||-1===n&&0===e[Ep]);)i[Ep]+=n,e=i,i=i[fs]}const $i={lFrame:KL(null),bindingsEnabled:!0};function zL(){return $i.bindingsEnabled}function Gt(){return $i.lFrame.lView}function Pr(){return $i.lFrame.tView}function $e(t){return $i.lFrame.contextLView=t,t[ks]}function Be(t){return $i.lFrame.contextLView=null,t}function Ea(){let t=UL();for(;null!==t&&64===t.type;)t=t.parent;return t}function UL(){return $i.lFrame.currentTNode}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function pT(){return $i.lFrame.isParent}function mT(){$i.lFrame.isParent=!1}function bl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function fg(){return $i.lFrame.bindingIndex++}function Eh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function zge(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,gT(n)}function gT(t){$i.lFrame.currentDirectiveIndex=t}function XL(){return $i.lFrame.currentQueryIndex}function yT(t){$i.lFrame.currentQueryIndex=t}function Gge(t){const n=t[Rn];return 2===n.type?n.declTNode:1===n.type?t[Qa]:null}function YL(t,n,e){if(e&ki.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ki.Host||(r=Gge(o),null===r||(o=o[cg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=JL();return i.currentTNode=n,i.lView=t,!0}function bT(t){const n=JL(),e=t[Rn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function JL(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?KL(t):n}function KL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function QL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const ZL=QL;function _T(){const t=QL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function _l(){return $i.lFrame.selectedIndex}function Mp(t){$i.lFrame.selectedIndex=t}function es(){const t=$i.lFrame;return BL(t.tView,t.selectedIndex)}function at(){$i.lFrame.currentNamespace=RL}function Ip(){!function Yge(){$i.lFrame.currentNamespace=null}()}function ox(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[ug]+=65536),(a>11>16&&(3&t[Ji])===n){t[Ji]+=2048,Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}else{Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}const pg=-1;class o1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function CT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[cg],e--;return i}let kT=!0;function ux(t){const n=kT;return kT=t,n}const oR=255,sR=5;let ive=0;const Md={};function dx(t,n){const e=aR(t,n);if(-1!==e)return e;const i=n[Rn];i.firstCreatePass&&(t.injectorIndex=n.length,ST(i.data,t),ST(n,null),ST(i.blueprint,null));const r=DT(t,n),o=t.injectorIndex;if(rR(r)){const s=lx(r),a=cx(r,n),l=a[Rn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function ST(t,n){t.push(0,0,0,0,0,0,0,0,n)}function aR(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function DT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=pR(r),null===i)return pg;if(e++,r=r[cg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return pg}function TT(t,n,e){!function rve(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Z0)&&(i=e[Z0]),null==i&&(i=e[Z0]=ive++);const r=i&oR;n.data[t+(r>>sR)]|=1<=0?n&oR:lve:n}(e);if("function"==typeof o){if(!YL(n,t,i))return i&ki.Host?lR(r,0,i):cR(n,e,i,r);try{const s=o(i);if(null!=s||i&ki.Optional)return s;W_()}finally{ZL()}}else if("number"==typeof o){let s=null,a=aR(t,n),l=pg,c=i&ki.Host?n[Za][Qa]:null;for((-1===a||i&ki.SkipSelf)&&(l=-1===a?DT(t,n):n[a+8],l!==pg&&fR(i,!1)?(s=n[Rn],a=lx(l),n=cx(l,n)):a=-1);-1!==a;){const u=n[Rn];if(hR(o,a,u.data)){const d=sve(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==pg&&fR(i,n[Rn].data[a+8]===c)&&hR(o,a,n)?(s=u,a=lx(l),n=cx(l,n)):a=-1}}return r}function sve(t,n,e,i,r,o){const s=n[Rn],a=s.data[t+8],u=hx(a,s,e,null==i?i1(a)&&kT:i!=s&&0!=(3&a.type),r&ki.Host&&o===a);return null!==u?Fp(n,s,u,a):Md}function hx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xu(f)&&f.type===e)return l}return null}function Fp(t,n,e,i){let r=t[e];const o=n.data;if(function Zge(t){return t instanceof o1}(r)){const s=r;s.resolving&&function rge(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Ot(-200,`Circular dependency in DI detected for ${t}${e}`)}(function eo(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ri(t)}(o[e]));const a=ux(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Pc(s.injectImpl):null;YL(t,i,ki.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function Kge(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=jL(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Pc(l),ux(a),s.resolving=!1,ZL()}}return r}function hR(t,n,e){return!!(e[n+(t>>sR)]&1<{const n=t.prototype.constructor,e=n[Sh]||ET(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Sh]||ET(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ET(t){return tT(t)?()=>{const n=ET(wi(t));return n&&n()}:Ap(t)}function pR(t){const n=t[Rn],e=n.type;return 2===e?n.declTNode:1===e?t[Qa]:null}function Ah(t){return function ove(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function AT(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(vg)?l[vg]:Object.defineProperty(l,vg,{value:[]})[vg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class zn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Np(t,n){t.forEach(e=>Array.isArray(e)?Np(e,n):n(e))}function gR(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function fx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function c1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function fve(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function IT(t,n){const e=_g(t,n);if(e>=0)return t[1|e]}function _g(t,n){return function vR(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Bl=Bl||{})[Bl.Important=1]="Important",Bl[Bl.DashCase=2]="DashCase",Bl))();const LT=new Map;let jve=0;const $T="__ngContext__";function el(t,n){oc(n)?(t[$T]=n[n1],function Lve(t){LT.set(t[n1],t)}(n)):t[$T]=n}let BT;function VT(t,n){return BT(t,n)}function m1(t){const n=t[fs];return _u(n)?n[fs]:n}function HT(t){return LR(t[e1])}function zT(t){return LR(t[bu])}function LR(t){for(;null!==t&&!_u(t);)t=t[bu];return t}function wg(t,n,e,i,r){if(null!=i){let o,s=!1;_u(i)?o=i:oc(i)&&(s=!0,i=i[Dh]);const a=Ta(i);0===t&&null!==e?null==r?zR(n,e,a):Op(n,e,a,r||null,!0):1===t&&null!==e?Op(n,e,a,r||null,!0):2===t?function JT(t,n,e){const i=vx(t,n);i&&function i0e(t,n,e,i){t.removeChild(n,e,i)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function s0e(t,n,e,i,r){const o=e[ex];o!==Ta(e)&&wg(n,t,i,o,r);for(let a=yl;a0&&(t[e-1][bu]=i[bu]);const o=fx(t,yl+n);!function Yve(t,n){g1(t,n,n[ir],2,null,null),n[Dh]=null,n[Qa]=null}(i[Rn],i);const s=o[Ed];null!==s&&s.detachView(o[Rn]),i[fs]=null,i[bu]=null,i[Ji]&=-65}return i}function BR(t,n){if(!(128&n[Ji])){const e=n[ir];e.destroyNode&&g1(t,n,e,3,null,null),function Qve(t){let n=t[e1];if(!n)return qT(t[Rn],t);for(;n;){let e=null;if(oc(n))e=n[e1];else{const i=n[yl];i&&(e=i)}if(!e){for(;n&&!n[bu]&&n!==t;)oc(n)&&qT(n[Rn],n),n=n[fs];null===n&&(n=t),oc(n)&&qT(n[Rn],n),e=n&&n[bu]}n=e}}(n)}}function qT(t,n){if(!(128&n[Ji])){n[Ji]&=-65,n[Ji]|=128,function n0e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===yu.None||o===yu.Emulated)return null}return sc(i,e)}}(t,n.parent,e)}function Op(t,n,e,i,r){t.insertBefore(n,e,i,r)}function zR(t,n,e){t.appendChild(n,e)}function UR(t,n,e,i,r){null!==i?Op(t,n,e,i,r):zR(t,n,e)}function vx(t,n){return t.parentNode(n)}function GR(t,n,e){return qR(t,n,e)}let XT,_x,ZT,xx,qR=function WR(t,n,e){return 40&t.type?sc(t,e):null};function yx(t,n,e,i){const r=VR(t,i,n),o=n[ir],a=GR(i.parent||n[Qa],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return _x}()?.createHTML(t)||t}function eE(){if(void 0===xx&&(xx=null,$o.trustedTypes))try{xx=$o.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xx}function e5(t){return eE()?.createHTML(t)||t}function n5(t){return eE()?.createScriptURL(t)||t}class jp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${U_})`}}class f0e extends jp{getTypeName(){return"HTML"}}class p0e extends jp{getTypeName(){return"Style"}}class m0e extends jp{getTypeName(){return"Script"}}class g0e extends jp{getTypeName(){return"URL"}}class v0e extends jp{getTypeName(){return"ResourceURL"}}function cc(t){return t instanceof jp?t.changingThisBreaksApplicationSecurity:t}function Id(t,n){const e=function y0e(t){return t instanceof jp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${U_})`)}return e===n}class k0e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Cg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S0e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Cg(n),e}}const T0e=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;function wx(t){return(t=String(t)).match(T0e)?t:"unsafe:"+t}function Mh(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function v1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const r5=Mh("area,br,col,hr,img,wbr"),o5=Mh("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),s5=Mh("rp,rt"),tE=v1(r5,v1(o5,Mh("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),v1(s5,Mh("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),v1(s5,o5)),nE=Mh("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),a5=v1(nE,Mh("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Mh("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),E0e=Mh("script,style,template");class A0e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!tE.hasOwnProperty(e))return this.sanitizedSomething=!0,!E0e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();tE.hasOwnProperty(e)&&!r5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(l5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const M0e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,I0e=/([^\#-~ |!])/g;function l5(t){return t.replace(/&/g,"&").replace(M0e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(I0e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Cx;function c5(t,n){let e=null;try{Cx=Cx||function i5(t){const n=new S0e(t);return function D0e(){try{return!!(new window.DOMParser).parseFromString(Cg(""),"text/html")}catch{return!1}}()?new k0e(n):n}(t);let i=n?String(n):"";e=Cx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Cx.getInertBodyElement(i)}while(i!==o);return Cg((new A0e).sanitizeChildren(iE(e)||e))}finally{if(e){const i=iE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function iE(t){return"content"in t&&function F0e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ko=(()=>((ko=ko||{})[ko.NONE=0]="NONE",ko[ko.HTML=1]="HTML",ko[ko.STYLE=2]="STYLE",ko[ko.SCRIPT=3]="SCRIPT",ko[ko.URL=4]="URL",ko[ko.RESOURCE_URL=5]="RESOURCE_URL",ko))();function kx(t){const n=b1();return n?e5(n.sanitize(ko.HTML,t)||""):Id(t,"HTML")?e5(cc(t)):c5(function ZR(){return void 0!==ZT?ZT:typeof document<"u"?document:void 0}(),Ri(t))}function y1(t){const n=b1();return n?n.sanitize(ko.URL,t)||"":Id(t,"URL")?cc(t):wx(Ri(t))}function u5(t){const n=b1();if(n)return n5(n.sanitize(ko.RESOURCE_URL,t)||"");if(Id(t,"ResourceURL"))return n5(cc(t));throw new Ot(904,!1)}function b1(){const t=Gt();return t&&t[cT]}const Sx=new zn("ENVIRONMENT_INITIALIZER"),Dx=new zn("INJECTOR",-1),h5=new zn("INJECTOR_DEF_TYPES");class f5{get(n,e=J0){if(e===J0){const i=new Error(`NullInjectorError: No provider for ${Cn(n)}!`);throw i.name="NullInjectorError",i}return e}}function $0e(...t){return{\u0275providers:p5(0,t),\u0275fromNgModule:!0}}function p5(t,...n){const e=[],i=new Set;let r;return Np(n,o=>{const s=o;rE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&m5(r,e),e}function m5(t,n){for(let e=0;e{n.push(o)})}}function rE(t,n,e,i){if(!(t=wi(t)))return!1;let r=null,o=xL(t);const s=!o&&no(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)rE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Np(o.imports,u=>{rE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&m5(c,n)}if(!a){const c=Ap(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Yr},{provide:h5,useValue:r,multi:!0},{provide:Sx,useValue:()=>ct(r),multi:!0})}const l=o.providers;null==l||a||oE(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function oE(t,n){for(let e of t)nT(e)&&(e=e.\u0275providers),Array.isArray(e)?oE(e,n):n(e)}const B0e=Xe({provide:String,useValue:Xe});function sE(t){return null!==t&&"object"==typeof t&&B0e in t}function Pp(t){return"function"==typeof t}const aE=new zn("Set Injector scope."),Tx={},H0e={};let lE;function Ex(){return void 0===lE&&(lE=new f5),lE}class Fd{}class y5 extends Fd{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,uE(n,s=>this.processProvider(s)),this.records.set(Dx,kg(void 0,this)),r.has("environment")&&this.records.set(Fd,kg(void 0,this));const o=this.records.get(aE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(h5.multi,Yr,ki.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=sg(this),i=Pc(void 0);try{return n()}finally{sg(e),Pc(i)}}get(n,e=J0,i=ki.Default){this.assertNotDestroyed(),i=J_(i);const r=sg(this),o=Pc(void 0);try{if(!(i&ki.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function q0e(t){return"function"==typeof t||"object"==typeof t&&t instanceof zn}(n)&&q_(n);a=l&&this.injectableDefInScope(l)?kg(cE(n),Tx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ki.Self?Ex():this.parent).get(n,e=i&ki.Optional&&e===J0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Y_]=s[Y_]||[]).unshift(Cn(n)),r)throw s;return function bge(t,n,e,i){const r=t[Y_];throw n[kL]&&r.unshift(n[kL]),t.message=function _ge(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==gge?t.slice(2):t;let r=Cn(n);if(Array.isArray(n))r=n.map(Cn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Cn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(mge,"\n ")}`}("\n"+t.message,r,e,i),t[pge]=r,t[Y_]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Pc(o),sg(r)}}resolveInjectorInitializers(){const n=sg(this),e=Pc(void 0);try{const i=this.get(Sx.multi,Yr,ki.Self);for(const r of i)r()}finally{sg(n),Pc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(Cn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ot(205,!1)}processProvider(n){let e=Pp(n=wi(n))?n:wi(n&&n.provide);const i=function U0e(t){return sE(t)?kg(void 0,t.useValue):kg(b5(t),Tx)}(n);if(Pp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=kg(void 0,Tx,!0),r.factory=()=>sT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Tx&&(e.value=H0e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function W0e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=wi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function cE(t){const n=q_(t),e=null!==n?n.factory:Ap(t);if(null!==e)return e;if(t instanceof zn)throw new Ot(204,!1);if(t instanceof Function)return function z0e(t){const n=t.length;if(n>0)throw c1(n,"?"),new Ot(204,!1);const e=function uge(t){const n=t&&(t[X_]||t[wL]);return n?(function dge(t){if(t.hasOwnProperty("name"))return t.name;(""+t).match(/^function\s*([^\s(]+)/)}(t),n):null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Ot(204,!1)}function b5(t,n,e){let i;if(Pp(t)){const r=wi(t);return Ap(r)||cE(r)}if(sE(t))i=()=>wi(t.useValue);else if(function v5(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...sT(t.deps||[]));else if(function g5(t){return!(!t||!t.useExisting)}(t))i=()=>ct(wi(t.useExisting));else{const r=wi(t&&(t.useClass||t.provide));if(!function G0e(t){return!!t.deps}(t))return Ap(r)||cE(r);i=()=>new r(...sT(t.deps))}return i}function kg(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function uE(t,n){for(const e of t)Array.isArray(e)?uE(e,n):e&&nT(e)?uE(e.\u0275providers,n):n(e)}class X0e{}class _5{}class J0e{resolveComponentFactory(n){throw function Y0e(t){const n=Error(`No component factory found for ${Cn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let $c=(()=>{class t{}return t.NULL=new J0e,t})();function K0e(){return Sg(Ea(),Gt())}function Sg(t,n){return new ti(sc(t,n))}let ti=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K0e,t})();function Q0e(t){return t instanceof ti?t.nativeElement:t}class Lp{}let Ss=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Z0e(){const t=Gt(),e=ac(Ea().index,t);return(oc(e)?e:t)[ir]}(),t})(),e1e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class _1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const t1e=new _1("15.2.2"),dE={},hE="ngOriginalError";function fE(t){return t[hE]}class Dg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&fE(n);for(;e&&fE(e);)e=fE(e);return e||null}}function w5(t){return t.ownerDocument.defaultView}function Ih(t){return t instanceof Function?t():t}function k5(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const S5="ng-template";function d1e(t,n,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==k5(f,c,0)||2&i&&c!==h){if(wu(i))return!1;s=!0}}}}else{if(!s&&!wu(i)&&!wu(l))return!1;if(s&&wu(l))continue;s=!1,i=l|1&i}}return wu(i)||s}function wu(t){return 0==(1&t)}function p1e(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!wu(s)&&(n+=E5(o,r),r=""),i=s,o=o||!wu(i);e++}return""!==r&&(n+=E5(o,r)),n}const Bi={};function w(t){A5(Pr(),Gt(),_l()+t,!1)}function A5(t,n,e,i){if(!i)if(3==(3&n[Ji])){const o=t.preOrderCheckHooks;null!==o&&sx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&ax(n,o,0,e)}Mp(e)}function N5(t,n=null,e=null,i){const r=O5(t,n,e,i);return r.resolveInjectorInitializers(),r}function O5(t,n=null,e=null,i,r=new Set){const o=[e||Yr,$0e(t)];return i=i||("object"==typeof t?void 0:Cn(t)),new y5(o,n||Ex(),i||null,r)}let Rs=(()=>{class t{static create(e,i){if(Array.isArray(e))return N5({name:""},i,e,"");{const r=e.name??"";return N5({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=J0,t.NULL=new f5,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>ct(Dx)}),t.__NG_ELEMENT_ID__=-1,t})();function le(t,n=ki.Default){const e=Gt();return null===e?ct(t,n):uR(Ea(),e,wi(t),n)}function H5(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iBo&&A5(t,n,Bo,!1),Lc(s?2:0,r),e(i,r)}finally{Mp(o),Lc(s?3:1,r)}}function _E(t,n,e){if(dT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,x1(t,e,r.hostVars,Bi),r)}function Nd(t,n,e,i,r,o){const s=sc(t,n);!function DE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Ri(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}(n[ir],s,o,t.value,e,i,r)}function oye(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&TE(e)}}function TE(t){for(let i=HT(t);null!==i;i=zT(i))for(let r=yl;r0&&TE(o)}const e=t[Rn].components;if(null!==e)for(let i=0;i0&&TE(r)}}function uye(t,n){const e=ac(n,t),i=e[Rn];(function dye(t,n){for(let e=n.length;e-1&&(WT(n,i),fx(e,i))}this._attachedToViewContainer=!1}BR(this._lView[Rn],this._lView)}onDestroy(n){G5(this._lView[Rn],this._lView,null,n)}markForCheck(){EE(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ji]&=-65}reattach(){this._lView[Ji]|=64}detectChanges(){Nx(this._lView[Rn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ot(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kve(t,n){g1(t,n,n[ir],2,null,null)}(this._lView[Rn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Ot(902,!1);this._appRef=n}}class hye extends w1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;Nx(n[Rn],n,n[ks],!1)}checkNoChanges(){}get context(){return null}}class n8 extends $c{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=no(n);return new C1(e,this.ngModule)}}function i8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pye{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=J_(i);const r=this.injector.get(n,dE,i);return r!==dE||e===dE?r:this.parentInjector.get(n,e,i)}}class C1 extends _5{get inputs(){return i8(this.componentDef.inputs)}get outputs(){return i8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _1e(t){return t.map(b1e).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Fd?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pye(n,o):n,a=s.get(Lp,null);if(null===a)throw new Ot(407,!1);const l=s.get(e1e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function U1e(t,n,e){return t.selectRootElement(n,e===yu.ShadowDom)}(c,i,this.componentDef.encapsulation):GT(c,u,function fye(t){const n=t.toLowerCase();return"svg"===n?RL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=CE(0,null,null,1,0,null,null,null,null,null),p=Mx(null,f,null,h,null,null,a,c,l,s,null);let m,g;bT(p);try{const v=this.componentDef;let y,_=null;v.findHostDirectiveDefs?(y=[],_=new Map,v.findHostDirectiveDefs(v,y,_),y.push(v)):y=[v];const C=function gye(t,n){const e=t[Rn],i=Bo;return t[i]=n,Ag(e,i,2,"#host",null)}(p,d),S=function vye(t,n,e,i,r,o,s,a){const l=r[Rn];!function yye(t,n,e,i){for(const r of t)n.mergedAttrs=s1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Ox(n,n.mergedAttrs,!0),null!==e&&QR(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mx(r,U5(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&SE(l,t,i.length-1),Fx(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=BL(f,Bo),d&&function _ye(t,n,e,i){if(i)CT(t,e,["ng-version",t1e.full]);else{const{attrs:r,classes:o}=function x1e(t){const n=[],e=[];let i=1,r=2;for(;i0&&KR(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function xye(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=s1(r.hostAttrs,e=s1(e,r.hostAttrs))}}(i)}function IE(t){return t===kh?{}:t===Yr?[]:t}function kye(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function Sye(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Dye(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function Px(t){return!!FE(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function FE(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Od(t,n,e){return t[n]=e}function tl(t,n,e){return!Object.is(t[n],e)&&(t[n]=e,!0)}function Rp(t,n,e,i){const r=tl(t,n,e);return tl(t,n+1,i)||r}function ht(t,n,e,i){const r=Gt();return tl(r,fg(),n)&&(Pr(),Nd(es(),r,t,n,e,i)),ht}function Ig(t,n,e,i){return tl(t,fg(),e)?n+Ri(e)+i:Bi}function Fg(t,n,e,i,r,o){const a=Rp(t,function Th(){return $i.lFrame.bindingIndex}(),e,r);return Eh(2),a?n+Ri(e)+i+Ri(r)+o:Bi}function J(t,n,e,i,r,o,s,a){const l=Gt(),c=Pr(),u=t+Bo,d=c.firstCreatePass?function Pye(t,n,e,i,r,o,s,a,l){const c=n.consts,u=Ag(n,t,4,s||null,yf(c,a));kE(n,e,u,yf(c,l)),ox(n,u);const d=u.tView=CE(2,u,i,r,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,c);return null!==n.queries&&(n.queries.template(n,u),d.queries=n.queries.embeddedTView(u)),u}(u,c,l,n,e,i,r,o,s):c.data[u];Ad(d,!1);const h=l[ir].createComment("");yx(c,l,h,d),el(h,l),Fx(l,l[u]=K5(h,l,h,d)),nx(d)&&xE(c,l,d),null!=s&&wE(l,d,a)}function uo(t){return hg(function Vge(){return $i.lFrame.contextLView}(),Bo+t)}function k(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!1),k}function NE(t,n,e,i,r){const s=r?"class":"style";ME(t,e,n.inputs[s],s,i)}function b(t,n,e,i){const r=Gt(),o=Pr(),s=Bo+t,a=r[ir],l=o.firstCreatePass?function Rye(t,n,e,i,r,o){const s=n.consts,l=Ag(n,t,2,i,yf(s,r));return kE(n,e,l,yf(s,o)),null!==l.attrs&&Ox(l,l.attrs,!1),null!==l.mergedAttrs&&Ox(l,l.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,l),l}(s,o,r,n,e,i):o.data[s],c=r[s]=GT(a,n,function Jge(){return $i.lFrame.currentNamespace}()),u=nx(l);return Ad(l,!0),QR(a,c,l),32!=(32&l.flags)&&yx(o,r,c,l),0===function Pge(){return $i.lFrame.elementDepthCount}()&&el(c,r),function Lge(){$i.lFrame.elementDepthCount++}(),u&&(xE(o,r,l),_E(o,l,r)),null!==i&&wE(r,l),b}function x(){let t=Ea();pT()?mT():(t=t.parent,Ad(t,!1));const n=t;!function Rge(){$i.lFrame.elementDepthCount--}();const e=Pr();return e.firstCreatePass&&(ox(e,t),dT(t)&&e.queries.elementEnd(t)),null!=n.classesWithoutHost&&function eve(t){return 0!=(8&t.flags)}(n)&&NE(e,n,Gt(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function tve(t){return 0!=(16&t.flags)}(n)&&NE(e,n,Gt(),n.stylesWithoutHost,!1),x}function ge(t,n,e,i){return b(t,n,e,i),x(),ge}function ta(t,n,e){const i=Gt(),r=Pr(),o=t+Bo,s=r.firstCreatePass?function $ye(t,n,e,i,r){const o=n.consts,s=yf(o,i),a=Ag(n,t,8,"ng-container",s);return null!==s&&Ox(a,s,!0),kE(n,e,a,yf(o,r)),null!==n.queries&&n.queries.elementStart(n,a),a}(o,r,i,n,e):r.data[o];Ad(s,!0);const a=i[o]=i[ir].createComment("");return yx(r,i,a,s),el(a,i),nx(s)&&(xE(r,i,s),_E(r,s,i)),null!=e&&wE(i,s),ta}function na(){let t=Ea();const n=Pr();return pT()?mT():(t=t.parent,Ad(t,!1)),n.firstCreatePass&&(ox(n,t),dT(t)&&n.queries.elementEnd(t)),na}function vt(){return Gt()}function S1(t){return!!t&&"function"==typeof t.then}const OE=function v8(t){return!!t&&"function"==typeof t.subscribe};function ye(t,n,e,i){const r=Gt(),o=Pr(),s=Ea();return function b8(t,n,e,i,r,o,s){const a=nx(i),c=t.firstCreatePass&&Z5(t),u=n[ks],d=Q5(n);let h=!0;if(3&i.type||s){const m=sc(i,n),g=s?s(m):m,v=d.length,y=s?C=>s(Ta(C[i.index])):i.index;let _=null;if(!s&&a&&(_=function Bye(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=x8(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=x8(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?ac(t.index,n):n);let l=_8(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=_8(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function j(t=1){return function Wge(t){return($i.lFrame.contextLView=function qge(t,n){for(;t>0;)n=n[cg],t--;return n}(t,$i.lFrame.contextLView))[ks]}(t)}function Vye(t,n){let e=null;const i=function m1e(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function jE(t){return 2|t}function Bp(t){return(131068&t)>>2}function PE(t,n){return-131069&t|n<<2}function LE(t){return 1|t}function M8(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?bf(o):Bp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];qye(t[a],n)&&(l=!0,t[a+1]=i?LE(u):jE(u)),a=i?bf(u):Bp(u)}l&&(t[e+1]=i?jE(o):LE(o))}function qye(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&_g(t,n)>=0}const ia={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function I8(t){return t.substring(ia.key,ia.keyEnd)}function F8(t,n){const e=ia.textEnd;return e===n?-1:(n=ia.keyEnd=function Kye(t,n,e){for(;n32;)n++;return n}(t,ia.key=n,e),$g(t,n,e))}function $g(t,n,e){for(;n=0;e=F8(n,e))lc(t,I8(n),!0)}function Du(t,n,e,i){const r=Gt(),o=Pr(),s=Eh(2);o.firstUpdatePass&&R8(o,t,s,i),n!==Bi&&tl(r,s,n)&&B8(o,o.data[_l()],r,r[ir],t,r[s+1]=function abe(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Cn(cc(t)))),t}(n,e),i,s)}function Tu(t,n,e,i){const r=Pr(),o=Eh(2);r.firstUpdatePass&&R8(r,null,o,i);const s=Gt();if(e!==Bi&&tl(s,o,e)){const a=r.data[_l()];if(H8(a,i)&&!L8(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=jr(l,e||"")),NE(r,a,s,e,i)}else!function sbe(t,n,e,i,r,o,s,a){r===Bi&&(r=Yr);let l=0,c=0,u=0=t.expandoStartIndex}function R8(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[_l()],s=L8(t,e);H8(o,i)&&null===n&&!s&&(n=!1),n=function tbe(t,n,e,i){const r=function vT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=D1(e=RE(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=RE(r,t,n,e,i),null===o){let l=function nbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Bp(i))return t[bf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=RE(null,t,n,l[1],i),l=D1(l,n.attrs,i),function ibe(t,n,e,i){t[bf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function rbe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=bf(t[a+1]);t[i+1]=$x(h,a),0!==h&&(t[h+1]=PE(t[h+1],i)),t[a+1]=function zye(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$x(a,0),0!==a&&(t[a+1]=PE(t[a+1],i)),a=i;else t[i+1]=$x(l,0),0===a?a=i:t[l+1]=PE(t[l+1],i),l=i;c&&(t[i+1]=jE(t[i+1])),M8(t,u,i,!0),M8(t,u,i,!1),function Wye(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&_g(o,n)>=0&&(e[i+1]=LE(e[i+1]))}(n,u,t,i,o),s=$x(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function RE(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?Yr:void 0);let f=d?IT(h,i):u===i?h:void 0;if(c&&!Bx(f)&&(f=IT(l,i)),Bx(f)&&(a=f,s))return a;const p=t[r+1];r=s?bf(p):Bp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=IT(l,i))}return a}function Bx(t){return void 0!==t}function H8(t,n){return 0!=(t.flags&(n?8:16))}function I(t,n=""){const e=Gt(),i=Pr(),r=t+Bo,o=i.firstCreatePass?Ag(i,r,1,n,null):i.data[r],s=e[r]=function UT(t,n){return t.createText(n)}(e[ir],n);yx(i,e,s,o),Ad(o,!1)}function Dt(t){return xn("",t,""),Dt}function xn(t,n,e){const i=Gt(),r=Ig(i,t,n,e);return r!==Bi&&Fh(i,_l(),r),xn}function Ld(t,n,e,i,r){const o=Gt(),s=Fg(o,t,n,e,i,r);return s!==Bi&&Fh(o,_l(),s),Ld}function dc(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!0),dc}const Vg="en-US";let u6=Vg;function VE(t,n,e,i,r){if(t=wi(t),Array.isArray(t))for(let o=0;o>20;if(Pp(t)||!t.multi){const f=new o1(l,r,le),p=zE(a,n,r?u:u+h,d);-1===p?(TT(dx(c,s),o,a),HE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=zE(a,n,u+h,d),p=zE(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){TT(dx(c,s),o,a);const v=function x_e(t,n,e,i,r){const o=new o1(t,e,le);return o.multi=[],o.index=n,o.componentProviders=0,O6(o,r,i&&!e),o}(r?__e:b_e,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),HE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else HE(o,t,f>-1?f:p,O6(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function HE(t,n,e,i){const r=Pp(n),o=function V0e(t){return!!t.useClass}(n);if(r||o){const l=(o?wi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function O6(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function zE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function y_e(t,n,e){const i=Pr();if(i.firstCreatePass){const r=xu(t);VE(e,i.data,i.blueprint,r,!0),VE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class zg{}class j6{}class P6 extends zg{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new n8(this);const i=rc(n);this._bootstrapComponents=Ih(i.bootstrap),this._r3Injector=O5(n,e,[{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],Cn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class GE extends j6{constructor(n){super(),this.moduleType=n}create(n){return new P6(this.moduleType,n)}}class C_e extends zg{constructor(n,e,i){super(),this.componentFactoryResolver=new n8(this),this.instance=null;const r=new y5([...n,{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],e||Ex(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gx(t,n,e=null){return new C_e(t,n,e).injector}let k_e=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=p5(0,e.type),r=i.length>0?Gx([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(ct(Fd))}),t})();function L6(t){t.getStandaloneInjector=n=>n.get(k_e).getOrCreateStandaloneInjector(t)}function wl(t,n,e){const i=bl()+t,r=Gt();return r[i]===Bi?Od(r,i,e?n.call(e):n()):function k1(t,n){return t[n]}(r,i)}function lr(t,n,e,i){return G6(Gt(),bl(),t,n,e,i)}function Sr(t,n,e,i,r){return function W6(t,n,e,i,r,o,s){const a=n+e;return Rp(t,a,r,o)?Od(t,a+2,s?i.call(s,r,o):i(r,o)):N1(t,a+2)}(Gt(),bl(),t,n,e,i,r)}function Ug(t,n,e,i,r,o){return function q6(t,n,e,i,r,o,s,a){const l=n+e;return function Lx(t,n,e,i,r){const o=Rp(t,n,e,i);return tl(t,n+2,r)||o}(t,l,r,o,s)?Od(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):N1(t,l+3)}(Gt(),bl(),t,n,e,i,r,o)}function N1(t,n){const e=t[n];return e===Bi?void 0:e}function G6(t,n,e,i,r,o){const s=n+e;return tl(t,s,r)?Od(t,s+1,o?i.call(o,r):i(r)):N1(t,s+1)}function XE(t,n,e){const i=t+Bo,r=Gt(),o=hg(r,i);return function O1(t,n){return t[Rn].data[n].pure}(r,i)?G6(r,bl(),n,o.transform,e,o):o.transform(e)}function YE(t){return n=>{setTimeout(t,void 0,n)}}const Ke=class z_e extends tr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=YE(o),r&&(r=YE(r)),s&&(s=YE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ue&&n.add(a),a}};function U_e(){return this._results[Symbol.iterator]()}class JE{get changes(){return this._changes||(this._changes=new Ke)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=JE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=U_e)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Rc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function dve(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=q_e,t})();const G_e=Si,W_e=class extends G_e{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[t1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),bE(i,r,n),new w1(r)}};function q_e(){return Wx(Ea(),Gt())}function Wx(t,n){return 4&t.type?new W_e(n,t,Sg(t,n)):null}let nl=(()=>{class t{}return t.__NG_ELEMENT_ID__=X_e,t})();function X_e(){return Q6(Ea(),Gt())}const Y_e=nl,J6=class extends Y_e{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Sg(this._hostTNode,this._hostLView)}get injector(){return new mg(this._hostTNode,this._hostLView)}get parentInjector(){const n=DT(this._hostTNode,this._hostLView);if(rR(n)){const e=cx(n,this._hostLView),i=lx(n);return new mg(e[Rn].data[i+8],e)}return new mg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=K6(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-yl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function l1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new C1(no(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Fd,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Rn];if(function jge(t){return _u(t[fs])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[fs],h=new J6(d,d[Qa],d[fs]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Zve(t,n,e,i){const r=yl+i,o=e.length;i>0&&(e[r-1][bu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=yl;d{class t{constructor(e){this.appInits=e,this.resolve=Xx,this.reject=Xx,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(ct(Yx,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const P1=new zn("AppId",{providedIn:"root",factory:function x$(){return`${lA()}${lA()}${lA()}`}});function lA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const w$=new zn("Platform Initializer"),L1=new zn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),C$=new zn("AnimationModuleType");let xxe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hc=new zn("LocaleId",{providedIn:"root",factory:()=>ar(hc,ki.Optional|ki.SkipSelf)||function wxe(){return typeof $localize<"u"&&$localize.locale||Vg}()});class kxe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let k$=(()=>{class t{compileModuleSync(e){return new GE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ih(rc(e).declarations).reduce((s,a)=>{const l=no(a);return l&&s.push(new C1(l)),s},[]);return new kxe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Txe=(()=>Promise.resolve(0))();function cA(t){typeof Zone>"u"?Txe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Wi{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ke(!1),this.onMicrotaskEmpty=new Ke(!1),this.onStable=new Ke(!1),this.onError=new Ke(!1),typeof Zone>"u")throw new Ot(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Exe(){let t=$o.requestAnimationFrame,n=$o.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function Ixe(t){const n=()=>{!function Mxe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call($o,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,dA(t),t.isCheckStableRunning=!0,uA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),dA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return T$(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),E$(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return T$(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),E$(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,dA(t),uA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Wi.isInAngularZone())throw new Ot(909,!1)}static assertNotInAngularZone(){if(Wi.isInAngularZone())throw new Ot(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Axe,Xx,Xx);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Axe={};function uA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function dA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function T$(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function E$(t){t._nesting--,uA(t)}class Fxe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ke,this.onMicrotaskEmpty=new Ke,this.onStable=new Ke,this.onError=new Ke}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const A$=new zn(""),Kx=new zn("");let pA,hA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,pA||(function Nxe(t){pA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Wi.assertNotInAngularZone(),cA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())cA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(fA),ct(Kx))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),fA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return pA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Oh=!1;let _f=null;const M$=new zn("AllowMultipleToken"),mA=new zn("PlatformDestroyListeners"),I$=new zn("appBootstrapListener");class F${constructor(n,e){this.name=n,this.token=e}}function O$(t,n,e=[]){const i=`Platform: ${n}`,r=new zn(i);return(o=[])=>{let s=gA();if(!s||s.injector.get(M$,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Pxe(t){if(_f&&!_f.get(M$,!1))throw new Ot(400,!1);_f=t;const n=t.get(P$);(function N$(t){const n=t.get(w$,null);n&&n.forEach(e=>e())})(t)}(function j$(t=[],n){return Rs.create({name:n,providers:[{provide:aE,useValue:"platform"},{provide:mA,useValue:new Set([()=>_f=null])},...t]})}(a,i))}return function Rxe(t){const n=gA();if(!n)throw new Ot(401,!1);return n}()}}function gA(){return _f?.get(P$)??null}let P$=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function R$(t,n){let e;return e="noop"===t?new Fxe:("zone.js"===t?void 0:t)||new Wi(n),e}(i?.ngZone,function L$(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Wi,useValue:r}];return r.run(()=>{const s=Rs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Dg,null);if(!l)throw new Ot(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qx(this._modules,a),c.unsubscribe()})}),function $$(t,n,e){try{const i=e();return S1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Jx);return c.runInitializers(),c.donePromise.then(()=>(function d6(t){jc(t,"Expected localeId to be defined"),"string"==typeof t&&(u6=t.toLowerCase().replace(/_/g,"-"))}(a.injector.get(hc,Vg)||Vg),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=B$({},i);return function Oxe(t,n,e){const i=new GE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Au);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Ot(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ot(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(mA,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function B$(t,n){return Array.isArray(n)?n.reduce(B$,t):{...t,...n}}let Au=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new rn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new rn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Wi.assertNotInAngularZone(),cA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Wi.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Tt(o,s.pipe(We()))}bootstrap(e,i){const r=e instanceof _5;if(!this._injector.get(Jx).done){!r&&function ag(t){const n=no(t)||Ka(t)||vl(t);return null!==n&&n.standalone}(e);throw new Ot(405,Oh)}let s;s=r?e:this._injector.get($c).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function jxe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(zg),c=s.create(Rs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(A$,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qx(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Ot(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(I$,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Ot(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(Fd),ct(Dg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qx(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let qo=(()=>{class t{}return t.__NG_ELEMENT_ID__=Bxe,t})();function Bxe(t){return function Vxe(t,n,e){if(i1(t)&&!e){const i=ac(t.index,n);return new w1(i,i)}return 47&t.type?new w1(n[Za],n):null}(Ea(),Gt(),16==(16&t))}class G${constructor(){}supports(n){return Px(n)}create(n){return new qxe(n)}}const Wxe=(t,n)=>n;class qxe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||Wxe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new Xxe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new W$),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new W$),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class Xxe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Yxe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class W${constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new Yxe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function q$(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kxe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Kxe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Y$(){return new tw([new G$])}let tw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Y$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:Y$}),t})();function J$(){return new R1([new X$])}let R1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||J$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:J$}),t})();const ewe=O$(null,"core",[]);let twe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(ct(Au))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();function qg(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}let xA=null;function jh(){return xA}class rwe{}const Ir=new zn("DocumentToken");let wA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function owe(){return ct(K$)}()},providedIn:"platform"}),t})();const swe=new zn("Location Initialized");let K$=(()=>{class t extends wA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return jh().getBaseHref(this._doc)}onPopState(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Q$()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Q$()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(){return function awe(){return new K$(ct(Ir))}()},providedIn:"platform"}),t})();function Q$(){return!!window.history.pushState}function CA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function Z$(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ph(t){return t&&"?"!==t[0]?"?"+t:t}let zp=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tB)},providedIn:"root"}),t})();const eB=new zn("appBaseHref");let tB=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ar(Ir).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return CA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ph(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),lwe=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=CA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),kA=(()=>{class t{constructor(e){this._subject=new Ke,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function dwe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(Z$(nB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ph(i))}normalize(e){return t.stripTrailingSlash(function uwe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,nB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ph,t.joinWithSlash=CA,t.stripTrailingSlash=Z$,t.\u0275fac=function(e){return new(e||t)(ct(zp))},t.\u0275prov=Et({token:t,factory:function(){return function cwe(){return new kA(ct(zp))}()},providedIn:"root"}),t})();function nB(t){return t.replace(/\/index.html$/,"")}function pB(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const jA=/\s+/,mB=[];let Rh=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=mB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(jA):mB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(jA):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(jA).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(le(tw),le(R1),le(ti),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class Gwe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let jn=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Gwe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),yB(a,r)}});for(let r=0,o=i.length;r{yB(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(tw))},t.\u0275dir=Zt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function yB(t,n){t.context.$implicit=n.item}let gn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new qwe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){bB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){bB("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class qwe{constructor(){this.$implicit=null,this.ngIf=null}}function bB(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Cn(n)}'.`)}class PA{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),_B=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new PA(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(dw,9))},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),wB=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Bl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(R1),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),kl=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(le(nl))},t.\u0275dir=Zt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Hn]}),t})(),Vs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const SB="browser";let _Ce=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new xCe(ct(Ir),window)}),t})();class xCe{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function wCe(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=TB(this.window.history)||TB(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function TB(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class EB{}class YCe extends rwe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class VA extends YCe{static makeCurrent(){!function iwe(t){xA||(xA=t)}(new VA)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function JCe(){return H1=H1||document.querySelector("base"),H1?H1.getAttribute("href"):null}();return null==e?null:function KCe(t){pw=pw||document.createElement("a"),pw.setAttribute("href",t);const n=pw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){H1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return pB(document.cookie,n)}}let pw,H1=null;const NB=new zn("TRANSITION_ID"),ZCe=[{provide:Yx,useFactory:function QCe(t,n,e){return()=>{e.get(Jx).donePromise.then(()=>{const i=jh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const mw=new zn("EventManagerPlugins");let gw=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),z1=(()=>{class t extends jB{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const HA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},zA=/%COMP%/g,RB=new zn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $B(t,n){return n.flat(100).map(e=>e.replace(zA,t))}function BB(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new UA(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof zB?r.applyToHost(e):r instanceof GA&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case yu.Emulated:o=new zB(s,a,i,this.appId,l);break;case yu.ShadowDom:return new l2e(s,a,e,i);default:o=new GA(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(ct(gw),ct(z1),ct(P1),ct(RB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class UA{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(HA[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(HB(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(HB(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=HA[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=HA[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Bl.DashCase|Bl.Important)?n.style.setProperty(e,i,r&Bl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Bl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,BB(i)):this.eventManager.addEventListener(n,e,BB(i))}}function HB(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class l2e extends UA{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$B(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class GA extends UA{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$B(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class zB extends GA{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function o2e(t){return"_ngcontent-%COMP%".replace(zA,t)}(s),this.hostAttr=function s2e(t){return"_nghost-%COMP%".replace(zA,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let c2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const UB=["alt","control","meta","shift"],u2e={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},d2e={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let h2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>jh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),UB.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=u2e[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),UB.forEach(s=>{s!==r&&(0,d2e[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const WB=[{provide:L1,useValue:SB},{provide:w$,useValue:function f2e(){VA.makeCurrent()},multi:!0},{provide:Ir,useFactory:function m2e(){return function h0e(t){ZT=t}(document),document},deps:[]}],g2e=O$(ewe,"browser",WB),qB=new zn(""),XB=[{provide:Kx,useClass:class e2e{addToWindow(n){$o.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},$o.getAllAngularTestabilities=()=>n.getAllTestabilities(),$o.getAllAngularRootElements=()=>n.getAllRootElements(),$o.frameworkStabilizers||($o.frameworkStabilizers=[]),$o.frameworkStabilizers.push(i=>{const r=$o.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?jh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:A$,useClass:hA,deps:[Wi,fA,Kx]},{provide:hA,useClass:hA,deps:[Wi,fA,Kx]}],YB=[{provide:aE,useValue:"root"},{provide:Dg,useFactory:function p2e(){return new Dg},deps:[]},{provide:mw,useClass:c2e,multi:!0,deps:[Ir,Wi,L1]},{provide:mw,useClass:h2e,multi:!0,deps:[Ir]},{provide:vw,useClass:vw,deps:[gw,z1,P1,RB]},{provide:Lp,useExisting:vw},{provide:jB,useExisting:z1},{provide:z1,useClass:z1,deps:[Ir]},{provide:gw,useClass:gw,deps:[mw,Wi]},{provide:EB,useClass:t2e,deps:[]},[]];let qA=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:P1,useValue:e.appId},{provide:NB,useExisting:P1},ZCe]}}}return t.\u0275fac=function(e){return new(e||t)(ct(qB,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[...YB,...XB],imports:[Vs,twe]}),t})(),JB=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function y2e(){return new JB(ct(Ir))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let ZB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):ct(e7),i},providedIn:"root"}),t})(),e7=(()=>{class t extends ZB{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case ko.NONE:return i;case ko.HTML:return Id(i,"HTML")?cc(i):c5(this._doc,String(i)).toString();case ko.STYLE:return Id(i,"Style")?cc(i):i;case ko.SCRIPT:if(Id(i,"Script"))return cc(i);throw new Error("unsafe value used in a script context");case ko.URL:return Id(i,"URL")?cc(i):wx(String(i));case ko.RESOURCE_URL:if(Id(i,"ResourceURL"))return cc(i);throw new Error(`unsafe value used in a resource URL context (see ${U_})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${U_})`)}}bypassSecurityTrustHtml(e){return function b0e(t){return new f0e(t)}(e)}bypassSecurityTrustStyle(e){return function _0e(t){return new p0e(t)}(e)}bypassSecurityTrustScript(e){return function x0e(t){return new m0e(t)}(e)}bypassSecurityTrustUrl(e){return function w0e(t){return new g0e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function C0e(t){return new v0e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function C2e(t){return new e7(t.get(Ir))}(ct(Rs)),i},providedIn:"root"}),t})();function U1(t){return(U1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function K(t,n,e){return(n=function S2e(t){var n=function k2e(t,n){if("object"!==U1(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==U1(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===U1(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}class t7{}class D2e{}const $h="*";function il(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ma(t,n=null){return{type:4,styles:n,timings:t}}function n7(t,n=null){return{type:2,steps:t,options:n}}function Dr(t){return{type:6,styles:t,offset:null}}function Ia(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i7(t){Promise.resolve().then(t)}class G1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YA="!";function o7(t){return new Ot(3e3,!1)}function ake(){return typeof window<"u"&&typeof window.document<"u"}function JA(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wf(t){switch(t.length){case 0:return new G1;case 1:return t[0];default:return new r7(t)}}function s7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case YA:v=r.get(m);break;case $h:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function Y2e(t){return new Ot(3502,!1)}();return a}function KA(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&QA(e,"start",t)));break;case"done":t.onDone(()=>i(e&&QA(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&QA(e,"destroy",t)))}}function QA(t,n,e){const o=ZA(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function ZA(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let eM=(t,n)=>!1,l7=(t,n,e)=>[],c7=null;function tM(t){const n=t.parentNode||t.host;return n===c7?null:n}(JA()||typeof Element<"u")&&(ake()?(c7=(()=>document.documentElement)(),eM=(t,n)=>{for(;n;){if(n===t)return!0;n=tM(n)}return!1}):eM=(t,n)=>t.contains(n),l7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let Up=null,u7=!1;const d7=eM,h7=l7;let f7=(()=>{class t{validateStyleProperty(e){return function cke(t){Up||(Up=function uke(){return typeof document<"u"?document.body:null}()||{},u7=!!Up.style&&"WebkitAppearance"in Up.style);let n=!0;return Up.style&&!function lke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in Up.style,!n&&u7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Up.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d7(e,i)}getParentElement(e){return tM(e)}query(e,i,r){return h7(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new G1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),nM=(()=>{class t{}return t.NOOP=new f7,t})();const dke=1e3,iM="ng-enter",yw="ng-leave",bw="ng-trigger",_w=".ng-trigger",m7="ng-animating",rM=".ng-animating";function Bh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:oM(parseFloat(n[1]),n[2])}function oM(t,n){return"s"===n?t*dke:t}function xw(t,n,e){return t.hasOwnProperty("duration")?t:function fke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o7()),{duration:0,delay:0,easing:""};r=oM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=oM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function T2e(){return new Ot(3100,!1)}()),a=!0),o<0&&(n.push(function E2e(){return new Ot(3101,!1)}()),a=!0),a&&n.splice(l,0,o7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function W1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function g7(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Cf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y7(t,n,e){return e?n+":"+e+";":""}function b7(t){let n="";for(let e=0;e{const o=aM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),JA()&&b7(t))}function Gp(t,n){t.style&&(n.forEach((e,i)=>{const r=aM(i);t.style[r]=""}),JA()&&b7(t))}function q1(t){return Array.isArray(t)?1==t.length?t[0]:n7(t):t}const sM=new RegExp("{{\\s*(.+?)\\s*}}","g");function _7(t){let n=[];if("string"==typeof t){let e;for(;e=sM.exec(t);)n.push(e[1]);sM.lastIndex=0}return n}function X1(t,n,e){const i=t.toString(),r=i.replace(sM,(o,s)=>{let a=n[s];return null==a&&(e.push(function M2e(t){return new Ot(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function ww(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gke=/-+([a-z0-9])/g;function aM(t){return t.replace(gke,(...n)=>n[1].toUpperCase())}function vke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function I2e(t){return new Ot(3004,!1)}()}}function x7(t,n){return window.getComputedStyle(t)[n]}const Sw="*";function Cke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function kke(t,n,e){if(":"==t[0]){const l=function Ske(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function U2e(t){return new Ot(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(w7(r,s));"<"==o[0]&&!(r==Sw&&s==Sw)&&n.push(w7(s,r))}(i,e,n)):e.push(t),e}const Dw=new Set(["true","1"]),Tw=new Set(["false","0"]);function w7(t,n){const e=Dw.has(t)||Tw.has(t),i=Dw.has(n)||Tw.has(n);return(r,o)=>{let s=t==Sw||t==r,a=n==Sw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Dw.has(t):Tw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Dw.has(n):Tw.has(n)),s&&a}}const Dke=new RegExp("s*:selfs*,?","g");function lM(t,n,e,i){return new Tke(t).build(n,e,i)}class Tke{constructor(n){this._driver=n}build(n,e,i){const r=new Mke(e);return this._resetContextStyleTimingState(r),pc(this,q1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function N2e(){return new Ot(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function O2e(){return new Ot(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{_7(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(ww(o.values()),e.errors.push(function j2e(t,n){return new Ot(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pc(this,q1(n.animation),e);return{type:1,matchers:Cke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Wp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pc(this,i,e)),options:Wp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Wp(n.options)}}visitAnimate(n,e){const i=function Fke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return cM(xw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=cM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=xw(e,n);return cM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Dr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Dr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$h?i.push(a):e.errors.push(new Ot(3002,!1)):i.push(g7(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function L2e(t,n,e,i,r){return new Ot(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function mke(t,n,e){const i=n.params||{},r=_7(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function A2e(t){return new Ot(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function R2e(){return new Ot(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let _=null!=y.offset?y.offset:function Ike(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=_&&(o++,C=y.offset=_),l=l||C<0||C>1,a=a||C0&&o{const _=h>0?y==f?1:h*y:s[y],C=_*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=_,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pc(this,q1(n.animation),e),options:Wp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:Wp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:Wp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Eke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Dke,"")),t=t.replace(/@\*/g,_w).replace(/@\w+/g,e=>_w+"-"+e.slice(1)).replace(/:animating/g,rM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fc(e.collectedStyles,e.currentQuerySelector,new Map);const a=pc(this,q1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:Wp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function H2e(){return new Ot(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:xw(n.timings,e.errors,!0);return{type:12,animation:pc(this,q1(n.animation),e),timings:i,options:null}}}class Mke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wp(t){return t?(t=W1(t)).params&&(t.params=function Ake(t){return t?W1(t):null}(t.params)):t={},t}function cM(t,n,e){return{duration:t,delay:n,easing:e}}function uM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ew{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jke=new RegExp(":enter","g"),Lke=new RegExp(":leave","g");function dM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Rke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Rke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ew;const d=new hM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[uM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bh(X1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bh(i.duration):null,a=null!=i.delay?Bh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Aw);const s=Bh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return xw(e.params?X1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Aw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Aw={};class hM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Aw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bh(i.duration)),null!=i.delay&&(r.delay=Bh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=X1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new hM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Aw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new $ke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jke,"."+this._enterClassName)).replace(Lke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function z2e(t){return new Ot(3014,!1)}()),a}}class Mw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$h),this._currentKeyframe.set(e,$h);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function Bke(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$h)}else Cf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=X1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$h),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Cf(a,new Map,this._backFill);c.forEach((u,d)=>{u===YA?n.add(d):u===$h&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?ww(n.values()):[],s=e.size?ww(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return uM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class $ke extends Mw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Cf(n[0]);l.set("offset",0),o.push(l);const c=Cf(n[0]);c.set("offset",S7(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Cf(n[d]);const f=h.get("offset");h.set("offset",S7((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return uM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function S7(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class fM{}const Vke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Hke extends fM{normalizePropertyName(n,e){return aM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(Vke.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function F2e(t,n){return new Ot(3005,!1)}())}return s+o}}function D7(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const pM={};class T7{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function zke(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||pM,p=this.buildStyles(i,a&&a.params||pM,d),m=l&&l.params||pM,g=this.buildStyles(r,m,d),v=new Set,y=new Map,_=new Map,C="void"===r,S={params:Uke(m,h),delay:this.ast.options?.delay},M=u?[]:dM(n,e,this.ast.animation,o,s,p,g,S,c,d);let $=0;if(M.forEach(R=>{$=Math.max(R.duration+R.delay,$)}),d.length)return D7(e,this._triggerName,i,r,C,p,g,[],[],y,_,$,d);M.forEach(R=>{const z=R.element,U=fc(y,z,new Set);R.preStyleProps.forEach(re=>U.add(re));const q=fc(_,z,new Set);R.postStyleProps.forEach(re=>q.add(re)),z!==e&&v.add(z)});const G=ww(v.values());return D7(e,this._triggerName,i,r,C,p,g,M,G,y,_,$)}}function Uke(t,n){const e=W1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class Gke{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=W1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=X1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class qke{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new Gke(r.style,r.options&&r.options.params||{},i))}),E7(this.states,"true","1"),E7(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new T7(n,r,this.states))}),this.fallbackTransition=function Xke(t,n,e){return new T7(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function E7(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const Yke=new Ew;class Jke{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=lM(this._driver,e,i,r);if(i.length)throw function J2e(t){return new Ot(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=dM(this._driver,e,o,iM,yw,new Map,new Map,i,Yke,r),s.forEach(u=>{const d=fc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function K2e(){return new Ot(3300,!1)}()),s=[]),r.length)throw function Q2e(t){return new Ot(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$h))})});const c=wf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function Z2e(t){return new Ot(3301,!1)}();return e}listen(n,e,i,r){const o=ZA(e,"","","");return KA(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const A7="ng-animate-queued",mM="ng-animate-disabled",tSe=[],M7={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},nSe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zc="__ng_removed";class gM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function sSe(t){return t??null}(i?n.value:n),i){const o=W1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Y1="void",vM=new gM(Y1);class iSe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Uc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function eke(t,n){return new Ot(3302,!1)}();if(null==i||0==i.length)throw function tke(t){return new Ot(3303,!1)}();if(!function aSe(t){return"start"==t||"done"==t}(i))throw function nke(t,n){return new Ot(3400,!1)}();const o=fc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fc(this._engine.statesByElement,n,new Map);return a.has(e)||(Uc(n,bw),Uc(n,bw+"-"+e),a.set(e,vM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function ike(t){return new Ot(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new yM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Uc(n,bw),Uc(n,bw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new gM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=vM),c.value!==Y1&&l.value===c.value){if(!function uSe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{Gp(n,g),Rd(n,v)})}return}const h=fc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Uc(n,A7),s.onStart(()=>{Xg(n,A7)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,_w,!0);i.forEach(r=>{if(r[zc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,Y1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&wf(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||vM,u=new gM(Y1),d=new yM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[zc];(!o||o===M7)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Uc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=ZA(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,KA(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class rSe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new iSe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Iw(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Iw(e))return;const o=e[zc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Uc(n,mM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Xg(n,mM))}removeNode(n,e,i,r){if(Iw(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[zc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Iw(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,_w,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,rM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return wf(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[zc];if(e&&e.setForRemoval){if(n[zc]=M7,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(mM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?wf(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function rke(t){return new Ot(3402,!1)}()}_flushAnimations(n,e){const i=new Ew,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Z=>{u.add(Z);const H=this.driver.query(Z,".ng-animate-queued",!0);for(let he=0;he{const he=iM+m++;p.set(H,he),Z.forEach(E=>Uc(E,he))});const g=[],v=new Set,y=new Set;for(let Z=0;Zv.add(E)):y.add(H))}const _=new Map,C=N7(h,Array.from(v));C.forEach((Z,H)=>{const he=yw+m++;_.set(H,he),Z.forEach(E=>Uc(E,he))}),n.push(()=>{f.forEach((Z,H)=>{const he=p.get(H);Z.forEach(E=>Xg(E,he))}),C.forEach((Z,H)=>{const he=_.get(H);Z.forEach(E=>Xg(E,he))}),g.forEach(Z=>{this.processLeaveNode(Z)})});const S=[],M=[];for(let Z=this._namespaceList.length-1;Z>=0;Z--)this._namespaceList[Z].drainQueuedTransitions(e).forEach(he=>{const E=he.player,F=he.element;if(S.push(E),this.collectedEnterElements.length){const xe=F[zc];if(xe&&xe.setForMove){if(xe.previousTriggersValues&&xe.previousTriggersValues.has(he.triggerName)){const tt=xe.previousTriggersValues.get(he.triggerName),ze=this.statesByElement.get(he.element);if(ze&&ze.has(he.triggerName)){const ot=ze.get(he.triggerName);ot.value=tt,ze.set(he.triggerName,ot)}}return void E.destroy()}}const N=!d||!this.driver.containsElement(d,F),Y=_.get(F),V=p.get(F),oe=this._buildInstruction(he,i,V,Y,N);if(oe.errors&&oe.errors.length)return void M.push(oe);if(N)return E.onStart(()=>Gp(F,oe.fromStyles)),E.onDestroy(()=>Rd(F,oe.toStyles)),void r.push(E);if(he.isFallbackTransition)return E.onStart(()=>Gp(F,oe.fromStyles)),E.onDestroy(()=>Rd(F,oe.toStyles)),void r.push(E);const fe=[];oe.timelines.forEach(xe=>{xe.stretchStartingKeyframe=!0,this.disabledNodes.has(xe.element)||fe.push(xe)}),oe.timelines=fe,i.append(F,oe.timelines),s.push({instruction:oe,player:E,element:F}),oe.queriedElements.forEach(xe=>fc(a,xe,[]).push(E)),oe.preStyleProps.forEach((xe,tt)=>{if(xe.size){let ze=l.get(tt);ze||l.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))}}),oe.postStyleProps.forEach((xe,tt)=>{let ze=c.get(tt);ze||c.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))})});if(M.length){const Z=[];M.forEach(H=>{Z.push(function oke(t,n){return new Ot(3505,!1)}())}),S.forEach(H=>H.destroy()),this.reportError(Z)}const $=new Map,G=new Map;s.forEach(Z=>{const H=Z.element;i.has(H)&&(G.set(H,H),this._beforeAnimationBuild(Z.player.namespaceId,Z.instruction,$))}),r.forEach(Z=>{const H=Z.element;this._getPreviousPlayers(H,!1,Z.namespaceId,Z.triggerName,null).forEach(E=>{fc($,H,[]).push(E),E.destroy()})});const R=g.filter(Z=>j7(Z,l,c)),z=new Map;F7(z,this.driver,y,c,$h).forEach(Z=>{j7(Z,l,c)&&R.push(Z)});const q=new Map;f.forEach((Z,H)=>{F7(q,this.driver,new Set(Z),l,YA)}),R.forEach(Z=>{const H=z.get(Z),he=q.get(Z);z.set(Z,new Map([...Array.from(H?.entries()??[]),...Array.from(he?.entries()??[])]))});const re=[],L=[],X={};s.forEach(Z=>{const{element:H,player:he,instruction:E}=Z;if(i.has(H)){if(u.has(H))return he.onDestroy(()=>Rd(H,E.toStyles)),he.disabled=!0,he.overrideTotalTime(E.totalTime),void r.push(he);let F=X;if(G.size>1){let Y=H;const V=[];for(;Y=Y.parentNode;){const oe=G.get(Y);if(oe){F=oe;break}V.push(Y)}V.forEach(oe=>G.set(oe,F))}const N=this._buildAnimation(he.namespaceId,E,$,o,q,z);if(he.setRealPlayer(N),F===X)re.push(he);else{const Y=this.playersByElement.get(F);Y&&Y.length&&(he.parentPlayer=wf(Y)),r.push(he)}}else Gp(H,E.fromStyles),he.onDestroy(()=>Rd(H,E.toStyles)),L.push(he),u.has(H)&&r.push(he)}),L.forEach(Z=>{const H=o.get(Z.element);if(H&&H.length){const he=wf(H);Z.setRealPlayer(he)}}),r.forEach(Z=>{Z.parentPlayer?Z.syncPlayerEvents(Z.parentPlayer):Z.destroy()});for(let Z=0;Z!N.destroyed);F.length?lSe(this,H,F):this.processLeaveNode(H)}return g.length=0,re.forEach(Z=>{this.players.push(Z),Z.onDone(()=>{Z.destroy();const H=this.players.indexOf(Z);this.players.splice(H,1)}),Z.play()}),re}elementContainsData(n,e){let i=!1;const r=e[zc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==Y1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Gp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[zc];if(g&&g.removedBeforeQueried)return new G1(p.duration,p.delay);const v=m!==l,y=function cSe(t){const n=[];return O7(t,n),n}((i.get(m)||tSe).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),_=o.get(m),C=s.get(m),S=s7(0,this._normalizer,0,p.keyframes,_,C),M=this._buildPlayer(p,S,y);if(p.subTimeline&&r&&d.add(m),v){const $=new yM(n,a,m);$.setRealPlayer(M),c.push($)}return M});c.forEach(p=>{fc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function oSe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Uc(p,m7));const f=wf(h);return f.onDestroy(()=>{u.forEach(p=>Xg(p,m7)),Rd(l,e.toStyles)}),d.forEach(p=>{fc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new G1(n.duration,n.delay)}}class yM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new G1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>KA(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Iw(t){return t&&1===t.nodeType}function I7(t,n){const e=t.style.display;return t.style.display=n??"none",e}function F7(t,n,e,i,r){const o=[];e.forEach(l=>o.push(I7(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[zc]=nSe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>I7(l,o[a++])),s}function N7(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Uc(t,n){t.classList?.add(n)}function Xg(t,n){t.classList?.remove(n)}function lSe(t,n,e){wf(e).onDone(()=>t.processLeaveNode(n))}function O7(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Fw{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new rSe(n,e,i),this._timelineEngine=new Jke(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=lM(this._driver,o,l,c);if(l.length)throw function X2e(t,n){return new Ot(3404,!1)}();a=function Wke(t,n,e){return new qke(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let hSe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Gp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gp(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bM(t){let n=null;return t.forEach((e,i)=>{(function fSe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class P7{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:x7(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class pSe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d7(n,e)}getParentElement(n){return tM(n)}query(n,e,i){return h7(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof P7);(function yke(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function pke(t){return t.length?t[0]instanceof Map?t:t.map(n=>g7(n)):[]}(e).map(f=>Cf(f));d=function bke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,x7(t,a)))}}return n}(n,d,c);const h=function dSe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=bM(n[0]),n.length>1&&(i=bM(n[n.length-1]))):n instanceof Map&&(e=bM(n)),e||i?new hSe(t,e,i):null}(n,d);return new P7(n,d,l,h)}}let mSe=(()=>{class t extends t7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:yu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n7(e):e;return L7(this._renderer,null,i,"register",[r]),new gSe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class gSe extends D2e{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new vSe(this._id,n,e||{},this._renderer)}}class vSe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L7(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L7(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const R7="@.disabled";let ySe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $7("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new bSe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Fw),ct(Wi))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class $7{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==R7?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class bSe extends $7{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==R7?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Se(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function xSe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wSe=(()=>{class t extends Fw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(nM),ct(fM),ct(Au))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const B7=[{provide:t7,useClass:mSe},{provide:fM,useFactory:function CSe(){return new Hke}},{provide:Fw,useClass:wSe},{provide:Lp,useFactory:function kSe(t,n,e){return new ySe(t,n,e)},deps:[vw,Fw,Wi]}],_M=[{provide:nM,useFactory:()=>new pSe},{provide:C$,useValue:"BrowserAnimations"},...B7],xM=[{provide:nM,useClass:f7},{provide:C$,useValue:"NoopAnimations"},...B7];let SSe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?xM:_M}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:_M,imports:[qA]}),t})(),DSe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:xM,imports:[qA]}),t})();function $n(...t){let n=t[t.length-1];return Sa(n)?(t.pop(),Oc(t,n)):st(t)}class Hs extends tr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Xr;return this._value}next(n){super.next(this._value=n)}}const Ow=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class wM extends O{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TSe extends O{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function CM(t,n,e,i,r=new TSe(t,e,i)){if(!r.closed)return n instanceof rn?n.subscribe(r):nc(n)(r)}const V7={};function jw(...t){let n,e;return Sa(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&et(t[0])&&(t=t[0]),st(t,e).lift(new ESe(n))}class ESe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new ASe(n,this.resultSelector))}}class ASe extends wM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V7),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lw(t){return t?function ISe(t){return new rn(n=>t.schedule(()=>n.complete()))}(t):Vh}function H7(t){return new rn(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?co(e):Lw()).subscribe(n)})}function qp(t,n){return new rn(n?e=>n.schedule(FSe,0,{error:t,subscriber:e}):e=>e.error(t))}function FSe({error:t,subscriber:n}){n.error(t)}function zl(t,n){return"function"==typeof n?e=>e.pipe(zl((i,r)=>co(t(i,r)).pipe(yn((o,s)=>n(i,o,r,s))))):e=>e.lift(new NSe(t))}class NSe{constructor(n){this.project=n}call(n,e){return e.subscribe(new OSe(n,this.project))}}class OSe extends W{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new ml(this),r=this.destination;r.add(i),this.innerSubscription=Ne(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const z7=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Sl(t){return n=>0===t?Lw():n.lift(new jSe(t))}class jSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new PSe(n,this.total))}}class PSe extends O{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ns(t,n){return function(i){return i.lift(new LSe(t,n))}}class LSe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new RSe(n,this.predicate,this.thisArg))}}class RSe extends O{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function Rw(t=null){return n=>n.lift(new $Se(t))}class $Se{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new BSe(n,this.defaultValue))}}class BSe extends O{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function U7(t=zSe){return n=>n.lift(new VSe(t))}class VSe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new HSe(n,this.errorFactory))}}class HSe extends O{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function zSe(){return new Ow}function kf(t,n){const e=arguments.length>=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,Sl(1),e?Rw(n):U7(()=>new Ow))}function Sf(t,n){return nt(t,n,1)}function Hh(){}function is(t,n,e){return function(r){return r.lift(new USe(t,n,e))}}class USe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new GSe(n,this.nextOrObserver,this.error,this.complete))}}class GSe extends O{constructor(n,e,i,r){super(n),this._tapNext=Hh,this._tapError=Hh,this._tapComplete=Hh,this._tapError=i||Hh,this._tapComplete=r||Hh,rt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hh,this._tapError=e.error||Hh,this._tapComplete=e.complete||Hh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ul(t){return function(e){const i=new WSe(t),r=e.lift(i);return i.caught=r}}class WSe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new qSe(n,this.selector,this.caught))}}class qSe extends W{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new ml(this);this.add(i);const r=Ne(e,i);r!==i&&this.add(r)}}}function G7(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new XSe(t,n,e))}}class XSe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YSe(n,this.accumulator,this.seed,this.hasSeed))}}class YSe extends O{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function kM(t){return function(e){return 0===t?Lw():e.lift(new JSe(t))}}class JSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new KSe(n,this.total))}}class KSe extends O{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,kM(1),e?Rw(n):U7(()=>new Ow))}class ZSe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new eDe(n,this.predicate,this.inclusive))}}class eDe extends O{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class nDe{constructor(n){this.value=n}call(n,e){return e.subscribe(new iDe(n,this.value))}}class iDe extends O{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function SM(t){return n=>n.lift(new rDe(t))}class rDe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new oDe(n,this.callback))}}class oDe extends O{constructor(n,e){super(n),this.add(new ue(e))}}const zi="primary",K1=Symbol("RouteTitle");class sDe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Yg(t){return new sDe(t)}function aDe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function X7(t){return Array.prototype.concat.apply([],t)}function Y7(t){return t.length>0?t[t.length-1]:null}function Fa(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Df(t){return OE(t)?t:S1(t)?co(Promise.resolve(t)):$n(t)}const $w=!1,cDe={exact:function Q7(t,n,e){if(!Xp(t.segments,n.segments)||!Bw(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q7(t.children[i],n.children[i],e))return!1;return!0},subset:Z7},J7={exact:function uDe(t,n){return $d(t,n)},subset:function dDe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q7(t[e],n[e]))},ignored:()=>!0};function K7(t,n,e){return cDe[e.paths](t.root,n.root,e.matrixParams)&&J7[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z7(t,n,e){return e9(t,n,n.segments,e)}function e9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!Xp(r,e)||n.hasChildren()||!Bw(r,e,i))}if(t.segments.length===e.length){if(!Xp(t.segments,e)||!Bw(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z7(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(Xp(t.segments,r)&&Bw(t.segments,r,i)&&t.children[zi])&&e9(t.children[zi],n,o,i)}}function Bw(t,n,e){return n.every((i,r)=>J7[e](t[r].parameters,i.parameters))}class Tf{constructor(n=new fr([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return pDe.serialize(this)}}class fr{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Fa(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Vw(this)}}class Q1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Yg(this.parameters)),this._parameterMap}toString(){return i9(this)}}function Xp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let Z1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new DM},providedIn:"root"}),t})();class DM{parse(n){const e=new CDe(n);return new Tf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${ey(n.root,!0)}`,i=function vDe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Hw(e)}=${Hw(r)}`).join("&"):`${Hw(e)}=${Hw(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function mDe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const pDe=new DM;function Vw(t){return t.segments.map(n=>i9(n)).join("/")}function ey(t,n){if(!t.hasChildren())return Vw(t);if(n){const e=t.children[zi]?ey(t.children[zi],!1):"",i=[];return Fa(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${ey(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function fDe(t,n){let e=[];return Fa(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Fa(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[ey(t.children[zi],!1)]:[`${r}:${ey(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${Vw(t)}/${e[0]}`:`${Vw(t)}/(${e.join("//")})`}}function t9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Hw(t){return t9(t).replace(/%3B/gi,";")}function TM(t){return t9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zw(t){return decodeURIComponent(t)}function n9(t){return zw(t.replace(/\+/g,"%20"))}function i9(t){return`${TM(t.path)}${function gDe(t){return Object.keys(t).map(n=>`;${TM(n)}=${TM(t[n])}`).join("")}(t.parameters)}`}const yDe=/^[^\/()?;=#]+/;function Uw(t){const n=t.match(yDe);return n?n[0]:""}const bDe=/^[^=?&#]+/,xDe=/^[^&#]+/;class CDe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new fr([],{}):new fr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new fr(n,e)),i}parseSegment(){const n=Uw(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Ot(4009,$w);return this.capture(n),new Q1(zw(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Uw(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Uw(this.remaining);r&&(i=r,this.capture(i))}n[zw(e)]=zw(i)}parseQueryParam(n){const e=function _De(t){const n=t.match(bDe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wDe(t){const n=t.match(xDe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=n9(e),o=n9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Uw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Ot(4010,$w);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new fr([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Ot(4011,$w)}}function EM(t){return t.segments.length>0?new fr([],{[zi]:t}):t}function Gw(t){const n={};for(const i of Object.keys(t.children)){const o=Gw(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function kDe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new fr(t.segments.concat(n.segments),n.children)}return t}(new fr(t.segments,n))}function Yp(t){return t instanceof Tf}const AM=!1;function SDe(t,n,e,i,r){if(0===e.length)return Jg(n.root,n.root,n.root,i,r);const o=function l9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new a9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Fa(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new a9(e,n,i)}(e);return o.toRoot()?Jg(n.root,n.root,new fr([],{}),i,r):function s(l){const c=function TDe(t,n,e,i){if(t.isAbsolute)return new Kg(n.root,!0,0);if(-1===i)return new Kg(e,e===n.root,0);return function c9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Ot(4005,AM&&"Invalid number of '../'");r=i.segments.length}return new Kg(i,!1,r-o)}(e,i+(ty(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Qg(c.segmentGroup,c.index,o.commands):MM(c.segmentGroup,c.index,o.commands);return Jg(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function ty(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function ny(t){return"object"==typeof t&&null!=t&&t.outlets}function Jg(t,n,e,i,r){let s,o={};i&&Fa(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:s9(t,n,e);const a=EM(Gw(s));return new Tf(a,o,r)}function s9(t,n,e){const i={};return Fa(t.children,(r,o)=>{i[o]=r===n?e:s9(r,n,e)}),new fr(t.segments,i)}class a9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&ty(i[0]))throw new Ot(4003,AM&&"Root segment cannot have matrix parameters");const r=i.find(ny);if(r&&r!==Y7(i))throw new Ot(4004,AM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kg{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function MM(t,n,e){if(t||(t=new fr([],{})),0===t.segments.length&&t.hasChildren())return Qg(t,n,e);const i=function ADe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(ny(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d9(l,c,s))return o;i+=2}else{if(!d9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=MM(t.children[s],n,o))}),Fa(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new fr(t.segments,r))}}function IM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=IM(new fr([],{}),0,e))}),n}function u9(t){const n={};return Fa(t,(e,i)=>n[i]=`${e}`),n}function d9(t,n,e){return t==e.path&&$d(n,e.parameters)}const iy="imperative";class Bd{constructor(n,e){this.id=n,this.url=e}}class Ww extends Bd{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class zh extends Bd{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ry extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class qw extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Xw extends Bd{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class IDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class FDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NDe extends Bd{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ODe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PDe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class LDe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class RDe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $De{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BDe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VDe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class h9{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UDe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SDe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return UDe.\u0275fac(n)},providedIn:"root"}),t})();class f9{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=FM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=FM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=NM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return NM(n,this._root).map(e=>e.value)}}function FM(t,n){if(t===n.value)return n;for(const e of n.children){const i=FM(t,e);if(i)return i}return null}function NM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=NM(t,e);if(i.length)return i.unshift(n),i}return[]}class Uh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Zg(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class p9 extends f9{constructor(n,e){super(n),this.snapshot=e,OM(this,n)}toString(){return this.snapshot.toString()}}function m9(t,n){const e=function qDe(t,n){const s=new Yw([],{},{},"",{},zi,n,null,t.root,-1,{});return new v9("",new Uh(s,[]))}(t,n),i=new Hs([new Q1("",{})]),r=new Hs({}),o=new Hs({}),s=new Hs({}),a=new Hs(""),l=new Rr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new p9(new Uh(l,[]),e)}class Rr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(yn(c=>c[K1]))??$n(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(yn(n=>Yg(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(yn(n=>Yg(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function g9(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function XDe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Yw{get title(){return this.data?.[K1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Yg(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class v9 extends f9{constructor(n,e){super(e),this.url=n,OM(this,e)}toString(){return y9(this._root)}}function OM(t,n){n.value._routerState=t,n.children.forEach(e=>OM(t,e))}function y9(t){const n=t.children.length>0?` { ${t.children.map(y9).join(", ")} } `:"";return`${t.value}${n}`}function jM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$d(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),$d(n.params,e.params)||t.params.next(e.params),function lDe(t,n){if(t.length!==n.length)return!1;for(let e=0;e$d(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||PM(t.parent,n.parent))}function oy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JDe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return oy(t,i,r);return oy(t,i)})}(t,n,e);return new Uh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>oy(t,a)),s}}const i=function KDe(t){return new Rr(new Hs(t.url),new Hs(t.params),new Hs(t.queryParams),new Hs(t.fragment),new Hs(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>oy(t,o));return new Uh(i,r)}}const LM="ngNavigationCancelingError";function b9(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=Yp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=_9(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function _9(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[LM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function x9(t){return w9(t)&&Yp(t.url)}function w9(t){return t&&t[LM]}class QDe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new sy,this.attachRef=null}}let sy=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new QDe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Jw=!1;let Jp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new Ke,this.deactivateEvents=new Ke,this.attachEvents=new Ke,this.detachEvents=new Ke,this.parentContexts=ar(sy),this.location=ar(nl),this.changeDetector=ar(qo),this.environmentInjector=ar(Fd)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Ot(4012,Jw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Ot(4012,Jw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Ot(4012,Jw);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Ot(4013,Jw);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new ZDe(e,a,r.injector);if(i&&function eTe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Hn]}),t})();class ZDe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Rr?this.route:n===sy?this.childContexts:this.parent.get(n,e)}}let RM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[L6],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp],encapsulation:2}),t})();function C9(t,n){return t.providers&&!t._injector&&(t._injector=Gx(t.providers,n,`Route: ${t.path}`)),t._injector??n}function BM(t){const n=t.children&&t.children.map(BM),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=RM),e}function Gc(t){return t.outlet||zi}function k9(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function ay(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class oTe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),jM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Fa(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new VDe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new $De(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(jM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),jM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=ay(r.snapshot),l=a?.get($c)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class S9{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Kw{constructor(n,e){this.component=n,this.route=e}}function sTe(t,n,e){const i=t._root;return ly(i,n?n._root:null,e,[i.value])}function ev(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function cge(t){return null!==q_(t)}(t)?n.get(t):t:i}function ly(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Zg(n);return t.children.forEach(s=>{(function lTe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function cTe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Xp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Xp(t.url,n.url)||!$d(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!PM(t,n)||!$d(t.queryParams,n.queryParams);default:return!PM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S9(i)):(o.data=s.data,o._resolvedData=s._resolvedData),ly(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Kw(a.outlet.component,s))}else s&&cy(n,a,r),r.canActivateChecks.push(new S9(i)),ly(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Fa(o,(s,a)=>cy(s,e.getContext(a),r)),r}function cy(t,n,e){const i=Zg(t),r=t.value;Fa(i,(o,s)=>{cy(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Kw(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function uy(t){return"function"==typeof t}function VM(t){return t instanceof Ow||"EmptyError"===t?.name}const Qw=Symbol("INITIAL_VALUE");function tv(){return zl(t=>jw(t.map(n=>n.pipe(Sl(1),function J1(...t){const n=t[t.length-1];return Sa(n)?(t.pop(),e=>Pw(t,e,n)):e=>Pw(t,e)}(Qw)))).pipe(yn(n=>{for(const e of n)if(!0!==e){if(e===Qw)return Qw;if(!1===e||e instanceof Tf)return e}return!0}),ns(n=>n!==Qw),Sl(1)))}function D9(t){return function Wt(...t){return wn(t)}(is(n=>{if(Yp(n))throw b9(0,n)}),yn(n=>!0===n))}const HM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function T9(t,n,e,i,r){const o=zM(t,n,e);return o.matched?function DTe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$n(r.map(s=>{const a=ev(s,t);return Df(function mTe(t){return t&&uy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9()):$n(!0)}(i=C9(n,i),n,e).pipe(yn(s=>!0===s?o:{...HM})):$n(o)}function zM(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...HM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||aDe)(e,t,n);if(!r)return{...HM};const o={};Fa(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Zw(t,n,e,i){if(e.length>0&&function ATe(t,n,e){return e.some(i=>eC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new fr(n,function ETe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new fr([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new fr(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function MTe(t,n,e){return e.some(i=>eC(t,n,i))}(t,e,i)){const o=new fr(t.segments,function TTe(t,n,e,i,r){const o={};for(const s of i)if(eC(t,e,s)&&!r[Gc(s)]){const a=new fr([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new fr(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function eC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function E9(t,n,e,i){return!!(Gc(t)===i||i!==zi&&eC(n,e,t))&&("**"===t.path||zM(n,t,e).matched)}function A9(t,n,e){return 0===n.length&&!t.children[e]}const tC=!1;class nC{constructor(n){this.segmentGroup=n||null}}class M9{constructor(n){this.urlTree=n}}function dy(t){return qp(new nC(t))}function I9(t){return qp(new M9(t))}function ITe(t){return qp(new Ot(4e3,tC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class OTe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=Zw(this.urlTree.root,[],[],this.config).segmentGroup,e=new fr(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(yn(o=>this.createUrlTree(Gw(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ul(o=>{if(o instanceof M9)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof nC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(yn(r=>this.createUrlTree(Gw(r),n.queryParams,n.fragment))).pipe(Ul(r=>{throw r instanceof nC?this.noMatchError(r):r}))}noMatchError(n){return new Ot(4002,tC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=EM(n);return new Tf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(yn(o=>new fr([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return co(r).pipe(Sf(o=>{const s=i.children[o],a=k9(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(yn(l=>({segment:l,outlet:o})))}),G7((o,s)=>(o[s.outlet]=s.segment,o),{}),W7())}expandSegment(n,e,i,r,o,s){return co(i).pipe(Sf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ul(c=>{if(c instanceof nC)return $n(null);throw c}))),kf(a=>!!a),Ul((a,l)=>{if(VM(a))return A9(e,r,o)?$n(new fr([],{})):dy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return E9(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):dy(e):dy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?I9(o):this.lineralizeSegments(i,o).pipe(nt(s=>{const a=new fr(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zM(e,r,o);if(!a)return dy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?I9(d):this.lineralizeSegments(r,d).pipe(nt(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=C9(i,n),i.loadChildren?(i._loadedRoutes?$n({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(yn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new fr(r,{})))):$n(new fr(r,{}))):T9(e,i,r,n).pipe(zl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(nt(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=Zw(e,a,l,h),m=new fr(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(yn(_=>new fr(a,_)));if(0===h.length&&0===p.length)return $n(new fr(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(yn(y=>new fr(a.concat(y.segments),y.children)))})):dy(e)))}getChildConfig(n,e,i){return e.children?$n({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$n({routes:e._loadedRoutes,injector:e._loadedInjector}):function STe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$n(!0):$n(r.map(s=>{const a=ev(s,t);return Df(function dTe(t){return t&&uy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9())}(n,e,i).pipe(nt(r=>r?this.configLoader.loadChildren(n,e).pipe(is(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function FTe(t){return qp(_9(tC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$n({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $n(i);if(r.numberOfChildren>1||!r.children[zi])return ITe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Tf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Fa(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Fa(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new fr(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Ot(4001,tC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PTe{}class $Te{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=Zw(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(yn(e=>{if(null===e)return null;const i=new Yw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uh(i,e),o=new v9(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=g9(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return co(Object.keys(i.children)).pipe(Sf(r=>{const o=i.children[r],s=k9(e,r);return this.processSegmentGroup(n,s,o,r)}),G7((r,o)=>r&&o?(r.push(...o),r):null),function QSe(t,n=!1){return e=>e.lift(new ZSe(t,n))}(r=>null!==r),Rw(null),W7(),yn(r=>{if(null===r)return null;const o=N9(r);return function BTe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return co(e).pipe(Sf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),kf(s=>!!s),Ul(s=>{if(VM(s))return A9(i,r,o)?$n([]):$n(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!E9(e,i,r,o))return $n(null);let s;if("**"===e.path){const a=r.length>0?Y7(r).parameters:{},l=j9(i)+r.length;s=$n({snapshot:new Yw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),l,L9(e)),consumedSegments:[],remainingSegments:[]})}else s=T9(i,e,r,n).pipe(yn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=j9(i)+l.length;return{snapshot:new Yw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),d,L9(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(zl(a=>{if(null===a)return $n(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function VTe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Zw(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(yn(g=>null===g?null:[new Uh(l,g)]));if(0===h.length&&0===p.length)return $n([new Uh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(yn(g=>null===g?null:[new Uh(l,g)]))}))}}function HTe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function N9(t){const n=[],e=new Set;for(const i of t){if(!HTe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=N9(i.children);n.push(new Uh(i.value,r))}return n.filter(i=>!e.has(i))}function O9(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function j9(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function P9(t){return t.data||{}}function L9(t){return t.resolve||{}}function R9(t){return"string"==typeof t.title||null===t.title}function UM(t){return zl(n=>{const e=t(n);return e?co(e).pipe(yn(()=>n)):$n(n)})}const nv=new zn("ROUTES");let GM=(()=>{class t{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $n(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Df(e.loadComponent()).pipe(yn(B9),is(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),SM(()=>{this.componentLoaders.delete(e)})),r=new pe(i,()=>new tr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $n({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(yn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=X7(l.get(nv,[],ki.Self|ki.Optional)));return{routes:c.map(BM),injector:l}}),SM(()=>{this.childrenLoaders.delete(i)})),s=new pe(o,()=>new tr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Df(e()).pipe(yn(B9),nt(r=>r instanceof j6||Array.isArray(r)?$n(r):co(this.compiler.compileModuleAsync(r))))}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs),ct(k$))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function B9(t){return function KTe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let rC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new tr,this.configLoader=ar(GM),this.environmentInjector=ar(Fd),this.urlSerializer=ar(Z1),this.rootContexts=ar(sy),this.navigationId=0,this.afterPreactivation=()=>$n(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new LDe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PDe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Hs({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ns(i=>0!==i.id),yn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),zl(i=>{let r=!1,o=!1;return $n(i).pipe(is(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),zl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return V9(s.source)&&(e.browserUrlTree=s.extractedUrl),$n(s).pipe(zl(u=>{const d=this.transitions?.getValue();return this.events.next(new Ww(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vh:Promise.resolve(u)}),function jTe(t,n,e,i){return zl(r=>function NTe(t,n,e,i,r){return new OTe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(yn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),is(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UTe(t,n,e,i,r){return nt(o=>function RTe(t,n,e,i,r,o,s="emptyOnly"){return new $Te(t,n,e,i,r,s,o).recognize().pipe(zl(a=>null===a?function LTe(t){return new rn(n=>n.error(t))}(new PTe):$n(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(yn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),is(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new IDe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new Ww(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=m9(d,this.rootComponentType).snapshot;return $n(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}}),is(s=>{const a=new FDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),yn(s=>i={...s,guards:sTe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function vTe(t,n){return nt(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$n({...e,guardsResult:!0}):function yTe(t,n,e,i){return co(t).pipe(nt(r=>function kTe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$n(o.map(a=>{const l=ay(n)??r,c=ev(a,l);return Df(function pTe(t){return t&&uy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(kf())})).pipe(tv()):$n(!0)}(r.component,r.route,e,n,i)),kf(r=>!0!==r,!0))}(s,i,r,t).pipe(nt(a=>a&&function uTe(t){return"boolean"==typeof t}(a)?function bTe(t,n,e,i){return co(n).pipe(Sf(r=>Pw(function xTe(t,n){return null!==t&&n&&n(new RDe(t)),$n(!0)}(r.route.parent,i),function _Te(t,n){return null!==t&&n&&n(new BDe(t)),$n(!0)}(r.route,i),function CTe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function aTe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H7(()=>$n(s.guards.map(l=>{const c=ay(s.node)??e,u=ev(l,c);return Df(function fTe(t){return t&&uy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(kf())})).pipe(tv())));return $n(o).pipe(tv())}(t,r.path,e),function wTe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $n(!0);const r=i.map(o=>H7(()=>{const s=ay(n)??e,a=ev(o,s);return Df(function hTe(t){return t&&uy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(kf())}));return $n(r).pipe(tv())}(t,r.route,e))),kf(r=>!0!==r,!0))}(i,o,t,n):$n(a)),yn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),is(s=>{if(i.guardsResult=s.guardsResult,Yp(s.guardsResult))throw b9(0,s.guardsResult);const a=new NDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),ns(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),UM(s=>{if(s.guards.canActivateChecks.length)return $n(s).pipe(is(a=>{const l=new ODe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),zl(a=>{let l=!1;return $n(a).pipe(function GTe(t,n){return nt(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $n(e);let o=0;return co(r).pipe(Sf(s=>function WTe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!R9(r)&&(o[K1]=r.title),function qTe(t,n,e,i){const r=function XTe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $n({});const o={};return co(r).pipe(nt(s=>function YTe(t,n,e,i){const r=ay(n)??i,o=ev(t,r);return Df(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(kf(),is(a=>{o[s]=a}))),kM(1),function tDe(t){return n=>n.lift(new nDe(t))}(o),Ul(s=>VM(s)?Vh:qp(s)))}(o,t,n,i).pipe(yn(s=>(t._resolvedData=s,t.data=g9(t,e).resolve,r&&R9(r)&&(t.data[K1]=r.title),null)))}(s.route,i,t,n)),is(()=>o++),kM(1),nt(s=>o===r.length?$n(e):Vh))})}(e.paramsInheritanceStrategy,this.environmentInjector),is({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),is(a=>{const l=new jDe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),UM(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(is(u=>{l.component=u}),yn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return jw(a(s.targetSnapshot.root)).pipe(Rw(),Sl(1))}),UM(()=>this.afterPreactivation()),yn(s=>{const a=function YDe(t,n,e){const i=oy(t,n._root,e?e._root:void 0);return new p9(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),is(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>yn(i=>(new oTe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),is({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new zh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),SM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ul(s=>{if(o=!0,w9(s)){x9(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ry(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),x9(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V9(i.source)};e.scheduleNavigation(l,iy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Xw(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vh}))}))}cancelNavigationTransition(e,i,r){const o=new ry(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function V9(t){return t!==iy}let H9=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[K1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(QTe)},providedIn:"root"}),t})(),QTe=(()=>{class t extends H9{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(ct(JB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZTe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tEe)},providedIn:"root"}),t})();class eEe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let tEe=(()=>{class t extends eEe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oC=new zn("",{providedIn:"root",factory:()=>({})});let iEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(rEe)},providedIn:"root"}),t})(),rEe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function oEe(t){throw t}function sEe(t,n,e){return n.parse("/")}const aEe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},lEe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let cr=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=ar(xxe),this.isNgZoneEnabled=!1,this.options=ar(oC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||oEe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||sEe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=ar(iEe),this.routeReuseStrategy=ar(ZTe),this.urlCreationStrategy=ar(WDe),this.titleStrategy=ar(H9),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=X7(ar(nv,{optional:!0})??[]),this.navigationTransitions=ar(rC),this.urlSerializer=ar(Z1),this.location=ar(kA),this.isNgZoneEnabled=ar(Wi)instanceof Wi&&Wi.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=m9(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),iy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(BM),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Yp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,iy,null,i)}navigate(e,i={skipLocationChange:!1}){return function cEe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Fu=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new tr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof zh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=qg(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=qg(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=qg(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function d5(t,n,e){return function L0e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?u5:y1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(Rr),Ah("tabindex"),le(Ss),le(ti),le(zp))},t.\u0275dir=Zt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ht("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Hn]}),t})(),hy=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Ke,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof zh&&this.update()})}ngAfterContentInit(){$n(this.links.changes,$n(null)).pipe(A()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=co(e).pipe(A()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function uEe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(ti),le(Ss),le(qo),le(Fu,8))},t.\u0275dir=Zt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,Fu,5),2&e){let o;cn(o=un())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Hn]}),t})();class z9{}let dEe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(ns(e=>e instanceof zh),Sf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gx(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return co(r).pipe(A())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$n(null);const o=r.pipe(nt(s=>null===s?$n(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?co([o,this.loader.loadComponent(i)]).pipe(A()):o})}}return t.\u0275fac=function(e){return new(e||t)(ct(cr),ct(k$),ct(Fd),ct(z9),ct(GM))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const qM=new zn("");let U9=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Ww?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof zh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof h9&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new h9(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function V5(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var mc=(()=>((mc=mc||{})[mc.COMPLETE=0]="COMPLETE",mc[mc.FAILED=1]="FAILED",mc[mc.REDIRECTING=2]="REDIRECTING",mc))();const iv=!1;function Ef(t,n){return{\u0275kind:t,\u0275providers:n}}const XM=new zn("",{providedIn:"root",factory:()=>!1});function W9(){const t=ar(Rs);return n=>{const e=t.get(Au);if(n!==e.components[0])return;const i=t.get(cr),r=t.get(q9);1===t.get(YM)&&i.initialNavigation(),t.get(X9,null,ki.Optional)?.setUpPreloading(),t.get(qM,null,ki.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const q9=new zn(iv?"bootstrap done indicator":"",{factory:()=>new tr}),YM=new zn(iv?"initial navigation":"",{providedIn:"root",factory:()=>1});function gEe(){let t=[];return t=iv?[{provide:Sx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function HDe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Ef(1,t)}const X9=new zn(iv?"router preloader":"");function vEe(t){return Ef(0,[{provide:X9,useExisting:dEe},{provide:z9,useExisting:t}])}const fy=!1,Y9=new zn(fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),yEe=[kA,{provide:Z1,useClass:DM},cr,sy,{provide:Rr,useFactory:function G9(t){return t.routerState.root},deps:[cr]},GM,fy?{provide:XM,useValue:!0}:[]];function bEe(){return new F$("Router",cr)}let J9=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[yEe,fy&&i?.enableTracing?gEe().\u0275providers:[],{provide:nv,multi:!0,useValue:e},{provide:Y9,useFactory:CEe,deps:[[cr,new u1,new d1]]},{provide:oC,useValue:i||{}},i?.useHash?{provide:zp,useClass:lwe}:{provide:zp,useClass:tB},{provide:qM,useFactory:()=>{const t=ar(_Ce),n=ar(Wi),e=ar(oC),i=ar(rC),r=ar(Z1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new U9(r,i,t,n,e)}},i?.preloadingStrategy?vEe(i.preloadingStrategy).\u0275providers:[],{provide:F$,multi:!0,useFactory:bEe},i?.initialNavigation?kEe(i):[],[{provide:K9,useFactory:W9},{provide:I$,multi:!0,useExisting:K9}]]}}static forChild(e){return{ngModule:t,providers:[{provide:nv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(ct(Y9,8))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[RM]}),t})();function CEe(t){if(fy&&t)throw new Ot(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function kEe(t){return["disabled"===t.initialNavigation?Ef(3,[{provide:Yx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>{n.setUpLocationChangeListener()}}},{provide:YM,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ef(2,[{provide:YM,useValue:0},{provide:Yx,multi:!0,deps:[Rs],useFactory:n=>{const e=n.get(swe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(cr),o=n.get(q9);(function hEe(t,n){t.events.pipe(ns(e=>e instanceof zh||e instanceof ry||e instanceof Xw||e instanceof qw),yn(e=>e instanceof zh||e instanceof qw?mc.COMPLETE:e instanceof ry&&(0===e.code||1===e.code)?mc.REDIRECTING:mc.FAILED),ns(e=>e!==mc.REDIRECTING),Sl(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(rC).afterPreactivation=()=>(i(!0),o.closed?$n(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const K9=new zn(fy?"Router Initializer":"");function sC(t,n){return new rn(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let Q9=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti))},t.\u0275dir=Zt({type:t}),t})(),Kp=(()=>{class t extends Q9{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,features:[vi]}),t})();const ha=new zn("NgValueAccessor"),TEe={provide:ha,useExisting:Gi(()=>aC),multi:!0};let aC=(()=>{class t extends Kp{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Lr([TEe]),vi]}),t})();const EEe={provide:ha,useExisting:Gi(()=>Na),multi:!0},MEe=new zn("CompositionEventMode");let Na=(()=>{class t extends Q9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function AEe(){const t=jh()?jh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti),le(MEe,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Lr([EEe]),vi]}),t})();const IEe=!1;function Af(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function Z9(t){return null!=t&&"number"==typeof t.length}const Oa=new zn("NgValidators"),Mf=new zn("NgAsyncValidators"),FEe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Do{static min(n){return eV(n)}static max(n){return function tV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nV(n)}static requiredTrue(n){return function iV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rV(t){return Af(t.value)||FEe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oV(t){return n=>Af(n.value)||!Z9(n.value)?null:n.value.lengthZ9(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aV(t){if(!t)return lC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Af(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fV(n)}static composeAsync(n){return pV(n)}}function eV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dV(t,n){return n.map(e=>e(t))}function hV(t){return t.map(n=>function NEe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return uV(dV(e,n))}}function JM(t){return null!=t?fV(hV(t)):null}function pV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return function DEe(...t){if(1===t.length){const n=t[0];if(et(n))return sC(n,null);if(Ve(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return sC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return sC(t=1===t.length&&et(t[0])?t[0]:t,null).pipe(yn(e=>n(...e)))}return sC(t,null)}(dV(e,n).map(cV)).pipe(yn(uV))}}function KM(t){return null!=t?pV(hV(t)):null}function mV(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function gV(t){return t._rawValidators}function vV(t){return t._rawAsyncValidators}function QM(t){return t?Array.isArray(t)?t:[t]:[]}function cC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yV(t,n){const e=QM(n);return QM(t).forEach(r=>{cC(e,r)||e.push(r)}),e}function bV(t,n){return QM(n).filter(e=>!cC(t,e))}class _V{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=JM(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=KM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class Dl extends _V{get formDirective(){return null}get path(){return null}}class If extends _V{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class xV{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let rl=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(If,2))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[vi]}),t})(),ol=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Dl,10))},t.\u0275dir=Zt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[vi]}),t})();function wV(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const t3=!1,py="VALID",dC="INVALID",rv="PENDING",my="DISABLED";function n3(t){return(hC(t)?t.validators:t)||null}function i3(t,n){return(hC(n)?n.asyncValidators:t)||null}function hC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CV(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Ot(1e3,t3?function LEe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Ot(1001,t3?function REe(t,n){return`Cannot find form control ${wV(t,n)}`}(n,e):"")}function kV(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Ot(1002,t3?function $Ee(t,n){return`Must supply a value for form control ${wV(t,n)}`}(n,r):"")})}class fC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===py}get invalid(){return this.status===dC}get pending(){return this.status==rv}get disabled(){return this.status===my}get enabled(){return this.status!==my}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yV(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yV(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(bV(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(bV(n,this._rawAsyncValidators))}hasValidator(n){return cC(this._rawValidators,n)}hasAsyncValidator(n){return cC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=rv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=my,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===py||this.status===rv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?my:py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=rv,this._hasOwnPendingAsyncValidator=!0;const e=cV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Ke,this.statusChanges=new Ke}_calculateStatus(){return this._allControlsDisabled()?my:this.errors?dC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(rv)?rv:this._anyControlsHaveStatus(dC)?dC:py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){hC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function BEe(t){return Array.isArray(t)?JM(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function VEe(t){return Array.isArray(t)?KM(t):t||null}(this._rawAsyncValidators)}}class gy extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){kV(this,!0,n),Object.keys(n).forEach(i=>{CV(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class SV extends gy{}const Qp=new zn("CallSetDisabledState",{providedIn:"root",factory:()=>vy}),vy="always";function yy(t,n,e=vy){r3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function zEe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&DV(t,n)})}(t,n),function GEe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function UEe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&DV(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function HEe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),vC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function gC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function r3(t,n){const e=gV(t);null!==n.validator?t.setValidators(mV(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vV(t);null!==n.asyncValidator?t.setAsyncValidators(mV(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();gC(n._rawValidators,r),gC(n._rawAsyncValidators,r)}function vC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=gV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return gC(n._rawValidators,i),gC(n._rawAsyncValidators,i),e}function DV(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function AV(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MV(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const _y=class extends fC{constructor(n=null,e,i){super(n3(e),i3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MV(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){AV(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){AV(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MV(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const eAe={provide:ha,useExisting:Gi(()=>c3),multi:!0};let c3=(()=>{class t extends Kp{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Lr([eAe]),vi]}),t})(),jV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const u3=new zn("NgModelWithFormControlWarning"),oAe={provide:Dl,useExisting:Gi(()=>fa)};let fa=(()=>{class t extends Dl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ke,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(vC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return yy(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function YEe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function EV(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof _y)(r)&&(yy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function TV(t,n){r3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function WEe(t,n){return vC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){r3(this.form,this),this._oldForm&&vC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(le(Oa,10),le(Mf,10),le(Qp,8))},t.\u0275dir=Zt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Lr([oAe]),vi,Hn]}),t})();const lAe={provide:If,useExisting:Gi(()=>ja)};let ja=(()=>{class t extends If{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Ke,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function a3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Na?e=o:function XEe(t){return Object.getPrototypeOf(t.constructor)===Kp}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function s3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function pC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(le(Dl,13),le(Oa,10),le(Mf,10),le(ha,10),le(u3,8))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Lr([lAe]),vi,Hn]}),t})();const cAe={provide:ha,useExisting:Gi(()=>ov),multi:!0};function BV(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let ov=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=BV(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function uAe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Lr([cAe]),vi]}),t})(),xy=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(BV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(ov,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const dAe={provide:ha,useExisting:Gi(()=>f3),multi:!0};function VV(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let f3=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(f3,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let Zp=(()=>{class t{constructor(){this._validator=lC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,features:[Hn]}),t})();const pAe={provide:Oa,useExisting:Gi(()=>p3),multi:!0};let p3=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function zV(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ht("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Lr([pAe]),vi]}),t})();const mAe={provide:Oa,useExisting:Gi(()=>Ff),multi:!0};let Ff=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=qg,this.createValidator=e=>nV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ht("required",i._enabled?"":null)},inputs:{required:"required"},features:[Lr([mAe]),vi]}),t})(),JV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[jV]}),t})();class KV extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){kV(this,!1,n),n.forEach((i,r)=>{CV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function QV(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let xAe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return QV(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new gy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new SV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(QV(i)?o=i:(o.validators=i,o.asyncValidators=r),new _y(e,{...o,nonNullable:!0})):new _y(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KV(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof _y||e instanceof fC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tl=(()=>{class t extends xAe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZV=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})(),wAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:u3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})();const m3=new zn("ngx-segment-analytics.config"),CAe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let g3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),yC=(()=>{class t{constructor(e,i,r){if(this._w=e,this._doc=i,this._config=Object.assign(Object.assign({},CAe),r),this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}get plugins(){return this._w.analytics.plugins}}return t.\u0275fac=function(e){return new(e||t)(ct(g3),ct(Ir),ct(m3))},t.\u0275prov=Et({factory:function(){return new t(ct(g3),ct(Ir),ct(m3))},token:t,providedIn:"root"}),t})();function kAe(t){return function DB(t){return t===SB}(t)?window:{}}let SAe=(()=>{class t{constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(e){return{ngModule:t,providers:[{provide:m3,useValue:e},yC]}}}return t.\u0275fac=function(e){return new(e||t)(ct(t,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:g3,useFactory:kAe,deps:[L1]}],imports:[Vs]}),t})();class bC{}class v3{}class Nu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Nu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Nu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Nu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class DAe{encodeKey(n){return eH(n)}encodeValue(n){return eH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const EAe=/%(\d[a-f0-9])/gi,AAe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eH(t){return encodeURIComponent(t).replace(EAe,(n,e)=>AAe[e]??n)}function _C(t){return`${t}`}class In{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new DAe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function TAe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(_C):[_C(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new In({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(_C(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(_C(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class MAe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nH(t){return typeof Blob<"u"&&t instanceof Blob}function iH(t){return typeof FormData<"u"&&t instanceof FormData}class Cy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function IAe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Nu),this.context||(this.context=new MAe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Cy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var zs=(()=>((zs=zs||{})[zs.Sent=0]="Sent",zs[zs.UploadProgress=1]="UploadProgress",zs[zs.ResponseHeader=2]="ResponseHeader",zs[zs.DownloadProgress=3]="DownloadProgress",zs[zs.Response=4]="Response",zs[zs.User=5]="User",zs))();class y3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Nu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class b3 extends y3{constructor(n={}){super(n),this.type=zs.ResponseHeader}clone(n={}){return new b3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class xC extends y3{constructor(n={}){super(n),this.type=zs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new xC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rH extends y3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function _3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let wC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Cy)o=e;else{let l,c;l=r.headers instanceof Nu?r.headers:new Nu(r.headers),r.params&&(c=r.params instanceof In?r.params:new In({fromObject:r.params})),o=new Cy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$n(o).pipe(Sf(l=>this.handler.handle(l)));if(e instanceof Cy||"events"===r.observe)return s;const a=s.pipe(ns(l=>l instanceof xC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(yn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(yn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new In).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,_3(r,i))}post(e,i,r={}){return this.request("POST",e,_3(r,i))}put(e,i,r={}){return this.request("PUT",e,_3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(ct(bC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function oH(t,n){return n(t)}function NAe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const x3=new zn("HTTP_INTERCEPTORS"),ky=new zn("HTTP_INTERCEPTOR_FNS");function jAe(){let t=null;return(n,e)=>(null===t&&(t=(ar(x3,{optional:!0})??[]).reduceRight(NAe,oH)),t(n,e))}let sH=(()=>{class t extends bC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ky)));this.chain=i.reduceRight((r,o)=>function OAe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(ct(v3),ct(Fd))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const $Ae=/^\)\]\}',?\n/;let lH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new rn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Nu(r.getAllResponseHeaders()),m=function BAe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new b3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const _=v;v=v.replace($Ae,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=_,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new xC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new rH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new rH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:zs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:zs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:zs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(ct(EB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const w3=new zn("XSRF_ENABLED"),cH=new zn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uH=new zn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dH{}let zAe=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=pB(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(L1),ct(cH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function UAe(t,n){const e=t.url.toLowerCase();if(!ar(w3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=ar(dH).getToken(),r=ar(uH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Ts=(()=>((Ts=Ts||{})[Ts.Interceptors=0]="Interceptors",Ts[Ts.LegacyInterceptors=1]="LegacyInterceptors",Ts[Ts.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ts[Ts.NoXsrfProtection=3]="NoXsrfProtection",Ts[Ts.JsonpSupport=4]="JsonpSupport",Ts[Ts.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ts))();function sv(t,n){return{\u0275kind:t,\u0275providers:n}}function GAe(...t){const n=[wC,lH,sH,{provide:bC,useExisting:sH},{provide:v3,useExisting:lH},{provide:ky,useValue:UAe,multi:!0},{provide:w3,useValue:!0},{provide:dH,useClass:zAe}];for(const e of t)n.push(...e.\u0275providers);return function R0e(t){return{\u0275providers:t}}(n)}const hH=new zn("LEGACY_INTERCEPTOR_FN");let qAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[GAe(sv(Ts.LegacyInterceptors,[{provide:hH,useFactory:jAe},{provide:ky,useExisting:hH,multi:!0}]))]}),t})();var oi=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(oi||(oi={})),oi))(),Sy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY"}(Sy||(Sy={})),Sy))();class C3{constructor(){K(this,"host",void 0),K(this,"timeoutMs",void 0)}}let xi=(()=>{class t{constructor(e,i){K(this,"httpClient",void 0),K(this,"config",void 0),this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new In({encoder:new Xn});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new In({encoder:new Xn});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new In({encoder:new Xn});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new In({encoder:new Xn});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new In({encoder:new Xn});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new In({encoder:new Xn});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Nu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Nu).set("Authorization","Basic "+btoa(e+":"+i))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(wC),ct(C3,8))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class Xn{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fH=new zn("window"),JAe=[{provide:fH,useFactory:()=>window}],k3="currentSession";let Xo=(()=>{class t{constructor(e,i,r,o){K(this,"window",void 0),K(this,"segment",void 0),K(this,"http",void 0),K(this,"consoleService",void 0),K(this,"currentSessionSubject",void 0),K(this,"currentSession",void 0),this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(k3));s&&this.segmentIdentify(s),this.currentSessionSubject=new Hs(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return oi.USER_ROLE_ADMIN;case 2:return oi.USER_ROLE_DEVELOPER;case 3:return oi.USER_ROLE_MAINTAINER;case 4:return oi.USER_ROLE_READONLY;default:return oi.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(is(r=>{localStorage.setItem(k3,JSON.stringify(r)),this.currentSessionSubject.next(r),this.segmentIdentify(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(is(()=>{localStorage.removeItem(k3),this.currentSessionSubject.next(null)})):Vh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(fH),ct(yC),ct(wC),ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function KAe(t,n){if(1&t&&(b(0,"div",17),I(1),x()),2&t){const e=j();w(1),xn(" ",e.error," ")}}const QAe=function(t){return{"was-validated":t}},pH=function(t){return{"is-invalid":t}};let ZAe=(()=>{class t{constructor(e,i,r,o,s){K(this,"segment",void 0),K(this,"formBuilder",void 0),K(this,"route",void 0),K(this,"router",void 0),K(this,"authenticationService",void 0),K(this,"error",""),K(this,"loginForm",void 0),K(this,"submitted",void 0),K(this,"returnUrl",void 0),this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Do.compose([Do.required])],password:["",Do.compose([Do.required,Do.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(yC),le(Tl),le(Rr),le(cr),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"h1",2),ge(3,"img",3),x(),J(4,KAe,2,1,"div",4),b(5,"div",5)(6,"div",6)(7,"h3",7),I(8,"Login"),x(),b(9,"form",8),ye("ngSubmit",function(){return i.onSubmit()}),b(10,"div",9)(11,"div",10)(12,"label",11),I(13,"Username"),x(),ge(14,"input",12),b(15,"div",13),I(16,"Please enter a username."),x()()(),b(17,"div",9)(18,"div",10)(19,"label",14),I(20,"Password"),x(),ge(21,"input",15),b(22,"div",13),I(23,"Password must be at least 8 characters."),x()()(),b(24,"button",16),I(25,"Login"),x()()()()()()),2&e&&(w(4),k("ngIf",i.error),w(5),k("formGroup",i.loginForm)("ngClass",lr(8,QAe,i.submitted)),w(5),k("ngClass",lr(10,pH,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(6),k("ngClass",lr(12,pH,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(2),k("disabled",!i.loginForm.valid||i.submitted))},dependencies:[Rh,gn,sl,Na,rl,ol,Ff,fa,ja],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]})),t})(),eMe=(()=>{class t{constructor(e,i){K(this,"authService",void 0),K(this,"router",void 0),this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),tMe=(()=>{class t{constructor(e,i){K(this,"router",void 0),K(this,"authenticationService",void 0),this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(cr),ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class nMe extends ue{constructor(n,e){super()}schedule(n,e=0){return this}}class S3 extends nMe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let mH=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Hd extends mH{constructor(n,e=mH.now){super(n,()=>Hd.delegate&&Hd.delegate!==this?Hd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Hd.delegate&&Hd.delegate!==this?Hd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Dy=new Hd(S3);class rMe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new sMe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class oMe{constructor(){this.buffer=[]}}class sMe extends O{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(gH,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vH,e,{subscriber:this,context:s})),this.add(o.schedule(aMe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(gH,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new oMe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function gH(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function aMe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vH,e,{subscriber:i,context:o})),this.schedule(t,n))}function vH(t){const{subscriber:n,context:e}=t;n.closeContext(e)}class lMe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new cMe(n,this.compare,this.keySelector))}}class cMe extends O{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Es(t,n,e,i){return rt(e)&&(i=e,e=void 0),i?Es(t,n,e).pipe(yn(r=>et(r)?i(...r):i(r))):new rn(r=>{yH(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yH(t,n,e,i,r){let o;if(function hMe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function dMe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function uMe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function av(t=0,n,e){let i=-1;return bH(n)?i=Number(n)<1?1:Number(n):Sa(n)&&(e=n),Sa(e)||(e=Dy),new rn(r=>{const o=bH(t)?t:+t-e.now();return e.schedule(fMe,o,{index:0,period:i,subscriber:r})})}function fMe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function _H(...t){if(1===t.length){if(!et(t[0]))return t[0];t=t[0]}return st(t,void 0).lift(new pMe)}class pMe{call(n,e){return e.subscribe(new mMe(n))}}class mMe extends wM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Me extends W{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Ro](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Ne(this.observable,new ml(this))}}function yo(t){return n=>n.lift(new wMe(t))}class wMe{constructor(n){this.notifier=n}call(n,e){const i=new CMe(n),r=Ne(this.notifier,new ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class CMe extends W{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function D3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new kMe(t,e))}}class kMe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SMe(n,this.observables,this.project))}}class SMe extends wM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ou{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $n(this.value);case"E":return qp(this.error);case"C":return Lw()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ou("N",n):Ou.undefinedValueNotification}static createError(n){return new Ou("E",void 0,n)}static createComplete(){return Ou.completeNotification}}function T3(t,n=Dy){const i=function DMe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TMe(i,n))}Ou.completeNotification=new Ou("C"),Ou.undefinedValueNotification=new Ou("N",void 0);class TMe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new E3(n,this.delay,this.scheduler))}}class E3 extends O{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(E3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new EMe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ou.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ou.createComplete()),this.unsubscribe()}}class EMe{constructor(n,e){this.time=n,this.notification=e}}function $Me(t,n){if(1&t){const e=vt();b(0,"button",1),ye("click",function(){return $e(e),Be(j().close())}),b(1,"span",2),I(2,"\xd7"),x()()}}const lv=["*"],b3e=["dialog"];function Nf(t){return null!=t}typeof Element<"u"&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const CH={animation:!0,transitionTimerDelayMs:5};let pa=(()=>{class t{constructor(){this.animation=CH.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})();const TIe=()=>{},{transitionTimerDelayMs:EIe}=CH,EC=new Map,ma=(t,n,e)=>{let i=e.context||{};const r=EC.get(t);if(r)switch(e.runningTransition){case"continue":return Vh;case"stop":r.transition$.complete(),i=Object.assign(r.context,i),EC.delete(t)}!function TC(t){return(t||document.body).offsetHeight}(t);const o=n(t,i)||TIe;if(!e.animation||"none"===window.getComputedStyle(t).transitionProperty)return o(),$n(void 0);const s=new tr,a=s.pipe(function xMe(...t){return n=>Pw(n,$n(...t))}(!0));EC.set(t,{transition$:s,context:i});const l=function DIe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(t),c=Es(t,"transitionend").pipe(yo(a),ns(({target:d})=>d===t));return _H(av(l+EIe).pipe(yo(a)),c).pipe(yo(a)).subscribe(()=>{EC.delete(t),o(),s.next(),s.complete()}),s.asObservable()};let AH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),IIe=(()=>{class t{constructor(e){this.dismissible=!0,this.type="warning",this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const FIe=({classList:t})=>{t.remove("show")};let To=(()=>{class t{constructor(e,i,r){this._renderer=i,this._element=r,this.closed=new Ke,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ma(this._element.nativeElement,FIe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(le(IIe),le(Ss),le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Mn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[Hn],ngContentSelectors:lv,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"close",3,"click"],["aria-hidden","true"]]},template:function(e,i){1&e&&(Cu(),ku(0),J(1,$Me,3,0,"button",0)),2&e&&(w(1),k("ngIf",i.dismissible))},dependencies:[gn],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),MH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(e,i){2&e&&Mn("btn",!0)("active",i.active)("disabled",i.disabled)("focus",i.focused)}}),t})(),OIe=0,F3=(()=>{class t{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+OIe++,this.onChange=e=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}onRadioChange(e){this.writeValue(e.value),this.onChange(e.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(e){this._radios.add(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._disabled=e,this._updateRadiosDisabled()}unregister(e){this._radios.delete(e)}writeValue(e){this._value=e,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(e=>e.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(e=>e.updateDisabled())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[Lr([{provide:ha,useExisting:Gi(()=>t),multi:!0}])]}),t})(),IH=(()=>{class t{constructor(e,i,r,o,s){this._group=e,this._label=i,this._renderer=r,this._element=o,this._cd=s,this._value=null,this._group.register(this),this.updateDisabled()}set value(e){this._value=e;const i=e?e.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",i),this._group.onRadioValueUpdate()}set disabled(e){this._disabled=!1!==e,this.updateDisabled()}set focused(e){this._label&&(this._label.focused=e),e||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(e){this.value!==e&&this._cd.markForCheck(),this._checked=this.value===e,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}}return t.\u0275fac=function(e){return new(e||t)(le(F3),le(AC),le(Ss),le(ti),le(qo))},t.\u0275dir=Zt({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("focus",function(){return i.focused=!0})("blur",function(){return i.focused=!1}),2&e&&dc("checked",i.checked)("disabled",i.disabled)("name",i.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),FH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),LH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();var ur=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ur||(ur={})),ur))();const NC=(t,n)=>!!n&&n.some(e=>e.contains(t)),VH=(t,n)=>!n||null!=function kIe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),sFe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),aFe=t=>sFe?()=>setTimeout(()=>t(),100):t;function Ey(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(aFe(()=>{const c=Es(n,"keydown").pipe(yo(r),ns(h=>h.which===ur.Escape),is(h=>h.preventDefault())),u=Es(n,"mousedown").pipe(yn(h=>{const f=h.target;return 2!==h.button&&!NC(f,s)&&("inside"===e?NC(f,o)&&VH(f,a):"outside"===e?!NC(f,o):VH(f,a)||!NC(f,o))}),yo(r)),d=Es(n,"mouseup").pipe(D3(u),ns(([h,f])=>f),T3(0),yo(r));_H([c.pipe(yn(h=>0)),d.pipe(yn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const HH=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function zH(t){const n=Array.from(t.querySelectorAll(HH)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}const cFe=/\s+/,GH=new class lFe{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.pageYOffset-document.documentElement.clientTop,r_left=window.pageXOffset-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),h=parseFloat(l.marginRight);let f=0,p=0;switch(o){case"top":f=a.top-(e.offsetHeight+c+u);break;case"bottom":f=a.top+a.height;break;case"left":p=a.left-(e.offsetWidth+d+h);break;case"right":p=a.left+a.width}switch(s){case"top":f=a.top;break;case"bottom":f=a.top+a.height-e.offsetHeight;break;case"left":p=a.left;break;case"right":p=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?p=a.left+a.width/2-e.offsetWidth/2:f=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(f)}px)`;const m=e.getBoundingClientRect(),g=document.documentElement,v=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return m.left>=0&&m.top>=0&&m.right<=y&&m.bottom<=v}};function Ay(t,n,e,i,r){let o=Array.isArray(e)?e:e.split(cFe);const s=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=n.classList,l=f=>{const[p,m]=f.split("-"),g=[];return r&&(g.push(`${r}-${p}`),m&&g.push(`${r}-${p}-${m}`),g.forEach(v=>{a.add(v)})),g};r&&s.forEach(f=>{a.remove(`${r}-${f}`)});let c=o.findIndex(f=>"auto"===f);c>=0&&s.forEach(function(f){null==o.find(p=>-1!==p.search("^"+f))&&o.splice(c++,1,f)});const u=n.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of o){let f=l(d);if(GH.positionElements(t,n,d,i)){h=!0;break}r&&f.forEach(p=>{a.remove(p)})}return h||(d=o[0],l(d),GH.positionElements(t,n,d,i)),d}new Date(1882,10,12),new Date(2174,10,25);let ZH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,ZV]}),t})(),xFe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),jf=(()=>{class t{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,i){2&e&&Mn("disabled",i.disabled)},inputs:{disabled:"disabled"}}),t})(),Pf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,jf,4),2&e){let o;cn(o=un())&&(i.menuItems=o)}},hostVars:5,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&(ht("x-placement",i.placement),Mn("dropdown-menu",!0)("show",i.dropdown.isOpen()))}}),t})(),LC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ht("aria-expanded",i.dropdown.isOpen())}}),t})(),rm=(()=>{class t extends LC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ht("aria-expanded",i.dropdown.isOpen())},features:[Lr([{provide:LC,useExisting:Gi(()=>t)}]),vi]}),t})(),Pu=(()=>{class t{constructor(e,i,r,o,s,a,l){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._closed$=new tr,this._bodyContainer=null,this._open=!1,this.openChange=new Ke,this.placement=i.placement,this.container=i.container,this.autoClose=i.autoClose,this.display=l?"static":"dynamic",this._zoneSubscription=o.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Sl(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){Ey(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ur.Space&&i!==ur.Enter){if(i!==ur.Tab){if(a||s){if(this.open(),r.length){switch(i){case ur.ArrowDown:o=Math.min(o+1,r.length-1);break;case ur.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ur.Home:o=0;break;case ur.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(HH);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Es(e.target,"focusout").pipe(Sl(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Es(s,"click").pipe(Sl(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Ay(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const r=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,r),e.removeStyle(r,"position"),e.removeStyle(r,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1050"),i.appendChild(o,r),i.appendChild(this._document.body,o)}}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown"),i.placement="static"===this.display?null:e;const s=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,s);const a=this._bodyContainer;a&&(r.removeClass(a,"dropup"),r.removeClass(a,"dropdown"),r.addClass(a,s))}}}return t.\u0275fac=function(e){return new(e||t)(le(qo),le(xFe),le(Ir),le(Wi),le(ti),le(Ss),le(ez,8))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Pf,5),ni(r,LC,5)),2&e){let o;cn(o=un())&&(i._menu=o.first),cn(o=un())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("show",i.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Hn]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),nz=(()=>{class t{constructor(e){this.backdrop=!0,this.keyboard=!0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();class om{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class V3{constructor(n,e,i,r,o,s,a){this._type=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._componentFactoryResolver=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:r}=this._windowRef.location,s=this._ngZone.onStable.asObservable().pipe(Sl(1)).pipe(nt(()=>this._ngZone.run(()=>ma(r,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"}))));return{windowRef:this._windowRef,transition$:s}}close(n=!1){return this._windowRef?ma(this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(is(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),null!==(e=this._contentRef)&&void 0!==e&&e.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$n(void 0)}_getContentRef(n,e){if(n){if(n instanceof Si){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new om([i.rootNodes],i)}return new om([[this._renderer.createText(`${n}`)]])}return new om([])}}const wFe=()=>{};let iz=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):wFe}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({factory:function(){return new t(ct(Ir))},token:t,providedIn:"root"}),t})(),CFe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Sl(1)).subscribe(()=>{ma(this._el.nativeElement,({classList:e})=>e.add("show"),{animation:this.animation,runningTransition:"continue"})})}hide(){return ma(this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Su("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Mn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class rz{close(n){}dismiss(n){}}class kFe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tr,this._dismissed=new tr,this._hidden=new tr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(yo(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(yo(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$n(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),kC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Fy=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(Fy||(Fy={})),Fy))();let SFe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new tr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Ke,this.shown=new tr,this.hidden=new tr}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=kC(ma(e,()=>e.classList.remove("show"),i),ma(this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"continue"};kC(ma(e,()=>e.classList.add("show"),i),ma(this._dialogEl.nativeElement,()=>{},i)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Es(e,"keydown").pipe(yo(this._closed$),ns(r=>r.which===ur.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Fy.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Es(this._dialogEl.nativeElement,"mousedown").pipe(yo(this._closed$),is(()=>i=!1),zl(()=>Es(e,"mouseup").pipe(yo(this._closed$),Sl(1))),ns(({target:r})=>e===r)).subscribe(()=>{i=!0}),Es(e,"click").pipe(yo(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(Fy.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=zH(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ma(this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(le(Ir),le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&io(b3e,7),2&e){let r;cn(r=un())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ht("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Su("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Mn("fade",i.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:lv,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0,1)(2,"div",2),ku(3),x()()),2&e&&Su("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),oz=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new tr,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Ke,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Es(n,"focusin").pipe(yo(e),yn(o=>o.target));Es(n,"keydown").pipe(yo(e),ns(o=>o.which===ur.Tab),D3(r)).subscribe(([o,s])=>{const[a,l]=zH(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Es(n,"click").pipe(yo(e),D3(r),yn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:Nf(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new rz,d=this._getContentRef(e,o.injector||i,r,u,o);let h=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,f=this._attachWindowComponent(e,s,d),p=new kFe(f,d,h,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(f),p.result.then(l,l),p.result.then(c,c),u.close=m=>{p.close(m)},u.dismiss=m=>{p.dismiss(m)},this._applyWindowOptions(f.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),h&&h.instance&&this._applyBackdropOptions(h.instance,o),p}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(CFe).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(SFe).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{Nf(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{Nf(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof Si?this._createFromTemplateRef(r,o):function DC(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new om([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new om([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new om([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=Rs.create({providers:[{provide:rz,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new om([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct(Rs),ct(Ir),ct(iz),ct(Lp),ct(Wi))},t.\u0275prov=Et({factory:function(){return new t(ct(Au),ct(Dx),ct(Ir),ct(iz),ct(Lp),ct(Wi))},token:t,providedIn:"root"}),t})(),H3=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=Object.assign({},this._config,i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(ct($c),ct(Rs),ct(oz),ct(nz))},t.\u0275prov=Et({factory:function(){return new t(ct($c),ct(Dx),ct(oz),ct(nz))},token:t,providedIn:"root"}),t})(),sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[H3]}),t})(),DFe=(()=>{class t{constructor(e){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const az=t=>Nf(t)&&""!==t;let TFe=0,lz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),sm=(()=>{class t{constructor(e,i){this.elementRef=i,this.disabled=!1,this.shown=new Ke,this.hidden=new Ke,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Nf(this.domId)||(this.domId="ngb-nav-"+TFe++)}get active(){return this._nav.activeId===this.id}get id(){return az(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Nf(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>am)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,lz,4),2&e){let o;cn(o=un())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),t})(),am=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Ke,this.shown=new Ke,this.hidden=new Ke,this.destroy$=new tr,this.navItemChange$=new tr,this.navChange=new Ke,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ur.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ur.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ur.Home:s=0;break;case ur.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Nf(this.activeId)){const e=this.items.first?this.items.first.id:null;az(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(yo(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(DFe),le(qo),le(Ir))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,sm,4),ni(r,fv,5)),2&e){let o;cn(o=un())&&(i.items=o),cn(o=un())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ht("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Mn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[Hn]}),t})(),fv=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(sm),le(am),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()}),2&e&&(dc("id",i.navItem.domId),ht("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Mn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))}}),t})(),cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();class FFe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const NFe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},vz=t=>t>0?T3(t):n=>n;let bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),_z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),QFe=(()=>{class t{constructor(e){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})(),ZFe=0,eNe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,i){2&e&&(dc("id",i.id),Su("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Mn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:lv,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(Cu(),ge(0,"div",0),b(1,"div",1),ku(2),x())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{bottom:.4rem;top:auto}"],encapsulation:2,changeDetection:0}),t})(),tNe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u,d){this._elementRef=e,this._renderer=i,this._ngZone=l,this._document=c,this._changeDetector=u,this.shown=new Ke,this.hidden=new Ke,this._ngbTooltipWindowId="ngb-tooltip-"+ZFe++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.triggers=a.triggers,this.container=a.container,this.disableTooltip=a.disableTooltip,this.tooltipClass=a.tooltipClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._popupService=new V3(eNe,r,s,i,this._ngZone,o,d),this._zoneSubscription=l.onStable.subscribe(()=>{this._windowRef&&Ay(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),Ey(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function yz(t,n,e,i,r,o,s=0,a=0){const l=function OFe(t,n=NFe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new FFe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function jFe(t,n,e,i){return new rn(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function PFe(t,n,e){return i=>{let r=null;const o=i.pipe(yn(l=>({open:l})),ns(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),We());return Tt(o.pipe(ns(l=>l.open),vz(t)),o.pipe(ns(l=>!l.open),vz(n))).pipe(ns(l=>l===r&&(r=null,l.open!==e())),yn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(Rs),le($c),le(nl),le(QFe),le(Wi),le(Ir),le(qo),le(Au))},t.\u0275dir=Zt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[Hn]}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();new zn("live announcer delay",{providedIn:"root",factory:function rNe(){return 100}});let Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();const lNe=[AH,MH,FH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz];let cNe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[lNe,AH,MH,FH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz]}),t})(),Iz=(()=>{class t{constructor(){K(this,"restrictedPages",new Map([["users",oi.USER_ROLE_ADMIN],["config",oi.USER_ROLE_DEVELOPER],["modules",oi.USER_ROLE_DEVELOPER],["apiexplorer",oi.USER_ROLE_DEVELOPER]]))}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function uNe(t,n){if(1&t&&(ta(0,5),b(1,"a",27),ge(2,"img",28),b(3,"span",12),I(4),x()(),na()),2&t){const e=j().$implicit;k("ngbNavItem",e.navItem),w(1),k("routerLink",e.routerLink),w(1),$p("src","/static/svg/",e.icon,".svg",y1),w(2),Dt(e.label)}}function dNe(t,n){1&t&&ge(0,"hr")}function hNe(t,n){if(1&t&&(J(0,uNe,5,4,"ng-container",26),J(1,dNe,1,0,"hr",25)),2&t){const e=n.$implicit;k("ngIf",j().getSessionRole()<=e.minRole),w(1),k("ngIf",e.separator)}}function fNe(t,n){if(1&t&&(b(0,"div",29)(1,"h2",30),ge(2,"img",31),I(3,"An error has occurred!"),x(),b(4,"h6",32),I(5),x(),b(6,"p"),I(7,"Please refresh the page to try again."),x()()),2&t){const e=j();w(5),Dt(e.error)}}function pNe(t,n){1&t&&(b(0,"div",33),ge(1,"img",34),x())}function mNe(t,n){1&t&&ge(0,"router-outlet")}const gNe=function(){return["/"]},vNe=function(){return["/login"]};let yNe=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"segment",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"routerSub",void 0),K(this,"segmentRouterSub",void 0),K(this,"loading",!0),K(this,"error",""),K(this,"routes",[{navItem:"status",routerLink:["/status"],label:"Status",minRole:oi.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:oi.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:oi.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:oi.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:oi.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:oi.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:oi.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:oi.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:oi.USER_ROLE_READONLY,icon:"chat"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:oi.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:oi.USER_ROLE_DEVELOPER,icon:"api-explorer"}]),this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function iMe(t){let n=arguments.length,e=Dy;Sa(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new rMe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof Ww&&(this.loading=!0),l instanceof zh&&(this.loading=!1),l instanceof ry&&(this.loading=!1),l instanceof Xw&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(function CC(t,n){return e=>e.lift(new lMe(t,n))}((a,l)=>!(l instanceof zh)||a.url===l.url)).subscribe(a=>{a&&r.page(a.url)})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(yC),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(o){return i.onSidebarNavChange(o)}),b(4,"div",4),ta(5,5),b(6,"a",6),ge(7,"img",7)(8,"img",8),x(),na(),ge(9,"hr"),J(10,hNe,2,2,"ng-template",9),ge(11,"hr"),b(12,"a",10),ge(13,"img",11),b(14,"span",12),I(15,"Heroic Cloud"),x()(),b(16,"a",13),ge(17,"img",14),b(18,"span",12),I(19,"Documentation"),x()(),b(20,"a",15),ge(21,"img",16),b(22,"span",12),I(23,"Forum"),x()(),b(24,"a",17),ge(25,"img",18),b(26,"span",12),I(27,"Heroic Labs Blog"),x()(),ge(28,"hr"),b(29,"div",19),I(30),x(),ta(31,5),b(32,"a",20),ye("click",function(){return i.logout()}),ge(33,"img",21),b(34,"span",12),I(35,"Logout"),x()(),na(),x()(),b(36,"main",22),J(37,fNe,8,1,"div",23),J(38,pNe,2,0,"div",24),J(39,mNe,1,0,"router-outlet",25),x()()()),2&e&&(w(5),k("ngbNavItem","logo"),w(1),k("routerLink",wl(9,gNe)),w(4),k("ngForOf",i.routes),w(20),xn("Logged in as: ",i.getUsername(),""),w(1),k("ngbNavItem","logout"),w(1),k("routerLink",wl(10,vNe)),w(5),k("ngIf",i.error),w(1),k("ngIf",!i.error&&i.loading),w(1),k("ngIf",!i.error&&!i.loading))},dependencies:[Jp,Fu,hy,jn,gn,am,sm,fv],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})),t})(),bNe=(()=>{class t{constructor(e,i,r){K(this,"authService",void 0),K(this,"router",void 0),K(this,"globals",void 0),this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||Rs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class kNe extends CNe{}class ENe{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new ANe(n,this.dueTime,this.scheduler))}}class ANe extends O{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(MNe,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function MNe(t){t.debouncedNext()}function INe(){}function W3(t){return null==t?INe:function(){return this.querySelector(t)}}function NNe(){return[]}function Lz(t){return null==t?NNe:function(){return this.querySelectorAll(t)}}function Rz(t){return function(){return this.matches(t)}}function $z(t){return new Array(t.length)}function $C(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$C.prototype={constructor:$C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Bz="$";function RNe(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var q3="http://www.w3.org/1999/xhtml";const Vz={svg:"http://www.w3.org/2000/svg",xhtml:q3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function BC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Vz.hasOwnProperty(n)?{space:Vz[n],local:t}:t}function ZNe(t){return function(){this.removeAttribute(t)}}function eOe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tOe(t,n){return function(){this.setAttribute(t,n)}}function nOe(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function iOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function rOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Hz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sOe(t){return function(){this.style.removeProperty(t)}}function aOe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function lOe(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function pv(t,n){return t.style.getPropertyValue(n)||Hz(t).getComputedStyle(t,null).getPropertyValue(n)}function uOe(t){return function(){delete this[t]}}function dOe(t,n){return function(){this[t]=n}}function hOe(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function zz(t){return t.trim().split(/^|\s+/)}function X3(t){return t.classList||new Uz(t)}function Uz(t){this._node=t,this._names=zz(t.getAttribute("class")||"")}function Gz(t,n){for(var e=X3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Xz={},Vr=null;function HOe(t,n,e){return t=Yz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Yz(t,n,e){return function(i){var r=Vr;Vr=i;try{t.call(this,this.__data__,n,e)}finally{Vr=r}}}function UOe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=_&&(_=y+1);!(S=g[_])&&++_=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function GNe(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=WNe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?sOe:"function"==typeof n?lOe:aOe)(t,n,e??"")):pv(this.node(),t)},property:function fOe(t,n){return arguments.length>1?this.each((null==n?uOe:"function"==typeof n?hOe:dOe)(t,n)):this.node()[t]},classed:function vOe(t,n){var e=zz(t+"");if(arguments.length<2){for(var i=X3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?GOe:UOe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=i4e.exec(t))?new vc(n[1],n[2],n[3],1):(n=r4e.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=o4e.exec(t))?zC(n[1],n[2],n[3],n[4]):(n=s4e.exec(t))?zC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=a4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,1):(n=l4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,n[4]):iU.hasOwnProperty(t)?sU(iU[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function sU(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function zC(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function Ly(t,n,e,i){return 1===arguments.length?function u4e(t){return t instanceof Oy||(t=lm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function aU(){return"#"+K3(this.r)+K3(this.g)+K3(this.b)}function lU(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function K3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cU(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ud(t,n,e,i)}function uU(t){if(t instanceof Ud)return new Ud(t.h,t.s,t.l,t.opacity);if(t instanceof Oy||(t=lm(t)),!t)return new Ud;if(t instanceof Ud)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Ud(s,a,l,t.opacity)}function Ud(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Q3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function dU(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function Z3(t){return function(){return t}}function fU(t,n){var e=n-t;return e?function hU(t,n){return function(e){return t+e*n}}(t,e):Z3(isNaN(t)?n:t)}J3(Oy,lm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rU,formatHex:rU,formatHsl:function c4e(){return uU(this).formatHsl()},formatRgb:oU,toString:oU}),J3(vc,Ly,nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aU,formatHex:aU,formatRgb:lU,toString:lU})),J3(Ud,function d4e(t,n,e,i){return 1===arguments.length?uU(t):new Ud(t,n,e,i??1)},nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new Ud(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ud(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(Q3(t>=240?t-240:t+120,r,i),Q3(t,r,i),Q3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const UC=function t(n){var e=function m4e(t){return 1==(t=+t)?fU:function(n,e){return e-n?function p4e(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):Z3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Ly(r)).r,(o=Ly(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=fU(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function pU(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return dU((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=tI.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--gv}()}finally{gv=0,function T4e(){for(var t,e,n=GC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:GC=e);By=t,nI(i)}(),um=0}}function D4e(){var t=Vy.now(),n=t-WC;n>bU&&(qC-=n,WC=t)}function nI(t){gv||(Ry&&(Ry=clearTimeout(Ry)),t-um>24?(t<1/0&&(Ry=setTimeout(wU,t-Vy.now()-qC)),$y&&($y=clearInterval($y))):($y||(WC=Vy.now(),$y=setInterval(D4e,bU)),gv=1,_U(wU)))}function CU(t,n,e){var i=new YC;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}YC.prototype=xU.prototype={constructor:YC,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?XC():+e)+(null==n?0:+n),!this._next&&By!==this&&(By?By._next=this:GC=this,By=this),this._call=t,this._time=e,nI()},stop:function(){this._call&&(this._call=null,this._time=1/0,nI())}};var E4e=tU("start","end","cancel","interrupt"),A4e=[],kU=0,SU=1,iI=2,JC=3,DU=4,rI=5,KC=6;function QC(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function M4e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==SU)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===JC)return CU(s);f.state===DU?(f.state=KC,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ukU)throw new Error("too late; already scheduled");return e}function Gh(t,n){var e=Ru(t,n);if(e.state>JC)throw new Error("too late; already running");return e}function Ru(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function sI(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>iI&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?oI:Gh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function G4e(t,n){var e=BC(t),i="transform"===e?j4e:IU;return this.attrTween(t,"function"==typeof n?(e.local?U4e:z4e)(e,i,cI(this,"attr."+t,n)):null==n?(e.local?B4e:$4e)(e):(e.local?H4e:V4e)(e,i,n))},attrTween:function J4e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=BC(t);return this.tween(e,(i.local?X4e:Y4e)(i,n))},style:function _je(t,n,e){var i="transform"==(t+="")?O4e:IU;return null==n?this.styleTween(t,function gje(t,n){var e,i,r;return function(){var o=pv(this,t),s=(this.style.removeProperty(t),pv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,FU(t)):"function"==typeof n?this.styleTween(t,function yje(t,n,e){var i,r,o;return function(){var s=pv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=pv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,cI(this,"style."+t,n))).each(function bje(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Gh(this,t),c=l.on,u=null==l.value[o]?a||(a=FU(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function vje(t,n,e){var i,o,r=e+"";return function(){var s=pv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function Cje(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function wje(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function xje(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function Dje(t){return this.tween("text","function"==typeof t?function Sje(t){return function(){var n=t(this);this.textContent=n??""}}(cI(this,"text",t)):function kje(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function Aje(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function Eje(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function Tje(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function dje(){return this.on("end.remove",function uje(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function R4e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Ru(this.node(),e).tween,r=0,o=i.length;r0&&(R=z-F),C<0?he=E-N:C>0&&(q=re-N),y=fI,B.attr("cursor",qh.selection),Ie());break;default:return}hI()},!0).on("keyup.brush",function _t(){switch(Vr.keyCode){case 16:V&&(oe=fe=V=!1,Ie());break;case 18:y===bv&&(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv,Ie());break;case 32:y===fI&&(Vr.altKey?(_&&(X=Z-F*_,R=z+F*_),C&&(he=E-N*C,q=re+N*C),y=bv):(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv),B.attr("cursor",qh[v]),Ie());break;default:return}hI()},!0),function e4e(t){var n=t.document.documentElement,e=va(t).on("dragstart.drag",Y3,!0);"onselectstart"in n?e.on("selectstart.drag",Y3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Vr.view)}OU(),sI(g),c.call(g),ze.start()}function ie(){var At=Fe(g);V&&!oe&&!fe&&(Math.abs(At[0]-tt[0])>Math.abs(At[1]-tt[1])?fe=!0:oe=!0),tt=At,Y=!0,hI(),Ie()}function Ie(){var At;switch(F=tt[0]-xe[0],N=tt[1]-xe[1],y){case fI:case jU:_&&(F=Math.max(G-R,Math.min(L-X,F)),z=R+F,Z=X+F),C&&(N=Math.max(U-q,Math.min(H-he,N)),re=q+N,E=he+N);break;case yv:_<0?(F=Math.max(G-R,Math.min(L-R,F)),z=R+F,Z=X):_>0&&(F=Math.max(G-X,Math.min(L-X,F)),z=R,Z=X+F),C<0?(N=Math.max(U-q,Math.min(H-q,N)),re=q+N,E=he):C>0&&(N=Math.max(U-he,Math.min(H-he,N)),re=q,E=he+N);break;case bv:_&&(z=Math.max(G,Math.min(L,R-F*_)),Z=Math.max(G,Math.min(L,X+F*_))),C&&(re=Math.max(U,Math.min(H,q-N*C)),E=Math.max(U,Math.min(H,he+N*C)))}Zn?1:t>=n?0:NaN}function yI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function Xje(t){return(n,e)=>vI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var bI=Math.sqrt(50),_I=Math.sqrt(10),xI=Math.sqrt(2);function $U(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=bI?10:o>=_I?5:o>=xI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=bI?10:o>=_I?5:o>=xI?2:1)}function wI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=bI?r*=10:o>=_I?r*=5:o>=xI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return CI.setTime(+o),kI.setTime(+s),t(CI),t(kI),Math.floor(e(CI,kI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var SI=$u(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});SI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$u(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Jje=SI;var BU=$u(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});const Kje=BU;var Uy=6e4,Zje=6048e5;function dm(t){return $u(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Uy)/Zje})}var HU=dm(0),zU=(dm(1),dm(2),dm(3),dm(4),dm(5),dm(6),$u(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Uy)/864e5,t=>t.getDate()-1));const sPe=zU;var UU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Uy)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()});const aPe=UU;var GU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*Uy)},function(t,n){return(n-t)/Uy},function(t){return t.getMinutes()});const lPe=GU;var WU=$u(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()});const cPe=WU;var i2=$u(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});i2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$u(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):i2:null};const uPe=i2;var DI=new Date,TI=new Date;function Xh(t,n,e,i){function r(o){return t(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return t(o=new Date(+o)),o},r.ceil=function(o){return t(o=new Date(o-1)),n(o,1),t(o),o},r.round=function(o){var s=r(o),a=r.ceil(o);return o-s0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return DI.setTime(+o),TI.setTime(+s),t(DI),t(TI),Math.floor(e(DI,TI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var qU=6e4,YU=6048e5;function hm(t){return Xh(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/YU})}var JU=hm(0),r2=hm(1),_v=(hm(2),hm(3),hm(4)),KU=(hm(5),hm(6),Xh(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const QU=KU;function fm(t){return Xh(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qU)/YU})}var ZU=fm(0),o2=fm(1),xv=(fm(2),fm(3),fm(4)),eG=(fm(5),fm(6),Xh(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qU)/864e5},function(t){return t.getDate()-1}));const tG=eG;var EI=Xh(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});EI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Gy=EI;var AI=Xh(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});AI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Wy=AI;function MI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function II(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function qy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var wv,gG,nG={"-":"",_:" ",0:"0"},ya=/^\s*\d+/,_Pe=/^%/,xPe=/[\\^$*+?|[\]().{}]/g;function Gr(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function EPe(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function APe(t,n,e){var i=ya.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function MPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function oG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function IPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function sG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function FPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function NPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function OPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function jPe(t,n,e){var i=ya.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function PPe(t,n,e){var i=_Pe.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function LPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function RPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function aG(t,n){return Gr(t.getDate(),n,2)}function $Pe(t,n){return Gr(t.getHours(),n,2)}function BPe(t,n){return Gr(t.getHours()%12||12,n,2)}function VPe(t,n){return Gr(1+tG.count(Gy(t),t),n,3)}function lG(t,n){return Gr(t.getMilliseconds(),n,3)}function HPe(t,n){return lG(t,n)+"000"}function zPe(t,n){return Gr(t.getMonth()+1,n,2)}function UPe(t,n){return Gr(t.getMinutes(),n,2)}function GPe(t,n){return Gr(t.getSeconds(),n,2)}function WPe(t){var n=t.getDay();return 0===n?7:n}function qPe(t,n){return Gr(ZU.count(Gy(t)-1,t),n,2)}function cG(t){var n=t.getDay();return n>=4||0===n?xv(t):xv.ceil(t)}function XPe(t,n){return t=cG(t),Gr(xv.count(Gy(t),t)+(4===Gy(t).getDay()),n,2)}function YPe(t){return t.getDay()}function JPe(t,n){return Gr(o2.count(Gy(t)-1,t),n,2)}function KPe(t,n){return Gr(t.getFullYear()%100,n,2)}function QPe(t,n){return Gr((t=cG(t)).getFullYear()%100,n,2)}function ZPe(t,n){return Gr(t.getFullYear()%1e4,n,4)}function eLe(t,n){var e=t.getDay();return Gr((t=e>=4||0===e?xv(t):xv.ceil(t)).getFullYear()%1e4,n,4)}function tLe(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Gr(n/60|0,"0",2)+Gr(n%60,"0",2)}function uG(t,n){return Gr(t.getUTCDate(),n,2)}function nLe(t,n){return Gr(t.getUTCHours(),n,2)}function iLe(t,n){return Gr(t.getUTCHours()%12||12,n,2)}function rLe(t,n){return Gr(1+QU.count(Wy(t),t),n,3)}function dG(t,n){return Gr(t.getUTCMilliseconds(),n,3)}function oLe(t,n){return dG(t,n)+"000"}function sLe(t,n){return Gr(t.getUTCMonth()+1,n,2)}function aLe(t,n){return Gr(t.getUTCMinutes(),n,2)}function lLe(t,n){return Gr(t.getUTCSeconds(),n,2)}function cLe(t){var n=t.getUTCDay();return 0===n?7:n}function uLe(t,n){return Gr(JU.count(Wy(t)-1,t),n,2)}function hG(t){var n=t.getUTCDay();return n>=4||0===n?_v(t):_v.ceil(t)}function dLe(t,n){return t=hG(t),Gr(_v.count(Wy(t),t)+(4===Wy(t).getUTCDay()),n,2)}function hLe(t){return t.getUTCDay()}function fLe(t,n){return Gr(r2.count(Wy(t)-1,t),n,2)}function pLe(t,n){return Gr(t.getUTCFullYear()%100,n,2)}function mLe(t,n){return Gr((t=hG(t)).getUTCFullYear()%100,n,2)}function gLe(t,n){return Gr(t.getUTCFullYear()%1e4,n,4)}function vLe(t,n){var e=t.getUTCDay();return Gr((t=e>=4||0===e?_v(t):_v.ceil(t)).getUTCFullYear()%1e4,n,4)}function yLe(){return"+0000"}function fG(){return"%"}function pG(t){return+t}function mG(t){return Math.floor(+t/1e3)}function vG(t){return null===t?NaN:+t}!function wLe(t){wv=function bPe(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Xy(r),u=Yy(r),d=Xy(o),h=Yy(o),f=Xy(s),p=Yy(s),m=Xy(a),g=Yy(a),v=Xy(l),y=Yy(l),_={a:function H(ze){return s[ze.getDay()]},A:function he(ze){return o[ze.getDay()]},b:function E(ze){return l[ze.getMonth()]},B:function F(ze){return a[ze.getMonth()]},c:null,d:aG,e:aG,f:HPe,g:QPe,G:eLe,H:$Pe,I:BPe,j:VPe,L:lG,m:zPe,M:UPe,p:function N(ze){return r[+(ze.getHours()>=12)]},q:function Y(ze){return 1+~~(ze.getMonth()/3)},Q:pG,s:mG,S:GPe,u:WPe,U:qPe,V:XPe,w:YPe,W:JPe,x:null,X:null,y:KPe,Y:ZPe,Z:tLe,"%":fG},C={a:function V(ze){return s[ze.getUTCDay()]},A:function oe(ze){return o[ze.getUTCDay()]},b:function fe(ze){return l[ze.getUTCMonth()]},B:function Fe(ze){return a[ze.getUTCMonth()]},c:null,d:uG,e:uG,f:oLe,g:mLe,G:vLe,H:nLe,I:iLe,j:rLe,L:dG,m:sLe,M:aLe,p:function xe(ze){return r[+(ze.getUTCHours()>=12)]},q:function tt(ze){return 1+~~(ze.getUTCMonth()/3)},Q:pG,s:mG,S:lLe,u:cLe,U:uLe,V:dLe,w:hLe,W:fLe,x:null,X:null,y:pLe,Y:gLe,Z:yLe,"%":fG},S={a:function z(ze,ot,B){var ne=f.exec(ot.slice(B));return ne?(ze.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function U(ze,ot,B){var ne=d.exec(ot.slice(B));return ne?(ze.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function q(ze,ot,B){var ne=v.exec(ot.slice(B));return ne?(ze.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function re(ze,ot,B){var ne=m.exec(ot.slice(B));return ne?(ze.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function L(ze,ot,B){return G(ze,n,ot,B)},d:oG,e:oG,f:jPe,g:rG,G:iG,H:sG,I:sG,j:IPe,L:OPe,m:MPe,M:FPe,p:function R(ze,ot,B){var ne=c.exec(ot.slice(B));return ne?(ze.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:APe,Q:LPe,s:RPe,S:NPe,u:kPe,U:SPe,V:DPe,w:CPe,W:TPe,x:function X(ze,ot,B){return G(ze,e,ot,B)},X:function Z(ze,ot,B){return G(ze,i,ot,B)},y:rG,Y:iG,Z:EPe,"%":PPe};function M(ze,ot){return function(B){var Le,_t,At,ne=[],ie=-1,Ie=0,Ye=ze.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Ie=II(qy(ne.y,0,1))).getUTCDay(),Ie=Ye>4||0===Ye?r2.ceil(Ie):r2(Ie),Ie=QU.offset(Ie,7*(ne.V-1)),ne.y=Ie.getUTCFullYear(),ne.m=Ie.getUTCMonth(),ne.d=Ie.getUTCDate()+(ne.w+6)%7):(Ye=(Ie=MI(qy(ne.y,0,1))).getDay(),Ie=Ye>4||0===Ye?o2.ceil(Ie):o2(Ie),Ie=tG.offset(Ie,7*(ne.V-1)),ne.y=Ie.getFullYear(),ne.m=Ie.getMonth(),ne.d=Ie.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?II(qy(ne.y,0,1)).getUTCDay():MI(qy(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,II(ne)):MI(ne)}}function G(ze,ot,B,ne){for(var Le,_t,ie=0,Ie=ot.length,Ye=B.length;ie=Ye)return-1;if(37===(Le=ot.charCodeAt(ie++))){if(Le=ot.charAt(ie++),!(_t=S[Le in nG?ot.charAt(ie++):Le])||(ne=_t(ze,B,ne))<0)return-1}else if(Le!=B.charCodeAt(ne++))return-1}return ne}return _.x=M(e,_),_.X=M(i,_),_.c=M(n,_),C.x=M(e,C),C.X=M(i,C),C.c=M(n,C),{format:function(ze){var ot=M(ze+="",_);return ot.toString=function(){return ze},ot},parse:function(ze){var ot=$(ze+="",!1);return ot.toString=function(){return ze},ot},utcFormat:function(ze){var ot=M(ze+="",C);return ot.toString=function(){return ze},ot},utcParse:function(ze){var ot=$(ze+="",!0);return ot.toString=function(){return ze},ot}}}(t),gG=wv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const CLe=yI(vI).right,bG=(yI(vG),CLe);function kLe(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function DLe(t){return+t}var _G=[0,1];function Cv(t){return t}function FI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function SLe(t){return function(){return t}}(isNaN(n)?NaN:.5)}function ELe(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?ALe:ELe,l=c=null,d}function d(h){return isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,DLe),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=kLe,u()},d.clamp=function(h){return arguments.length?(s=!!h||Cv,u()):s!==Cv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Cv,Cv)}function Jy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Ky=1e3,Qy=60*Ky,Zy=60*Qy,eb=24*Zy,FLe=7*eb,CG=30*eb,NI=365*eb;function NLe(t){return new Date(t)}function OLe(t){return t instanceof Date?+t:+new Date(+t)}function kG(t,n,e,i,r,o,s,a,l){var c=wG(),u=c.invert,d=c.domain,h=l(".%L"),f=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),_=l("%Y"),C=[[s,1,Ky],[s,5,5*Ky],[s,15,15*Ky],[s,30,30*Ky],[o,1,Qy],[o,5,5*Qy],[o,15,15*Qy],[o,30,30*Qy],[r,1,Zy],[r,3,3*Zy],[r,6,6*Zy],[r,12,12*Zy],[i,1,eb],[i,2,2*eb],[e,1,FLe],[n,1,CG],[n,3,3*CG],[t,1,NI]];function S($){return(s($)<$?h:o($)<$?f:r($)<$?p:i($)<$?m:n($)<$?e($)<$?g:v:t($)<$?y:_)($)}function M($,G,R){if(null==$&&($=10),"number"==typeof $){var q,z=Math.abs(R-G)/$,U=yI(function(re){return re[2]}).right(C,z);return U===C.length?(q=wI(G/NI,R/NI,$),$=t):U?(q=(U=C[z/C[U-1][2]=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s2(t){if(!(n=jLe.exec(t)))throw new Error("invalid format: "+t);var n;return new OI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function OI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function a2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function kv(t){return(t=a2(Math.abs(t)))?t[1]:NaN}function DG(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}s2.prototype=OI.prototype,OI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const TG={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function PLe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return DG(100*t,n)},r:DG,s:function VLe(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(SG=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+a2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function EG(t){return t}var l2,jI,IG,AG=Array.prototype.map,MG=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function qLe(t){var n=t.domain;return t.ticks=function(e){var i=n();return function Yje(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),s=new Array(o=Math.ceil(n-t+1));++r0;){if((c=$U(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function bo(){var t=wG();return t.copy=function(){return xG(t,bo())},Jy.apply(t,arguments),qLe(t)}function FG(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(AG.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?EG:function $Le(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(AG.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=s2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,_=d.precision,C=d.trim,S=d.type;"n"===S?(y=!0,S="g"):TG[S]||(void 0===_&&(_=12),C=!0,S="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var M="$"===m?e:"#"===m&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",$="$"===m?i:/[%p]/.test(S)?s:"",G=TG[S],R=/[defgprs%]/.test(S);function z(U){var L,X,Z,q=M,re=$;if("c"===S)re=G(U)+re,U="";else{var H=(U=+U)<0||1/U<0;if(U=isNaN(U)?l:G(Math.abs(U),_),C&&(U=function BLe(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(U)),H&&0==+U&&"+"!==p&&(H=!1),q=(H?"("===p?p:a:"-"===p||"("===p?"":p)+q,re=("s"===S?MG[8+SG/3]:"")+re+(H&&"("===p?")":""),R)for(L=-1,X=U.length;++L(Z=U.charCodeAt(L))||Z>57){re=(46===Z?r+U.slice(L+1):U.slice(L))+re,U=U.slice(0,L);break}}y&&!g&&(U=n(U,1/0));var he=q.length+U.length+re.length,E=he>1)+q+U+re+E.slice(he);break;default:U=E+q+U+re}return o(U)}return _=void 0===_?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),z.toString=function(){return d+""},z}return{format:c,formatPrefix:function u(d,h){var f=c(((d=s2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(kv(h)/3))),m=Math.pow(10,-p),g=MG[8+p/3];return function(v){return f(m*v)+g}}}}(t),jI=l2.format,IG=l2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const NG=Symbol("implicit");function PI(){var t=new Map,n=[],e=[],i=NG;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==NG)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return PI(n,e).unknown(i)},Jy.apply(r,arguments),r}function La(){var o,s,t=PI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function jG(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],avm)if(Math.abs(u*a-l*c)>vm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((LI-Math.acos((p+d-m)/(2*g*v)))/2),_=y/v,C=y/g;Math.abs(_-1)>vm&&(this._+="L"+(t+_*c)+","+(n+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>vm||Math.abs(this._y1-c)>vm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%RI+RI),d>YLe?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>vm&&(this._+="A"+e+","+e+",0,"+ +(d>=LI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const BI=LG;function mo(t){return function(){return t}}function RG(t){return t[0]}function $G(t){return t[1]}function c2(){var t=RG,n=$G,e=mo(!0),i=null,r=gm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=BI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],_[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),_[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):_[d]))}if(v)return a=null,v+""||null}function c(){return c2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:mo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:mo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:mo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function BG(){}function VI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function VG(t,n){this._context=t,this._k=(1-n)/6}function HG(t,n){this._context=t,this._k=(1-n)/6}function zG(t){this._curve=t}function fRe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function XG(t,n){var r,s,a,l,c,e=new rb(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=NRe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new rb(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(YG)}function NRe(t){return t.children}function ORe(t){t.data=t.data.data}function YG(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rb(t){this.data=t,this.depth=this.height=0,this.parent=null}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:VI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new VG(i,n)}return e.tension=function(i){return t(+i)},e}(0),HG.prototype={areaStart:BG,areaEnd:BG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new HG(i,n)}return e.tension=function(i){return t(+i)},e}(0),function UG(t){function n(e){return new zG(t(e))}return n._curve=t,n}(gm),zG.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function gRe(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,_,C,S,M,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),M=g*g*S,(_=Math.max(y/M,M/v))>C){g-=c;break}C=_}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),rb.prototype=XG.prototype={constructor:rb,count:function _Re(){return this.eachAfter(bRe)},each:function xRe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function kRe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function SRe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function DRe(t){for(var n=this,e=function TRe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function ERe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function ARe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function MRe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function IRe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function FRe(){return XG(this).eachBefore(ORe)}};const $Re=["caretElm"];function BRe(t,n){}const VRe=function(t){return{model:t}};function HRe(t,n){if(1&t&&(b(0,"span"),J(1,BRe,0,0,"ng-template",5),x()),2&t){const e=j();w(1),k("ngTemplateOutlet",e.template)("ngTemplateOutletContext",lr(2,VRe,e.context))}}function zRe(t,n){1&t&&ge(0,"span",6),2&t&&k("innerHTML",j().title,kx)}function URe(t,n){if(1&t&&(at(),Ip(),ge(0,"ngx-charts-scale-legend",4)),2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function GRe(t,n){if(1&t){const e=vt();at(),Ip(),b(0,"ngx-charts-legend",5),ye("labelClick",function(r){return $e(e),Be(j().legendLabelClick.emit(r))})("labelActivate",function(r){return $e(e),Be(j().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return $e(e),Be(j().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const QG=["*"],WRe=["ngx-charts-axis-label",""],ZG=["ticksel"],qRe=["ngx-charts-x-axis-ticks",""];function XRe(t,n){if(1&t&&(at(),b(0,"g",3)(1,"title"),I(2),x(),b(3,"text",4),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function YRe(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",6),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),ht("y1",-e.gridLineHeight)}}function JRe(t,n){if(1&t&&(at(),b(0,"g"),J(1,YRe,2,2,"g",5),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(1),k("ngIf",i.showGridLines)}}const KRe=["ngx-charts-x-axis",""];function QRe(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksHeight(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function ZRe(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const e5e=["ngx-charts-y-axis-ticks",""];function t5e(t,n){if(1&t&&(at(),b(0,"g",4)(1,"title"),I(2),x(),b(3,"text",5),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function n5e(t,n){if(1&t&&(at(),ge(0,"path",6)),2&t){const e=j();ht("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function i5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",j(3).gridLineWidth)}function r5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",-j(3).gridLineWidth)}function o5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,i5e,1,1,"line",8),J(2,r5e,1,1,"line",8),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),k("ngIf","left"===e.orient),w(1),k("ngIf","right"===e.orient)}}function s5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,o5e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(1),k("ngIf",i.showGridLines)}}function a5e(t,n){if(1&t&&(at(),b(0,"g")(1,"title"),I(2),x(),b(3,"text",11),I(4),x()()),2&t){const e=j(2).$implicit,i=j();w(2),Dt(i.tickTrim(i.tickFormat(e.value))),w(1),ht("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),xn(" ",e.name," ")}}function l5e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",10),J(2,a5e,5,6,"g",7),x()),2&t){const e=j().$implicit,i=j();ht("transform",i.transform(e.value)),w(1),ht("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),k("ngIf",i.showRefLabels)}}function c5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,l5e,3,4,"g",7),x()),2&t){const e=j();w(1),k("ngIf",e.showRefLines)}}const u5e=["ngx-charts-y-axis",""];function d5e(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksWidth(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function h5e(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const f5e=["ngx-charts-circle-series",""];function p5e(t,n){if(1&t&&(at(),ge(0,"rect",4)),2&t){const e=j(2);k("@animationState","active"),ht("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const m5e=function(t){return{name:t}};function g5e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"defs"),ge(2,"g",1),x(),J(3,p5e,1,6,"rect",2),b(4,"g",3),ye("select",function(){$e(e);const r=j();return Be(r.onClick(r.circle.data))})("activate",function(){return $e(e),Be(j().activateCircle())})("deactivate",function(){return $e(e),Be(j().deactivateCircle())}),x()()}if(2&t){const e=j();w(2),k("name",e.gradientId)("stops",e.circle.gradientStops),w(1),k("ngIf",e.barVisible&&"standard"===e.type),w(1),Mn("active",e.isActive(lr(18,m5e,e.circle.seriesName))),k("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const v5e=["ngx-charts-circle",""],x5e=["ngx-charts-svg-linear-gradient",""];function w5e(t,n){if(1&t&&(at(),ge(0,"stop")),2&t){const e=n.$implicit;rr("stop-color",e.color)("stop-opacity",e.opacity),ht("offset",e.offset+"%")}}const S5e=["ngx-charts-area",""];function D5e(t,n){if(1&t&&(at(),b(0,"defs"),ge(1,"g",2),x()),2&t){const e=j();w(1),k("name",e.gradientId)("stops",e.gradientStops)}}const E5e=["tooltipAnchor"],A5e=["ngx-charts-tooltip-area",""];function M5e(t,n){if(1&t&&(b(0,"div",6),ge(1,"span",7),I(2),x()),2&t){const e=n.$implicit,i=j(2);w(1),rr("background-color",e.color),w(1),xn(" ",i.getToolTipText(e)," ")}}function I5e(t,n){if(1&t&&(at(),Ip(),b(0,"div",4),J(1,M5e,3,3,"div",5),x()),2&t){const e=n.model;w(1),k("ngForOf",e)}}const F5e=["ngx-charts-timeline",""];function N5e(t,n){if(1&t&&(b(0,"header",4)(1,"span",5),I(2),x()()),2&t){const e=j();w(2),Dt(e.title)}}function O5e(t,n){if(1&t){const e=vt();b(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return $e(e),Be(j().labelClick.emit(r))})("activate",function(r){return $e(e),Be(j().activate(r))})("deactivate",function(r){return $e(e),Be(j().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j();w(1),k("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Us=["tooltipTemplate"],p2=["seriesTooltipTemplate"],Eo=function(t,n){return[t,n]},n6e=["ngx-charts-line",""];function i6e(t,n){if(1&t){const e=vt();at(),b(0,"g",7),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateXAxisHeight(r))}),x()}if(2&t){const e=j();k("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function r6e(t,n){if(1&t){const e=vt();at(),b(0,"g",8),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateYAxisWidth(r))}),x()}if(2&t){const e=j();k("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function o6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",9),x()),2&t){const e=n.$implicit,i=j();k("@animationState","active"),w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function s6e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"g",13),ye("select",function(r){return $e(e),Be(j(2).onClick(r))})("activate",function(r){return $e(e),Be(j(2).onActivate(r))})("deactivate",function(r){return $e(e),Be(j(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function a6e(t,n){if(1&t){const e=vt();at(),b(0,"g",10),ye("mouseleave",function(){return $e(e),Be(j().hideCircles())}),b(1,"g",11),ye("hover",function(r){return $e(e),Be(j().updateHoveredVertical(r))}),x(),J(2,s6e,2,9,"g",12),x()}if(2&t){const e=j();w(1),k("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),k("ngForOf",e.results)}}function l6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",15),x()),2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function c6e(t,n){if(1&t){const e=vt();at(),b(0,"g",14),ye("onDomainChange",function(r){return $e(e),Be(j().updateDomain(r))}),J(1,l6e,2,8,"g",4),x()}if(2&t){const e=j();k("results",e.results)("view",Sr(10,Eo,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ht("transform",e.timelineTransform),w(1),k("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const u6e=["ngx-charts-line-series",""];function d6e(t,n){if(1&t&&(at(),ge(0,"g",4)),2&t){const e=j();k("name",e.gradientId)("stops",e.gradientStops)}}function h6e(t,n){if(1&t&&(at(),ge(0,"g",5)),2&t){const e=j();Mn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),k("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let iW=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function a$e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new kNe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Fz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct($c),ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function l$e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function c$e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:l$e(o.value,t,n)}),this[r]}}}}var Gs=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Gs||(Gs={})),Gs))();const Lf=7;function rW(t,n,e){return"top"===e?t.top-Lf:"bottom"===e?t.top+t.height-n.height+Lf:"center"===e?t.top+t.height/2-n.height/2:void 0}function oW(t,n,e){return"left"===e?t.left-Lf:"right"===e?t.left+t.width-n.width+Lf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=rW(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Lf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Lf),"center"===r&&(o=e.height/2-i.height/2);const s=rW(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=oW(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Lf),"right"===r&&(o=e.width-n.width/2-i.width/2-Lf),"center"===r&&(o=e.width/2-i.width/2);const s=oW(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===Gs.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===Gs.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===Gs.right)return Gs.left;if(n===Gs.left)return Gs.right;if(n===Gs.top)return Gs.bottom;if(n===Gs.bottom)return Gs.top}return n}}let u$e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&io($Re,5),2&e){let r;cn(r=un())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,w5),2&e&&Su(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(b(0,"div"),ge(1,"span",0,1),b(3,"div",2),J(4,HRe,2,4,"span",3),J(5,zRe,1,1,"span",4),x()()),2&e&&(w(1),function J8(t,n,e){Tu(lc,Pd,Ig(Gt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),k("hidden",!i.showCaret),w(3),k("ngIf",!i.title),w(1),k("ngIf",i.title))},dependencies:[gn,kl],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function SNe(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);r>3&&o&&Object.defineProperty(n,e,o)}([c$e(100)],t.prototype,"onWindowResize",null),t})();class d$e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let UI=(()=>{class t extends d$e{constructor(e){super(e),this.type=u$e}}return t.\u0275fac=function(e){return new(e||t)(ct(iW))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),os=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Ke,this.legendLabelActivate=new Ke,this.legendLabelDeactivate=new Ke}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Lr([UI]),Hn],ngContentSelectors:QG,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0),at(),b(1,"svg",1),ku(2),x(),J(3,URe,1,5,"ngx-charts-scale-legend",2),J(4,GRe,1,7,"ngx-charts-legend",3),x()),2&e&&(rr("width",i.view[0],"px"),k("@animationState","active")("@.disabled",!i.animations),w(1),ht("width",i.chartWidth)("height",i.view[1]),w(2),k("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),k("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[gn,vW,bW]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma("500ms 100ms",Dr({opacity:1}))])])]},changeDetection:0}),t})(),h$e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Ke,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275dir=Zt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),ss=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Ke}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new h$e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new ENe(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Hn],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"div")},encapsulation:2}),t})(),GI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Hn],attrs:WRe,decls:2,vars:6,template:function(e,i){1&e&&(at(),b(0,"text"),I(1),x()),2&e&&(ht("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),xn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Rf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function sW(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Ke,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:qRe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,XRe,5,7,"g",1),x(),J(3,JRe,2,2,"g",2)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngForOf",i.ticks))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),Wl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Ke,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&io(aW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:KRe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,QRe,1,12,"g",0),J(2,ZRe,1,5,"g",1),x()),2&e&&(ht("class",i.xAxisClassName)("transform",i.transform),w(1),k("ngIf",i.xScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,aW],encapsulation:2,changeDetection:0}),t})();let lW=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Ke,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Yh(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:e5e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,t5e,5,9,"g",1),x(),J(3,n5e,1,2,"path",2),J(4,s5e,2,2,"g",3),J(5,c5e,2,1,"g",3)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),k("ngForOf",i.ticks),w(1),k("ngForOf",i.referenceLines))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),El=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Ke,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&io(lW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:u5e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,d5e,1,14,"g",0),J(2,h5e,1,5,"g",1),x()),2&e&&(ht("class",i.yAxisClassName)("transform",i.transform),w(1),k("ngIf",i.yScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,lW],encapsulation:2,changeDetection:0}),t})(),cW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();var m2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(m2||(m2={})),m2))(),g2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(g2||(g2={})),g2))(),$f=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}($f||($f={})),$f))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Gs.top,this.tooltipAlignment=g2.center,this.tooltipType=m2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$f.all,this.tooltipImmediateExit=!1,this.show=new Ke,this.hide=new Ke}get listensForFocus(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.focus}get listensForHover(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(le(UI),le(nl),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),uW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[iW,UI],imports:[Vs]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function oa(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const dW={};function Al(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,dW[t]?Al():(dW[t]=!0,t)}let YI,ob=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${oa(r)} \u2022 ${oa(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:f5e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&J(0,g5e,5,20,"g",0),2&e&&k("ngIf",i.circle)},dependencies:function(){return[gn,Bu,v2,bm]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma(250,Dr({opacity:1}))])])]},changeDetection:0}),t})(),v2=(()=>{class t{constructor(){this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:v5e,decls:1,vars:8,template:function(e,i){1&e&&(at(),ge(0,"circle")),2&e&&ht("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),bm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Hn],attrs:x5e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(at(),b(0,"linearGradient",0),J(1,w5e,1,5,"stop",1),x()),2&e&&(k("id",i.name),ht("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),k("ngForOf",i.stops))},dependencies:[jn],encapsulation:2,changeDetection:0}),t})(),XI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Ke,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=va(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Hn],attrs:S5e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(J(0,D5e,2,2,"defs",0),at(),ge(1,"path",1)),2&e&&(k("ngIf",i.gradient),w(1),rr("opacity",i.opacity),ht("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[gn,bm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?YI=window:typeof global<"u"&&(YI=global);const gW=YI.MouseEvent;function JI(t,n=!1,e=!0){if("function"==typeof gW)return new gW(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let sb=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Ke}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=JI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&io(E5e,5),2&e){let r;cn(r=un())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:A5e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(at(),b(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),J(2,I5e,2,1,"ng-template",null,1,Ur),ge(4,"rect",2,3),x()),2&e){const r=uo(3);w(1),ht("x",0)("width",i.dims.width)("height",i.dims.height),w(3),rr("opacity",i.anchorOpacity)("pointer-events","none"),k("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ht("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[jn,Bu],encapsulation:2,data:{animation:[il("animationState",[Ia("inactive => active",[Dr({opacity:0}),Ma(250,Dr({opacity:.7}))]),Ia("active => inactive",[Dr({opacity:.7}),Ma(250,Dr({opacity:0}))])])]},changeDetection:0}),t})(),ab=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Ke,this.onDomainChange=new Ke,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+Al().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=pm().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=bo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=mm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function qje(){return gI(e2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Vr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),va(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),va(this.element).select(".brush").call(this.brush),va(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Hn],attrs:F5e,ngContentSelectors:QG,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(Cu(),at(),b(0,"g",0)(1,"filter"),ge(2,"feColorMatrix",1),x(),b(3,"g",2),ku(4),x(),ge(5,"rect",3)(6,"g",4),x()),2&e&&(ht("transform",i.transform),w(1),ht("id",i.filterId),w(4),ht("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),vW=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Ke,this.labelActivate=new Ke,this.labelDeactivate=new Ke,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Hn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(b(0,"div"),J(1,N5e,3,1,"header",0),b(2,"div",1)(3,"ul",2),J(4,O5e,2,4,"li",3),x()()()),2&e&&(rr("width",i.width,"px"),w(1),k("ngIf",(null==i.title?null:i.title.length)>0),w(2),rr("max-height",i.height-45,"px"),Mn("horizontal-legend",i.horizontal),w(1),k("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[jn,gn,yW]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),yW=(()=>{class t{constructor(){this.isActive=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.toggle=new Ke}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(b(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),b(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),b(2,"span",2),I(3),x()()),2&e&&(Mn("active",i.isActive),k("title",i.formattedLabel),w(1),rr("background-color",i.color),w(2),xn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),bW=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(le(ZB))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Hn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"span"),I(3),x()(),ge(4,"div",2),b(5,"div",1)(6,"span"),I(7),x()()()),2&e&&(rr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Mn("horizontal-legend",i.horizontal),w(3),Dt(i.valueRange[1].toLocaleString()),w(1),rr("background",i.gradient),w(3),Dt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,cW,uW,Vs,cW,uW]}),t})();let xW=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class vs{constructor(n,e,i,r){"string"==typeof n&&(n=xW.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=xW.find(o=>o.name===n)),"quantile"===e)r=jG().range(n.domain).domain(i);else if("ordinal"===e)r=PI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=FG(0,1,1/o.length);r=bo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=bo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=bo().domain(this.domain).range([0,1]),r=La().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let f$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),CW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),m$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),y$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),DW=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Ke,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=va(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Hn],attrs:n6e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(at(),ge(0,"path",0)),2&e&&(k("@animationState","active"),ht("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({strokeDasharray:2e3,strokeDashoffset:2e3}),Ma(1e3,Dr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),b$e=(()=>{class t extends ss{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=gm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Ke,this.deactivate=new Ke,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function gs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+Al().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function b2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Bf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=pm().range([0,i]).domain(e):"linear"===this.scaleType?(r=bo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=mm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=bo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new vs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Us,5),ni(r,p2,5)),2&e){let o;cn(o=un())&&(i.tooltipTemplate=o.first),cn(o=un())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[vi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(b(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),at(),b(1,"defs")(2,"clipPath"),ge(3,"rect"),x()(),b(4,"g",1),J(5,i6e,1,10,"g",2),J(6,r6e,1,12,"g",3),b(7,"g"),J(8,o6e,2,11,"g",4),J(9,a6e,3,9,"g",5),x()(),J(10,c6e,2,13,"g",6),x()),2&e&&(k("view",Sr(17,Eo,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ht("id",i.clipPathId),w(1),ht("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ht("transform",i.transform),w(1),k("ngIf",i.xAxis),w(1),k("ngIf",i.yAxis),w(1),ht("clip-path",i.clipPath),w(1),k("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),k("ngIf",!i.tooltipDisabled),w(1),k("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[jn,gn,Wl,El,sb,os,ob,ab,_$e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[il("animationState",[Ia(":leave",[Dr({opacity:1}),Ma(500,Dr({opacity:0}))])])]},changeDetection:0}),t})(),_$e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return c2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return Sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return Sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function KI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function ZI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function QI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+Al().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Hn],attrs:u6e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(at(),b(0,"g")(1,"defs"),J(2,d6e,1,2,"g",0),x(),ge(3,"g",1)(4,"g",2),J(5,h6e,1,9,"g",3),x()),2&e&&(w(2),k("ngIf",i.hasGradient),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),k("ngIf",i.hasRange))},dependencies:[gn,XI,bm,DW],encapsulation:2,changeDetection:0}),t})(),TW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})();Math;let iF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),S$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iF,TW]}),t})(),A$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),F$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),j$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iF,CW]}),t})(),L$e=(()=>{class t{constructor(){!function P$e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,f$e,CW,m$e,y$e,TW,S$e,A$e,iF,F$e,j$e]}),t})();function R$e(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function $$e(t,n){1&t&&ge(0,"img",31)}function B$e(t,n){1&t&&ge(0,"img",32)}function V$e(t,n){1&t&&ge(0,"img",33)}function H$e(t,n){1&t&&ge(0,"img",34)}function z$e(t,n){if(1&t&&(b(0,"tr",24)(1,"td"),ta(2,25),J(3,$$e,1,0,"img",26),J(4,B$e,1,0,"img",27),J(5,V$e,1,0,"img",28),J(6,H$e,1,0,"img",29),na(),b(7,"span"),I(8),x()(),b(9,"td"),I(10),b(11,"span",30),I(12),x()(),b(13,"td"),I(14),b(15,"span",30),I(16),x()(),b(17,"td"),I(18),b(19,"span",30),I(20),x()(),b(21,"td"),I(22),b(23,"span",30),I(24),x()()()),2&t){const e=n.$implicit,i=j(2);w(2),k("ngSwitch",e.health),w(1),k("ngSwitchCase",0),w(1),k("ngSwitchCase",1),w(1),k("ngSwitchCase",2),w(1),k("ngSwitchCase",3),w(2),Dt(e.name),w(2),xn("",e.session_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),xn("",e.presence_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),xn("",e.match_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),xn("",e.goroutine_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function U$e(t,n){if(1&t&&(b(0,"tbody"),J(1,z$e,25,18,"tr",22),b(2,"tr",3),ge(3,"td",23),b(4,"th",3),I(5),x(),b(6,"th",3),I(7),x(),b(8,"th",3),I(9),x(),b(10,"th",3),I(11),x()()()),2&t){const e=j();w(1),k("ngForOf",e.statusData.nodes),w(4),Dt(e.getTotalSessionCount()),w(2),Dt(e.getMaxPresenceCount()),w(2),Dt(e.getTotalMatchCount()),w(2),Dt(e.getTotalGorountineCount())}}function G$e(t,n){if(1&t&&(b(0,"option",35),I(1),x()),2&t){const e=n.$implicit,i=j();Nh("value",e),w(1),Dt(i.ranges[e])}}const w2=function(t){return{"background-color":t}};function W$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function q$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,W$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function X$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",37),J(2,q$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function Y$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function J$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Y$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function K$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",43),J(2,J$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function Q$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function Z$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Q$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function eBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",44),J(2,Z$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function tBe(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function nBe(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,tBe,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function iBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",45),J(2,nBe,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let rBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"showDelta",!1),K(this,"statusData",void 0),K(this,"rateGraphData",[]),K(this,"latencyGraphData",[]),K(this,"inputGraphData",[]),K(this,"outputGraphData",[]),K(this,"rangeForm",void 0),K(this,"ranges",{1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"}),K(this,"rangesKeys",Object.keys(this.ranges).map(o=>+o)),K(this,"colorScheme",{domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]}),K(this,"samples",60),K(this,"refreshTimer",void 0),K(this,"$refreshTimer",void 0),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Status"),x(),J(2,R$e,4,2,"ngb-alert",1),b(3,"table",2),ye("mouseover",function(){return i.showDelta=!0})("mouseout",function(){return i.showDelta=!1}),b(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Node name"),x(),b(8,"th",4),I(9,"Sessions"),x(),b(10,"th",4),I(11,"Presences"),x(),b(12,"th",4),I(13,"Authoritative Matches"),x(),b(14,"th",4),I(15,"Goroutines"),x()()(),J(16,U$e,12,5,"tbody",5),x(),b(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),I(21,"View:"),x(),b(22,"div",9)(23,"select",10),ye("change",function(o){return i.setRange(o)}),J(24,G$e,2,2,"option",11),function qE(t,n){const e=Pr();let i;const r=t+Bo;e.firstCreatePass?(i=function R_e(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Ap(i.type)),s=Pc(le);try{const a=ux(!1),l=o();return ux(a),function Lye(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,Gt(),r,l),l}finally{Pc(s)}}(25,"sortNumbers"),x()()()()(),b(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),I(30,"Processing Latency"),x(),b(31,"small"),I(32," (ms)"),x()()(),b(33,"div",13)(34,"div",14)(35,"h5",15),I(36,"Rate"),x(),b(37,"small"),I(38," (rpc/s)"),x()()()(),b(39,"div",12)(40,"div",16),J(41,X$e,4,12,"div",17),x(),b(42,"div",16),J(43,K$e,4,12,"div",17),x()(),b(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),I(48,"Input"),x(),b(49,"small"),I(50," (kb/s)"),x()()(),b(51,"div",13)(52,"div",14)(53,"h5",15),I(54,"Output"),x(),b(55,"small"),I(56," (kb/s)"),x()()()(),b(57,"div",12)(58,"div",16),J(59,eBe,4,12,"div",17),x(),b(60,"div",16),J(61,iBe,4,12,"div",17),x()()),2&e&&(w(2),k("ngIf",i.error),w(14),k("ngIf",i.statusData),w(1),k("formGroup",i.rangeForm),w(7),k("ngForOf",XE(25,8,i.rangesKeys)),w(17),k("ngIf",i.latencyGraphData.length>0),w(2),k("ngIf",i.rateGraphData.length>0),w(16),k("ngIf",i.inputGraphData.length>0),w(2),k("ngIf",i.outputGraphData.length>0))},dependencies:function(){return[jn,gn,wB,dw,_B,To,Pu,tNe,b$e,sl,xy,wy,ov,rl,ol,fa,ja,sBe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})),t})(),oBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),sBe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275pipe",gl({name:"sortNumbers",type:t,pure:!1})),t})();var aBe=De(870),rF=De(327);const lBe=["fileSelector"];function cBe(t,n){if(1&t&&(b(0,"div",8),I(1),x()),2&t){const e=j(2);w(1),Dt(e.dropZoneLabel)}}function uBe(t,n){if(1&t){const e=vt();b(0,"div")(1,"input",9),ye("click",function(r){return $e(e),Be(j(2).openFileSelector(r))}),x()()}if(2&t){const e=j(2);w(1),Nh("value",e.browseBtnLabel),k("className",e.browseBtnClassName)}}function dBe(t,n){if(1&t&&(J(0,cBe,2,1,"div",6),J(1,uBe,2,2,"div",7)),2&t){const e=j();k("ngIf",e.dropZoneLabel),w(1),k("ngIf",e.showBrowseBtn)}}function hBe(t,n){}const fBe=function(t){return{openFileSelector:t}};class C2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let OW=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),jW=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Ke,this.onFileOver=new Ke,this.onFileLeave=new Ke,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new C2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=av(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new C2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new C2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(le(Wi),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&ni(r,OW,5,Si),2&e){let o;cn(o=un())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&io(lBe,7),2&e){let r;cn(r=un())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(b(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),b(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),J(4,dBe,2,2,"ng-template",null,4,Ur),J(6,hBe,0,0,"ng-template",5),x()()),2&e){const r=uo(5);Mn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),k("className",i.dropZoneClassName),w(1),k("className",i.contentClassName),w(1),k("accept",i.accept)("multiple",i.multiple),ht("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),k("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",lr(13,fBe,i.openFileSelector))}},dependencies:[gn,kl],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),pBe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t,bootstrap:function(){return[jW]}}),t.\u0275inj=Ci({imports:[Vs]}),t})();function mBe(t,n){1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3,"Failed to retrieve configuration."),x()()),2&t&&k("dismissible",!1)}function gBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(2).$implicit;k("id",e.name),w(1),Dt(e.value)}}function vBe(t,n){1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t&&k("id",j(2).$implicit.name)}function yBe(t,n){if(1&t&&(b(0,"div",35)(1,"b"),I(2),x(),b(3,"label",27)(4,"a",28),ge(5,"img",10),x()()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.flatConfig[e+1].name),w(1),k("for",i.flatConfig[e+1].name),w(1),$p("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",y1)}}function bBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(3).index,i=j();k("id",i.flatConfig[e+1].name),w(1),Dt(i.flatConfig[e+1].value)}}function _Be(t,n){if(1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t){const e=j(3).index;k("id",j().flatConfig[e+1].name)}}function xBe(t,n){if(1&t&&(b(0,"div",36),J(1,bBe,2,2,"span",29),J(2,_Be,2,1,"span",30),x()),2&t){const e=j(2).index,i=j();w(1),k("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),k("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function wBe(t,n){if(1&t&&(b(0,"div",26)(1,"div",7)(2,"b"),I(3),x(),b(4,"label",27)(5,"a",28),ge(6,"img",10),x()()(),b(7,"div",7),J(8,gBe,2,2,"span",29),J(9,vBe,2,1,"span",30),x(),J(10,yBe,6,3,"div",31),J(11,xBe,3,2,"div",32),x()),2&t){const e=j(),i=e.index,r=e.$implicit,o=j();Mn("border-top-0",i>0),w(3),Dt(r.name),w(1),k("for",r.name),w(1),$p("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",y1),w(3),k("ngIf",!o.isEmpty(r.value)),w(1),k("ngIf",o.isEmpty(r.value)),w(1),k("ngIf",i{class t{constructor(e,i,r,o,s,a){K(this,"config",void 0),K(this,"route",void 0),K(this,"httpClient",void 0),K(this,"modalService",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"configError",""),K(this,"uploadError",""),K(this,"deleteError",""),K(this,"jsonConfig",void 0),K(this,"flatConfig",void 0),K(this,"nakamaVersion",void 0),K(this,"file",void 0),K(this,"uploading",!1),K(this,"uploadSuccess",!1),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"confirmDeleteForm",void 0),K(this,"apiConfig",void 0),this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,aBe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});rF.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(T3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(C3),le(Rr),le(wC),le(H3),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:43,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],["autocomplete","off",3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,i){if(1&e){const r=vt();J(0,mBe,4,1,"ngb-alert",0),b(1,"h2",1),I(2,"Server Configuration"),x(),b(3,"div",2)(4,"h5")(5,"b"),I(6,"Server version:"),x(),I(7),x(),b(8,"button",3),ye("click",function(){return i.exportYaml()}),I(9,"Export Configuration"),x()(),b(10,"div",4),J(11,CBe,2,1,"ng-container",5),b(12,"div",6)(13,"div",7)(14,"b"),I(15,"runtime.env"),x(),b(16,"label",8)(17,"a",9),ge(18,"img",10),x()()(),b(19,"div",11),J(20,SBe,2,1,"div",12),J(21,DBe,3,0,"div",12),x()()(),b(22,"h5",13),I(23,"Import storage data"),x(),b(24,"p"),I(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),J(26,TBe,6,2,"ngb-alert",0),J(27,EBe,4,1,"ngb-alert",14),b(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return i.dropped(s)}),J(29,ABe,2,0,"ng-template",16),x(),b(30,"h5",13),I(31,"Delete all data"),x(),J(32,MBe,6,2,"ngb-alert",0),J(33,IBe,4,1,"ngb-alert",14),b(34,"div",17)(35,"div"),ge(36,"img",18),b(37,"small",19),I(38,"Warning - this operation is not reversible!"),x()(),J(39,NBe,19,5,"ng-template",null,20,Ur),b(41,"button",21),ye("click",function(){$e(r);const s=uo(40);return Be(i.openDeleteDataModal(s))}),I(42,"Delete all"),x()()}2&e&&(k("ngIf",i.configError),w(7),xn(" ",i.nakamaVersion,""),w(4),k("ngForOf",i.flatConfig),w(9),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&i.jsonConfig.runtime.env.length>0),w(1),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&0===i.jsonConfig.runtime.env.length),w(5),k("ngIf",i.uploadError),w(1),k("ngIf",i.uploadSuccess),w(1),k("disabled",i.uploading),w(4),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(8),k("disabled",i.deleting))},dependencies:[jW,OW,Rh,jn,gn,To,sl,Na,rl,ol,fa,ja],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})),t})(),jBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function PBe(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function LBe(t,n){1&t&&(b(0,"tr")(1,"td",51),I(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),k("colSpan",4))}function RBe(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td")(6,"span",36),I(7,"Administrator"),x(),b(8,"span",36),I(9,"Developer"),x(),b(10,"span",36),I(11,"Maintainer"),x(),b(12,"span",36),I(13,"View Only"),x()(),b(14,"td")(15,"button",52),ye("click",function(){const o=$e(e).$implicit;return Be(j().deleteUser(o.username))}),I(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.username),w(2),Dt(e.email),w(2),k("hidden",e.role!==i.adminRole),w(2),k("hidden",e.role!==i.developerRole),w(2),k("hidden",e.role!==i.maintainerRole),w(2),k("hidden",e.role!==i.readonlyRole)}}function $Be(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3,"An error occurred:"),x(),b(4,"p",53),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.userCreateError)}}const oF=function(t){return{"is-invalid":t}};let BBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"userCreateError",""),K(this,"users",[]),K(this,"createUserForm",void 0),K(this,"adminRole",oi.USER_ROLE_ADMIN),K(this,"developerRole",oi.USER_ROLE_DEVELOPER),K(this,"maintainerRole",oi.USER_ROLE_MAINTAINER),K(this,"readonlyRole",oi.USER_ROLE_READONLY),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Do.required],email:["",[Do.required,Do.email]],password:["",Do.compose([Do.required,Do.minLength(8)])],role:[+this.readonlyRole,Do.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=oi.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=oi.USER_ROLE_ADMIN;break;case 2:e=oi.USER_ROLE_DEVELOPER;break;case 3:e=oi.USER_ROLE_MAINTAINER;break;case 4:e=oi.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Management"),x(),J(2,PBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Username"),x(),b(8,"th"),I(9,"Email"),x(),b(10,"th",5),I(11,"Role"),x(),b(12,"th",6),I(13,"Action"),x()()(),b(14,"tbody"),J(15,LBe,3,1,"tr",7),J(16,RBe,17,6,"tr",8),x()(),b(17,"h5",9),I(18,"Add new user"),x(),b(19,"ngb-alert",10)(20,"h6",11),I(21,"User roles"),x(),b(22,"div",12)(23,"div",13)(24,"div",14),ge(25,"img",15),b(26,"h6",16),I(27,"Administrator"),x()(),b(28,"small"),I(29," Owners have complete control over the server, its users and resources. "),x()(),b(30,"div",13)(31,"div",14),ge(32,"img",17),b(33,"h6",16),I(34,"Developer"),x()(),b(35,"small"),I(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),b(37,"div",13)(38,"div",14),ge(39,"img",18),b(40,"h6",16),I(41,"Maintainer"),x()(),b(42,"small"),I(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),b(44,"div",13)(45,"div",14),ge(46,"img",19),b(47,"h6",16),I(48,"View Only"),x()(),b(49,"small"),I(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),J(51,$Be,6,2,"ngb-alert",1),b(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return i.addUser()}),b(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),I(58,"Email"),x()(),b(59,"div",26),ge(60,"input",27),b(61,"div",28),I(62,"Email is required"),x()()()(),b(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),I(67,"Username"),x()(),b(68,"div",26),ge(69,"input",30),b(70,"div",28),I(71,"Username is required"),x()()()(),b(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),I(76,"Password"),x()(),b(77,"div",26),ge(78,"input",32),b(79,"div",28),I(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),b(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),I(85,"Role"),x()(),b(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),I(90,"Administrator"),x(),b(91,"span",36),I(92,"Developer"),x(),b(93,"span",36),I(94,"Maintainer"),x(),b(95,"span",36),I(96,"View Only"),x()(),b(97,"div",37),ge(98,"button",38),b(99,"div",39)(100,"button",40),ye("click",function(){return i.f.role.setValue(+i.adminRole)}),I(101,"Administrator"),x(),b(102,"button",40),ye("click",function(){return i.f.role.setValue(+i.developerRole)}),I(103,"Developer"),x(),b(104,"button",40),ye("click",function(){return i.f.role.setValue(+i.maintainerRole)}),I(105,"Maintainer"),x(),b(106,"button",40),ye("click",function(){return i.f.role.setValue(+i.readonlyRole)}),I(107,"View Only"),x()()()(),b(108,"div",28),I(109,"Role is required"),x()()()(),b(110,"div",41)(111,"div",42),ge(112,"div",24),b(113,"div",26)(114,"div",43),ge(115,"input",44),b(116,"label",45),I(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),b(118,"div",46)(119,"button",47),I(120,"Save"),x()()()()),2&e&&(w(2),k("ngIf",i.error),w(13),k("ngIf",0===i.users.length),w(1),k("ngForOf",i.users),w(3),k("type","secondary"),w(32),k("ngIf",i.userCreateError),w(2),k("formGroup",i.createUserForm),w(7),k("ngClass",lr(18,oF,i.f.email.dirty&&i.f.email.errors)),w(1),k("hidden",i.f.email.disabled||i.f.email.valid||i.f.email.pristine),w(8),k("ngClass",lr(20,oF,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(8),k("ngClass",lr(22,oF,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(10),k("hidden",i.f.role.value!==+i.adminRole),w(2),k("hidden",i.f.role.value!==+i.developerRole),w(2),k("hidden",i.f.role.value!==+i.maintainerRole),w(2),k("hidden",i.f.role.value!==+i.readonlyRole),w(13),k("hidden",i.f.role.disabled||i.f.role.valid||i.f.role.pristine),w(11),k("disabled",i.createUserForm.invalid))},dependencies:[Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Na,aC,rl,ol,Ff,fa,ja],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})),t})(),VBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function HBe(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Failed to retrieve runtime information: ",e.error,"")}}function zBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function UBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Go modules were found."),x(),ge(3,"td"),x())}function GBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function WBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Lua modules were found."),x(),ge(3,"td"),x())}function qBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function XBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No JavaScript modules were found."),x(),ge(3,"td"),x())}const sF=function(){return["/apiexplorer"]},aF=function(t){return{endpoint:t}};function YBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function JBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Go RPC functions were found."),x()())}function KBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function QBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Lua RPC functions were found."),x()())}function ZBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function e7e(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No JavaScript RPC functions were found."),x()())}let t7e=(()=>{class t{constructor(e,i){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"runtimeInfo",void 0),this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Runtime Modules"),x(),J(2,HBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),I(7,"Go Modules"),x(),b(8,"th",4),I(9,"Last Modified"),x()()(),b(10,"tbody"),J(11,zBe,5,2,"tr",5),J(12,UBe,4,0,"tr",6),x(),b(13,"thead",3)(14,"tr")(15,"th",7),I(16,"Lua Modules"),x()()(),b(17,"tbody"),J(18,GBe,5,2,"tr",5),J(19,WBe,4,0,"tr",6),x(),b(20,"thead",3)(21,"tr")(22,"th",7),I(23,"JavaScript Modules"),x()()(),b(24,"tbody"),J(25,qBe,5,2,"tr",5),J(26,XBe,4,0,"tr",6),x()(),b(27,"h4",8),I(28,"Registered RPC Functions"),x(),b(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),I(33,"Go RPC Functions"),x()()(),b(34,"tbody"),J(35,YBe,7,6,"tr",5),J(36,JBe,3,0,"tr",6),x(),b(37,"thead",3)(38,"tr")(39,"th",7),I(40,"Lua RPC Functions"),x()()(),b(41,"tbody"),J(42,KBe,7,6,"tr",5),J(43,QBe,3,0,"tr",6),x(),b(44,"thead",3)(45,"tr")(46,"th",7),I(47,"JavaScript RPC Functions"),x()()(),b(48,"tbody"),J(49,ZBe,7,6,"tr",5),J(50,e7e,3,0,"tr",6),x()()),2&e&&(w(2),k("ngIf",i.error),w(9),k("ngForOf",i.runtimeInfo.go_modules),w(1),k("ngIf",0===i.runtimeInfo.go_modules.length),w(6),k("ngForOf",i.runtimeInfo.lua_modules),w(1),k("ngIf",0===i.runtimeInfo.lua_modules.length),w(6),k("ngForOf",i.runtimeInfo.js_modules),w(1),k("ngIf",0===i.runtimeInfo.js_modules.length),w(9),k("ngForOf",i.runtimeInfo.go_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.go_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.lua_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.lua_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.js_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.js_rpc_functions.length))},dependencies:[Fu,jn,gn,To],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})),t})(),n7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function i7e(t,n){1&t&&(b(0,"span"),I(1,"Filter by collection"),x())}function r7e(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.f.collection.value)}}function o7e(t,n){if(1&t){const e=vt();b(0,"button",34),ye("click",function(){const o=$e(e).$implicit;return Be(j().f.collection.setValue(o))}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function s7e(t,n){if(1&t&&(b(0,"ngb-alert",35),ge(1,"img",36),b(2,"h6",37),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying storage objects: ",e.error,"")}}function a7e(t,n){1&t&&(b(0,"th",38),I(1,"Remove"),x())}function l7e(t,n){1&t&&(b(0,"tr")(1,"td",39),I(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function c7e(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteObject(r,s,a))}),I(2,"Delete"),x()()}}function u7e(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(2),x(),b(3,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(4),x(),b(5,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(6),x(),b(7,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(8),x(),J(9,c7e,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.collection),w(2),Dt(e.key),w(2),Dt(e.user_id),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let d7e=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"collections",[]),K(this,"objects",[]),K(this,"objectCount",0),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Objects"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),J(12,i7e,2,0,"span",10),J(13,r7e,2,1,"span",10),x(),b(14,"div",11)(15,"button",12),ye("click",function(){return i.f.collection.reset()}),I(16,"\u2718 Deselect collection"),x(),ge(17,"div",13),J(18,o7e,2,1,"button",14),x()()(),ge(19,"input",15)(20,"input",16),b(21,"div",17)(22,"span",18),ye("click",function(){return i.f.user_id.setValue(i.systemUserId)}),ge(23,"img",19),x()(),b(24,"div",17)(25,"button",20),ye("click",function(){return i.search(0)}),I(26,"Search"),x()()()()(),b(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return i.search(0)}),ge(30,"img",24),x(),b(31,"button",23),ye("click",function(){return i.search(1)}),ge(32,"img",25),x()()()()(),J(33,s7e,4,2,"ngb-alert",26),b(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),I(39,"Collection Name"),x(),b(40,"th"),I(41,"Key Name"),x(),b(42,"th",30),I(43,"User ID"),x(),b(44,"th",31),I(45,"Last Update"),x(),J(46,a7e,2,0,"th",32),x()(),b(47,"tbody"),J(48,l7e,3,0,"tr",10),J(49,u7e,10,5,"tr",33),x()()()),2&e&&(w(3),xn("",i.objectCount," objects found."),w(4),k("formGroup",i.searchForm),w(4),k("disabled",0===i.collections.length),w(1),k("ngIf",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngIf",i.f.collection.value&&""!==i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngForOf",i.collections),w(7),k("disabled",i.disableSearch()),w(4),k("disabled",0===i.objects.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.objects.length),w(1),k("ngForOf",i.objects))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),h7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),f7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();var lF,PW,LW,RW,$W,BW,VW,HW,zW,UW,GW,WW,qW,XW,YW,JW,KW,QW,ZW,eq,tq,nq,iq,rq,oq,sq,aq,lq,cq,uq,dq,hq,fq,pq,mq,gq,vq,yq,bq,_q,xq,wq,Cq,kq,Sq,Dq,Tq,Eq,Aq,Mq,Iq,Fq,Nq,Oq,jq,Pq,Lq,Rq,$q,Bq,Vq,Hq,zq,Uq,Gq,Wq,qq,Xq,Yq,Jq,Kq,Qq,Zq,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,bX,_X,xX,wX,CX,kX,SX,DX,TX,EX,AX,MX,IX,FX,NX,OX,jX,PX,LX,RX,$X,BX,VX,HX,zX,UX,GX,WX,qX,XX,YX,JX,KX,QX,ZX,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,bY,_Y,xY,wY,CY,kY,SY,DY,TY,EY,AY,MY,IY,FY,NY,OY,jY,PY,LY,RY,$Y,BY,VY,HY,zY,UY,GY,WY,qY,XY,YY,JY,KY,QY,ZY,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,bJ,_J,xJ,wJ,CJ,kJ,SJ,DJ,TJ,EJ,AJ,MJ,IJ,FJ,NJ,OJ,jJ,PJ,LJ,RJ,$J,BJ,VJ,HJ,zJ,UJ,GJ,WJ,qJ,XJ,YJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,bK,_K,xK,wK,CK,kK,SK,DK,TK,EK,AK,MK,IK,FK,NK,OK,jK,PK,LK,RK,$K,BK,VK,HK,zK,UK,GK,WK,qK,p7e=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],m7e=["mainAxis","crossAxis","limiter"];function lb(t){var n="function"==typeof Map?new Map:void 0;return lb=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return cF(e,arguments,qi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),cb(r,e)},lb(t)}function cF(t,n,e){return(cF=ZK()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&cb(a,o.prototype),a}).apply(null,arguments)}function Ae(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function XK(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=k2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}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 o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function vn(){vn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(q,re,L){q[re]=L.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(q,re,L){return Object.defineProperty(q,re,{value:L,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{l({},"")}catch{l=function(re,L,X){return re[L]=X}}function c(q,re,L,X){var H=Object.create((re&&re.prototype instanceof h?re:h).prototype),he=new R(X||[]);return i(H,"_invoke",{value:S(q,L,he)}),H}function u(q,re,L){try{return{type:"normal",arg:q.call(re,L)}}catch(X){return{type:"throw",arg:X}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(z([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function _(q){["next","throw","return"].forEach(function(re){l(q,re,function(L){return this._invoke(re,L)})})}function C(q,re){function L(Z,H,he,E){var F=u(q[Z],q,H);if("throw"!==F.type){var N=F.arg,Y=N.value;return Y&&"object"==bn(Y)&&e.call(Y,"__await")?re.resolve(Y.__await).then(function(V){L("next",V,he,E)},function(V){L("throw",V,he,E)}):re.resolve(Y).then(function(V){N.value=V,he(N)},function(V){return L("throw",V,he,E)})}E(F.arg)}var X;i(this,"_invoke",{value:function(Z,H){function he(){return new re(function(E,F){L(Z,H,E,F)})}return X=X?X.then(he,he):he()}})}function S(q,re,L){var X="suspendedStart";return function(Z,H){if("executing"===X)throw new Error("Generator is already running");if("completed"===X){if("throw"===Z)throw H;return{value:void 0,done:!0}}for(L.method=Z,L.arg=H;;){var he=L.delegate;if(he){var E=M(he,L);if(E){if(E===d)continue;return E}}if("next"===L.method)L.sent=L._sent=L.arg;else if("throw"===L.method){if("suspendedStart"===X)throw X="completed",L.arg;L.dispatchException(L.arg)}else"return"===L.method&&L.abrupt("return",L.arg);X="executing";var F=u(q,re,L);if("normal"===F.type){if(X=L.done?"completed":"suspendedYield",F.arg===d)continue;return{value:F.arg,done:L.done}}"throw"===F.type&&(X="completed",L.method="throw",L.arg=F.arg)}}}function M(q,re){var L=re.method,X=q.iterator[L];if(void 0===X)return re.delegate=null,"throw"===L&&q.iterator.return&&(re.method="return",re.arg=void 0,M(q,re),"throw"===re.method)||"return"!==L&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+L+"' method")),d;var Z=u(X,q.iterator,re.arg);if("throw"===Z.type)return re.method="throw",re.arg=Z.arg,re.delegate=null,d;var H=Z.arg;return H?H.done?(re[q.resultName]=H.value,re.next=q.nextLoc,"return"!==re.method&&(re.method="next",re.arg=void 0),re.delegate=null,d):H:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,d)}function $(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function G(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function R(q){this.tryEntries=[{tryLoc:"root"}],q.forEach($,this),this.reset(!0)}function z(q){if(q){var re=q[o];if(re)return re.call(q);if("function"==typeof q.next)return q;if(!isNaN(q.length)){var L=-1,X=function Z(){for(;++L=0;--X){var Z=this.tryEntries[X],H=Z.completion;if("root"===Z.tryLoc)return L("end");if(Z.tryLoc<=this.prev){var he=e.call(Z,"catchLoc"),E=e.call(Z,"finallyLoc");if(he&&E){if(this.prev=0;--L){var X=this.tryEntries[L];if(X.tryLoc<=this.prev&&e.call(X,"finallyLoc")&&this.prev=0;--re){var L=this.tryEntries[re];if(L.finallyLoc===q)return this.complete(L.completion,L.afterLoc),G(L),d}},catch:function(q){for(var re=this.tryEntries.length-1;re>=0;--re){var L=this.tryEntries[re];if(L.tryLoc===q){var X=L.completion;if("throw"===X.type){var Z=X.arg;G(L)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(q,re,L){return this.delegate={iterator:z(q),resultName:re,nextLoc:L},"next"===this.method&&(this.arg=void 0),d}},t}function YK(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Zi(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){YK(o,i,r,s,a,"next",l)}function a(l){YK(o,i,r,s,a,"throw",l)}s(void 0)})}}function Un(t,n){return KK(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||k2(t,n)||JK()}function JK(){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 KK(t){if(Array.isArray(t))return t}function QK(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ze(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ke(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function eQ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function qd(t,n){return new t(n)}var db,D2=new Map,fF=0;function fQ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function x7e(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=hF(t),m=D2.get(p)||function w7e(t,n){var e={stylesheet:b7e(n),rules:{}};return D2.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),fF+=1,f}function hb(t){db=t}function Tv(){if(!db)throw new Error("Function called outside component initialization");return db}function Wc(t){Tv().$$.on_mount.push(t)}function Hu(t){Tv().$$.on_destroy.push(t)}function pQ(){var t=Tv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=hQ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function mQ(t,n){return Tv().$$.context.set(t,n),n}function xa(t){return Tv().$$.context.get(t)}function T2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Ev=[],Vi=[],E2=[],pF=[],gQ=Promise.resolve(),mF=!1;function vQ(){mF||(mF=!0,gQ.then(yQ))}function Xl(){return vQ(),gQ}function _m(t){E2.push(t)}function zu(t){pF.push(t)}var A2,gF=new Set,Av=0;function yQ(){if(0===Av){var t=db;do{try{for(;Avl.start&&(a=d(l,_),l=null,vF(t,a.b,"start"),G&&(u(),c=fQ(t,s,a.b,a.duration,0,S,o.css))),a&&(z>=a.end?($(s=a.b,1-s),vF(t,a.b,"end"),l||(a.b?u():--a.group.r||ho(a.group.c)),a=null):z>=a.start&&(s=a.a+a.d*S((z-a.start)/a.duration),$(s,1-s))),!(!a&&!l)},0===ub.size&&dF(lQ),new Promise(function(z){ub.add({c:p,f:z})}))}return{run:function(f){ba(o)?(A2||(A2=Promise.resolve()).then(function(){A2=null}),A2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var yF=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function D7e(t,n){t.d(1),n.delete(t.key)}function bF(t,n){ce(t,1,1,function(){n.delete(t.key)})}function F2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var _=d(r,o,p),C=e(_),S=s.get(C);S?i&&S.p(_,n):(S=c(C,_)).c(),v.set(C,g[p]=S),C in m&&y.set(C,Math.abs(p-m[C]))}var M=new Set,$=new Set;function G(L){Q(L,1),L.m(a,u),s.set(L.key,L),u=L.first,f--}for(;h&&f;){var R=g[f-1],z=t[h-1],U=R.key,q=z.key;R===z?(u=R.first,h--,f--):v.has(q)?!s.has(U)||M.has(U)?G(R):$.has(q)?h--:y.get(U)>y.get(q)?($.add(U),G(R)):(M.add(q),h--):(l(z,s),h--)}for(;h--;){var re=t[h];v.has(re.key)||l(re,s)}for(;f;)G(g[f-1]);return g}function xm(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function N2(t){return"object"===bn(t)&&null!==t?t:{}}function Uu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function mt(t){t&&t.c()}function ft(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||_m(function(){var a,l=t.$$.on_mount.map(rQ).filter(ba);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,si(l)):ho(l),t.$$.on_mount=[]}),s.forEach(_m)}function pt(t,n){var e=t.$$;null!==e.fragment&&(ho(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=db;hb(t);var c=t.$$={fragment:null,ctx:[],props:o,update:Lt,not_equal:r,bound:oQ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:oQ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function T7e(t,n){-1===t.$$.dirty[0]&&(Ev.push(t),vQ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function M7e(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function I7e(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?iQ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var N7e=yF.window;function O7e(t){pi(t,"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 _Q(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=t[1].closeButton&&xQ(t),C=t[2];return C&&(s=qd(C,{})),{c:function(){n=be("div"),e=be("div"),i=be("div"),_&&_.c(),r=it(),o=be("div"),s&&mt(s.$$.fragment),P(o,"class",a=Ao(t[1].classContent)+" svelte-n7cvum"),P(o,"style",t[9]),Mt(o,"content",!t[0]),P(i,"class",l=Ao(t[1].classWindow)+" svelte-n7cvum"),P(i,"role","dialog"),P(i,"aria-modal","true"),P(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),P(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),P(i,"style",t[8]),Mt(i,"window",!t[0]),P(e,"class",h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"),P(e,"style",t[7]),Mt(e,"wrap",!t[0]),P(n,"id",f=t[1].id),P(n,"class",p=Ao(t[1].classBg)+" svelte-n7cvum"),P(n,"style",t[6]),Mt(n,"bg",!t[0])},m:function(S,M){Pe(S,n,M),de(n,e),de(e,i),_&&_.m(i,null),de(i,r),de(i,o),s&&ft(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[Nt(i,"introstart",function(){ba(t[13])&&t[13].apply(this,arguments)}),Nt(i,"outrostart",function(){ba(t[14])&&t[14].apply(this,arguments)}),Nt(i,"introend",function(){ba(t[15])&&t[15].apply(this,arguments)}),Nt(i,"outroend",function(){ba(t[16])&&t[16].apply(this,arguments)}),Nt(n,"mousedown",t[20]),Nt(n,"mouseup",t[21])],v=!0)},p:function(S,M){if((t=S)[1].closeButton?_?(_.p(t,M),2&M[0]&&Q(_,1)):((_=xQ(t)).c(),Q(_,1),_.m(i,r)):_&&($t(),ce(_,1,1,function(){_=null}),Bt()),C!==(C=t[2])){if(s){$t();var $=s;ce($.$$.fragment,1,0,function(){pt($,1)}),Bt()}C?(mt((s=qd(C,{})).$$.fragment),Q(s.$$.fragment,1),ft(s,o,null)):s=null}(!g||2&M[0]&&a!==(a=Ao(t[1].classContent)+" svelte-n7cvum"))&&P(o,"class",a),(!g||512&M[0])&&P(o,"style",t[9]),(!g||3&M[0])&&Mt(o,"content",!t[0]),(!g||2&M[0]&&l!==(l=Ao(t[1].classWindow)+" svelte-n7cvum"))&&P(i,"class",l),(!g||2&M[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&P(i,"aria-label",c),(!g||2&M[0]&&u!==(u=t[1].ariaLabelledBy||null))&&P(i,"aria-labelledby",u),(!g||256&M[0])&&P(i,"style",t[8]),(!g||3&M[0])&&Mt(i,"window",!t[0]),(!g||2&M[0]&&h!==(h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"))&&P(e,"class",h),(!g||128&M[0])&&P(e,"style",t[7]),(!g||3&M[0])&&Mt(e,"wrap",!t[0]),(!g||2&M[0]&&f!==(f=t[1].id))&&P(n,"id",f),(!g||2&M[0]&&p!==(p=Ao(t[1].classBg)+" svelte-n7cvum"))&&P(n,"class",p),(!g||64&M[0])&&P(n,"style",t[6]),(!g||3&M[0])&&Mt(n,"bg",!t[0])},i:function(S){g||(Q(_),s&&Q(s.$$.fragment,S),_m(function(){d||(d=I2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),_m(function(){m||(m=I2(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(S){ce(_),s&&ce(s.$$.fragment,S),d||(d=I2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=I2(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(S){S&&je(n),_&&_.d(),s&&pt(s),t[50](null),S&&d&&d.end(),t[51](null),t[52](null),S&&m&&m.end(),v=!1,ho(y)}}}function xQ(t){var n,e,i,r,o,s=[P7e,j7e],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function j7e(t){var n,e,i,r;return{c:function(){P(n=be("button"),"class",e=Ao(t[1].classCloseButton)+" svelte-n7cvum"),P(n,"aria-label","Close modal"),P(n,"style",t[10]),P(n,"type","button"),Mt(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=Nt(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Ao(o[1].classCloseButton)+" svelte-n7cvum")&&P(n,"class",e),1024&s[0]&&P(n,"style",o[10]),3&s[0]&&Mt(n,"close",!o[0])},i:Lt,o:Lt,d:function(o){o&&je(n),i=!1,r()}}}function P7e(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=qd(r,o(t))),{c:function(){n&&mt(n.$$.fragment),e=_r()},m:function(s,a){n&&ft(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){$t();var l=n;ce(l.$$.fragment,1,0,function(){pt(l,1)}),Bt()}r?(mt((n=qd(r,o(s))).$$.fragment),Q(n.$$.fragment,1),ft(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&Q(n.$$.fragment,s),i=!0)},o:function(s){n&&ce(n.$$.fragment,s),i=!1},d:function(s){s&&je(e),n&&pt(n,s)}}}function L7e(t){var n,e,i,r,o=t[2]&&_Q(t),s=t[49].default,a=Ms(s,t,t[48],null);return{c:function(){o&&o.c(),n=it(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=Nt(N7e,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&Q(o,1)):((o=_Q(l)).c(),Q(o,1),o.m(n.parentNode,n)):o&&($t(),ce(o,1,1,function(){o=null}),Bt()),a&&a.p&&(!e||131072&c[1])&&Fs(a,s,l,l[48],e?Is(s,l[48],c,null):Ns(l[48]),null)},i:function(l){e||(Q(o),Q(a,l),e=!0)},o:function(l){ce(o),ce(a,l),e=!1},d:function(l){o&&o.d(l),l&&je(n),a&&a.d(l),i=!1,r()}}}function wQ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ze(Ze({},e),{},{props:Ze(Ze({},n),e.props)}))}}function R7e(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,_=void 0===y?{}:y,C=n.$$scope,S=pQ(),$=n.isTabbable,G=void 0===$?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:$,R=n.show,z=void 0===R?null:R,U=n.id,q=void 0===U?null:U,re=n.key,L=void 0===re?"simple-modal":re,X=n.ariaLabel,Z=void 0===X?null:X,H=n.ariaLabelledBy,he=void 0===H?null:H,E=n.closeButton,F=void 0===E||E,N=n.closeOnEsc,Y=void 0===N||N,V=n.closeOnOuterClick,oe=void 0===V||V,fe=n.styleBg,Fe=void 0===fe?{}:fe,xe=n.styleWindowWrap,tt=void 0===xe?{}:xe,ze=n.styleWindow,ot=void 0===ze?{}:ze,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Ie=void 0===ie?{}:ie,Ye=n.classBg,Le=void 0===Ye?null:Ye,_t=n.classWindowWrap,At=void 0===_t?null:_t,_n=n.classWindow,ci=void 0===_n?null:_n,on=n.classContent,Fi=void 0===on?null:on,pn=n.classCloseButton,Nr=void 0===pn?null:pn,$r=n.unstyled,wr=void 0!==$r&&$r,Or=n.setContext,Ai=void 0===Or?mQ:Or,Wr=n.transitionBg,jo=void 0===Wr?F7e:Wr,Nn=n.transitionBgProps,xt=void 0===Nn?{duration:250}:Nn,ui=n.transitionWindow,Ni=void 0===ui?jo:ui,Cr=n.transitionWindowProps,xo=void 0===Cr?xt:Cr,Qo=n.disableFocusTrap,gt=void 0!==Qo&&Qo,On={id:q,ariaLabel:Z,ariaLabelledBy:he,closeButton:F,closeOnEsc:Y,closeOnOuterClick:oe,styleBg:Fe,styleWindowWrap:tt,styleWindow:ot,styleContent:ne,styleCloseButton:Ie,classBg:Le,classWindowWrap:At,classWindow:ci,classContent:Fi,classCloseButton:Nr,transitionBg:jo,transitionBgProps:xt,transitionWindow:Ni,transitionWindowProps:xo,disableFocusTrap:gt,isTabbable:G,unstyled:wr},ai=Ze({},On),bi=null,Er=function(Ue){return Ue?Object.keys(Ue).reduce(function(Dn,ii){return"".concat(Dn,"; ").concat((hi=ii,hi.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ii]);var hi},""):""},qr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},ao=function(){e(6,a=Er(Object.assign({},{width:window.innerWidth,height:window.innerHeight},ai.styleBg))),e(7,l=Er(ai.styleWindowWrap)),e(8,c=Er(ai.styleWindow)),e(9,u=Er(ai.styleContent)),e(10,d=Er(ai.styleCloseButton)),e(11,h=ai.transitionBg),e(12,f=ai.transitionWindow)},Js=function(){},vr=Js,Ks=Js,qa=Js,Xa=Js,Ic=function(Ue){var ii=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hi=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,bi=wQ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,ai=Ze(Ze({},On),ii)),ao(),He(),e(13,vr=function(di){hi.onOpen&&hi.onOpen(di),S("open"),S("opening")}),e(14,Ks=function(di){hi.onClose&&hi.onClose(di),S("close"),S("closing")}),e(15,qa=function(di){hi.onOpened&&hi.onOpened(di),S("opened")}),e(16,Xa=function(di){hi.onClosed&&hi.onClosed(di),S("closed")})},we=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};bi&&(e(14,Ks=Ue.onClose||Ks),e(16,Xa=Ue.onClosed||Xa),e(2,bi=null),qe())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},qe=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};Ai(L,{open:Ic,close:we});var ut=!1;return Hu(function(){ut&&we()}),Wc(function(){e(47,ut=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,G=Ue.isTabbable),"show"in Ue&&e(23,z=Ue.show),"id"in Ue&&e(24,q=Ue.id),"key"in Ue&&e(25,L=Ue.key),"ariaLabel"in Ue&&e(26,Z=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,he=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,F=Ue.closeButton),"closeOnEsc"in Ue&&e(29,Y=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,oe=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Fe=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,tt=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,ot=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Ie=Ue.styleCloseButton),"classBg"in Ue&&e(36,Le=Ue.classBg),"classWindowWrap"in Ue&&e(37,At=Ue.classWindowWrap),"classWindow"in Ue&&e(38,ci=Ue.classWindow),"classContent"in Ue&&e(39,Fi=Ue.classContent),"classCloseButton"in Ue&&e(40,Nr=Ue.classCloseButton),"unstyled"in Ue&&e(0,wr=Ue.unstyled),"setContext"in Ue&&e(41,Ai=Ue.setContext),"transitionBg"in Ue&&e(42,jo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Ni=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,xo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,gt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&ut&&(qr(z)?Ic(z):we())},[wr,ai,bi,i,r,o,a,l,c,u,d,h,f,vr,Ks,qa,Xa,qr,we,function(Ue){if(ai.closeOnEsc&&bi&&"Escape"===Ue.key&&(Ue.preventDefault(),we()),bi&&"Tab"===Ue.key&&!ai.disableFocusTrap){var Dn=o.querySelectorAll("*"),ii=Array.from(Dn).filter(ai.isTabbable).sort(function(di,kr){return di.tabIndex-kr.tabIndex}),hi=ii.indexOf(document.activeElement);-1===hi&&Ue.shiftKey&&(hi=0),hi+=ii.length+(Ue.shiftKey?-1:1),ii[hi%=ii.length].focus(),Ue.preventDefault()}},function(Ue){!ai.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){ai.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),we())},G,z,q,L,Z,he,F,Y,oe,Fe,tt,ot,ne,Ie,Le,At,ci,Fi,Nr,Ai,jo,xt,Ni,xo,gt,ut,C,_,function(Ue){Vi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Jo,ro,Gu,Xd,Wu,qc,CQ=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,R7e,L7e,ys,{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},O7e,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Jo||(Jo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(ro||(ro={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Xd||(Xd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(qc||(qc={}));var wm=[{start:0,end:100}],Cm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},$7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),B7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),kQ=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),_F="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",xF="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",V7e="NO",wF="SELF",CF="NEXT_INSIDE",H7e=(ql(lF={},qc.asc,"ascending"),ql(lF,qc.desc,"descending"),lF),z7e=0;function fb(){return++z7e}function Uf(t){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function oo(t){return Array.isArray(t)}function Mo(t){return null!==t&&"object"===Uf(t)&&t.constructor===Object}function SQ(t){return!(!t||"object"!==Uf(t))&&"add"===t.op}function DQ(t){return!(!t||"object"!==Uf(t))&&"remove"===t.op}function kF(t){return!(!t||"object"!==Uf(t))&&"replace"===t.op}function SF(t){return!(!t||"object"!==Uf(t))&&"copy"===t.op}function Mv(t){return!(!t||"object"!==Uf(t))&&"move"===t.op}function DF(t){return(DF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function U7e(t,n){return t===n}function TQ(t){return t.slice(0,t.length-1)}function EQ(t){return"object"===DF(t)&&null!==t}function pb(t){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function AQ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function G7e(t,n,e){return r=function(o,s){if("object"!==pb(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==pb(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===pb(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function TF(t){if(oo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Mo(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Mo(t)||oo(t))return EF(t,r,o);if(i){var s=W7e.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var W7e=/^\d+$/;function MQ(t,n,e){if(0===n.length)return e(t);if(!EQ(t))throw new Error("Path doesn't exist");var i=n[0];return EF(t,i,MQ(t[i],n.slice(1),e))}function AF(t,n){if(0===n.length)return t;if(!EQ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=TF(t);return oo(i)&&i.splice(parseInt(e),1),Mo(i)&&delete i[e],i}return t}var r=n[0];return EF(t,r,AF(t[r],n.slice(1)))}function MF(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return MQ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=TF(o);return s.splice(parseInt(r),0,e),s})}function Xc(t,n){return void 0!==t&&(0===n.length||null!==t&&Xc(t[n[0]],n.slice(1)))}function Xu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function ln(t){return t.map(IQ).join("")}function IQ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function IF(t,n){return t+IQ(n)}function Iv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:U7e;if(p.length=0?G=function(){var z="",U=!0;"-"==t[s]&&(z+=h()),z+="0"==t[s]?h():m(),"."==t[s]&&(z+=h()+m(),U=!1),"e"!=t[s]&&"E"!=t[s]||(z+=h(),"+"!=t[s]&&"-"!=t[s]||(z+=h()),z+=m(),U=!1);var q=+z;return a&&U&&(q>Number.MAX_SAFE_INTEGER||q="a"&&G<="f"?$+=G.charCodeAt()-n9e+10:G>="0"&&G<="9"?$+=+G:C()}return String.fromCharCode($)}function m(){for(var M="";t[s]>="0"&&t[s]<="9";)M+=h();if(M.length)return M;S(),_()}function g(M,$){v(M,$,y())}function v(M,$,G){i[M]=i[M]||{},i[M][$]=G}function y(){return{line:r,column:o,pos:s}}function _(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),_()}function S(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},O2.stringify=function(t,n,e){if(j2(t)){var i,r,o=0,s="object"==bn(e)?e.space:e;switch(bn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var r9e=/"|\\/g,o9e=/[\b]/g,s9e=/\f/g,a9e=/\n/g,l9e=/\r/g,c9e=/\t/g;function P2(t){return'"'+(t=t.replace(r9e,"\\$&").replace(s9e,"\\f").replace(o9e,"\\b").replace(a9e,"\\n").replace(l9e,"\\r").replace(c9e,"\\t"))+'"'}var u9e=/~/g,d9e=/\//g;function OF(t){return t.replace(u9e,"~0").replace(d9e,"~1")}function jF(t){return(jF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function PF(t){var n="function"==typeof Map?new Map:void 0;return PF=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return LF(e,arguments,vb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),gb(r,e)},PF(t)}function LF(t,n,e){return(LF=RQ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&gb(a,o.prototype),a}).apply(null,arguments)}function RQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gb(t,n){return(gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function vb(t){return(vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var Gf=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&gb(l,c)}(a,PF(Error));var n,e,i,s=(n=a,e=RQ(),function(){var l,c=vb(n);if(e){var u=vb(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function h9e(t,n){if(n&&("object"===jF(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function L2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function R2(t){return t>=48&&t<=57}function f9e(t){return t>=32&&t<=1114111}var p9e=/^[,:[\]{}()\n]$/;function $Q(t){return m9e.test(t)||t&&B2(t.charCodeAt(0))}var m9e=/^[[{\w-]$/;function g9e(t){return 10===t||13===t||9===t||8===t||12===t}function $2(t){return 32===t||10===t||9===t||13===t}function v9e(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function B2(t){return BQ(t)||RF(t)}function BQ(t){return 34===t||8220===t||8221===t}function RF(t){return 39===t||8216===t||8217===t||96===t||180===t}function yb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function km(t,n){var e=t.length;if(!$2(t.charCodeAt(e-1)))return t+n;for(;$2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function y9e(t,n,e){return t.substring(0,n)+t.substring(n+e)}var b9e={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_9e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yd(t){var n=0,e="";r()||function(){throw new Gf("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),$Q(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=km(e,",")),function(){for(var _=!0,C=!0;C;)_?_=!1:l(44)||(e=km(e,",")),C=r();C||(e=yb(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=yb(e,",")),n>=t.length)return e;function r(){o();var _=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&S<=57)for(n++;R2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);R2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);R2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),_}function o(){var _=n,C=s();do{(C=a())&&(C=s())}while(C);return n>_}function s(){for(var _,C="";(_=$2(t.charCodeAt(n)))||v9e(t.charCodeAt(n));)C+=_?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;$2(t.charCodeAt(n-1))&&n>0;)n--;var S=t.slice(C,n);return e+=JSON.stringify(S),!0}}function f(_){if(!R2(t.charCodeAt(n))){var C=t.slice(_,n);throw new Gf("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(_){throw new Gf("Invalid character "+JSON.stringify(_),n)}function m(){throw new Gf("Object key expected",n)}function g(){throw new Gf("Object value expected",n)}function v(){throw new Gf("Colon expected",n)}function y(_){for(var C=_+2;/\w/.test(t[C]);)C++;var S=t.slice(_,C);throw new Gf('Invalid unicode character "'.concat(S,'"'),n)}!function(){throw new Gf("Unexpected character "+JSON.stringify(t[n]),n)}()}function x9e(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ws(t){return parseInt(t,10)}function $F(t){return w9e.test(t)}var w9e=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Io(t){return"object"===bn(t)&&null!==t&&t.constructor===Object}function Ho(t){return"object"===bn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function BF(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return BF(Number(t));try{var n=t&&t.valueOf();if(n!==t)return BF(n)}catch{return!1}return!1}function VQ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function VF(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return bn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Io(t))return"object";var e=n.stringify(t);return e&&$F(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var C9e=/^https?:\/\/\S+$/;function V2(t){return"string"==typeof t&&C9e.test(t)}function Fv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&($F(e)?n.parse(e):t)}var k9e=/^-?[0-9]+$/,zQ="object"==(typeof global>"u"?"undefined":bn(global))&&global&&global.Object===Object&&global,S9e="object"==(typeof self>"u"?"undefined":bn(self))&&self&&self.Object===Object&&self,Ca=zQ||S9e||Function("return this")(),ll=Ca.Symbol,UQ=Object.prototype,D9e=UQ.hasOwnProperty,T9e=UQ.toString,bb=ll?ll.toStringTag:void 0,E9e=Object.prototype.toString,GQ=ll?ll.toStringTag:void 0;function Ml(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":GQ&&GQ in Object(t)?function(n){var e=D9e.call(n,bb),i=n[bb];try{n[bb]=void 0;var r=!0}catch{}var o=T9e.call(n);return r&&(e?n[bb]=i:delete n[bb]),o}(t):E9e.call(t)}function ls(t){return null!=t&&"object"==bn(t)}function Yl(t){return"symbol"==bn(t)||ls(t)&&"[object Symbol]"==Ml(t)}function WQ(t){return"number"==typeof t?t:Yl(t)?NaN:+t}function Ko(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var lZ=aZ(nZ),K9e=/\{\n\/\* \[wrapped with (.+)\] \*/,Q9e=/,? & /,Z9e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function q2(t){return function(){return t}}var eVe=function(){try{var t=Dm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),X2=eVe,tVe=X2?function(t,n){return X2(t,"toString",{configurable:!0,enumerable:!1,value:q2(n),writable:!0})}:cl,UF=aZ(tVe);function Jc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var nVe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function uZ(t,n,e){var o,i=n+"";return UF(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(Z9e,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Jc(nVe,function(s){var a="_."+s[0];o&s[1]&&!J2(r,a)&&r.push(a)}),r.sort()}((o=i.match(K9e))?o[1].split(Q9e):[],e)))}function dZ(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return zF(t)&&lZ(h,d),h.placeholder=i,uZ(h,t,n)}function Pv(t){return t.placeholder}var iVe=/^(?:0|[1-9]\d*)$/;function Zh(t,n){var e=bn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&iVe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Il(t){return null!=t&&Cb(t.length)&&!Kd(t)}function Fl(t,n,e){if(!zo(e))return!1;var i=bn(n);return!!("number"==i?Il(e)&&Zh(n,e.length):"string"==i&&n in e)&&Kc(e[n],t)}function Lv(t){return dr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Fl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,yZ=vZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,bZ=yZ&&yZ.exports===vZ?Ca.Buffer:void 0,nf=(bZ?bZ.isBuffer:void 0)||Q2,Uo={};function Cc(t){return function(n){return t(n)}}Uo["[object Float32Array]"]=Uo["[object Float64Array]"]=Uo["[object Int8Array]"]=Uo["[object Int16Array]"]=Uo["[object Int32Array]"]=Uo["[object Uint8Array]"]=Uo["[object Uint8ClampedArray]"]=Uo["[object Uint16Array]"]=Uo["[object Uint32Array]"]=!0,Uo["[object Arguments]"]=Uo["[object Array]"]=Uo["[object ArrayBuffer]"]=Uo["[object Boolean]"]=Uo["[object DataView]"]=Uo["[object Date]"]=Uo["[object Error]"]=Uo["[object Function]"]=Uo["[object Map]"]=Uo["[object Number]"]=Uo["[object Object]"]=Uo["[object RegExp]"]=Uo["[object Set]"]=Uo["[object String]"]=Uo["[object WeakMap]"]=!1;var _Z="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,Sb=_Z&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,qF=Sb&&Sb.exports===_Z&&zQ.process,Qc=function(){try{return Sb&&Sb.require&&Sb.require("util").types||qF&&qF.binding&&qF.binding("util")}catch{}}(),xZ=Qc&&Qc.isTypedArray,Tm=xZ?Cc(xZ):function(t){return ls(t)&&Cb(t.length)&&!!Uo[Ml(t)]},hVe=Object.prototype.hasOwnProperty;function wZ(t,n){var e=Pi(t),i=!e&&qf(t),r=!e&&!i&&nf(t),o=!e&&!i&&!r&&Tm(t),s=e||i||r||o,a=s?WF(t.length,String):[],l=a.length;for(var c in t)!n&&!hVe.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zh(c,l))||a.push(c);return a}function CZ(t,n){return function(e){return t(n(e))}}var fVe=CZ(Object.keys,Object),pVe=Object.prototype.hasOwnProperty;function XF(t){if(!kb(t))return fVe(t);var n=[];for(var e in Object(t))pVe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function qs(t){return Il(t)?wZ(t):XF(t)}var mVe=Object.prototype.hasOwnProperty,gVe=Lv(function(t,n){if(kb(n)||Il(n))Qd(n,qs(n),t);else for(var e in n)mVe.call(n,e)&&wb(t,e,n[e])}),kZ=gVe,vVe=Object.prototype.hasOwnProperty;function Nl(t){return Il(t)?wZ(t,!0):function yVe(t){if(!zo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=kb(t),e=[];for(var i in t)("constructor"!=i||!n&&vVe.call(t,i))&&e.push(i);return e}(t)}var bVe=Lv(function(t,n){Qd(n,Nl(n),t)}),Z2=bVe,_Ve=Lv(function(t,n,e,i){Qd(n,Nl(n),t,i)}),Rv=_Ve,xVe=Lv(function(t,n,e,i){Qd(n,qs(n),t,i)}),SZ=xVe,wVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CVe=/^\w*$/;function YF(t,n){if(Pi(t))return!1;var e=bn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Yl(t))||CVe.test(t)||!wVe.test(t)||null!=n&&t in Object(n)}var Db=Dm(Object,"create"),kVe=Object.prototype.hasOwnProperty,SVe=Object.prototype.hasOwnProperty;function Em(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},rf.prototype.set=function(t,n){var e=this.__data__,i=ek(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var Tb=Dm(Ca,"Map");function tk(t,n){var i,r,e=t.__data__;return("string"==(r=bn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function sf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?$a(a,n-1,e,i,r):Yf(r,a):i||(r[r.length]=a)}return r}function KF(t){return null!=t&&t.length?$a(t,1):[]}function af(t){return UF(pZ(t,void 0,KF),t+"")}var EZ=af(JF),ik=CZ(Object.getPrototypeOf,Object),AZ=Function.prototype.toString,NVe=Object.prototype.hasOwnProperty,OVe=AZ.call(Object);function Bv(t){if(!ls(t)||"[object Object]"!=Ml(t))return!1;var n=ik(t);if(null===n)return!0;var e=NVe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&AZ.call(e)==OVe}function rk(t){if(!ls(t))return!1;var n=Ml(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Bv(t)}var jVe=dr(function(t,n){try{return wc(t,void 0,n)}catch(e){return rk(e)?e:new Error(e)}}),QF=jVe;function ZF(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Ui(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var eN=dr(function(t,n,e){var i=1;if(e.length){var r=Wf(e,Pv(eN));i|=32}return ef(t,i,n,e,r)});eN.placeholder={};var tN=eN,PVe=af(function(t,n){return Jc(n,function(e){e=Zd(e),tf(t,e,tN(t[e],t))}),t}),MZ=PVe,nN=dr(function(t,n,e){var i=3;if(e.length){var r=Wf(e,Pv(nN));i|=32}return ef(n,i,t,e,r)});nN.placeholder={};var IZ=nN;function Zc(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:Zc(t,n,e)}var LVe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Vv(t){return LVe.test(t)}var iN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rN="\\ud83c[\\udffb-\\udfff]",FZ="[^\\ud800-\\udfff]",NZ="(?:\\ud83c[\\udde6-\\uddff]){2}",OZ="[\\ud800-\\udbff][\\udc00-\\udfff]",jZ="(?:"+iN+"|"+rN+")?",$Ve="[\\ufe0e\\ufe0f]?"+jZ+"(?:\\u200d(?:"+[FZ,NZ,OZ].join("|")+")[\\ufe0e\\ufe0f]?"+jZ+")*",BVe="(?:"+[FZ+iN+"?",iN,NZ,OZ,"[\\ud800-\\udfff]"].join("|")+")",VVe=RegExp(rN+"(?="+rN+")|"+BVe+$Ve,"g");function Ku(t){return Vv(t)?function(n){return n.match(VVe)||[]}(t):function(n){return n.split("")}(t)}function PZ(t){return function(n){var e=Vv(n=Jr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?Jf(e,1).join(""):n.slice(1);return i[t]()+r}}var ok=PZ("toUpperCase");function oN(t){return ok(Jr(t).toLowerCase())}function sN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function JZ(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Mm(xc(t),n,e)}function Qu(t){var n=this.__data__=new rf(t);this.size=n.size}function KZ(t,n){return t&&Qd(n,qs(n),t)}Qu.prototype.clear=function(){this.__data__=new rf,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof rf){var i=e.__data__;if(!Tb||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new sf(i)}return e.set(t,n),this.size=e.size,this};var QZ="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,ZZ=QZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,eee=ZZ&&ZZ.exports===QZ?Ca.Buffer:void 0,tee=eee?eee.allocUnsafe:void 0;function nee(t,n){if(n)return t.slice();var e=t.length,i=tee?tee(e):new t.constructor(e);return t.copy(i),i}function Kf(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Fm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&_-c>=o}function g(){var C,S,_=Mb();if(m(_))return v(_);a=setTimeout(g,(S=n-((C=_)-l),d?CHe(S,o-(C-c)):S))}function v(_){return a=void 0,h&&i?f(_):(i=r=void 0,s)}function y(){var _=Mb(),C=m(_);if(i=arguments,r=this,l=_,C){if(void 0===a)return function p(_){return c=_,a=setTimeout(g,n),u?f(_):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,zo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?wHe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Mb())},y}function Nee(t,n){return null==t||t!=t?n:t}var Oee=Object.prototype,kHe=Oee.hasOwnProperty,SHe=dr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Fl(n[0],n[1],r)&&(i=1);++e=200&&(o=Eb,s=!1,n=new Fm(n));e:for(;++r=0&&t.slice(e,r)==n}function Qee(t){return function(n){var i,r,o,e=eh(n);return"[object Map]"==e?CN(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Ko(r,function(o){return[o,i[o]]})}(n,t(n))}}var vk=Qee(qs),yk=Qee(Nl),NHe=aN({"&":"&","<":"<",">":">",'"':""","'":"'"}),Zee=/[&<>"']/g,OHe=RegExp(Zee.source);function PN(t){return(t=Jr(t))&&OHe.test(t)?t.replace(Zee,NHe):t}var ete=/[\\^$.*+?()[\]{}|]/g,jHe=RegExp(ete.source);function tte(t){return(t=Jr(t))&&jHe.test(t)?t.replace(ete,"\\$&"):t}function nte(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Ui(l))<0&&(l+=c),l=a>l?0:LN(l);a-1?r[o?n[s]:s]:void 0}}var LHe=Math.max;function RN(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=LHe(i+r,0)),Y2(t,Li(n),r)}var lte=ate(RN);function cte(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function ute(t,n){return cte(t,Li(n),th)}var RHe=Math.max,$He=Math.min;function $N(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Ui(e),r=e<0?RHe(i+r,0):$He(r,i-1)),Y2(t,Li(n),r,!0)}var dte=ate($N);function hte(t,n){return cte(t,Li(n),jN)}function sa(t){return t&&t.length?t[0]:void 0}function fte(t,n){var e=-1,i=Il(t)?Array(t.length):[];return Qf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Wv(t,n){return(Pi(t)?Ko:fte)(t,Li(n))}function pte(t,n){return $a(Wv(t,n),1)}function mte(t,n){return $a(Wv(t,n),1/0)}function gte(t,n,e){return e=void 0===e?1:Ui(e),$a(Wv(t,n),e)}function vte(t){return null!=t&&t.length?$a(t,1/0):[]}function yte(t,n){return null!=t&&t.length?$a(t,n=void 0===n?1:Ui(n)):[]}function bte(t){return ef(t,512)}var _te=uN("floor");function xte(t){return af(function(n){var e=n.length,i=e,r=Yc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==W2(o))var s=new Yc([],!0)}for(i=s?i:e;++in}function _k(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Ite=_k(BN),Fte=_k(function(t,n){return t>=n}),HHe=Object.prototype.hasOwnProperty;function zHe(t,n){return null!=t&&HHe.call(t,n)}function Nte(t,n){return null!=t&&Cee(t,n,zHe)}var UHe=Math.max,GHe=Math.min;function Ote(t,n,e){return n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),(i=t=xc(t))>=GHe(r=n,o=e)&&i-1:!!r&&jv(t,n,e)>-1}var qHe=Math.max;function Pte(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=qHe(i+r,0)),jv(t,n,r)}function Xi(t){return null!=t&&t.length?Zc(t,0,-1):[]}var XHe=Math.min;function HN(t,n,e){for(var i=e?ON:J2,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Ko(u,Cc(n))),l=XHe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Fm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function cne(t){return void 0===t}function une(t){return ls(t)&&"[object WeakMap]"==eh(t)}function dne(t){return ls(t)&&"[object WeakSet]"==Ml(t)}function hne(t){return Li("function"==typeof t?t:eu(t,1))}var oze=Array.prototype.join;function fne(t,n){return null==t?"":oze.call(t,n)}var sze=zv(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),pne=sze,aze=dk(function(t,n,e){tf(t,e,n)}),mne=aze,lze=Math.max,cze=Math.min;function gne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Ui(e))<0?lze(i+r,0):cze(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):Y2(t,cZ,r,!0)}var uze=zv(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),vne=uze,yne=PZ("toLowerCase");function WN(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function One(t,n){var e=t.length;if(e)return Zh(n+=n<0?e:0,e)?t[n]:void 0}function jne(t,n){return t&&t.length?One(t,Ui(n)):void 0}function Pne(t){return t=Ui(t),dr(function(n){return One(n,t)})}function ZN(t,n){return null==(t=Ute(t,n=Xf(n,t)))||delete t[Zd(Ln(n))]}function pze(t){return Bv(t)?void 0:t}var mze=af(function(t,n){var e={};if(null==t)return e;var i=!1;n=Ko(n,function(o){return o=Xf(o,t),i||(i=o.length>1),o}),Qd(t,pN(t),e),i&&(e=eu(e,7,pze));for(var r=n.length;r--;)ZN(e,n[r]);return e}),Lne=mze;function jb(t,n,e,i){if(!zo(t))return t;for(var r=-1,o=(n=Xf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(fte(t,function(o,s,a){return{criteria:Ko(n,function(c){return c(o)}),index:++i,value:o}}))}function zne(t,n,e,i){return null==t?[]:(Pi(n)||(n=null==n?[]:[n]),Pi(e=i?void 0:e)||(e=null==e?[]:[e]),Hne(t,n,e))}function tO(t){return af(function(n){return n=Ko(n,Cc(Li)),dr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var Une=tO(Ko),vze=Math.min,yze=dr(function(t,n){var e=(n=1==n.length&&Pi(n[0])?Ko(n[0],Cc(Li)):Ko($a(n,1),Cc(Li))).length;return dr(function(i){for(var r=-1,o=vze(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=bze(n/2))&&(t+=t)}while(n);return e}var _ze=TN("length"),iO="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rO="\\ud83c[\\udffb-\\udfff]",Xne="[^\\ud800-\\udfff]",Yne="(?:\\ud83c[\\udde6-\\uddff]){2}",Jne="[\\ud800-\\udbff][\\udc00-\\udfff]",Kne="(?:"+iO+"|"+rO+")?",wze="[\\ufe0e\\ufe0f]?"+Kne+"(?:\\u200d(?:"+[Xne,Yne,Jne].join("|")+")[\\ufe0e\\ufe0f]?"+Kne+")*",Cze="(?:"+[Xne+iO+"?",iO,Yne,Jne,"[\\ud800-\\udfff]"].join("|")+")",Qne=RegExp(rO+"(?="+rO+")|"+Cze+wze,"g");function Jv(t){return Vv(t)?function(n){for(var e=Qne.lastIndex=0;Qne.test(n);)++e;return e}(t):_ze(t)}var kze=Math.ceil;function Ck(t,n){var e=(n=void 0===n?" ":_c(n)).length;if(e<2)return e?nO(n,t):n;var i=nO(n,kze(t/Jv(n)));return Vv(n)?Jf(Ku(i),0,t).join(""):i.slice(0,t)}var Sze=Math.ceil,Dze=Math.floor;function Zne(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return Ck(Dze(r),e)+t+Ck(Sze(r),e)}function eie(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;return n&&i-1;)a!==t&&sie.call(a,l,1),sie.call(t,l,1);return t}function dO(t,n){return t&&t.length&&n&&n.length?uO(t,n):t}var aie=dr(dO);function lie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,Li(e)):t}function cie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,void 0,e):t}var Fze=Array.prototype.splice;function uie(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;Zh(r)?Fze.call(t,r,1):ZN(t,r)}}return t}var Nze=af(function(t,n){var e=null==t?0:t.length,i=JF(t,n);return uie(t,Ko(n,function(r){return Zh(r,e)?+r:r}).sort(Vne)),i}),die=Nze,Oze=Math.floor,jze=Math.random;function hO(t,n){return t+Oze(jze()*(n-t+1))}var Pze=parseFloat,Lze=Math.min,Rze=Math.random;function hie(t,n,e){if(e&&"boolean"!=typeof e&&Fl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Jd(t),void 0===n?(n=t,t=0):n=Jd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=Rze();return Lze(t+r*(n-t+Pze("1e-"+((r+"").length-1))),n)}return hO(t,n)}var $ze=Math.ceil,Bze=Math.max;function fie(t){return function(n,e,i){return i&&"number"!=typeof i&&Fl(n,e,i)&&(e=i=void 0),n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),function(r,o,s,a){for(var l=-1,c=Bze($ze((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Fl(t,n[0],n[1])?n=[]:e>2&&Fl(n[0],n[1],n[2])&&(n=[n[0]]),Hne(t,$a(n,1),[])}),pO=Kze,Qze=Math.floor,Zze=Math.min;function mO(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Yl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Yl(s)&&(e?s<=n:s>>0)?(t=Jr(t))&&("string"==typeof n||null!=n&&!xk(n))&&!(n=_c(n))&&Vv(t)?Jf(Ku(t),0,e):t.split(n,e):[]}var eUe=Math.max;function Wie(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:eUe(Ui(n),0),dr(function(e){var i=e[n],r=Jf(e,0,n);return i&&Yf(r,i),wc(t,this,r)})}var tUe=zv(function(t,n,e){return t+(e?" ":"")+ok(n)}),qie=tUe;function Xie(t,n,e){return t=Jr(t),e=null==e?0:Mm(Ui(e),0,t.length),n=_c(n),t.slice(e,e+n.length)==n}function Yie(){return{}}function Jie(){return""}function Kie(){return!0}var Qie=H2(function(t,n){return t-n},0);function Zie(t){return t&&t.length?XN(t,cl):0}function ere(t,n){return t&&t.length?XN(t,Li(n)):0}function tre(t){var n=null==t?0:t.length;return n?Zc(t,1,n):[]}function nre(t,n,e){return t&&t.length?Zc(t,0,(n=e||void 0===n?1:Ui(n))<0?0:n):[]}function ire(t,n,e){var i=null==t?0:t.length;return i?Zc(t,(n=i-(n=e||void 0===n?1:Ui(n)))<0?0:n,i):[]}function rre(t,n){return t&&t.length?mk(t,Li(n),!1,!0):[]}function ore(t,n){return t&&t.length?mk(t,Li(n)):[]}function sre(t,n){return n(t),t}var are=Object.prototype,nUe=are.hasOwnProperty;function lre(t,n,e,i){return void 0===t||Kc(t,are[e])&&!nUe.call(i,e)?n:t}var iUe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function rUe(t){return"\\"+iUe[t]}var cre=/<%=([\s\S]+?)%>/g,Tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:cre,variable:"",imports:{_:{escape:PN}}},oUe=/\b__p \+= '';/g,sUe=/\b(__p \+=) '' \+/g,aUe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lUe=/[()=,{}\[\]\/\s]/,cUe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ek=/($^)/,uUe=/['\n\r\u2028\u2029\\]/g,ure=Object.prototype.hasOwnProperty;function dre(t,n,e){var i=Tk.imports._.templateSettings||Tk;e&&Fl(t,n,e)&&(n=void 0),t=Jr(t),n=Rv({},n,i,lre);var r,o,s=Rv({},n.imports,i.imports,lre),a=qs(s),l=VN(s,a),c=0,u=n.interpolate||Ek,d="__p += '",h=RegExp((n.escape||Ek).source+"|"+u.source+"|"+(u===cre?cUe:Ek).source+"|"+(n.evaluate||Ek).source+"|$","g"),f=ure.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,_,C,S){return y||(y=_),d+=t.slice(c,S).replace(uUe,rUe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=S+g.length,g}),d+="';\n";var p=ure.call(n,"variable")&&n.variable;if(p){if(lUe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(oUe,""):d).replace(sUe,"$1").replace(aUe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=QF(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,rk(m))throw m;return m}function gO(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return zo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Gv(t,n,{leading:i,maxWait:n,trailing:r})}function Kv(t,n){return n(t)}var dUe=Math.min;function vO(t,n){if((t=Ui(t))<1||t>9007199254740991)return[];var e=4294967295,i=dUe(t,4294967295);t-=4294967295;for(var r=WF(i,n=nh(n));++e-1;);return e}function bre(t,n){for(var e=-1,i=t.length;++e-1;);return e}function _re(t,n,e){if((t=Jr(t))&&(e||void 0===n))return KQ(t);if(!t||!(n=_c(n)))return t;var i=Ku(t),r=Ku(n);return Jf(i,bre(i,r),yre(i,r)+1).join("")}function xre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.slice(0,JQ(t)+1);if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,0,yre(i,Ku(n))+1).join("")}var hUe=/^\s+/;function wre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.replace(hUe,"");if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,bre(i,Ku(n))).join("")}var fUe=/\w*$/;function Cre(t,n){var e=30,i="...";if(zo(n)){var r="separator"in n?n.separator:r;e="length"in n?Ui(n.length):e,i="omission"in n?_c(n.omission):i}var o=(t=Jr(t)).length;if(Vv(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-Jv(i);if(a<1)return i;var l=s?Jf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),xk(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Jr(fUe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(_c(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function kre(t){return GF(t,1)}var pUe=aN({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Sre=/&(?:amp|lt|gt|quot|#39);/g,mUe=RegExp(Sre.source);function Dre(t){return(t=Jr(t))&&mUe.test(t)?t.replace(Sre,pUe):t}var gUe=Uv&&1/lk(new Uv([,-0]))[1]==1/0?function(t){return new Uv(t)}:go,vUe=gUe;function Zf(t,n,e){var i=-1,r=J2,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=ON;else if(o>=200){var c=n?null:vUe(t);if(c)return lk(c);s=!1,r=Eb,l=new Fm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Tr&&Zh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Kv,args:[r],thisArg:void 0}),new Yc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Vre=CUe;function Hre(){return dN(this)}function zre(){var t=this.__wrapped__;if(t instanceof Tr){var n=t;return this.__actions__.length&&(n=new Tr(this)),(n=n.reverse()).__actions__.push({func:Kv,args:[kk],thisArg:void 0}),new Yc(n,this.__chain__)}return this.thru(kk)}function _O(t,n,e){var i=t.length;if(i<2)return i?Zf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,bO(t,e)}),Kre=SUe,Gn={chunk:YZ,compact:mee,concat:gee,difference:Vee,differenceBy:Hee,differenceWith:zee,drop:Gee,dropRight:Wee,dropRightWhile:qee,dropWhile:Xee,fill:rte,findIndex:RN,findLastIndex:$N,first:sa,flatten:KF,flattenDeep:vte,flattenDepth:yte,fromPairs:Ete,head:sa,indexOf:Pte,initial:Xi,intersection:Lte,intersectionBy:Rte,intersectionWith:$te,join:fne,last:Ln,lastIndexOf:gne,nth:jne,pull:aie,pullAll:dO,pullAllBy:lie,pullAllWith:cie,pullAt:die,remove:_ie,reverse:kk,slice:Nie,sortedIndex:Pie,sortedIndexBy:Lie,sortedIndexOf:Rie,sortedLastIndex:$ie,sortedLastIndexBy:Bie,sortedLastIndexOf:Vie,sortedUniq:zie,sortedUniqBy:Uie,tail:tre,take:nre,takeRight:ire,takeRightWhile:rre,takeWhile:ore,union:Tre,unionBy:Ere,unionWith:Are,uniq:Mre,uniqBy:Ire,uniqWith:Fre,unzip:Ak,unzipWith:bO,without:$re,xor:Ure,xorBy:Gre,xorWith:Wre,zip:qre,zipObject:Yre,zipObjectDeep:Jre,zipWith:Kre},vo={countBy:Iee,each:gk,eachRight:Fb,every:ite,filter:ste,find:lte,findLast:dte,flatMap:pte,flatMapDeep:mte,flatMapDepth:gte,forEach:gk,forEachRight:Fb,groupBy:qv,includes:jte,invokeMap:Wte,keyBy:mne,map:Wv,orderBy:zne,partition:lO,reduce:vie,reduceRight:yie,reject:bie,sample:Tie,sampleSize:Eie,shuffle:Iie,size:Fie,some:jie,sortBy:pO},DUe={now:Mb},_s={after:QQ,ary:GF,before:ZF,bind:tN,bindKey:IZ,curry:hk,curryRight:fk,debounce:Gv,defer:$ee,delay:Bee,flip:bte,memoize:$v,negate:Yv,once:Bne,overArgs:Gne,partial:sO,partialRight:iie,rearg:mie,rest:Cie,spread:Wie,throttle:gO,unary:kre,wrap:Bre},mi={castArray:qZ,clone:hee,cloneDeep:fee,cloneDeepWith:_N,cloneWith:pee,conformsTo:Eee,eq:Kc,gt:Ite,gte:Fte,isArguments:qf,isArray:Pi,isArrayBuffer:Xte,isArrayLike:Il,isArrayLikeObject:bs,isBoolean:Yte,isBuffer:nf,isDate:Kte,isElement:Qte,isEmpty:Hi,isEqual:or,isEqualWith:Zte,isError:rk,isFinite:ene,isFunction:Kd,isInteger:UN,isLength:Cb,isMap:yN,isMatch:tne,isMatchWith:nne,isNaN:ine,isNative:rne,isNil:one,isNull:sne,isNumber:GN,isObject:zo,isObjectLike:ls,isPlainObject:Bv,isRegExp:xk,isSafeInteger:lne,isSet:bN,isString:Nb,isSymbol:Yl,isTypedArray:Tm,isUndefined:cne,isWeakMap:une,isWeakSet:dne,lt:bne,lte:_ne,toArray:KN,toFinite:Jd,toInteger:Ui,toLength:LN,toNumber:xc,toPlainObject:FN,toSafeInteger:mre,toString:Jr},Ol={add:YQ,ceil:XZ,divide:Uee,floor:_te,max:kne,maxBy:Sne,mean:Tne,meanBy:Ene,min:Fne,minBy:Xv,multiply:Nne,round:Sie,subtract:Qie,sum:Zie,sumBy:ere},TUe=JZ,EUe=Ote,AUe=hie,Ii={assign:kZ,assignIn:Z2,assignInWith:Rv,assignWith:SZ,at:EZ,create:Fee,defaults:jee,defaultsDeep:Lee,entries:vk,entriesIn:yk,extend:Z2,extendWith:Rv,findKey:ute,findLastKey:hte,forIn:kte,forInRight:Ste,forOwn:Dte,forOwnRight:Tte,functions:Ate,functionsIn:Mte,get:nk,has:Nte,hasIn:uk,invert:Vte,invertBy:zte,invoke:Gte,keys:qs,keysIn:Nl,mapKeys:xne,mapValues:qN,merge:Ane,mergeWith:NN,omit:Lne,omitBy:$ne,pick:rie,pickBy:eO,result:kie,set:Aie,setWith:Mie,toPairs:vk,toPairsIn:yk,transform:vre,unset:Nre,update:jre,updateWith:Pre,values:Nm,valuesIn:Rre},ih={at:Vre,chain:dN,commit:xN,lodash:me,next:QN,plant:cO,reverse:zre,tap:sre,thru:Kv,toIterator:yO,toJSON:Om,value:Om,valueOf:Om,wrapperChain:Hre},Kr={camelCase:WZ,capitalize:oN,deburr:lN,endsWith:Kee,escape:PN,escapeRegExp:tte,kebabCase:pne,lowerCase:vne,lowerFirst:yne,pad:Zne,padEnd:eie,padStart:tie,parseInt:nie,repeat:xie,replace:wie,snakeCase:Oie,split:Gie,startCase:qie,startsWith:Xie,template:dre,templateSettings:Tk,toLower:fre,toUpper:gre,trim:_re,trimEnd:xre,trimStart:wre,truncate:Cre,unescape:Dre,upperCase:Lre,upperFirst:ok,words:cN},so={attempt:QF,bindAll:MZ,cond:See,conforms:Tee,constant:q2,defaultTo:Nee,flow:wte,flowRight:Cte,identity:cl,iteratee:hne,matches:wne,matchesProperty:Cne,method:Mne,methodOf:Ine,mixin:YN,noop:go,nthArg:Pne,over:Une,overEvery:Wne,overSome:qne,property:EN,propertyOf:oie,range:fO,rangeRight:pie,stubArray:sk,stubFalse:Q2,stubObject:Yie,stubString:Jie,stubTrue:Kie,times:vO,toPath:pre,uniqueId:ep},MUe=Math.max,IUe=Math.min,FUe=Math.min,NUe=Array.prototype,Qre=Object.prototype.hasOwnProperty,Zre=ll?ll.iterator:void 0,OUe=Math.max,eoe=Math.min,wO=function(t){return function(n,e,i){if(null==i){var r=zo(e),o=r&&qs(e),s=o&&o.length&&bk(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(YN);me.after=_s.after,me.ary=_s.ary,me.assign=Ii.assign,me.assignIn=Ii.assignIn,me.assignInWith=Ii.assignInWith,me.assignWith=Ii.assignWith,me.at=Ii.at,me.before=_s.before,me.bind=_s.bind,me.bindAll=so.bindAll,me.bindKey=_s.bindKey,me.castArray=mi.castArray,me.chain=ih.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=so.cond,me.conforms=so.conforms,me.constant=so.constant,me.countBy=vo.countBy,me.create=Ii.create,me.curry=_s.curry,me.curryRight=_s.curryRight,me.debounce=_s.debounce,me.defaults=Ii.defaults,me.defaultsDeep=Ii.defaultsDeep,me.defer=_s.defer,me.delay=_s.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=vo.filter,me.flatMap=vo.flatMap,me.flatMapDeep=vo.flatMapDeep,me.flatMapDepth=vo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=_s.flip,me.flow=so.flow,me.flowRight=so.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Ii.functions,me.functionsIn=Ii.functionsIn,me.groupBy=vo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Ii.invert,me.invertBy=Ii.invertBy,me.invokeMap=vo.invokeMap,me.iteratee=so.iteratee,me.keyBy=vo.keyBy,me.keys=qs,me.keysIn=Ii.keysIn,me.map=vo.map,me.mapKeys=Ii.mapKeys,me.mapValues=Ii.mapValues,me.matches=so.matches,me.matchesProperty=so.matchesProperty,me.memoize=_s.memoize,me.merge=Ii.merge,me.mergeWith=Ii.mergeWith,me.method=so.method,me.methodOf=so.methodOf,me.mixin=wO,me.negate=Yv,me.nthArg=so.nthArg,me.omit=Ii.omit,me.omitBy=Ii.omitBy,me.once=_s.once,me.orderBy=vo.orderBy,me.over=so.over,me.overArgs=_s.overArgs,me.overEvery=so.overEvery,me.overSome=so.overSome,me.partial=_s.partial,me.partialRight=_s.partialRight,me.partition=vo.partition,me.pick=Ii.pick,me.pickBy=Ii.pickBy,me.property=so.property,me.propertyOf=so.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=so.range,me.rangeRight=so.rangeRight,me.rearg=_s.rearg,me.reject=vo.reject,me.remove=Gn.remove,me.rest=_s.rest,me.reverse=Gn.reverse,me.sampleSize=vo.sampleSize,me.set=Ii.set,me.setWith=Ii.setWith,me.shuffle=vo.shuffle,me.slice=Gn.slice,me.sortBy=vo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Kr.split,me.spread=_s.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=ih.tap,me.throttle=_s.throttle,me.thru=Kv,me.toArray=mi.toArray,me.toPairs=Ii.toPairs,me.toPairsIn=Ii.toPairsIn,me.toPath=so.toPath,me.toPlainObject=mi.toPlainObject,me.transform=Ii.transform,me.unary=_s.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Ii.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Ii.update,me.updateWith=Ii.updateWith,me.values=Ii.values,me.valuesIn=Ii.valuesIn,me.without=Gn.without,me.words=Kr.words,me.wrap=_s.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Ii.toPairs,me.entriesIn=Ii.toPairsIn,me.extend=Ii.assignIn,me.extendWith=Ii.assignInWith,wO(me,me),me.add=Ol.add,me.attempt=so.attempt,me.camelCase=Kr.camelCase,me.capitalize=Kr.capitalize,me.ceil=Ol.ceil,me.clamp=TUe,me.clone=mi.clone,me.cloneDeep=mi.cloneDeep,me.cloneDeepWith=mi.cloneDeepWith,me.cloneWith=mi.cloneWith,me.conformsTo=mi.conformsTo,me.deburr=Kr.deburr,me.defaultTo=so.defaultTo,me.divide=Ol.divide,me.endsWith=Kr.endsWith,me.eq=mi.eq,me.escape=Kr.escape,me.escapeRegExp=Kr.escapeRegExp,me.every=vo.every,me.find=vo.find,me.findIndex=Gn.findIndex,me.findKey=Ii.findKey,me.findLast=vo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Ii.findLastKey,me.floor=Ol.floor,me.forEach=vo.forEach,me.forEachRight=vo.forEachRight,me.forIn=Ii.forIn,me.forInRight=Ii.forInRight,me.forOwn=Ii.forOwn,me.forOwnRight=Ii.forOwnRight,me.get=Ii.get,me.gt=mi.gt,me.gte=mi.gte,me.has=Ii.has,me.hasIn=Ii.hasIn,me.head=Gn.head,me.identity=cl,me.includes=vo.includes,me.indexOf=Gn.indexOf,me.inRange=EUe,me.invoke=Ii.invoke,me.isArguments=mi.isArguments,me.isArray=Pi,me.isArrayBuffer=mi.isArrayBuffer,me.isArrayLike=mi.isArrayLike,me.isArrayLikeObject=mi.isArrayLikeObject,me.isBoolean=mi.isBoolean,me.isBuffer=mi.isBuffer,me.isDate=mi.isDate,me.isElement=mi.isElement,me.isEmpty=mi.isEmpty,me.isEqual=mi.isEqual,me.isEqualWith=mi.isEqualWith,me.isError=mi.isError,me.isFinite=mi.isFinite,me.isFunction=mi.isFunction,me.isInteger=mi.isInteger,me.isLength=mi.isLength,me.isMap=mi.isMap,me.isMatch=mi.isMatch,me.isMatchWith=mi.isMatchWith,me.isNaN=mi.isNaN,me.isNative=mi.isNative,me.isNil=mi.isNil,me.isNull=mi.isNull,me.isNumber=mi.isNumber,me.isObject=zo,me.isObjectLike=mi.isObjectLike,me.isPlainObject=mi.isPlainObject,me.isRegExp=mi.isRegExp,me.isSafeInteger=mi.isSafeInteger,me.isSet=mi.isSet,me.isString=mi.isString,me.isSymbol=mi.isSymbol,me.isTypedArray=mi.isTypedArray,me.isUndefined=mi.isUndefined,me.isWeakMap=mi.isWeakMap,me.isWeakSet=mi.isWeakSet,me.join=Gn.join,me.kebabCase=Kr.kebabCase,me.last=Ln,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Kr.lowerCase,me.lowerFirst=Kr.lowerFirst,me.lt=mi.lt,me.lte=mi.lte,me.max=Ol.max,me.maxBy=Ol.maxBy,me.mean=Ol.mean,me.meanBy=Ol.meanBy,me.min=Ol.min,me.minBy=Ol.minBy,me.stubArray=so.stubArray,me.stubFalse=so.stubFalse,me.stubObject=so.stubObject,me.stubString=so.stubString,me.stubTrue=so.stubTrue,me.multiply=Ol.multiply,me.nth=Gn.nth,me.noop=so.noop,me.now=DUe.now,me.pad=Kr.pad,me.padEnd=Kr.padEnd,me.padStart=Kr.padStart,me.parseInt=Kr.parseInt,me.random=AUe,me.reduce=vo.reduce,me.reduceRight=vo.reduceRight,me.repeat=Kr.repeat,me.replace=Kr.replace,me.result=Ii.result,me.round=Ol.round,me.sample=vo.sample,me.size=vo.size,me.snakeCase=Kr.snakeCase,me.some=vo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Kr.startCase,me.startsWith=Kr.startsWith,me.subtract=Ol.subtract,me.sum=Ol.sum,me.sumBy=Ol.sumBy,me.template=Kr.template,me.times=so.times,me.toFinite=mi.toFinite,me.toInteger=Ui,me.toLength=mi.toLength,me.toLower=Kr.toLower,me.toNumber=mi.toNumber,me.toSafeInteger=mi.toSafeInteger,me.toString=mi.toString,me.toUpper=Kr.toUpper,me.trim=Kr.trim,me.trimEnd=Kr.trimEnd,me.trimStart=Kr.trimStart,me.truncate=Kr.truncate,me.unescape=Kr.unescape,me.uniqueId=so.uniqueId,me.upperCase=Kr.upperCase,me.upperFirst=Kr.upperFirst,me.each=vo.forEach,me.eachRight=vo.forEachRight,me.first=Gn.head,wO(me,(xO={},th(me,function(t,n){Qre.call(me.prototype,n)||(xO[n]=t)}),xO),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Kr.templateSettings).imports._=me,Jc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Jc(["drop","take"],function(t,n){Tr.prototype[t]=function(e){e=void 0===e?1:OUe(Ui(e),0);var i=this.__filtered__&&!n?new Tr(this):this.clone();return i.__filtered__?i.__takeCount__=eoe(e,i.__takeCount__):i.__views__.push({size:eoe(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Tr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Jc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Tr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Li(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Jc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Tr.prototype[t]=function(){return this[e](1).value()[0]}}),Jc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Tr.prototype[t]=function(){return this.__filtered__?new Tr(this):this[e](1)}}),Tr.prototype.compact=function(){return this.filter(cl)},Tr.prototype.find=function(t){return this.filter(t).head()},Tr.prototype.findLast=function(t){return this.reverse().find(t)},Tr.prototype.invokeMap=dr(function(t,n){return"function"==typeof t?new Tr(this):this.map(function(e){return Ob(e,t,n)})}),Tr.prototype.reject=function(t){return this.filter(Yv(Li(t)))},Tr.prototype.slice=function(t,n){t=Ui(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Tr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Ui(n))<0?e.dropRight(-n):e.take(n-t)),e)},Tr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tr.prototype.toArray=function(){return this.take(4294967295)},th(Tr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Tr,c=a[0],u=l||Pi(s),d=function(v){var y=r.apply(me,Yf([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Tr(this);var g=t.apply(s,a);return g.__actions__.push({func:Kv,args:[d],thisArg:void 0}),new Yc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Jc(["pop","push","shift","sort","splice","unshift"],function(t){var n=NUe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Pi(o)?o:[],r)}return this[e](function(s){return n.apply(Pi(s)?s:[],r)})}}),th(Tr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";Qre.call(Ov,i)||(Ov[i]=[]),Ov[i].push({name:n,func:e})}}),Ov[K2(void 0,2).name]=[{name:"wrapper",func:void 0}],Tr.prototype.clone=function(){var t=new Tr(this.__wrapped__);return t.__actions__=Jl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Jl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Jl(this.__views__),t},Tr.prototype.reverse=function(){if(this.__filtered__){var t=new Tr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Tr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Pi(t),i=n<0,r=e?t.length:0,o=function(S,M,$){for(var G=-1,R=$.length;++G1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Io(l)||n&&c.length>0)&&(e[ln(c)]=!0),Io(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function noe(t){return Ze({},t)}function ioe(t){return Object.values(t)}function roe(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(si(o))),r}function kO(t,n){try{return n.parse(t)}catch{return n.parse(Yd(t))}}function ooe(t,n){try{return kO(t,n)}catch{return}}function Ik(t,n){t=t.replace(aoe,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function soe(t){t=t.replace(aoe,"");try{return Yd(t)}catch{}try{var n=Yd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var aoe=/,\s*$/;function Fk(t,n){var e=uoe.exec(n);if(e){var i=Ws(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Qv(t)?t:{text:e.stringify(t.json,null,n)}}function loe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return DO(t)?t:{json:n.parse(t.text)}}function Nk(t,n,e){return Zv(t,n,e).text}function coe(t,n){return function RUe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Qv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Io(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var uoe=/(position|char) (\d+)/,$Ue=/line (\d+)/,BUe=/column (\d+)/;function hoe(t){return VUe.test(t)&&t.length>2}var VUe=/^[[{]\S/;function TO(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?HUe:zUe:e?UUe:GUe}var HUe={escapeValue:function(t){return foe(goe(String(t)))},unescapeValue:function(t){return voe(poe(t))}},zUe={escapeValue:function(t){return goe(String(t))},unescapeValue:function(t){return voe(t)}},UUe={escapeValue:function(t){return foe(String(t))},unescapeValue:function(t){return poe(t)}},GUe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function foe(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function poe(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return moe[e]||e}catch{return n}})}var moe={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},WUe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function goe(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return moe[n]||n})}function voe(t){return t.replace(/\\["bfnrt\\]/g,function(n){return WUe[n]||n})}function jm(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function yoe(t,n){return Pb(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function Pm(t,n,e){return Pb(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function Pb(t,n){return!!EO(t,n)}function EO(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function boe(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function Ok(t,n,e){var i=e0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,boe(r))}}function e0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function jk(t){var e=e0(t)?.document.activeElement;return!!e&&Pb(e,function(i){return i===t})}function _oe(t,n){return EO(t,function(e){return e.nodeName===n})}function AO(t){return Pm(t,"data-type","selectable-key")?ro.key:Pm(t,"data-type","selectable-value")?ro.value:Pm(t,"data-type","insert-selection-area-inside")?ro.inside:Pm(t,"data-type","insert-selection-area-after")?ro.after:ro.multi}function t0(t){return encodeURIComponent(ln(t))}function xoe(t){var e=EO(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Xu(decodeURIComponent(e)):null}function tp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in XUe||e.push(i),e.join(n)}var XUe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},MO=yF.window;function YUe(t){pi(t,"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 woe(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,G="left"===v||_+u>window.innerWidth&&_>u;return{left:G?y.right-g:_+g,top:$?C-p:y.bottom+p,positionAbove:$,positionLeft:G}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,z=n.top,U=n.width,q=void 0===U?0:U,re=n.height,L=void 0===re?0:re;return{left:R,top:z,positionAbove:z+L>window.innerHeight&&z>L,positionLeft:R+q>window.innerWidth&&R>q}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function QUe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!Pb(l.target,function(c){return c===i})&&s(o.id)}return Wc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===tp(l)&&s(o.id)},function(l){a(l)},s,function(l){Vi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Vi[l?"unshift":"push"](function(){e(1,i=l)})}]}var ZUe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QUe,JUe,ys,{popup:0,closeAbsolutePopup:6},YUe),r}return Se(e)}();function koe(t,n,e){var i=t.slice();return i[6]=n[e],i}function Soe(t){var n,e;return n=new ZUe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eGe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(iGe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var iGe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function Lb(t){return{value:t,label:Hi(t)?"(whole item)":tu(Kl(t))}}function rh(t){return t.map(function(n){return FO.test(n)?"?.[".concat(n,"]"):IO.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var IO=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,FO=/^\d+$/;function Rb(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function oh(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var rGe={id:"javascript",name:"JavaScript",description:"\n

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

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(rh(e.path)),a=function NO(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function HQ(t){return k9e.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(rh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(rh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\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')()(t);return void 0!==e?e:null}},oGe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 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.5H93c-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.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 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.5H210.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.7zM176 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-80V416H256v16c0 44.2-35.8 80-80 80z"]},$b={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},Bb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},sGe={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 aGe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var OGe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,NGe,FGe,Ei,{path:4,value:0,readOnly:1,onPatch:5,focus:6},IGe),r}return Se(e)}();function Poe(t){for(var n=pO(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=Rk(n,u);jO(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(Io(l)&&i(o)){r[ln(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Ze(Ze({},n),{},{expandedMap:r})}function Loe(t,n){var e=n0(t.expandedMap,n),i=n0(t.enforceStringMap,n),r=n0(t.visibleSectionsMap,n);return Ze(Ze({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Roe(t,n,e){if(e){var i=Ze({},t.enforceStringMap);return i[n]=e,Ze(Ze({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ze({},t.enforceStringMap);return delete r[n],Ze(Ze({},t),{},{enforceStringMap:r})}return t}function $oe(t,n,e){var i=Yu(t,e),r=e.reduce(function(o,s){return SQ(s)?Boe(i,o,s):DQ(s)?Voe(i,o,s):kF(s)?(u=(c=s).path,d=BO(a=i,(l=o).expandedMap),h=BO(a,l.enforceStringMap),f=BO(a,l.visibleSectionsMap),Mo(c.value)||oo(c.value)||delete d[u],oo(c.value)||delete f[u],(Mo(c.value)||oo(c.value))&&delete h[u],Ze(Ze({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):SF(s)||Mv(s)?function(a,l,c){if(Mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=$O(LO(l.expandedMap,c.from),u),h=$O(LO(l.enforceStringMap,c.from),u),f=$O(LO(l.visibleSectionsMap,c.from),u),p=l;Mv(c)&&(p=Voe(a,p,{op:"remove",path:c.from}));var m=RO((p=Boe(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=RO(p.enforceStringMap,h),v=RO(p.visibleSectionsMap,f);return Ze(Ze({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Boe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r);if(oo(Sn(t,r))){var s=Ws(Ln(i)),a=r0(n.expandedMap,r,s,1),l=r0(n.enforceStringMap,r,s,1),c=r0(n.visibleSectionsMap,r,s,1);return c=Hoe(c,o,function(u){return zoe(u,s,1)}),Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Voe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=n0(a,i),l=n0(l,i),c=n0(c,i),oo(s)){var u=Ws(Ln(i));a=r0(a,r,u,-1),l=r0(l,r,u,-1),c=Hoe(c=r0(c,r,u,-1),o,function(d){return zoe(d,u,-1)})}return Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function n0(t,n){var e={},i=ln(n);return Object.keys(t).forEach(function(r){Iv(r,i)||(e[r]=t[r])}),e}function LO(t,n){var e={};return Object.keys(t).forEach(function(i){Iv(i,n)&&(e[i]=t[i])}),e}function RO(t,n){return Ze(Ze({},t),n)}function $O(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function r0(t,n,e,i){for(var r=n.length,o=ln(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:ln(u),value:t[c]}))}}if(0===s.length)return t;var h=Ze({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function BO(t,n){var e={};return Object.keys(n).filter(function(i){return Xc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function Hoe(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!or(i,r)){var o=Ze({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function zoe(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function lf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof Fv(o,i)}function Vb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function VO(t,n){var e=[];return function i(r,o){e.push(o);var s=ln(o);if(r&&!0===n.expandedMap[s]){if(oo(r)){var a=Rk(n,s);jO(r,a,function(l){i(r[l],o.concat(String(l)))})}Mo(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function Uoe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=ln(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),oo(o)){var l=Rk(n,a);jO(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Mo(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function HO(t,n,e){var i=VO(t,n),r=i.map(ln).indexOf(ln(e));return-1!==r&&r0;){if(!0===t.pointersMap[ln(i)])return!0;i.pop()}return xs(t)?e===ro.key&&or(t.focusPath,n):!(!Yi(t)||!(e===ro.value&&or(t.focusPath,n)||l0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===ro.key||e===ro.value||e===ro.multi)))}function qoe(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Fr(r)?r.focusPath:sa(r.paths),s=function LGe(t,n,e){var i=VO(t,n),r=i.map(ln),o=ln(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Xs(r)?Os(t,r.anchorPath,r.anchorPath):Os(t,r.anchorPath,l);if(xs(r)){var u=Sn(t,Xi(s));return Array.isArray(u)||Hi(s)?mr(s,!1):iu(s,!1)}return Yi(r)?mr(s,!1):Zu(r)||Xs(r)?Os(t,o,o):Os(t,a,l)}function Xoe(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=Uoe(t,n,e),o=r.findIndex(function(s){return or(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,Xi(r)))?mr(r,!1):iu(r,!1)}function a0(t,n){if(1===n.length){var e=sa(n);if("replace"===e.op||"move"===e.op)return mr(Ju(t,e.path),!1)}if(!Hi(n)&&n.every(function(s){return"move"===s.op})){var i=sa(n),r=n.slice(1);if((SF(i)||Mv(i))&&i.from!==i.path&&r.every(function(s){return(SF(s)||Mv(s))&&s.from===s.path}))return iu(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Hi(o))return{type:ro.multi,paths:o,anchorPath:sa(o),focusPath:Ln(o),pointersMap:Yoe(o)}}function Yoe(t){var n={};return t.forEach(function(e){n[ln(e)]=!0}),n}function Bk(t){return ql({},ln(t),!0)}function zb(t){return void 0!==t&&(xs(t)||Yi(t)||Fr(t)&&1===t.paths.length)}function Joe(t,n){return zb(n)&&Ho(Sn(t,n.focusPath))?n.focusPath:Xi(n.focusPath)}function l0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function WGe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function ase(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Mo(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else lse(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function lse(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function WO(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function cse(t,n,e){var i=t;return Fb(e,function(r){i=WO(i,n,r.start,r.end)}),i}function qGe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=Xi(s),u=Sn(t,c),d=Ln(s),h=Gb(c,Object.keys(u),d,WO(d,e,a,l));return{newSelection:a0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(ln(s)));var p="string"==typeof f?f:String(f),m=ln(s),g=lf(f,n.enforceStringMap,m,r),v=WO(p,e,a,l),y=[{op:"replace",path:ln(s),value:g?v:Fv(v,r)}];return{newSelection:a0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function XGe(t,n,e,i,r){for(var o=ase(e,t,1/0),s=[],a=0;an.floating[o]&&(s=Xk(s)),{main:s,cross:Xk(s)}}var OWe={start:"end",end:"start"};function e4(t){return t.replace(/start|end/g,function(n){return OWe[n]})}var jWe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,he,E,F,N,Y,V,oe;return vn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,_=void 0===(y=u.fallbackAxisSideDirection)?"none":y,S=void 0===(C=u.flipAlignment)||C,M=XK(u,p7e),$=Bm(r),G=Bm(a)===a,fe.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=fe.sent,z=m||(G||!S?[Xk(a)]:(void 0,xe=Xk(Fe=a),[e4(Fe),xe,e4(xe)])),m||"none"===_||z.push.apply(z,si(function(Fe,xe,tt,ze){var ot=Wk(Fe),B=function(ne,ie,Ie){var Ye=["left","right"],Le=["right","left"];switch(ne){case"top":case"bottom":return Ie?ie?Le:Ye:ie?Ye:Le;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(Bm(Fe),"start"===tt,ze);return ot&&(B=B.map(function(ne){return ne+"-"+ot}),xe&&(B=B.concat(B.map(e4)))),B}(a,S,_,R))),U=[a].concat(si(z)),fe.next=29,Sse(n,M);case 29:if(q=fe.sent,re=[],L=(null==(i=o.flip)?void 0:i.overflows)||[],h&&re.push(q[$]),p&&(X=NWe(r,s,R),re.push(q[X.main],q[X.cross])),L=[].concat(si(L),[{placement:r,overflows:re}]),re.every(function(Fe){return Fe<=0})){fe.next=48;break}if(F=((null==(he=o.flip)?void 0:he.index)||0)+1,!(N=U[F])){fe.next=37;break}return fe.abrupt("return",{data:{index:F,overflows:L},reset:{placement:N}});case 37:if(Y=null==(E=L.filter(function(Fe){return Fe.overflows[0]<=0}).sort(function(Fe,xe){return Fe.overflows[1]-xe.overflows[1]})[0])?void 0:E.placement,Y){fe.next=46;break}fe.t0=v,fe.next="bestFit"===fe.t0?42:"initialPlacement"===fe.t0?45:46;break;case 42:return oe=null==(V=L.map(function(Fe){return[Fe.placement,Fe.overflows.filter(function(xe){return xe>0}).reduce(function(xe,tt){return xe+tt},0)]}).sort(function(Fe,xe){return Fe[1]-xe[1]})[0])?void 0:V[0],oe&&(Y=oe),fe.abrupt("break",46);case 45:Y=a;case 46:if(r===Y){fe.next=48;break}return fe.abrupt("return",{reset:{placement:Y}});case 48:return fe.abrupt("return",{});case 49:case"end":return fe.stop()}var Fe,xe},e)}))()}}},PWe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o;return vn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Zi(vn().mark(function l(c,u){var d,h,f,p,m,g,v,y,_,C,S,M,$,G;return vn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=Bm(d),g=Wk(d),v="x"===qk(d),y=["left","top"].includes(m)?-1:1,_=p&&v?-1:1,C="function"==typeof u?u(c):u,S="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ze({mainAxis:0,crossAxis:0,alignmentAxis:null},C),M=S.mainAxis,$=S.crossAxis,G=S.alignmentAxis,R.abrupt("return",(g&&"number"==typeof G&&($="end"===g?-1*G:G),v?{x:$*_,y:M*y}:{x:M*y,y:$*_}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function LWe(t){return"x"===t?"y":"x"}var RWe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,$;return vn().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=XK(a,m7e),m={x:r,y:o},G.next=14,Sse(n,p);case 14:return g=G.sent,v=qk(Bm(s)),y=LWe(v),_=m[v],C=m[y],c&&(_=Dse(_+g["y"===v?"top":"left"],_,_-g["y"===v?"bottom":"right"])),d&&(C=Dse(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),$=f.fn(Ze(Ze({},n),{},(ql(i={},v,_),ql(i,y,C),i))),G.abrupt("return",Ze(Ze({},$),{},{data:{x:$.x-r,y:$.y-o}}));case 22:case"end":return G.stop()}},e)}))()}}};function kc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function lh(t){return kc(t).getComputedStyle(t)}var t4,Tse=Math.min,qb=Math.max,Yk=Math.round;function Ese(t){var n=lh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Yk(e)!==r||Yk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function ap(t){return Mse(t)?(t.nodeName||"").toLowerCase():""}function Ase(){if(t4)return t4;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t4=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ch(t){return t instanceof kc(t).HTMLElement}function td(t){return t instanceof kc(t).Element}function Mse(t){return t instanceof kc(t).Node}function Ise(t){return typeof ShadowRoot<"u"&&(t instanceof kc(t).ShadowRoot||t instanceof ShadowRoot)}function Jk(t){var n=lh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function $We(t){return["table","td","th"].includes(ap(t))}function n4(t){var n=/firefox/i.test(Ase()),e=lh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function i4(){return/^((?!chrome|android).)*safari/i.test(Ase())}function r4(t){return["html","body","#document"].includes(ap(t))}function Fse(t){return td(t)?t:t.contextElement}var Nse={x:1,y:1};function m0(t){var n=Fse(t);if(!ch(n))return Nse;var e=n.getBoundingClientRect(),i=Ese(n),r=i.width,o=i.height,s=i.fallback,a=(s?Yk(e.width):e.width)/r,l=(s?Yk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function Vm(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=Fse(t),l=Nse;n&&(i?td(i)&&(l=m0(i)):l=m0(t));var c=a?kc(a):window,u=i4()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=kc(a),g=i&&td(i)?kc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=m0(v),_=v.getBoundingClientRect(),C=getComputedStyle(v);_.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,_.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=_.x,h+=_.y,v=kc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function lp(t){return((Mse(t)?t.ownerDocument:t.document)||window.document).documentElement}function Kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ose(t){return Vm(lp(t)).left+Kk(t).scrollLeft}function Xb(t){if("html"===ap(t))return t;var n=t.assignedSlot||t.parentNode||Ise(t)&&t.host||lp(t);return Ise(n)?n.host:n}function jse(t){var n=Xb(t);return r4(n)?n.ownerDocument.body:ch(n)&&Jk(n)?n:jse(n)}function Yb(t,n){var e;void 0===n&&(n=[]);var i=jse(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=kc(i);return r?n.concat(o,o.visualViewport||[],Jk(i)?i:[]):n.concat(i,Yb(i))}function Pse(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=kc(l),d=lp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=i4();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=lp(t),c=lp(l),u=Kk(l),h=qb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=qb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Ose(l),m=-u.scrollTop,"rtl"===lh(d).direction&&(p+=qb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=Vm(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ch(l)?m0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ze({},n);if(i4()){var o,s,a=kc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return QO(i)}function Lse(t,n){return ch(t)&&"fixed"!==lh(t).position?n?n(t):t.offsetParent:null}function Rse(t,n){for(var e=kc(t),i=Lse(t,n);i&&$We(i)&&"static"===lh(i).position;)i=Lse(i,n);return i&&("html"===ap(i)||"body"===ap(i)&&"static"===lh(i).position&&!n4(i))?e:i||function(r){for(var o=Xb(r);ch(o)&&!r4(o);){if(n4(o))return o;o=Xb(o)}return null}(t)||e}function BWe(t,n,e){var i=ch(n),r=lp(n),o=Vm(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==ap(n)||Jk(r))&&(s=Kk(n)),ch(n)){var l=Vm(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Ose(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var VWe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=Yb(c).filter(function(y){return td(y)&&"body"!==ap(y)}),f=null,p="fixed"===lh(c).position,m=p?Xb(c):c;td(m)&&!r4(m);){var g=lh(m),v=n4(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=Xb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(si(o),[i]),l=s.reduce(function(c,u){var d=Pse(n,u,r);return c.top=qb(d.top,c.top),c.right=Tse(d.right,c.right),c.bottom=Tse(d.bottom,c.bottom),c.left=qb(d.left,c.left),c},Pse(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ch(e),o=lp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==ap(e)||Jk(o))&&(s=Kk(e)),ch(e))){var c=Vm(e);a=m0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return ch(t)?Ese(t):t.getBoundingClientRect()},getOffsetParent:Rse,getDocumentElement:lp,getScale:m0,getElementRects:function(t){var n=this;return Zi(vn().mark(function e(){var i,r,o,s,a;return vn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Rse,a=n.getDimensions,l.t0=BWe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ze,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===lh(t).direction}};function UWe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==bn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function GWe(t){return o4.apply(this,arguments)}function o4(){return o4=Zi(vn().mark(function t(n){var e,i,r,o,s;return vn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==bn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),o4.apply(this,arguments)}function WWe(t){pi(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function qWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","0 0 20 20"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var XWe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,qWe,ys,{},WWe),r}return Se(e)}();function YWe(t){pi(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function JWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","-2 -2 50 50"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"role","presentation"),P(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var Qk=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,JWe,ys,{},YWe),r}return Se(e)}();function KWe(t){pi(t,"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 QWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("circle"),"class","circle_path svelte-1p3nqvd"),P(e,"cx","50"),P(e,"cy","50"),P(e,"r","20"),P(e,"fill","none"),P(e,"stroke","currentColor"),P(e,"stroke-width","5"),P(e,"stroke-miterlimit","10"),P(n,"class","loading svelte-1p3nqvd"),P(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var ZWe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,QWe,ys,{},KWe),r}return Se(e)}();function eqe(t){pi(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var tqe=function(t){return{value:8&t[0]}},$se=function(t){return{value:t[3]}},nqe=function(t){return{listOpen:64&t[0]}},Bse=function(t){return{listOpen:t[6]}},iqe=function(t){return{}},Vse=function(t){return{}},rqe=function(t){return{}},Hse=function(t){return{}},oqe=function(t){return{selection:8&t[0]}},zse=function(t){return{selection:t[3]}};function Use(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var sqe=function(t){return{}},Gse=function(t){return{}},aqe=function(t){return{selection:8&t[0]}},Wse=function(t){return{selection:t[127],index:t[129]}},lqe=function(t){return{}},qse=function(t){return{}},cqe=function(t){return{}},Xse=function(t){return{}};function Yse(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var uqe=function(t){return{item:16777216&t[0]}},Jse=function(t){return{item:t[127],index:t[129]}},dqe=function(t){return{filteredItems:16777216&t[0]}},Kse=function(t){return{filteredItems:t[24]}};function Qse(t){var n,e,i,r,o,s,a=[pqe,fqe,hqe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=be("div"),i&&i.c(),P(n,"class","svelte-select-list svelte-tyxmms"),Mt(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[_a(t[49].call(null,n)),Nt(n,"scroll",t[41]),Nt(n,"pointerdown",Jh(t[50])),Nt(n,"pointerup",Kh(Jh(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&($t(),ce(l[h],1,1,function(){l[h]=null}),Bt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),Q(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Mt(n,"prefloat",u[28])},i:function(u){r||(Q(i),r=!0)},o:function(u){ce(i),r=!1},d:function(u){u&&je(n),~e&&l[e].d(),t[91](null),o=!1,ho(s)}}}function hqe(t){var n,e,i=t[83].empty,r=Ms(i,t,t[82],Xse),o=r||{c:function(){(e=be("div")).textContent="No options",P(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:Lt,d:function(s){s&&je(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Fs(r,i,s,s[82],n?Is(i,s[82],a,cqe):Ns(s[82]),Xse)},i:function(s){n||(Q(o,s),n=!0)},o:function(s){ce(o,s),n=!1},d:function(s){o&&o.d(s)}}}function fqe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Qe,Jn)}:Dn,hi=n.debounceWait,di=void 0===hi?300:hi,kr=n.hideEmptyState,Qr=void 0!==kr&&kr,gi=n.inputAttributes,yr=void 0===gi?{}:gi,Ee=n.listAutoWidth,St=void 0===Ee||Ee,Ht=n.showChevron,sn=void 0!==Ht&&Ht,hn=n.listOffset,ri=void 0===hn?5:hn,Oi=n.hoverItemIndex,Bn=void 0===Oi?0:Oi,ei=n.floatingConfig,Yn=void 0===ei?{}:ei,br=n.class,Ar=void 0===br?"":br;function Po(Qe){var Jn=[],er={};Qe.forEach(function(wd){var Br=$r(wd);Jn.includes(Br)||(Jn.push(Br),er[Br]=[],Br&&er[Br].push(Object.assign(Js(Br,wd),{id:Br,groupHeader:!0,selectable:Wr}))),er[Br].push(Object.assign({groupItem:!!Br},wd))});var Qs=[];return Or(Jn).forEach(function(wd){er[wd]&&Qs.push.apply(Qs,si(er[wd]))}),Qs}function ca(){var Qe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,Bn=Qe<0?0:Qe),!Jn&&$r&&c[Bn]&&!c[Bn].selectable&&wo(1)}function md(){var Qe=!0;if(B){var Jn=[],er=[];B.forEach(function(Qs){Jn.includes(Qs[Nn])?Qe=!1:(Jn.push(Qs[Nn]),er.push(Qs))}),Qe||e(3,B=er)}return Qe}function hu(Qe){var Jn=Qe?Qe[Nn]:B[Nn];return _n.find(function(er){return er[Nn]===Jn})}function ua(Qe){return Rl.apply(this,arguments)}function Rl(){return(Rl=Zi(vn().mark(function Qe(Jn){var er;return vn().wrap(function(Qs){for(;;)switch(Qs.prev=Qs.next){case 0:er=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==er})),$("clear",er);case 3:case"end":return Qs.stop()}},Qe)}))).apply(this,arguments)}function gd(Qe){var Jn;ze&&N===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Qe&&$("focus",Qe),N.focus(),e(2,ze=!0))}function Ps(Qe){return vd.apply(this,arguments)}function vd(){return(vd=Zi(vn().mark(function Qe(Jn){return vn().wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!fi&&!z_){er.next=2;break}return er.abrupt("return");case 2:(Ue||ze)&&($("blur",Jn),yd(),e(2,ze=!1),e(26,f=void 0),N.blur());case 3:case"end":return er.stop()}},Qe)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Zi(vn().mark(function Qe(){return vn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Qe)})),Tv().$$.before_update.push(y),Wc(function(){Ue&&e(2,ze=!0),ze&&N&&N.focus()});var an,eT=n.ariaValues,Ce=void 0===eT?function(Qe){return"Option ".concat(Qe,", selected.")}:eT,lt=n.ariaListOpen,It=void 0===lt?function(Qe,Jn){return"You are currently focused on option ".concat(Qe,". There are ").concat(Jn," results available.")}:lt,Jt=n.ariaFocused,nn=void 0===Jt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Jt,Vn=null;function li(){clearTimeout(an),an=setTimeout(function(){fi=!1},100)}Hu(function(){var Qe;null===(Qe=Vn)||void 0===Qe||Qe.remove()});var fi=!1;function Lo(Qe){Qe&&!1!==Qe.selectable&&function(Jn){if(Jn){e(4,ie="");var er=Object.assign({},Jn);if(er.groupHeader&&!er.selectable)return;e(3,B=V?B?B.concat([er]):[er]:e(3,B=er)),setTimeout(function(){qr&&yd(),e(26,f=void 0),$("change",B),$("select",Jn)})}}(Qe)}function Ls(Qe){fi||e(7,Bn=Qe)}function Zo(Qe){var Qs,Jn=Qe.item,er=Qe.i;if(!1!==Jn?.selectable){if(B&&!V&&B[Nn]===Jn[Nn])return yd();((Qs=Jn).groupHeader&&Qs.selectable||Qs.selectable||!Qs.hasOwnProperty("selectable"))&&(e(7,Bn=er),Lo(Jn)),z_=!1}}function wo(Qe){if(0===c.filter(function(er){return!Object.hasOwn(er,"selectable")||!0===er.selectable}).length)return e(7,Bn=0);e(7,Qe>0&&Bn===c.length-1?Bn=0:Qe<0&&0===Bn?Bn=c.length-1:Bn+=Qe);var Jn=c[Bn];Jn&&!1===Jn.selectable&&(1!==Qe&&-1!==Qe||wo(Qe))}var $l=bd,wh=bd;function bd(Qe){return{update:function(Jn){Jn.scroll&&(li(),Qe.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Mr={strategy:"absolute",placement:"bottom-start",middleware:[PWe(ri),jWe(),RWe()],autoUpdate:!1},tc=Un(function zWe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ze(Ze(Ze({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ze({platform:VWe},d),p=Ze(Ze({},f.platform),{},{_c:h}),EWe(c,u,Ze(Ze({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function HWe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(si(td(t)?Yb(t):t.contextElement?Yb(t.contextElement):[]),si(Yb(n))):[];p.forEach(function(_){f&&_.addEventListener("scroll",e,{passive:!0}),l&&_.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?Vm(t):null;return h&&function _(){var C=Vm(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(_)}(),e(),function(){var _;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(_=g)||_.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Mr),3),fu=tc[0],_d=tc[1],Ch=tc[2],xd=!0,z_=!1;return t.$$set=function(Qe){"justValue"in Qe&&e(53,R=Qe.justValue),"filter"in Qe&&e(54,U=Qe.filter),"getItems"in Qe&&e(55,re=Qe.getItems),"id"in Qe&&e(56,X=Qe.id),"name"in Qe&&e(8,H=Qe.name),"container"in Qe&&e(0,E=Qe.container),"input"in Qe&&e(1,N=Qe.input),"multiple"in Qe&&e(9,V=Qe.multiple),"multiFullItemClearable"in Qe&&e(10,fe=Qe.multiFullItemClearable),"disabled"in Qe&&e(11,xe=Qe.disabled),"focused"in Qe&&e(2,ze=Qe.focused),"value"in Qe&&e(3,B=Qe.value),"filterText"in Qe&&e(4,ie=Qe.filterText),"placeholder"in Qe&&e(57,Ye=Qe.placeholder),"placeholderAlwaysShow"in Qe&&e(58,_t=Qe.placeholderAlwaysShow),"items"in Qe&&e(52,_n=Qe.items),"label"in Qe&&e(12,on=Qe.label),"itemFilter"in Qe&&e(59,pn=Qe.itemFilter),"groupBy"in Qe&&e(60,$r=Qe.groupBy),"groupFilter"in Qe&&e(61,Or=Qe.groupFilter),"groupHeaderSelectable"in Qe&&e(62,Wr=Qe.groupHeaderSelectable),"itemId"in Qe&&e(13,Nn=Qe.itemId),"loadOptions"in Qe&&e(63,ui=Qe.loadOptions),"containerStyles"in Qe&&e(14,Cr=Qe.containerStyles),"hasError"in Qe&&e(15,Qo=Qe.hasError),"filterSelectedItems"in Qe&&e(64,On=Qe.filterSelectedItems),"required"in Qe&&e(16,bi=Qe.required),"closeListOnChange"in Qe&&e(65,qr=Qe.closeListOnChange),"createGroupHeaderItem"in Qe&&e(66,Js=Qe.createGroupHeaderItem),"searchable"in Qe&&e(17,Ks=Qe.searchable),"inputStyles"in Qe&&e(18,Xa=Qe.inputStyles),"clearable"in Qe&&e(68,we=Qe.clearable),"loading"in Qe&&e(5,qe=Qe.loading),"listOpen"in Qe&&e(6,Ue=Qe.listOpen),"debounce"in Qe&&e(69,ii=Qe.debounce),"debounceWait"in Qe&&e(70,di=Qe.debounceWait),"hideEmptyState"in Qe&&e(19,Qr=Qe.hideEmptyState),"inputAttributes"in Qe&&e(71,yr=Qe.inputAttributes),"listAutoWidth"in Qe&&e(72,St=Qe.listAutoWidth),"showChevron"in Qe&&e(20,sn=Qe.showChevron),"listOffset"in Qe&&e(73,ri=Qe.listOffset),"hoverItemIndex"in Qe&&e(7,Bn=Qe.hoverItemIndex),"floatingConfig"in Qe&&e(74,Yn=Qe.floatingConfig),"class"in Qe&&e(21,Ar=Qe.class),"ariaValues"in Qe&&e(75,Ce=Qe.ariaValues),"ariaListOpen"in Qe&&e(76,It=Qe.ariaListOpen),"ariaFocused"in Qe&&e(77,nn=Qe.ariaFocused),"$$scope"in Qe&&e(82,S=Qe.$$scope)},t.$$.update=function(){var Qe,Jn,er,Qs,wd,Br;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var Br,Zs=(_n||[]).find(function(pu){return pu[Nn]===B});e(3,B=Zs||(ql(Br={},Nn,B),ql(Br,"label",B),Br))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(pu){return"string"==typeof pu?{value:pu,label:pu}:pu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!yr&&Ks||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},yr)),X&&e(27,v.id=X,v),Ks||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=si(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&$("input",B):p&&JSON.stringify(B[Nn])===JSON.stringify(p[Nn])||$("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&$("input",B),6&t.$$.dirty[0]&&!ze&&N&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ui||0!==ie.length)&&(ui?ii(Zi(vn().mark(function Br(){var Zs;return vn().wrap(function(pu){for(;;)switch(pu.prev=pu.next){case 0:return e(5,qe=!0),pu.next=3,re({dispatch:$,loadOptions:ui,convertStringItemsToObjects:lae,filterText:ie});case 3:(Zs=pu.sent)?(e(5,qe=Zs.loading),e(6,Ue=Ue?Zs.listOpen:ie.length>0),e(2,ze=Ue&&Zs.focused),e(52,_n=$r?Po(Zs.filteredItems):Zs.filteredItems)):(e(5,qe=!1),e(2,ze=!0),e(6,Ue=!0));case 5:case"end":return pu.stop()}},Br)})),di):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=U({loadOptions:ui,filterText:ie,items:_n,multiple:V,value:B,itemId:Nn,groupBy:$r,label:on,filterSelectedItems:On,itemFilter:pn,convertStringItemsToObjects:lae,filterGroupedItems:Po})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Qe=c.findIndex(function(Br){return Br[Nn]===B[Nn]}),ca(Qe,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,Bn=0),16&t.$$.dirty[0]&&ie&&e(7,Bn=0),128&t.$$.dirty[0]&&$("hoverItem",Bn),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&we&&!xe&&!qe),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=_t&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(er=V&&B.length>0?B.map(function(Br){return Br[on]}).join(", "):B[on],Ce(er)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Br=c[Bn];return Ue&&Br?It(Br[on],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(Br=_n)&&0!==Br.length&&!Br.some(function(Zs){return"object"!==bn(Zs)})&&B&&(V?!B.some(function(Zs){return!Zs||!Zs[Nn]}):B[Nn])&&(Array.isArray(B)?e(3,B=B.map(function(Zs){return hu(Zs)||Zs})):e(3,B=hu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(Br){return Br[Nn]}):null:B&&B[Nn]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||$("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&ca(),16777216&t.$$.dirty[0]&&function(Br){Ue&&$("filter",Br)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Qs=Yn)||void 0===Qs?void 0:Qs.autoUpdate)&&e(81,Mr.autoUpdate=!0,Mr),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Yn&&Ch(Object.assign(Mr,Yn)),8388608&t.$$.dirty[0]&&e(30,u=!!Vn),8388672&t.$$.dirty[0]&&function(Br,Zs){if(!Br||!Zs)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Vn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Vn&&(wd=E.getBoundingClientRect().width,e(23,Vn.style.width=St?wd+"px":"auto",Vn)),128&t.$$.dirty[0]&&e(29,d=Bn),70&t.$$.dirty[0]&&N&&Ue&&!ze&&gd()},[E,N,ze,B,ie,qe,Ue,Bn,H,V,fe,xe,on,Nn,Cr,Qo,bi,Ks,Xa,Qr,sn,Ar,function(){$("clear",B),e(3,B=void 0),yd(),gd()},Vn,c,i,f,v,xd,d,u,l,a,s,o,r,ua,function(Qe){if(ze)switch(Qe.stopPropagation(),Qe.key){case"Escape":Qe.preventDefault(),yd();break;case"Enter":if(Qe.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[Nn]===c[Bn][Nn]){yd();break}Lo(c[Bn])}break;case"ArrowDown":Qe.preventDefault(),Ue?wo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Qe.preventDefault(),Ue?wo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&ze){if(0===c.length||B&&B[Nn]===c[Bn][Nn])return yd();Qe.preventDefault(),Lo(c[Bn]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(ua(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(X){return{value:X,label:X}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],z=null!==(i=M)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?Lb(M.filter.path):null,U=null!==(o=M)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?G.find(function(X){var Z;return X.value===(null===(Z=M.filter)||void 0===Z?void 0:Z.relation)}):null,q=(null===(a=M)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",re=null!==(c=M)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?Lb(M.sort.path):null,L=null!==(d=M)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(X){var Z;return X.value===(null===(Z=M.sort)||void 0===Z?void 0:Z.direction)}):null;return t.$$set=function(X){"json"in X&&e(11,C=X.json),"queryOptions"in X&&e(10,M=X.queryOptions),"onChange"in X&&e(12,$=X.onChange)},t.$$.update=function(){var X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne,ie,Ie,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?CO(C):[]),34816&t.$$.dirty&&e(13,m=f?CO(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(Lb)),8192&t.$$.dirty&&e(6,v=m?m.map(Lb):[]),1088&t.$$.dirty&&e(5,y=null!==(X=M)&&void 0!==X&&null!==(Z=X.projection)&&void 0!==Z&&Z.paths&&v?M.projection.paths.map(function(ie){return v.find(function(Ie){return or(Ie.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(he=(null===(H=z)||void 0===H?void 0:H.value)||null,or(null===(E=M)||void 0===E||null===(F=E.filter)||void 0===F?void 0:F.path,he)||(_("changeFilterPath",he),e(10,M=qu(M,["filter","path"],he,!0)),$(M))),2&t.$$.dirty&&(Y=(null===(N=U)||void 0===N?void 0:N.value)||null,or(null===(V=M)||void 0===V||null===(oe=V.filter)||void 0===oe?void 0:oe.relation,Y)||(_("changeFilterRelation",Y),e(10,M=qu(M,["filter","relation"],Y,!0)),$(M))),4&t.$$.dirty&&(or(null===(Fe=M)||void 0===Fe||null===(xe=Fe.filter)||void 0===xe?void 0:xe.value,fe=q||null)||(_("changeFilterValue",fe),e(10,M=qu(M,["filter","value"],fe,!0)),$(M))),8&t.$$.dirty&&(ie=(null===(tt=re)||void 0===tt?void 0:tt.value)||null,or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.sort)||void 0===Ye?void 0:Ye.path,ie)||(_("changeSortPath",ie),e(10,M=qu(M,["sort","path"],ie,!0)),$(M))),16&t.$$.dirty&&(ot=(null===(ze=L)||void 0===ze?void 0:ze.value)||null,or(null===(B=M)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,ot)||(_("changeSortDirection",ot),e(10,M=qu(M,["sort","direction"],ot,!0)),$(M))),32&t.$$.dirty&&function(ie){var Ie,Ye;or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.projection)||void 0===Ye?void 0:Ye.paths,ie)||(_("changeProjectionPaths",ie),e(10,M=qu(M,["projection","paths"],ie,!0)),$(M))}(y?y.map(function(ie){return ie.value}):null)},[z,U,q,re,L,y,v,g,G,R,M,C,$,m,p,f,function(X){e(0,z=X)},function(X){e(1,U=X)},function(){e(2,q=this.value)},function(X){e(3,re=X)},function(X){e(4,L=X)},function(X){e(5,y=X),e(10,M),e(6,v),e(13,m),e(15,f),e(11,C)}]}var wqe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,xqe,_qe,Ei,{json:11,queryOptions:10,onChange:12},bqe),r}return Se(e)}();function Cqe(t){pi(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function cae(t,n,e){var i=t.slice();return i[5]=n[e],i}function kqe(t){var n,e;return n=new sr({props:{data:Bb}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Sqe(t){var n,e;return n=new sr({props:{data:$b}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function uae(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[Sqe,kqe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=be("button"),i.c(),r=it(),o=tn(d),s=it(),P(n,"type","button"),P(n,"class","jse-query-language svelte-19cxesy"),P(n,"title",a="Select ".concat(t[5].name," as query language")),Mt(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),de(n,r),de(n,o),de(n,s),l=!0,c||(u=Nt(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):($t(),ce(f[y],1,1,function(){f[y]=null}),Bt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),Q(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&P(n,"title",a),(!l||3&v)&&Mt(n,"selected",t[5].id===t[0])},i:function(g){l||(Q(i),l=!0)},o:function(g){ce(i),l=!1},d:function(g){g&&je(n),f[e].d(),c=!1,u()}}}function Dqe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&dae(t);return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),(e=be("div")).textContent="Transform",i=it(),u&&u.c(),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),de(n,e),de(n,i),u&&u.m(n,null),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Nt(o,"click",t[2]),l=!0)},p:function(d,h){var f=Un(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&Q(u,1)):((u=dae(d)).c(),Q(u,1),u.m(n,r)):u&&($t(),ce(u,1,1,function(){u=null}),Bt())},i:function(d){a||(Q(u),Q(s.$$.fragment,d),a=!0)},o:function(d){ce(u),ce(s.$$.fragment,d),a=!1},d:function(d){d&&je(n),u&&u.d(),pt(s),l=!1,c()}}}function Iqe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xa("simple-modal").close,c=xa("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Eqe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Vi[h?"unshift":"push"](function(){e(1,i=h)})}]}var Fqe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Iqe,Mqe,Ei,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Aqe),r}return Se(e)}(),s4=wa("jsoneditor:AutoScrollHandler"),Nqe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},hae=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Nqe,s=y.a11y||!1,bn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),bn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,bn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Zk=wa("jsoneditor:History");function fae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Zk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Zk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Zk("undo",h),a(),h}},redo:function d(){if(o())return Zk("redo",e[i-=1]),a(),e[i]}}}function g0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var v0=wa("validation");function pae(t,n,e,i){return v0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Oqe(t,n,e,i){if(v0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Xd.info}]};if(0===t.length)return null;try{var r=g0(function(){return e.parse(t)},function(l){return v0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:g0(function(){return i.parse(t)},function(l){return v0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=g0(function(){return n(o)},function(l){return v0("validate: validated json in ".concat(l," ms"))});return Hi(s)?null:{validationErrors:s}}catch(l){var a=g0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yd(c)),!0}catch{return!1}}(t,e)},function(c){return v0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:Fk(t,l.message||l.toString()),isRepairable:a}}}var eS=wa("jsoneditor:FocusTracker");function a4(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(eS("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){eS("blur"),l=!1,a()}))}(0,t.onMount)(function(){eS("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){eS("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function jqe(t){pi(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function mae(t,n,e){var i=t.slice();return i[8]=n[e],i}function gae(t){var n,e;return n=new sr({props:{data:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function vae(t){var n,e;return n=new sr({props:{data:t[8].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function yae(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&vae(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=be("button"),d&&d.c(),e=it(),i=tn(u),r=it(),P(n,"type","button"),P(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),P(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),de(n,e),de(n,i),de(n,r),a=!0,l||(c=[Nt(n,"click",h),Nt(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&Q(d,1)):((d=vae(t)).c(),Q(d,1),d.m(n,e)):d&&($t(),ce(d,1,1,function(){d=null}),Bt()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&P(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(Q(d),a=!0)},o:function(p){ce(d),a=!1},d:function(p){p&&je(n),d&&d.d(),l=!1,ho(c)}}}function Pqe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&gae(t),f=t[3],p=[],m=0;m100&&Cae(t);return{c:function(){n=be("table"),e=be("tbody");for(var u=0;u100?c?c.p(u,d):((c=Cae(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&xae(t);function y(){return t[6](t[7])}return{c:function(){n=be("tr"),e=be("td"),mt(i.$$.fragment),r=it(),o=be("td"),s=tn(m),a=it(),l=be("td"),c=tn(g),u=it(),d=be("td"),v&&v.c(),P(e,"class","jse-validation-error-icon svelte-1oe8e8r"),P(o,"class","svelte-1oe8e8r"),P(l,"class","svelte-1oe8e8r"),P(d,"class","jse-validation-error-action svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(_,C){Pe(_,n,C),de(n,e),ft(i,e,null),de(n,r),de(n,o),de(o,s),de(n,a),de(n,l),de(l,c),de(n,u),de(n,d),v&&v.m(d,null),h=!0,f||(p=Nt(n,"click",y),f=!0)},p:function(_,C){t=_,(!h||1&C)&&m!==(m=tu(Kl(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&Q(v,1)):((v=xae(t)).c(),Q(v,1),v.m(d,null)):v&&($t(),ce(v,1,1,function(){v=null}),Bt())},i:function(_){h||(Q(i.$$.fragment,_),Q(v),h=!0)},o:function(_){ce(i.$$.fragment,_),ce(v),h=!1},d:function(_){_&&je(n),pt(i),v&&v.d(),f=!1,p()}}}function Cae(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=be("tr"),e=be("td"),i=it(),r=be("td"),o=it(),s=be("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=it(),d=be("td"),P(e,"class","svelte-1oe8e8r"),P(r,"class","svelte-1oe8e8r"),P(s,"class","svelte-1oe8e8r"),P(d,"class","svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(n,u),de(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&je(n)}}}function Vqe(t){var n,e,i=!Hi(t[0]),r=i&&_ae(t);return{c:function(){r&&r.c(),n=_r()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=Un(s,1)[0];1&a&&(i=!Hi(o[0])),i?r?(r.p(o,a),1&a&&Q(r,1)):((r=_ae(o)).c(),Q(r,1),r.m(n.parentNode,n)):r&&($t(),ce(r,1,1,function(){r=null}),Bt())},i:function(o){e||(Q(r),e=!0)},o:function(o){ce(r),e=!1},d:function(o){r&&r.d(o),o&&je(n)}}}function Hqe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var l4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Hqe,Vqe,Ei,{validationErrors:0,selectError:1},Rqe),r}return Se(e)}(),zqe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Uqe(t){pi(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function Gqe(t){var n,e,i,r,o,s,a,l,c;return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),e=be("div"),i=tn(t[0]),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),de(n,e),de(e,i),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Nt(o,"click",t[3]),l=!0)},p:function(u,d){var h=Un(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(Q(s.$$.fragment,u),a=!0)},o:function(u){ce(s.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(s),l=!1,c()}}}function Wqe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xa("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var c4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wqe,Gqe,Ei,{title:0,onClose:1},Uqe),r}return Se(e)}();function qqe(t){pi(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function Xqe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G;return e=new c4({props:{title:"Copying and pasting"}}),{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).textContent="These actions are unavailable via the menu. Please use:",s=it(),a=be("div"),l=be("div"),(c=be("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=it(),h=be("div"),(f=be("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=it(),g=be("div"),(v=be("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),_=it(),C=be("div"),(S=be("button")).textContent="Close",P(c,"class","jse-key svelte-1olothd"),P(l,"class","jse-shortcut"),P(f,"class","jse-key svelte-1olothd"),P(h,"class","jse-shortcut"),P(v,"class","jse-key svelte-1olothd"),P(g,"class","jse-shortcut"),P(a,"class","jse-shortcuts svelte-1olothd"),P(S,"type","button"),P(S,"class","jse-primary svelte-1olothd"),P(C,"class","jse-actions svelte-1olothd"),P(r,"class","jse-modal-contents svelte-1olothd"),P(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(a,l),de(l,c),de(l,u),de(a,d),de(a,h),de(h,f),de(h,p),de(a,m),de(a,g),de(g,v),de(g,y),de(r,_),de(r,C),de(C,S),M=!0,$||(G=Nt(S,"click",t[0]),$=!0)},p:Lt,i:function(R){M||(Q(e.$$.fragment,R),M=!0)},o:function(R){ce(e.$$.fragment,R),M=!1},d:function(R){R&&je(n),pt(e),$=!1,G()}}}function Yqe(t){return[xa("simple-modal").close,zqe?"\u2318":"Ctrl"]}var kae=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Yqe,Xqe,Ei,{},qqe),r}return Se(e)}();function Sae(t){return!!t&&("space"===t.type||!0===t.space)}function tS(t){return!!t&&("separator"===t.type||!0===t.separator)}function Jb(t){return!!t&&"function"==typeof t.onClick}function u4(t){return!!t&&"dropdown-button"===t.type&&Jb(t.main)&&Array.isArray(t.items)}function Dae(t){return Io(t)&&Io(t.parseError)}function Kqe(t){pi(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var Qqe=function(t){return{}},Tae=function(t){return{}};function Eae(t,n,e){var i=t.slice();return i[3]=n[e],i}var Zqe=function(t){return{}},Aae=function(t){return{}};function eXe(t){var n,e=Nae(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Nae(i[3])+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function tXe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Mae(t),u=t[3].text&&Iae(t);return{c:function(){n=be("button"),c&&c.c(),e=it(),u&&u.c(),P(n,"type","button"),P(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),P(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),de(n,e),u&&u.m(n,null),s=!0,a||(l=Nt(n,"click",function(){ba(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&Q(c,1)):((c=Mae(t)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),t[3].text?u?u.p(t,h):((u=Iae(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&P(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&P(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(Q(c),s=!0)},o:function(d){ce(c),s=!1},d:function(d){d&&je(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function nXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function iXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Mae(t){var n,e;return n=new sr({props:{data:t[3].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Iae(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&je(n)}}}function Fae(t){var n,e,i,r,o,s,a,l=[iXe,nXe,tXe,eXe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!tS(d[3])),n?0:(null==e&&(e=!!Sae(d[3])),e?1:(null==i&&(i=!!Jb(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=_r()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(d){a||(Q(o),a=!0)},o:function(d){ce(o),a=!1},d:function(d){c[r].d(d),d&&je(s)}}}function rXe(t){for(var n,e,i,r,o=t[2].left,s=Ms(o,t,t[1],Aae),a=t[0],l=[],c=0;c0&&_.height>0}),u),c=u(e);function u(y){var _=y.getBoundingClientRect();return{x:_.left+_.width/2,y:_.top+_.height/2,rect:_,element:y}}function d(y,_){var S=y.x-_.x,M=(y.y-_.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(S*S+M*M)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(Xv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(Xv(g.filter(function(y){return o(y.element)}),h)||Xv(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Vi[a?"unshift":"push"](function(){e(2,i=a)})}]}var Jae=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,GXe,UXe,Ei,{items:0,tip:1},EXe),r}return Se(e)}();function WXe(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qXe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$=n.json,G=n.documentState,R=n.parser,z=n.showTip,U=n.onCloseContextMenu,q=n.onEditKey,re=n.onEditValue,L=n.onToggleEnforceString,X=n.onCut,Z=n.onCopy,H=n.onPaste,he=n.onRemove,E=n.onDuplicate,F=n.onExtract,N=n.onInsertBefore,Y=n.onInsert,V=n.onConvert,oe=n.onInsertAfter,fe=n.onSort,Fe=n.onTransform;function xe(){U(),q()}function tt(){U(),re()}function ze(){U(),L()}function ot(){U(),X(!0)}function B(){U(),X(!1)}function ne(){U(),Z(!0)}function ie(){U(),Z(!1)}function Ie(){U(),H()}function Ye(){U(),he()}function Le(){U(),E()}function _t(){U(),F()}function At(pn){U(),c?V(pn):Y(pn)}function _n(){U(),fe()}function ci(){U(),Fe()}function on(){U(),N()}function Fi(){U(),oe()}return t.$$set=function(pn){"json"in pn&&e(2,$=pn.json),"documentState"in pn&&e(3,G=pn.documentState),"parser"in pn&&e(4,R=pn.parser),"showTip"in pn&&e(0,z=pn.showTip),"onCloseContextMenu"in pn&&e(5,U=pn.onCloseContextMenu),"onEditKey"in pn&&e(6,q=pn.onEditKey),"onEditValue"in pn&&e(7,re=pn.onEditValue),"onToggleEnforceString"in pn&&e(8,L=pn.onToggleEnforceString),"onCut"in pn&&e(9,X=pn.onCut),"onCopy"in pn&&e(10,Z=pn.onCopy),"onPaste"in pn&&e(11,H=pn.onPaste),"onRemove"in pn&&e(12,he=pn.onRemove),"onDuplicate"in pn&&e(13,E=pn.onDuplicate),"onExtract"in pn&&e(14,F=pn.onExtract),"onInsertBefore"in pn&&e(15,N=pn.onInsertBefore),"onInsert"in pn&&e(16,Y=pn.onInsert),"onConvert"in pn&&e(17,V=pn.onConvert),"onInsertAfter"in pn&&e(18,oe=pn.onInsertAfter),"onSort"in pn&&e(19,fe=pn.onSort),"onTransform"in pn&&e(20,Fe=pn.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=G.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==$),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Hi(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn($,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Io(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Fr(i)||xs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Fr(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&zb(i)&&!s&&!Array.isArray(Sn($,Xi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&zb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!Ho(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?Lm(i)&&!Io(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,_=m?Lm(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?Lm(i)&&Ho(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,S=null!=i&&lf(a,G.enforceStringMap,ln(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,M=[{type:"row",items:[{type:"button",onClick:xe,icon:h0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:tt,icon:h0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:h0,text:l,title:"Edit the value (Double-click on the value)",onClick:tt,disabled:!f},{type:"button",icon:S?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:ze,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:ot,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:ot,disabled:!c},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Ie,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:Le,icon:wse,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:_t,icon:wWe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_n,icon:Gk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:ci,icon:Hk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return At("structure")},icon:m?Uk:f0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return At("object")},icon:m?Uk:f0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return At("array")},icon:m?Uk:f0,text:"Array",title:g+" array",disabled:!_},{type:"button",onClick:function(){return At("value")},icon:m?Uk:f0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:on,icon:_We,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Fi,icon:vWe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[z,M,$,G,R,U,q,re,L,X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,s,c,C,g,m,_,y,v,d,u,o,p,S,f,l,h,i,a,r]}var XXe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,qXe,WXe,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function YXe(t){pi(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Kae(t,n,e){var i=t.slice();return i[13]=n[e],i}function Qae(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=be("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=it(),P(n,"type","button"),P(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=Nt(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&je(n),a=!1,l()}}}function JXe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&_.end<=M.start)&&$.push(_),M.start>=(G?_.end:v.end)&&$.push(M),a=$))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var ZXe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QXe,JXe,Ei,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},YXe),r}return Se(e)}();function eYe(t){pi(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function tYe(t){var n,e,i,r,o;return e=new sr({props:{data:ru}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-context-menu-pointer svelte-1yzl4st"),P(n,"title",xF),Mt(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Nt(n,"click",t[1]),r=!0)},p:function(s,a){var l=Un(a,1)[0];(!i||1&l)&&Mt(n,"jse-selected",s[0])},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nYe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var cp=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,nYe,tYe,Ei,{selected:0,onContextMenu:2},eYe),r}return Se(e)}();function iYe(t){pi(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function rYe(t){var n,e,i,r,o,s,a,l=[aYe,sYe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=be("div"),i.c(),P(n,"data-type","selectable-key"),P(n,"class",r=Ao(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=Nt(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),Q(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Ao(d[6](d[0]))+" svelte-24a1b2"))&&P(n,"class",r)},i:function(d){o||(Q(i),o=!0)},o:function(d){ce(i),o=!1},d:function(d){d&&je(n),c[e].d(),s=!1,a()}}}function oYe(t){var n,e;return n=new tse({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function sYe(t){var n,e=jm(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=jm(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function aYe(t){var n,e;return n=new pse({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ele(t){var n,e;return n=new cp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function lYe(t){var n,e,i,r,o,s=[oYe,rYe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&ele(t);return{c:function(){e.c(),i=it(),c&&c.c(),r=_r()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=Un(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):($t(),ce(a[f],1,1,function(){a[f]=null}),Bt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),Q(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&($t(),ce(c,1,1,function(){c=null}),Bt()):c?(c.p(u,h),28&h&&Q(c,1)):((c=ele(u)).c(),Q(c,1),c.m(r.parentNode,r))},i:function(u){o||(Q(e),Q(c),o=!0)},o:function(u){ce(e),ce(c),o=!1},d:function(u){a[n].d(u),u&&je(i),c&&c.d(u),u&&je(r)}}}function cYe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&xs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&ip(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(iu(o,!0)))},function(h){return ah("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=Xi(o).concat(p);d.onSelect(f===CF?mr(m,!1):iu(m,!1)),f!==wF&&d.focus()},function(){d.onSelect(iu(o,!1)),d.focus()},o,s,l,u]}var uYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cYe,lYe,Ei,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},iYe),r}return Se(e)}();function tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function nle(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=$k(u.selection),v=f.findIndex(function(z){return or(z.path,g)}),y=0,_=v,C=function(){var z;return null===(z=f[_+1])||void 0===z?void 0:z.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),_+=1;var M=Sn(h,Xi(g)),$=Array.isArray(M),G=null===(d=f[$?_:_+1])||void 0===d?void 0:d.path,R=_-v;return G?{beforePath:G,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,_,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=Xi(d.focusPath),g=Sn(u,m);if(!(p||f&&l0(f,m)&&f.length>m.length))return[];var v=o0(d),y=$k(d),_=Ln(v),C=Ln(y),S=f?f[m.length]:void 0;if(!Mo(g)){if(oo(g)){var M=Ws(_),$=Ws(C),G=void 0!==S?Ws(S):g.length;return vO($-M+1,Gz?[].concat(si(R.slice(z,U+1)),si(R.slice(q,R.length))).map(function(re){return Rm(m,re)}):[].concat(si(R.slice(q,z)),si(R.slice(U+1,R.length))).map(function(re){return Rm(m,re)}):[]}(n,o,s),l=Sn(n,Xi(o0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=o0(m=u.selection),y=$k(m),_=f.findIndex(function($){return or($.path,v)}),C=f.findIndex(function($){return or($.path,y)}),Os(p,null===(d=f[_+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function uh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Iv(e,n)})}function mYe(t){pi(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function gYe(t){var n,e,i,r,o,s;return e=new sr({props:{data:$m}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=[Nt(n,"click",function(){ba(t[0])&&t[0].apply(this,arguments)}),_a(i=qO.call(null,n,Ze({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Un(l,1)[0];t=a,i&&ba(i.update)&&2&c&&i.update.call(null,Ze({text:t[1]},t[2]))},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,ho(s)}}}function vYe(t,n,e){var i,r=xa("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var _0=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vYe,gYe,ys,{validationError:3,onExpand:0},mYe),r}return Se(e)}();function yYe(t){pi(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var bYe=function(t){return{}},ile=function(t){return{}};function rle(t,n,e){var i=t.slice();return i[53]=n[e],i}var _Ye=function(t){return{}},ole=function(t){return{}};function sle(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function ale(t,n,e){var i=t.slice();return i[50]=n[e],i}var xYe=function(t){return{}},lle=function(t){return{}};function wYe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),d=t[34].identifier,h=Ms(d,t,t[35],ile),f=!t[17]&&cle();o=new pYe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:dse(t[6],t[9]),context:t[8]}});var p=u&&ule(t),m=t[15]&&dle(t),g=!t[17]&&hle(t);return{c:function(){n=be("div"),e=be("div"),h&&h.c(),i=it(),f&&f.c(),r=it(),mt(o.$$.fragment),s=it(),p&&p.c(),a=it(),m&&m.c(),l=it(),g&&g.c(),P(e,"class","jse-contents svelte-1wlxti1"),P(n,"class","jse-contents-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(v,y){Pe(v,n,y),de(n,e),h&&h.m(e,null),de(e,i),f&&f.m(e,null),de(e,r),ft(o,e,null),de(e,s),p&&p.m(e,null),de(n,a),m&&m.m(n,null),de(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Fs(h,d,v,v[35],c?Is(d,v[35],y,bYe):Ns(v[35]),ile),v[17]?f&&(f.d(1),f=null):f||((f=cle()).c(),f.m(e,r));var _={};2&y[0]&&(_.path=v[1]),1&y[0]&&(_.value=v[0]),8192&y[0]&&(_.enforceString=v[13]),65664&y[0]&&(_.selection=v[16]?v[7]:void 0),576&y[0]&&(_.searchResultItems=dse(v[6],v[9])),256&y[0]&&(_.context=v[8]),o.$set(_),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Fr(v[7]))&&!v[7].edit&&or(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&Q(p,1)):((p=ule(v)).c(),Q(p,1),p.m(e,null)):p&&($t(),ce(p,1,1,function(){p=null}),Bt()),v[15]?m?(m.p(v,y),32768&y[0]&&Q(m,1)):((m=dle(v)).c(),Q(m,1),m.m(n,l)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=hle(v)).c(),g.m(n,null)),(!c||262144&y[0])&&P(n,"style",v[18])},i:function(v){c||(Q(h,v),Q(o.$$.fragment,v),Q(p),Q(m),c=!0)},o:function(v){ce(h,v),ce(o.$$.fragment,v),ce(p),ce(m),c=!1},d:function(v){v&&je(n),h&&h.d(v),f&&f.d(),pt(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function CYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[DYe,SYe],S=[];function M(E,F){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],ole),R=!t[17]&&fle();function z(E,F){return E[12]?EYe:TYe}var U=z(t),q=U(t),re=_&&ple(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&mle(t);function X(E,F){return E[12]?MYe:E[17]?void 0:AYe}var Z=X(t),H=Z&&Z(t),he=t[12]&&gle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H&&H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(c,"class","jse-meta svelte-1wlxti1"),P(c,"data-type","selectable-value"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,F){Pe(E,n,F),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H&&H.m(n,null),Pe(E,p,F),he&&he.m(E,F),Pe(E,m,F),g=!0,v||(y=Nt(i,"click",t[21]),v=!0)},p:function(E,F){var N=r;(r=M(E))===N?S[r].p(E,F):($t(),ce(S[N],1,1,function(){S[N]=null}),Bt(),(o=S[r])?o.p(E,F):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&F[1])&&Fs(G,$,E,E[35],g?Is($,E[35],F,_Ye):Ns(E[35]),ole),E[17]?R&&(R.d(1),R=null):R||((R=fle()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,F):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&F[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Fr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,F),65922&F[0]&&Q(re,1)):((re=ple(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),36864&F[0]&&Q(L,1)):((L=mle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,F):(H&&H.d(1),(H=Z&&Z(E))&&(H.c(),H.m(n,null))),(!g||262144&F[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,F),4096&F[0]&&Q(he,1)):((he=gle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H&&H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function kYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[NYe,FYe],S=[];function M(E,F){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],lle),R=!t[17]&&_le();function z(E,F){return E[12]?jYe:OYe}var U=z(t),q=U(t),re=_&&xle(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&wle(t);function X(E,F){return E[12]?LYe:PYe}var Z=X(t),H=Z(t),he=t[12]&&Cle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(u,"data-type","selectable-value"),P(c,"class","jse-meta svelte-1wlxti1"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,F){Pe(E,n,F),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H.m(n,null),Pe(E,p,F),he&&he.m(E,F),Pe(E,m,F),g=!0,v||(y=Nt(i,"click",t[21]),v=!0)},p:function(E,F){var N=r;(r=M(E))===N?S[r].p(E,F):($t(),ce(S[N],1,1,function(){S[N]=null}),Bt(),(o=S[r])?o.p(E,F):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&F[1])&&Fs(G,$,E,E[35],g?Is($,E[35],F,xYe):Ns(E[35]),lle),E[17]?R&&(R.d(1),R=null):R||((R=_le()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,F):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&F[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Fr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,F),65922&F[0]&&Q(re,1)):((re=xle(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),36864&F[0]&&Q(L,1)):((L=wle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,F):(H.d(1),(H=Z(E))&&(H.c(),H.m(n,null))),(!g||262144&F[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,F),4096&F[0]&&Q(he,1)):((he=Cle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function cle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function ule(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function dle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hle(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function SYe(t){var n,e;return n=new sr({props:{data:rp}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function DYe(t){var n,e;return n=new sr({props:{data:ru}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function TYe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=be("div")).textContent="{",e=it(),i=be("button"),r=tn(d),o=it(),s=tn(h),a=it(),(l=be("div")).textContent="}",P(n,"class","jse-bracket svelte-1wlxti1"),P(i,"type","button"),P(i,"class","jse-tag svelte-1wlxti1"),P(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),de(i,r),de(i,o),de(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=Nt(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&je(n),f&&je(e),f&&je(i),f&&je(a),f&&je(l),c=!1,u()}}}function EYe(t){var n;return{c:function(){(n=be("div")).textContent="{",P(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function ple(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function mle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function AYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function MYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),P(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[29]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function gle(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Xs(t[7])),c=l&&vle(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=it(),p&&p.c(),P(n,"class","jse-props svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),de(n,e);for(var v=0;v]',s=it(),v&&v.c(),P(n,"class","jse-items svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(y,_){Pe(y,n,_),d&&d.m(n,null),de(n,e);for(var C=0;C=Le.start&&ne<=Le.end});if(!ie)return null;toe(ie.start,Math.min(p.length,ie.end),function(Le){return tt(String(Le))})}else Object.keys(p).forEach(tt);return xe}(S,l||wm);if(G("dragSelectionStart",{selection:S,items:N}),N){var Y=o0(S),V=N.findIndex(function(fe){return or(fe.path,Y)}),oe=f4({json:M.getJson(),documentState:M.getDocumentState(),deltaY:0,items:N}).offset;e(11,U={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:X(),selectionStartIndex:V,selectionItemsCount:Qoe(S).length,items:N,offset:oe,didMoveItems:!1}),aa.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",he)}else G("Cannot drag the current selection (probably spread over multiple sections)")}else $(E)}},function(E){aa.selecting||aa.dragging||(E.stopPropagation(),Pm(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):Pm(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):Pm(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(z))},function(E){E.stopPropagation(),z=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(cf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(uf(m)))},function(E){M.onSelect(cf(m)),M.onContextMenu(E)},function(E){M.onSelect(uf(m)),M.onContextMenu(E)},$,h,f]}var p4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,BYe,$Ye,Ei,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},yYe,[-1,-1]),r}return Se(e)}(),VYe=p4,HYe={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"]},zYe={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"]},m4={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"]},UYe={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 GYe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function WYe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,_=n.onRedo,C=n.onSort,S=n.onTransform,M=n.onContextMenu,$=n.onCopy,G=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(z){"json"in z&&e(2,u=z.json),"selection"in z&&e(3,d=z.selection),"readOnly"in z&&e(4,h=z.readOnly),"showSearch"in z&&e(1,p=z.showSearch),"historyState"in z&&e(5,m=z.historyState),"onExpandAll"in z&&e(6,g=z.onExpandAll),"onCollapseAll"in z&&e(7,v=z.onCollapseAll),"onUndo"in z&&e(8,y=z.onUndo),"onRedo"in z&&e(9,_=z.onRedo),"onSort"in z&&e(10,C=z.onSort),"onTransform"in z&&e(11,S=z.onTransform),"onContextMenu"in z&&e(12,M=z.onContextMenu),"onCopy"in z&&e(13,$=z.onCopy),"onRenderMenu"in z&&e(14,G=z.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Fr(d)||xs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:HYe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!Ho(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:zYe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!Ho(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:sp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:$,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:S,disabled:h||void 0===u},l,{type:"button",icon:bse,title:xF,className:"jse-contextmenu",onClick:M},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:_,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=G(c)||c)},[o,p,u,d,h,m,g,v,y,_,C,S,M,$,G,s,a,l,c,r,i]}var qYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,WYe,GYe,Ei,{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}),r}return Se(e)}();function XYe(t){pi(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Mle(t){var n;return{c:function(){(n=be("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',P(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function YYe(t){var n,e,i,r,o,s,a,l=!t[0]&&Mle();return{c:function(){n=be("div"),e=be("div"),i=it(),r=be("div"),o=tn("Empty document\n "),l&&l.c(),s=it(),a=be("div"),P(e,"class","jse-space jse-before svelte-1q2qkk2"),P(r,"class","jse-contents svelte-1q2qkk2"),P(a,"class","jse-space jse-after svelte-1q2qkk2"),P(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),de(n,e),de(n,i),de(n,r),de(r,o),l&&l.m(r,null),de(n,s),de(n,a)},p:function(c,u){Un(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Mle()).c(),l.m(r,null))},i:Lt,o:Lt,d:function(c){c&&je(n),l&&l.d()}}}function JYe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var KYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,JYe,YYe,Ei,{readOnly:0},XYe),r}return Se(e)}(),g4={},QYe={get exports(){return g4},set exports(t){g4=t}},Ile=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(oo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function eJe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function tJe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:ln(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Io(t))return function ZYe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*v4(u,d)});for(var s=[],a=0;aQb&&jle();return{c:function(){n=be("div");for(var d=0;dQb?u?u.p(d,f):((u=jle()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:Lt,o:Lt,d:function(d){d&&je(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return fO(0,v.length).map(String);if(Io(v)){var y=Object.keys(v).slice(0);return y.sort(v4),y}return[]},function(g){return Xc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Vi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Vi[g?"unshift":"push"](function(){e(4,o=g)})}]}var yJe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vJe,gJe,Ei,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},fJe),r}return Se(e)}();function bJe(t){pi(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function Ule(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",L=!t[4]&&Gle(t),X=[xJe,_Je],Z=[];function H(E,F){return E[2]?0:1}a=H(t),l=Z[a]=X[a](t),y=new sr({props:{data:DWe}}),S=new sr({props:{data:bWe}}),G=new sr({props:{data:p0}});var he=t[0]&&!t[4]&&Wle(t);return{c:function(){n=be("div"),e=be("form"),L&&L.c(),i=it(),r=be("div"),o=be("div"),s=be("div"),l.c(),c=it(),u=be("label"),d=be("input"),h=it(),f=be("div"),p=tn(re),m=tn(t[10]),g=it(),v=be("button"),mt(y.$$.fragment),_=it(),C=be("button"),mt(S.$$.fragment),M=it(),$=be("button"),mt(G.$$.fragment),R=it(),he&&he.c(),P(s,"class","jse-search-icon svelte-3lbrbf"),P(d,"class","jse-search-input svelte-3lbrbf"),P(d,"title","Enter text to search"),P(d,"type","text"),P(d,"placeholder","Find"),P(u,"class","jse-search-input-label svelte-3lbrbf"),P(u,"about","jse-search input"),P(f,"class","jse-search-count svelte-3lbrbf"),Mt(f,"jse-visible",""!==t[8]),P(v,"type","button"),P(v,"class","jse-search-next svelte-3lbrbf"),P(v,"title","Go to next search result (Enter)"),P(C,"type","button"),P(C,"class","jse-search-previous svelte-3lbrbf"),P(C,"title","Go to previous search result (Shift+Enter)"),P($,"type","button"),P($,"class","jse-search-clear svelte-3lbrbf"),P($,"title","Close search box (Esc)"),P(o,"class","jse-search-section svelte-3lbrbf"),P(r,"class","jse-search-contents svelte-3lbrbf"),P(e,"class","jse-search-form svelte-3lbrbf"),P(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,F){Pe(E,n,F),de(n,e),L&&L.m(e,null),de(e,i),de(e,r),de(r,o),de(o,s),Z[a].m(s,null),de(o,c),de(o,u),de(u,d),Hf(d,t[8]),de(o,h),de(o,f),de(f,p),de(f,m),de(o,g),de(o,v),ft(y,v,null),de(o,_),de(o,C),ft(S,C,null),de(o,M),de(o,$),ft(G,$,null),de(r,R),he&&he.m(r,null),z=!0,U||(q=[Nt(d,"input",t[21]),_a(CJe.call(null,d)),Nt(v,"click",t[22]),Nt(C,"click",t[23]),Nt($,"click",t[24]),Nt(e,"submit",t[12]),Nt(e,"keydown",t[13])],U=!0)},p:function(E,F){E[4]?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),16&F&&Q(L,1)):((L=Gle(E)).c(),Q(L,1),L.m(e,i));var N=a;(a=H(E))===N?Z[a].p(E,F):($t(),ce(Z[N],1,1,function(){Z[N]=null}),Bt(),(l=Z[a])?l.p(E,F):(l=Z[a]=X[a](E)).c(),Q(l,1),l.m(s,null)),256&F&&d.value!==E[8]&&Hf(d,E[8]),(!z||8&F)&&re!==(re=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,re),(!z||1024&F)&&qn(m,E[10]),(!z||256&F)&&Mt(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?he?he.p(E,F):((he=Wle(E)).c(),he.m(r,null)):he&&(he.d(1),he=null)},i:function(E){z||(Q(L),Q(l),Q(y.$$.fragment,E),Q(S.$$.fragment,E),Q(G.$$.fragment,E),z=!0)},o:function(E){ce(L),ce(l),ce(y.$$.fragment,E),ce(S.$$.fragment,E),ce(G.$$.fragment,E),z=!1},d:function(E){E&&je(n),L&&L.d(),Z[a].d(),pt(y),pt(S),pt(G),he&&he.d(),U=!1,ho(q)}}}function Gle(t){var n,e,i,r,o;return e=new sr({props:{data:t[0]?ru:rp}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-replace-toggle svelte-3lbrbf"),P(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Nt(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?ru:rp),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function _Je(t){var n,e;return n=new sr({props:{data:KO}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function xJe(t){var n,e;return n=new sr({props:{data:gWe,spin:!0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wle(t){var n,e,i,r,o,s,a,l;return{c:function(){n=be("div"),e=be("input"),i=it(),(r=be("button")).textContent="Replace",o=it(),(s=be("button")).textContent="All",P(e,"class","jse-replace-input svelte-3lbrbf"),P(e,"title","Enter replacement text"),P(e,"type","text"),P(e,"placeholder","Replace"),P(r,"type","button"),P(r,"title","Replace current occurrence (Ctrl+Enter)"),P(r,"class","svelte-3lbrbf"),P(s,"type","button"),P(s,"title","Replace all occurrences"),P(s,"class","svelte-3lbrbf"),P(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),de(n,e),Hf(e,t[9]),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=[Nt(e,"input",t[25]),Nt(r,"click",t[14]),Nt(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&Hf(e,c[9])},d:function(c){c&&je(n),a=!1,ho(l)}}}function wJe(t){var n,e,i=t[1]&&Ule(t);return{c:function(){i&&i.c(),n=_r()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=Un(o,1)[0];r[1]?i?(i.p(r,s),2&s&&Q(i,1)):((i=Ule(r)).c(),Q(i,1),i.m(n.parentNode,n)):i&&($t(),ce(i,1,1,function(){i=null}),Bt())},i:function(r){e||(Q(i),e=!0)},o:function(r){ce(i),e=!1},d:function(r){i&&i.d(r),r&&je(n)}}}function CJe(t){t.select()}function kJe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?go:g,y=n.onPrevious,_=void 0===y?go:y,C=n.onNext,S=void 0===C?go:C,M=n.onReplace,$=void 0===M?go:M,G=n.onReplaceAll,R=void 0===G?go:G,z=n.onClose,U=void 0===z?go:z,q="",re="",L="";function X(){e(0,f=!f&&!m)}function Z(){m||$(q,L)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,_=H.onPrevious),"onNext"in H&&e(6,S=H.onNext),"onReplace"in H&&e(18,$=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,U=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Gv(v,300)),1048832&t.$$.dirty&&r(q),2&t.$$.dirty&&s&&""!==q&&v(q)},[f,s,a,d,m,_,S,U,q,L,i,X,function(H){H.preventDefault(),q!==re?(re=q,r.cancel(),v(q)):S()},function(H){H.stopPropagation();var he=tp(H);"Enter"===he&&(H.preventDefault(),S()),"Shift+Enter"===he&&(H.preventDefault(),_()),"Ctrl+Enter"===he&&(H.preventDefault(),f?Z():S()),"Ctrl+H"===he&&(H.preventDefault(),X()),"Escape"===he&&(H.preventDefault(),U())},Z,function(){m||R(q,L)},c,v,$,R,r,function(){e(8,q=this.value)},function(){return S()},function(){return _()},function(){return U()},function(){e(9,L=this.value)}]}var SJe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,kJe,wJe,Ei,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},bJe),r}return Se(e)}(),qle=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function DJe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',P(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function HJe(t){var n,e,i,r,o,s,a,l,c,u=[UJe,zJe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-qojdc1"),P(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),de(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Nt(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[76](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function zJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new SJe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new VYe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:go}});var m=t[18]&&rce(t),g=t[23]&&oce(t);return f=new l4({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=be("div"),mt(s.$$.fragment),a=it(),l=be("div"),mt(c.$$.fragment),u=it(),m&&m.c(),d=it(),g&&g.c(),h=it(),mt(f.$$.fragment),P(o,"class","jse-search-box-container svelte-qojdc1"),P(l,"class","jse-contents svelte-qojdc1"),P(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),ft(s,o,null),Pe(v,a,y),Pe(v,l,y),ft(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),ft(f,v,y),p=!0},p:function(v,y){var _,C,S,M,$={};524288&y[0]&&($.show=v[19]),131072&y[0]&&($.resultCount=(null===(_=v[17])||void 0===_||null===(C=_.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&($.activeIndex=(null===(S=v[17])||void 0===S?void 0:S.activeIndex)||0),1048576&y[0]&&($.showReplace=v[20]),2097152&y[0]&&($.searching=v[21]),1&y[0]&&($.readOnly=v[0]),s.$set($);var G={};1024&y[0]&&(G.value=v[10]),65536&y[0]&&(G.expandedMap=v[16].expandedMap),65536&y[0]&&(G.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(G.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(G.validationErrorsMap=v[24]),131072&y[0]&&(G.searchResultItemsMap=null===(M=v[17])||void 0===M?void 0:M.itemsMap),65536&y[0]&&(G.selection=v[16].selection),8192&y[0]&&(G.context=v[13]),c.$set(G),v[18]?m?(m.p(v,y),262144&y[0]&&Q(m,1)):((m=rce(v)).c(),Q(m,1),m.m(d.parentNode,d)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[23]?g?(g.p(v,y),8388608&y[0]&&Q(g,1)):((g=oce(v)).c(),Q(g,1),g.m(h.parentNode,h)):g&&($t(),ce(g,1,1,function(){g=null}),Bt());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(m),Q(g),Q(f.$$.fragment,v),p=!0)},o:function(v){ce(s.$$.fragment,v),ce(c.$$.fragment,v),ce(m),ce(g),ce(f.$$.fragment,v),p=!1},d:function(v){v&&je(o),pt(s),v&&je(a),v&&je(l),pt(c),t[77](null),v&&je(u),m&&m.d(v),v&&je(d),g&&g.d(v),v&&je(h),pt(f,v)}}}function UJe(t){var n,e,i,r,o=[WJe,GJe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=_r()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):($t(),ce(s[u],1,1,function(){s[u]=null}),Bt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),Q(e,1),e.m(i.parentNode,i))},i:function(l){r||(Q(e),r=!0)},o:function(l){ce(e),r=!1},d:function(l){s[n].d(l),l&&je(i)}}}function rce(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:zk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function oce(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:Wb,text:"Ok",onClick:t[8]},{icon:op,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:Wb,text:"Ok",onClick:i[8]},{icon:op,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function GJe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[47]}]}}),i=new tce({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function WJe(t){var n,e;return n=new KYe({props:{readOnly:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qJe(t){var n,e,i,r,o,s,a,l,c=t[1]&&nce(t),u=t[2]&&ice(t),h=[];return o=h[r=t[25]?1:0]=[HJe,VJe][r](t),{c:function(){n=be("div"),c&&c.c(),e=it(),u&&u.c(),i=it(),o.c(),P(n,"class","jse-tree-mode svelte-qojdc1"),Mt(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),de(n,e),u&&u.m(n,null),de(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Nt($Je,"mousedown",t[49]),Nt(n,"keydown",t[41]),Nt(n,"mousedown",t[42]),Nt(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&Q(c,1)):((c=nce(f)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),f[2]?u?(u.p(f,p),4&p[0]&&Q(u,1)):((u=ice(f)).c(),Q(u,1),u.m(n,i)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),o.p(f,p),(!s||2&p[0])&&Mt(n,"no-main-menu",!f[1])},i:function(f){s||(Q(c),Q(u),Q(o),s=!0)},o:function(f){ce(c),ce(u),ce(o),s=!1},d:function(f){f&&je(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,ho(l)}}}function XJe(t,n,e){var i,r=wa("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xa("simple-modal").open,h=ep(),f=ep(),p=xa("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=hae(),_=n.readOnly,C=n.externalContent,S=n.mainMenuBar,M=n.navigationBar,$=n.escapeControlCharacters,G=n.escapeUnicodeCharacters,R=n.parser,z=n.parseMemoizeOne,U=n.validator,q=n.validationParser,re=n.pathParser,L=n.indentation,X=n.onError,Z=n.onChange,H=n.onChangeMode,he=n.onRenderValue,E=n.onRenderMenu,F=n.onClassName,N=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal,Fe=!1;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(l)},hasFocus:function(){return Fe&&document.hasFocus()||jk(l)},onFocus:function(){v=!0,N&&N()},onBlur:function(){v=!1,Y&&Y()}});var xe=void 0;function tt(Ce){r("updateSelection",Ce);var lt="function"==typeof Ce?Ce(ie.selection):Ce;or(lt,ie.selection)||e(16,ie=Ze(Ze({},ie),{},{selection:lt}))}var ze,ot,B,ne=!1,ie=Lk(),Ie=!1,Ye=!1,Le=!1,_t="";function At(Ce){return _n.apply(this,arguments)}function _n(){return(_n=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return r("search text updated",lt),e(74,_t=lt),It.next=4,Xl();case 4:return It.next=6,Nr();case 6:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function ci(){return(ci=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?GGe(ze):void 0),lt.next=3,Nr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function on(){return(on=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?WGe(ze):void 0),lt.next=3,Nr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function Fi(){return(Fi=Zi(vn().mark(function Ce(lt,It){var Jt,nn,an,li;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(nn=null===(Jt=ze)||void 0===Jt?void 0:Jt.activeItem,r("handleReplace",{replacementText:It,activeItem:nn}),nn){fi.next=4;break}return fi.abrupt("return");case 4:return an=qGe(c,ie,It,nn,R),li=an.newSelection,Yn(an.operations,function(Lo,Ls){return{state:Ze(Ze({},Ls),{},{selection:li})}}),fi.next=8,Xl();case 8:return fi.next=10,Nr();case 10:case"end":return fi.stop()}},Ce)}))).apply(this,arguments)}function pn(){return(pn=Zi(vn().mark(function Ce(lt,It){var Jt,an;return vn().wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return r("handleReplaceAll",{text:lt,replacementText:It}),Jt=XGe(c,ie,lt,It,R),an=Jt.newSelection,Yn(Jt.operations,function(li,fi){return{state:Ze(Ze({},fi),{},{selection:an})}}),Vn.next=5,Xl();case 5:return Vn.next=7,Nr();case 7:case"end":return Vn.stop()}},Ce)}))).apply(this,arguments)}function Nr(){return $r.apply(this,arguments)}function $r(){return($r=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(It=null===(lt=ze)||void 0===lt?void 0:lt.activeItem,r("focusActiveSearchResult",ze),!It){nn.next=9;break}return e(16,ie=Ze(Ze({},PO(c,ie,Jt=It.path)),{},{selection:void 0})),nn.next=7,Xl();case 7:return nn.next=9,hn(Jt);case 9:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}var Ai,Wr,wr=fae({onChange:function(Ce){e(22,Or=Ce)}}),Or=wr.getState(),jo=gO(function(Ce,lt){if(""===Ce)return r("clearing search result"),void(void 0!==ze&&e(17,ze=void 0));e(21,Le=!0),setTimeout(function(){r("searching...",Ce);var nn,an,Vn,li,fi,Lo,Ls,It=ase(Ce,lt,1e3);e(17,(nn=It,Vn=null!=(an=ze)&&an.activeItem?use(an.activeItem):void 0,li=nn.findIndex(function(Zo){return or(Vn,use(Zo))}),fi=-1!==li?li:void 0!==an?.activeIndex&&an?.activeIndex0?0:-1,Ls=(Lo=nn.map(function(Zo,wo){return Ze(Ze({},Zo),{},{active:wo===fi})}))[fi],ze={items:Lo,itemsMap:qv(Lo,function(Zo){return ln(Zo.path)}),activeItem:Ls,activeIndex:fi})),e(21,Le=!1)})},300),Nn=!1,xt=[],ui=Zb(pae);function Ni(Ce,lt,It,Jt){g0(function(){var nn;try{nn=ui(Ce,lt,It,Jt)}catch(an){nn=[{path:[],message:"Failed to validate: "+an.message,severity:Xd.warning}]}or(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),xe?{parseError:xe,isRepairable:!1}:(Ni(c,U,R,q),Hi(xt)?null:{validationErrors:xt})}function xo(){return c}function Qo(){return ie}function On(Ce){ne||(ne=!0,e(16,ie=nu(Ce,ie,[],coe({json:Ce},10240)?sh:Hb)))}function ai(Ce){void 0!==ie.selection&&(ie.selection&&Xc(Ce,ie.selection.anchorPath)&&Xc(Ce,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Ze(Ze({},ie),{},{selection:s0(Ce,ie)}))))}function bi(Ce){var lt=Ce.previousJson,It=Ce.previousState,Jt=Ce.previousText,nn=Ce.previousTextIsRepaired;void 0===lt&&void 0===Jt||(void 0!==c?wr.add(void 0!==lt?{undo:{patch:[{op:"replace",path:"",value:lt}],state:ul(It),json:void 0,text:Jt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ul(ie),json:void 0,text:u,textIsRepaired:Nn}}:{undo:{patch:void 0,json:void 0,text:Jt,state:ul(It),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ul(ie),text:u,textIsRepaired:Nn}}):void 0!==lt&&wr.add({undo:{patch:void 0,json:lt,state:ul(It),text:Jt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Nn,state:ul(ie)}}))}function Er(Ce,lt){if(r("patch",Ce,lt),void 0===c)throw new Error("Cannot apply patch: no JSON");var It={json:c,text:u},Jt=c,nn=ie,an=u,Vn=Nn,li=ose(c,Ce),fi=$oe(c,ie,Ce),Lo=a0(c,Ce),Ls=function(wh,bd){return void 0!==bd||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ze(Ze({},wh),{},{selection:bd}):wh}(fi.documentState,Lo,!1);r("patch updatedSelection",Lo);var Zo="function"==typeof lt?lt(fi.json,Ls):void 0;e(10,c=Zo&&void 0!==Zo.json?Zo.json:fi.json);var wo=Zo&&void 0!==Zo.state?Zo.state:Ls;e(16,ie=wo),e(11,u=void 0),e(23,Nn=!1),e(18,B=void 0),ai(c),wr.add({undo:{patch:li,json:void 0,text:an,state:ul(nn),textIsRepaired:Vn},redo:{patch:Ce,json:void 0,state:ul(wo),text:u,textIsRepaired:Nn}});var $l={json:c,previousJson:Jt,undo:li,redo:Ce};return ei(It,$l),$l}function qr(){!_&&ie.selection&&tt(iu(ie.selection.focusPath,!0))}function ao(){if(!_&&ie.selection){var Ce=ie.selection.focusPath,lt=Sn(c,Ce);Ho(lt)?(r("openJSONEditorModal",{path:It=Ce,value:Jt=lt}),Fe=!0,fe({content:{json:Jt},path:It,onPatch:Wr.onPatch,onClose:function(){Fe=!1,Ps()}})):tt(mr(Ce,!0))}var It,Jt}function Js(){if(!_&&Yi(ie.selection)){var Ce=ie.selection.focusPath,lt=ln(Ce),It=Sn(c,Ce),Jt=!lf(It,ie.enforceStringMap,lt,R),nn=Jt?String(It):Fv(String(It),R);r("handleToggleEnforceString",{enforceString:Jt,value:It,updatedValue:nn}),Yn([{op:"replace",path:lt,value:nn}],function(an,Vn){return{state:Roe(Vn,lt,Jt)}})}}function vr(){return Ks.apply(this,arguments)}function Ks(){return Ks=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return lt=!(It.length>0&&void 0!==It[0])||It[0],Jt.next=3,Jle({json:c,documentState:ie,indentation:lt?L:void 0,readOnly:_,parser:R,onPatch:Yn});case 3:case"end":return Jt.stop()}},Ce)})),Ks.apply(this,arguments)}function qa(){return Xa.apply(this,arguments)}function Xa(){return Xa=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(lt=!(It.length>0&&void 0!==It[0])||It[0],void 0!==c){Jt.next=3;break}return Jt.abrupt("return");case 3:return Jt.next=5,Kle({json:c,documentState:ie,indentation:lt?L:void 0,parser:R});case 5:case"end":return Jt.stop()}},Ce)})),Xa.apply(this,arguments)}function Ic(){d(kae,{},Ze(Ze({},Cm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ps()}})}function we(Ce,lt){d(jae,{text:Ce,onParse:Ik,onRepair:soe,onApply:lt},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ps()}})}function He(){Zle({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:_,onChange:Z,onPatch:Yn})}function qe(){!_&&void 0!==c&&ie.selection&&c0(ie.selection)&&!Hi(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Yn(nse(c,Qoe(ie.selection))))}function ut(){_||!ie.selection||!Fr(ie.selection)&&!Yi(ie.selection)||Hi(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Yn(function(lt,It){if(Yi(It))return[{op:"move",from:ln(It.focusPath),path:""}];if(!Fr(It))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Jt=Sn(lt,Xi(It.focusPath));if(oo(Jt))return[{op:"replace",path:"",value:It.paths.map(function(an){var Vn=Ws(Ln(an));return Jt[Vn]})}];if(Mo(Jt)){var nn={};return It.paths.forEach(function(an){var Vn=String(Ln(an));nn[Vn]=Jt[Vn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(It))}(c,ie.selection),function(lt,It){if(Ho(lt))return{state:np(lt,It,[])}}))}function Ue(Ce){void 0!==c&&rS({insertType:Ce,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br})}function Dn(Ce){xs(ie.selection)&&tt(mr(ie.selection.focusPath,!1)),Ue(Ce)}function ii(Ce){if(!_&&ie.selection)if(Lm(ie.selection))try{var lt=ie.selection.anchorPath,It=Sn(c,lt),Jt=function(an,Vn,li){if("array"===Vn){if(Array.isArray(an))return an;if(Io(an))return ioe(an);if("string"==typeof an)try{var fi=li.parse(an);if(Array.isArray(fi))return fi;if(Io(fi))return ioe(fi)}catch{return[an]}return[an]}if("object"===Vn){if(Array.isArray(an))return noe(an);if(Io(an))return an;if("string"==typeof an)try{var Lo=li.parse(an);if(Io(Lo))return Lo;if(Array.isArray(Lo))return noe(Lo)}catch{return{value:an}}return{value:an}}if("value"===Vn)return Ho(an)?li.stringify(an):an;throw new Error("Cannot convert ".concat(VF(an,li)," to ").concat(Vn))}(It,Ce,R);if(Jt===It)return;var nn=[{op:"replace",path:ln(lt),value:Jt}];r("handleConvert",{selection:ie.selection,path:lt,type:Ce,operations:nn}),Yn(nn,function(an,Vn){return{state:np(an,Vn,ie.selection.focusPath)}})}catch(an){X(an)}else X(new Error("Cannot convert current selection to ".concat(Ce)))}function hi(){var Ce=qoe(c,ie,!1),lt=Xi(ie.selection.focusPath);!Hi(Ce.focusPath)&&or(lt,Xi(Ce.focusPath))?tt(uf(Ce.focusPath)):tt(cf(lt)),r("insert before",{selection:ie.selection,selectionBefore:Ce,parentPath:lt}),Xl().then(Rl)}function di(){var Ce=Fr(ie.selection)?Ln(ie.selection.paths):ie.selection.focusPath;r("insert after",Ce),tt(uf(Ce)),Xl().then(Rl)}function kr(Ce){return Qr.apply(this,arguments)}function Qr(){return(Qr=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,ece({char:lt,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br,onSelect:tt});case 2:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function gi(){if(!_&&wr.getState().canUndo){var Ce=wr.undo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.undo.patch?Yu(c,Ce.undo.patch):Ce.undo.json),e(16,ie=Ce.undo.state),e(11,u=Ce.undo.text),e(23,Nn=Ce.undo.textIsRepaired),r("undo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.undo.patch,undo:Ce.redo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function yr(){if(!_&&wr.getState().canRedo){var Ce=wr.redo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.redo.patch?Yu(c,Ce.redo.patch):Ce.redo.json),e(16,ie=Ce.redo.state),e(11,u=Ce.redo.text),e(23,Nn=Ce.redo.textIsRepaired),r("redo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.redo.patch,undo:Ce.undo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function Ee(Ce){var lt;_||void 0===c||(Fe=!0,V({id:h,json:c,rootPath:Ce,onSort:(lt=Zi(vn().mark(function It(Jt){var nn;return vn().wrap(function(an){for(;;)switch(an.prev=an.next){case 0:r("onSort",Ce,nn=Jt.operations),Yn(nn,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,Ce)),{},{selection:mr(Ce,!1)})}});case 3:case"end":return an.stop()}},It)})),function(It){return lt.apply(this,arguments)}),onClose:function(){Fe=!1,Ps()}}))}function St(){ie.selection&&Ee(Joe(c,ie.selection))}function Ht(Ce){var It=Ce.rootPath,Jt=Ce.onTransform,nn=Ce.onClose;void 0!==c&&It&&(Fe=!0,oe({id:Ce.id||f,json:c,rootPath:It,onTransform:Jt?function(an){Jt({operations:an,json:c,transformedJson:Yu(c,an)})}:function(an){r("onTransform",It,an),Yn(an,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,It)),{},{selection:mr(It,!1)})}})},onClose:function(){Fe=!1,Ps(),nn&&nn()}}))}function sn(){ie.selection&&Ht({rootPath:Joe(c,ie.selection)})}function hn(Ce){return ri.apply(this,arguments)}function ri(){return ri=Zi(vn().mark(function Ce(lt){var It,Jt,nn,an,li=arguments;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return It=!(li.length>1&&void 0!==li[1])||li[1],e(16,ie=PO(c,ie,Xi(lt))),fi.next=4,Xl();case 4:if(!(Jt=Oi(lt))){fi.next=14;break}if(r("scrollTo",{path:lt,elem:Jt,refContents:s}),nn=s.getBoundingClientRect(),an=Jt.getBoundingClientRect(),It){fi.next=12;break}if(!(an.bottom>nn.top&&an.topIt.bottom-20&&y(lt,{container:s,offset:-(It.height-nn-20),duration:0})}}function ei(Ce,lt){(void 0!==Ce.json||void 0!==Ce?.text)&&(void 0!==u?Z({text:u,json:void 0},Ce,{contentErrors:Cr(),patchResult:lt}):void 0!==c&&Z({text:void 0,json:c},Ce,{contentErrors:Cr(),patchResult:lt}))}function Yn(Ce,lt){if(!_)return r("handlePatch",Ce,lt),Er(Ce,lt)}function br(Ce,lt){var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Nn,li=nu(c,ie,[],sh),fi="function"==typeof lt?lt(Ce,li):void 0;e(10,c=fi&&void 0!==fi.json?fi.json:Ce),e(16,ie=fi&&void 0!==fi.state?fi.state:li),e(11,u=void 0),e(23,Nn=!1),ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Ar(Ce,lt){r("handleChangeText");var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Nn;try{e(10,c=z(Ce)),e(16,ie=nu(c,ie,[],sh)),e(11,u=void 0),e(23,Nn=!1)}catch{try{e(10,c=z(Yd(Ce))),e(16,ie=nu(c,ie,[],sh)),e(11,u=Ce),e(23,Nn=!0)}catch{e(10,c=void 0),e(16,ie=Lk({json:c,expand:sh})),e(11,u=Ce),e(23,Nn=!1)}}if("function"==typeof lt){var li=lt(c,ie);e(10,c=li&&li.json?li.json:c),e(16,ie=li&&li.state?li.state:ie)}ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Po(Ce,lt){var It=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:Ce,expanded:lt,recursive:It}),e(16,ie=lt?It?nu(c,ie,Ce,Hb):function PGe(t,n){return Ze(Ze({},t),{},{expandedMap:Ze(Ze({},t.expandedMap),{},ql({},ln(n),!0))})}(ie,Ce):Loe(ie,Ce)),ie.selection&&!lt&&function RGe(t,n){return l0(t.focusPath,n)&&(t.focusPath.length>n.length||Xs(t))}(ie.selection,Ce)&&tt(void 0),setTimeout(function(){jk(l)||Ps()})}function ca(Ce){r("openFind",{findAndReplace:Ce}),e(19,Ie=!1),e(20,Ye=!1),Xl().then(function(){e(19,Ie=!0),e(20,Ye=Ce)})}function md(Ce,lt){r("handleExpandSection",Ce,lt);var nn,an,Vn,It=ln(Ce);e(16,(an=It,Vn=lt,ie=Ze(Ze({},nn=ie),{},{visibleSectionsMap:Ze(Ze({},nn.visibleSectionsMap),{},ql({},an,Poe(Rk(nn,an).concat(Vn))))})))}function hu(Ce){r("pasted json as text",Ce),e(18,B=Ce)}function ua(Ce){Fe=!0;var Lo=m(XXe,{json:c,documentState:ie,parser:R,showTip:Ce.showTip,onEditKey:qr,onEditValue:ao,onToggleEnforceString:Js,onCut:vr,onCopy:qa,onPaste:Ic,onRemove:He,onDuplicate:qe,onExtract:ut,onInsertBefore:hi,onInsert:Dn,onConvert:ii,onInsertAfter:di,onSort:St,onTransform:sn,onCloseContextMenu:function(){g(Lo),Ps()}},{left:Ce.left,top:Ce.top,offsetTop:Ce.offsetTop,offsetLeft:Ce.offsetLeft,width:Ce.width,height:Ce.height,anchor:Ce.anchor,closeOnOuterClick:!0,onClose:function(){Fe=!1,Ps()}})}function Rl(Ce){if(!_&&!ip(ie.selection)){if(Ce&&(Ce.stopPropagation(),Ce.preventDefault()),Ce&&"contextmenu"===Ce.type&&Ce.target!==a)ua({left:Ce.clientX,top:Ce.clientY,width:260,height:336,showTip:!1});else{var lt,It=null===(lt=s)||void 0===lt?void 0:lt.querySelector(".jse-context-menu-pointer.jse-selected");if(It)ua({anchor:It,offsetTop:2,width:260,height:336,showTip:!1});else{var Jt,nn=null===(Jt=s)||void 0===Jt?void 0:Jt.getBoundingClientRect();nn&&ua({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),It=(lt=B).path,Jt=lt.contents,tt(mr(It,!1)),nn.next=5,Xl();case 5:Yn([{op:"replace",path:ln(It),value:Jt}],function(an,Vn){return{state:np(an,Vn,It)}});case 7:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}function Ps(){r("focus"),a&&(a.focus(),a.select())}function vd(Ce){return lt=c,It=ie,nn=Xi(Jt=Ce),an=[Ln(Jt)],(li=(Vn=Sn(lt,nn))?HO(Vn,It,an):void 0)?mr(nn.concat(li),!1):uf(Jt);var lt,It,Jt,nn,an,Vn,li}function yd(Ce){i&&i.onDrag(Ce)}function eT(){i&&i.onDragEnd()}return t.$$set=function(Ce){"readOnly"in Ce&&e(0,_=Ce.readOnly),"externalContent"in Ce&&e(50,C=Ce.externalContent),"mainMenuBar"in Ce&&e(1,S=Ce.mainMenuBar),"navigationBar"in Ce&&e(2,M=Ce.navigationBar),"escapeControlCharacters"in Ce&&e(51,$=Ce.escapeControlCharacters),"escapeUnicodeCharacters"in Ce&&e(52,G=Ce.escapeUnicodeCharacters),"parser"in Ce&&e(3,R=Ce.parser),"parseMemoizeOne"in Ce&&e(53,z=Ce.parseMemoizeOne),"validator"in Ce&&e(54,U=Ce.validator),"validationParser"in Ce&&e(55,q=Ce.validationParser),"pathParser"in Ce&&e(4,re=Ce.pathParser),"indentation"in Ce&&e(5,L=Ce.indentation),"onError"in Ce&&e(6,X=Ce.onError),"onChange"in Ce&&e(56,Z=Ce.onChange),"onChangeMode"in Ce&&e(57,H=Ce.onChangeMode),"onRenderValue"in Ce&&e(58,he=Ce.onRenderValue),"onRenderMenu"in Ce&&e(7,E=Ce.onRenderMenu),"onClassName"in Ce&&e(59,F=Ce.onClassName),"onFocus"in Ce&&e(60,N=Ce.onFocus),"onBlur"in Ce&&e(61,Y=Ce.onBlur),"onSortModal"in Ce&&e(62,V=Ce.onSortModal),"onTransformModal"in Ce&&e(63,oe=Ce.onTransformModal),"onJSONEditorModal"in Ce&&e(64,fe=Ce.onJSONEditorModal)},t.$$.update=function(){var Ce,lt;3145728&t.$$.dirty[1]&&e(73,ot=TO({escapeControlCharacters:$,escapeUnicodeCharacters:G})),524288&t.$$.dirty[1]&&function gt(Ce){void 0!==Ce.json&&function(lt){if(void 0!==lt){var It=!or(c,lt);if(r("update external json",{isChanged:It,currentlyText:void 0===c}),It){var Jt={json:c,text:u},nn=ie,an=c,Vn=u,li=Nn;e(10,c=lt),On(c),e(11,u=void 0),e(23,Nn=!1),ai(c),bi({previousJson:an,previousState:nn,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.json),void 0!==Ce.text&&function(lt){if(void 0!==lt&&void 0===C.json){var It=lt!==u;if(r("update external text",{isChanged:It}),It){var Jt={json:c,text:u},nn=c,an=ie,Vn=u,li=Nn;try{e(10,c=z(lt)),On(c),e(11,u=lt),e(23,Nn=!1),xe=void 0}catch(fi){try{e(10,c=z(Yd(lt))),On(c),e(11,u=lt),e(23,Nn=!0),xe=void 0,ai(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Nn=!1),xe=Fk(u,fi.message||fi.toString())}}ai(c),bi({previousJson:nn,previousState:an,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&jo(_t,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Ni(c,U,R,q),4096&t.$$.dirty[0]&&e(24,(lt={},(Ce=xt).forEach(function(It){lt[ln(It.path)]=It}),Ce.forEach(function(It){for(var Jt=It.path;Jt.length>0;){var nn=ln(Jt=Xi(Jt));nn in lt||(lt[nn]={isChildError:!0,path:Jt,message:"Contains invalid data",severity:Xd.warning})}}),Ai=lt)),512&t.$$.dirty[0]&&(i=s?function(Ce){var lt,It;function Jt(li){return li<20?200:li<50?400:1200}function nn(){Ce&&(Ce.scrollTop+=.05*(lt||0))}function an(li){It&&li===lt||(Vn(),s4("startAutoScroll",li),lt=li,It=setInterval(nn,50))}function Vn(){It&&(s4("stopAutoScroll"),clearInterval(It),It=void 0,lt=void 0)}return s4("createAutoScrollHandler",Ce),{onDrag:function(li){if(Ce){var fi=li.clientY,Lo=Ce.getBoundingClientRect(),Ls=Lo.top,Zo=Lo.bottom;fiZo?an(Jt(fi-Zo)):Vn()}},onDragEnd:function(){Vn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Wr={readOnly:_,parser:R,normalization:ot,getJson:xo,getDocumentState:Qo,findElement:Oi,findNextInside:vd,focus:Ps,onPatch:Yn,onInsert:Ue,onExpand:Po,onSelect:tt,onFind:ca,onExpandSection:md,onPasteJson:hu,onRenderValue:he,onContextMenu:ua,onClassName:F||function(){},onDrag:yd,onDragEnd:eT}),8192&t.$$.dirty[0]&&r("context changed",Wr)},[_,S,M,R,re,L,X,E,function(){return Nn&&void 0!==c&&br(c),{json:c,text:u}},s,c,u,xt,Wr,a,l,ie,ze,B,Ie,Ye,Le,Or,Nn,Ai,o,At,function(){return ci.apply(this,arguments)},function(){return on.apply(this,arguments)},function(Ce,lt){return Fi.apply(this,arguments)},function(Ce,lt){return pn.apply(this,arguments)},function(){e(19,Ie=!1),e(20,Ye=!1),At(""),Ps()},function(Ce){r("select validation error",Ce),tt(mr(Ce.path,!1)),hn(Ce.path)},qa,function(Ce){Ce.preventDefault(),Qle({clipboardText:Ce.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onChangeText:Ar,openRepairModal:we})},gi,yr,function(){Ee([])},function(){Ht({rootPath:[]})},function(){Po([],!0,!0)},function(){Po([],!1,!0)},function(Ce){var lt=tp(Ce),It=Ce.shiftKey;if(r("keydown",{combo:lt,key:Ce.key}),"Ctrl+X"===lt&&(Ce.preventDefault(),vr(!0)),"Ctrl+Shift+X"===lt&&(Ce.preventDefault(),vr(!1)),"Ctrl+C"===lt&&(Ce.preventDefault(),qa(!0)),"Ctrl+Shift+C"===lt&&(Ce.preventDefault(),qa(!1)),"Ctrl+D"===lt&&(Ce.preventDefault(),qe()),"Delete"!==lt&&"Backspace"!==lt||(Ce.preventDefault(),He()),"Insert"===lt&&(Ce.preventDefault(),Ue("structure")),"Ctrl+A"===lt&&(Ce.preventDefault(),tt(mr([],!1))),"Ctrl+Q"===lt&&Rl(Ce),"ArrowUp"===lt||"Shift+ArrowUp"===lt){Ce.preventDefault();var Jt=ie.selection?qoe(c,ie,It,!0)||ie.selection:s0(c,ie);tt(Jt),Bn(Jt.focusPath)}if("ArrowDown"===lt||"Shift+ArrowDown"===lt){Ce.preventDefault();var nn=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Fr(Mr)?Mr.focusPath:Ln(Mr.paths),fu=HO(wo,$l,tc),_d=fu,Ch=fu;if(null===fu||null==_d||null==Ch)return null;if(wh){var xd=HO(wo,Ho(Sn(wo,tc))?Loe($l,tc):$l,tc);return null===xd?null:Zu(Mr)?Os(wo,xd,xd):Xs(Mr)?Os(wo,_d,Ch):Os(wo,Mr.anchorPath,xd)}if(xs(Mr)){var z_=Sn(wo,Xi(fu));return Array.isArray(z_)?mr(Ch,!1):iu(Ch,!1)}return Yi(Mr)?mr(Ch,!1):Xs(Mr)?Os(wo,_d,Ch):Os(wo,fu,fu)}(c,ie,It,!0)||ie.selection:s0(c,ie);tt(nn),Bn(nn.focusPath)}if("ArrowLeft"===lt||"Shift+ArrowLeft"===lt){Ce.preventDefault();var an=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.previous;if(wh)return Fr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath);if(fu&&_d)return zO(_d);var xd=Sn(wo,Xi(Mr.focusPath));return Yi(Mr)&&Array.isArray(xd)?Os(wo,Mr.focusPath,Mr.focusPath):Fr(Mr)&&!Array.isArray(xd)?iu(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(an),Bn(an.focusPath)}if("ArrowRight"===lt||"Shift+ArrowRight"===lt){Ce.preventDefault();var Vn=ie.selection&&void 0!==c?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.next;return wh?Fr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath):fu&&_d?zO(_d):Fr(Mr)?mr(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(Vn),Bn(Vn.focusPath)}if("Enter"===lt&&ie.selection){if(!_&&Fr(ie.selection)&&1===ie.selection.paths.length){var li=ie.selection.focusPath,fi=Sn(c,Xi(li));Array.isArray(fi)&&tt(mr(li,!1))}!_&&xs(ie.selection)&&(Ce.preventDefault(),tt(Ze(Ze({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(Ce.preventDefault(),Ho(Sn(c,ie.selection.focusPath))?Po(ie.selection.focusPath,!0):_||tt(Ze(Ze({},ie.selection),{},{edit:!0})))}if(1===lt.replace(/^Shift\+/,"").length&&ie.selection)return Ce.preventDefault(),void kr(Ce.key);if("Enter"===lt&&(Zu(ie.selection)||Xs(ie.selection)))return Ce.preventDefault(),void kr("");if("Ctrl+Enter"===lt&&Yi(ie.selection)){var Lo=Sn(c,ie.selection.focusPath);V2(Lo)&&window.open(String(Lo),"_blank")}if("Escape"===lt&&ie.selection&&(Ce.preventDefault(),tt(void 0)),"Ctrl+F"===lt&&(Ce.preventDefault(),ca(!1)),"Ctrl+H"===lt&&(Ce.preventDefault(),ca(!0)),"Ctrl+Z"===lt){Ce.preventDefault();var Ls=document.activeElement;Ls&&Ls.blur&&Ls.focus?(Ls.blur(),setTimeout(function(){gi(),setTimeout(function(){return Ls.select()})})):gi()}if("Ctrl+Shift+Z"===lt){Ce.preventDefault();var Zo=document.activeElement;Zo&&Zo.blur&&Zo.focus?(Zo.blur(),setTimeout(function(){yr(),setTimeout(function(){return Zo.select()})})):yr()}},function(Ce){r("handleMouseDown",Ce),setTimeout(function(){setTimeout(function(){v||yoe(Ce.target,"BUTTON")||(Ps(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Ze(Ze({},ie),{},{selection:Os(c||{},[],[])}))))})})},Rl,function(Ce){_||ua({anchor:_oe(Ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Jo.text)},function(Ce){tt(Ce),Ps(),hn(Ce.focusPath)},function(Ce){!Pb(Ce.target,function(It){return It===l})&&ip(ie.selection)&&(r("click outside the editor, stop edit mode"),tt(function(It){return xs(It)||Yi(It)?Ze(Ze({},It),{},{edit:!1}):It}),v&&a&&(a.focus(),a.blur()),Xl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,$,G,z,U,q,Z,H,he,F,N,Y,V,oe,fe,function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hb;r("expand");var lt=Ze(Ze({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=nu(c,lt,[],Ce))},Cr,xo,Er,Ht,hn,Oi,Ps,ot,_t,function(Ce){e(19,Ie=Ce)},function(Ce){Vi[Ce?"unshift":"push"](function(){e(14,a=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(9,s=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(15,l=Ce)})}]}var k4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,XJe,qJe,Ei,{readOnly:0,externalContent: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,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},BJe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function YJe(t){pi(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function sce(t){var n,e,i,r,o,s=[KJe,JJe],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function JJe(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function KJe(t){var n,e;return n=new wqe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ace(t){var n,e;return n=new k4({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function QJe(t){var n,e;return{c:function(){n=be("div"),e=tn(t[17]),P(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function ZJe(t){var n,e;return n=new k4({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne=t[21](t[0]).description+"";n=new Fqe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new sr({props:{data:t[15]?ru:rp}});var ie=t[15]&&sce(t);X=new sr({props:{data:t[16]?ru:rp}});var Ie=t[16]&&ace(t),Ye=[ZJe,QJe],Le=[];function _t(At,_n){return At[17]?1:0}return Y=_t(t),V=Le[Y]=Ye[Y](t),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=be("div"),o=be("div"),(s=be("div")).innerHTML='
    Language
    ',a=it(),l=be("div"),c=it(),(u=be("div")).innerHTML='
    Path
    ',d=it(),h=be("input"),p=it(),m=be("div"),g=be("div"),v=be("button"),mt(y.$$.fragment),_=tn("\n Wizard"),C=it(),ie&&ie.c(),S=it(),(M=be("div")).innerHTML='
    Query
    ',$=it(),G=be("textarea"),R=it(),z=be("div"),U=be("div"),q=be("div"),re=be("div"),L=be("button"),mt(X.$$.fragment),Z=tn("\n Original"),H=it(),Ie&&Ie.c(),he=it(),E=be("div"),(F=be("div")).innerHTML='
    Preview
    ',N=it(),V.c(),oe=it(),fe=be("div"),Fe=be("button"),xe=tn("Transform"),P(s,"class","jse-label svelte-107mggt"),P(l,"class","jse-description svelte-107mggt"),P(u,"class","jse-label svelte-107mggt"),P(h,"class","jse-path svelte-107mggt"),P(h,"type","text"),h.readOnly=!0,P(h,"title","Selected path"),h.value=f=Hi(t[1])?"(whole document)":tu(Kl(t[1])),P(v,"type","button"),P(v,"class","svelte-107mggt"),P(g,"class","jse-label-inner svelte-107mggt"),P(m,"class","jse-label svelte-107mggt"),P(M,"class","jse-label svelte-107mggt"),P(G,"class","jse-query svelte-107mggt"),P(G,"spellcheck","false"),G.value=t[13],P(o,"class","jse-query-contents svelte-107mggt"),P(L,"type","button"),P(L,"class","svelte-107mggt"),P(re,"class","jse-label-inner svelte-107mggt"),P(q,"class","jse-label svelte-107mggt"),P(U,"class","jse-original-data svelte-107mggt"),Mt(U,"jse-hide",!t[16]),P(F,"class","jse-label svelte-107mggt"),P(E,"class","jse-preview-data svelte-107mggt"),P(z,"class","jse-data-contents svelte-107mggt"),Mt(z,"jse-hide-original-data",!t[16]),P(r,"class","jse-main-contents svelte-107mggt"),P(Fe,"type","button"),P(Fe,"class","jse-primary svelte-107mggt"),Fe.disabled=tt=!!t[17],P(fe,"class","jse-actions svelte-107mggt"),P(i,"class","jse-modal-contents svelte-107mggt")},m:function(At,_n){ft(n,At,_n),Pe(At,e,_n),Pe(At,i,_n),de(i,r),de(r,o),de(o,s),de(o,a),de(o,l),l.innerHTML=ne,de(o,c),de(o,u),de(o,d),de(o,h),de(o,p),de(o,m),de(m,g),de(g,v),ft(y,v,null),de(v,_),de(o,C),ie&&ie.m(o,null),de(o,S),de(o,M),de(o,$),de(o,G),de(r,R),de(r,z),de(z,U),de(U,q),de(q,re),de(re,L),ft(X,L,null),de(L,Z),de(U,H),Ie&&Ie.m(U,null),de(z,he),de(z,E),de(E,F),de(E,N),Le[Y].m(E,null),de(i,oe),de(i,fe),de(fe,Fe),de(Fe,xe),ze=!0,ot||(B=[Nt(v,"click",t[25]),Nt(G,"input",t[23]),Nt(L,"click",t[26]),Nt(Fe,"click",t[24]),_a(nKe.call(null,Fe))],ot=!0)},p:function(At,_n){var ci={};512&_n[0]&&(ci.queryLanguages=At[9]),1&_n[0]&&(ci.queryLanguageId=At[0]),n.$set(ci),(!ze||1&_n[0])&&ne!==(ne=At[21](At[0]).description+"")&&(l.innerHTML=ne),(!ze||2&_n[0]&&f!==(f=Hi(At[1])?"(whole document)":tu(Kl(At[1])))&&h.value!==f)&&(h.value=f);var on={};32768&_n[0]&&(on.data=At[15]?ru:rp),y.$set(on),At[15]?ie?(ie.p(At,_n),32768&_n[0]&&Q(ie,1)):((ie=sce(At)).c(),Q(ie,1),ie.m(o,S)):ie&&($t(),ce(ie,1,1,function(){ie=null}),Bt()),(!ze||8192&_n[0])&&(G.value=At[13]);var Fi={};65536&_n[0]&&(Fi.data=At[16]?ru:rp),X.$set(Fi),At[16]?Ie?(Ie.p(At,_n),65536&_n[0]&&Q(Ie,1)):((Ie=ace(At)).c(),Q(Ie,1),Ie.m(U,null)):Ie&&($t(),ce(Ie,1,1,function(){Ie=null}),Bt()),(!ze||65536&_n[0])&&Mt(U,"jse-hide",!At[16]);var pn=Y;(Y=_t(At))===pn?Le[Y].p(At,_n):($t(),ce(Le[pn],1,1,function(){Le[pn]=null}),Bt(),(V=Le[Y])?V.p(At,_n):(V=Le[Y]=Ye[Y](At)).c(),Q(V,1),V.m(E,null)),(!ze||65536&_n[0])&&Mt(z,"jse-hide-original-data",!At[16]),(!ze||131072&_n[0]&&tt!==(tt=!!At[17]))&&(Fe.disabled=tt)},i:function(At){ze||(Q(n.$$.fragment,At),Q(y.$$.fragment,At),Q(ie),Q(X.$$.fragment,At),Q(Ie),Q(V),ze=!0)},o:function(At){ce(n.$$.fragment,At),ce(y.$$.fragment,At),ce(ie),ce(X.$$.fragment,At),ce(Ie),ce(V),ze=!1},d:function(At){pt(n,At),At&&je(e),At&&je(i),pt(y),ie&&ie.d(),pt(X),Ie&&Ie.d(),Le[Y].d(),ot=!1,ho(B)}}}function tKe(t){var n,e,i,r,o;return e=new Doe({props:{$$slots:{default:[eKe]},$$scope:{ctx:t}}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=_a(iS.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nKe(t){t.focus()}function iKe(t,n,e){var i,r,o=wa("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+fb():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,_=n.queryLanguageId,C=n.onChangeQueryLanguage,S=n.onRenderValue,M=n.onClassName,$=n.onTransform,G=xa("simple-modal").close,R="".concat(a,":").concat(ln(u)),z=ed[R]||{},U=!1!==ed.showWizard,q=!1!==ed.showOriginal,re=z.queryOptions||{},L=_===z.queryLanguageId&&z.query?z.query:he(_).createQuery(l,z.queryOptions||{}),X=z.isManual||!1,Z=void 0,H={text:""};function he(F){return y.find(function(N){return N.id===F})||y[0]}var E=Gv(function(F,N){try{o("previewTransform",{query:N});var Y=he(_).executeQuery(F,N,p);e(18,H={json:Y}),e(17,Z=void 0)}catch(V){e(18,H={text:""}),e(17,Z=V.toString())}},300);return t.$$set=function(F){"id"in F&&e(28,a=F.id),"json"in F&&e(29,l=F.json),"rootPath"in F&&e(1,u=F.rootPath),"indentation"in F&&e(2,d=F.indentation),"escapeControlCharacters"in F&&e(3,h=F.escapeControlCharacters),"escapeUnicodeCharacters"in F&&e(4,f=F.escapeUnicodeCharacters),"parser"in F&&e(5,p=F.parser),"parseMemoizeOne"in F&&e(6,m=F.parseMemoizeOne),"validationParser"in F&&e(7,g=F.validationParser),"pathParser"in F&&e(8,v=F.pathParser),"queryLanguages"in F&&e(9,y=F.queryLanguages),"queryLanguageId"in F&&e(0,_=F.queryLanguageId),"onChangeQueryLanguage"in F&&e(30,C=F.onChangeQueryLanguage),"onRenderValue"in F&&e(10,S=F.onRenderValue),"onClassName"in F&&e(11,M=F.onClassName),"onTransform"in F&&e(31,$=F.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,L),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:re,query:L,queryLanguageId:_,isManual:X},ed),o("store state in memory",R,ed[R]))},[_,u,d,h,f,p,m,g,v,y,S,M,re,L,i,U,q,Z,H,r,G,he,function(F){e(12,re=F),e(13,L=he(_).createQuery(l,F)),e(33,X=!1),o("updateQueryByWizard",{queryOptions:re,query:L,isManual:X})},function(F){e(13,L=F.target.value),e(33,X=!0),o("handleChangeQuery",{query:L,isManual:X})},function(){try{o("handleTransform",{query:L});var F=he(_).executeQuery(i,L,p);$([{op:"replace",path:ln(u),value:F}]),G()}catch(N){console.error(N),e(18,H={text:""}),e(17,Z=N.toString())}},function(){e(15,U=!U),e(32,ed.showWizard=U,ed)},function(){e(16,q=!q),e(32,ed.showOriginal=q,ed)},function(F){o("handleChangeQueryLanguage",F),e(0,_=F),C(F);var N=he(_);e(13,L=N.createQuery(l,re)),e(33,X=!1)},a,l,C,$,ed,X]}var rKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,iKe,tKe,Ei,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},YJe,[-1,-1]),r}return Se(e)}(),up={};function oKe(t){pi(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function lce(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new Hm({props:c}),Vi.push(function(){return Uu(o,"value",l)}),{c:function(){n=be("tr"),(e=be("th")).textContent="Property",i=it(),r=be("td"),mt(o.$$.fragment),P(e,"class","svelte-1y818v2"),P(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),de(n,e),de(n,i),de(n,r),ft(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],zu(function(){return s=!1})),o.$set(h)},i:function(u){a||(Q(o.$$.fragment,u),a=!0)},o:function(u){ce(o.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(o)}}}function cce(t){var n,e;return{c:function(){n=be("div"),e=tn(t[5]),P(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&je(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z;e=new c4({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&lce(t);function he(N){t[15](N)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),S=new Hm({props:E}),Vi.push(function(){return Uu(S,"value",he)});var F=t[5]&&cce(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),o=be("table"),(s=be("colgroup")).innerHTML=' \n ',a=it(),l=be("tbody"),c=be("tr"),(u=be("th")).textContent="Path",d=it(),h=be("td"),f=be("input"),m=it(),H&&H.c(),g=it(),v=be("tr"),(y=be("th")).textContent="Direction",_=it(),C=be("td"),mt(S.$$.fragment),$=it(),G=be("div"),F&&F.c(),R=it(),z=be("div"),U=be("button"),q=tn("Sort"),P(u,"class","svelte-1y818v2"),P(f,"class","jse-path svelte-1y818v2"),P(f,"type","text"),f.readOnly=!0,P(f,"title","Selected path"),f.value=p=Hi(t[0])?"(whole document)":tu(Kl(t[0])),P(h,"class","svelte-1y818v2"),P(y,"class","svelte-1y818v2"),P(C,"class","svelte-1y818v2"),P(o,"class","svelte-1y818v2"),P(G,"class","jse-space svelte-1y818v2"),P(U,"type","button"),P(U,"class","jse-primary svelte-1y818v2"),U.disabled=re=!!t[4]&&!t[1],P(z,"class","jse-actions svelte-1y818v2"),P(r,"class","jse-modal-contents svelte-1y818v2"),P(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(N,Y){Pe(N,n,Y),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(o,s),de(o,a),de(o,l),de(l,c),de(c,u),de(c,d),de(c,h),de(h,f),de(l,m),H&&H.m(l,null),de(l,g),de(l,v),de(v,y),de(v,_),de(v,C),ft(S,C,null),de(r,$),de(r,G),F&&F.m(G,null),de(r,R),de(r,z),de(z,U),de(U,q),L=!0,X||(Z=[Nt(U,"click",t[8]),_a(aKe.call(null,U)),_a(iS.call(null,n,t[6]))],X=!0)},p:function(N,Y){var V=Un(Y,1)[0],oe={};16&V&&(oe.title=N[4]?"Sort array items":"Sort object keys"),e.$set(oe),(!L||1&V&&p!==(p=Hi(N[0])?"(whole document)":tu(Kl(N[0])))&&f.value!==p)&&(f.value=p),N[4]&&(N[3].length>1||void 0===N[1])?H?(H.p(N,V),26&V&&Q(H,1)):((H=lce(N)).c(),Q(H,1),H.m(l,g)):H&&($t(),ce(H,1,1,function(){H=null}),Bt());var fe={};!M&&4&V&&(M=!0,fe.value=N[2],zu(function(){return M=!1})),S.$set(fe),N[5]?F?F.p(N,V):((F=cce(N)).c(),F.m(G,null)):F&&(F.d(1),F=null),(!L||18&V&&re!==(re=!!N[4]&&!N[1]))&&(U.disabled=re)},i:function(N){L||(Q(e.$$.fragment,N),Q(H),Q(S.$$.fragment,N),L=!0)},o:function(N){ce(e.$$.fragment,N),ce(H),ce(S.$$.fragment,N),L=!1},d:function(N){N&&je(n),pt(e),H&&H.d(),pt(S),F&&F.d(),X=!1,ho(Z)}}}function aKe(t){t.focus()}function lKe(t,n,e){var i,r,o,s=wa("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xa("simple-modal").close,h="".concat(a,":").concat(ln(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=up[h]&&up[h].selectedProperty||void 0,v=up[h]&&up[h].selectedDirection||p,y=void 0;return t.$$set=function(_){"id"in _&&e(9,a=_.id),"json"in _&&e(10,l=_.json),"rootPath"in _&&e(0,c=_.rootPath),"onSort"in _&&e(11,u=_.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?CO(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(Lb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,up[h]={selectedProperty:g,selectedDirection:v},up),s("store state in memory",h,up[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var _,C;e(5,y=void 0);var S=null===(_=g)||void 0===_?void 0:_.value,M=null===(C=v)||void 0===C?void 0:C.value,$=Fle(l,c,S,M);u({operations:$,rootPath:c,itemPath:S,direction:M}),d()}catch(G){e(5,y=G.toString())}},a,l,u,up,r,function(_){e(1,g=_),e(3,o),e(13,r),e(4,i)},function(_){e(2,v=_)}]}var cKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,lKe,sKe,Ei,{id:9,json:10,rootPath:0,onSort:11},oKe),r}return Se(e)}();function dh(){}function sS(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function uKe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function dKe(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,_=n.canTransform,C=n.onRenderMenu;return t.$$set=function(S){"readOnly"in S&&e(1,s=S.readOnly),"onFormat"in S&&e(2,a=S.onFormat),"onCompact"in S&&e(3,l=S.onCompact),"onSort"in S&&e(4,c=S.onSort),"onTransform"in S&&e(5,u=S.onTransform),"onToggleSearch"in S&&e(6,d=S.onToggleSearch),"onUndo"in S&&e(7,h=S.onUndo),"onRedo"in S&&e(8,f=S.onRedo),"canUndo"in S&&e(9,p=S.canUndo),"canRedo"in S&&e(10,m=S.canRedo),"canFormat"in S&&e(11,g=S.canFormat),"canCompact"in S&&e(12,v=S.canCompact),"canSort"in S&&e(13,y=S.canSort),"canTransform"in S&&e(14,_=S.canTransform),"onRenderMenu"in S&&e(15,C=S.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:m4,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:UYe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!_},{type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,r]}var hKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,dKe,uKe,Ei,{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}),r}return Se(e)}(),fo=function(){function t(){ke(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),aS.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),aS.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new t_(this),o=new t_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new t_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new dce(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new hce(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):aS.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,fo);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function fKe(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ke(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new pKe(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(uce(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=lS(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return pr(qi(e.prototype),"replace",this).call(this,i,r,o);var s=lS(this.text,lS(o.text,uce(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):aS.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),aS=function(t){wt(e,fo);var n=Ct(e);function e(i,r){var o;ke(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return pr(qi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return pr(qi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Un(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,z){return R+z.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,_=[];function C(R){var z;if(R.lines>p&&R instanceof e){var U,q=Re(R.children);try{for(q.s();!(U=q.n()).done;)C(U.value)}catch(re){q.e(re)}finally{q.f()}}else R.lines>m&&(v>m||!v)?(S(),g.push(R)):R instanceof id&&v&&(z=_[_.length-1])instanceof id&&R.lines+z.lines<=32?(v+=R.lines,y+=R.length+1,_[_.length-1]=new id(z.text.concat(R.text),z.length+1+R.length)):(v+R.lines>f&&S(),v+=R.lines,y+=R.length+1,_.push(R))}function S(){0!=v&&(g.push(1==_.length?_[0]:e.from(_,y)),y=-1,v=_.length=0)}var M,$=Re(i);try{for($.s();!(M=$.n()).done;)C(M.value)}catch(R){$.e(R)}finally{$.f()}return S(),1==g.length?g[0]:new e(g,o)}}]),e}();function lS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ke(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),dce=function(){function t(n,e,i){ke(this,t),this.value="",this.done=!1,this.cursor=new t_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),hce=function(){function t(n){ke(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(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}}]),t}();typeof Symbol<"u"&&(fo.prototype[Symbol.iterator]=function(){return this.iter()},t_.prototype[Symbol.iterator]=dce.prototype[Symbol.iterator]=hce.prototype[Symbol.iterator]=function(){return this});for(var pKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),w0="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(t){return t?parseInt(t,36):1}),cS=1;cSt)return w0[n-1]<=t;return!1}function fce(t){return t>=127462&&t<=127487}function Pl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?gKe:pce)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function pce(t,n,e){if(n==t.length)return n;n&&mce(t.charCodeAt(n))&&gce(t.charCodeAt(n-1))&&n--;var i=Ba(t,n);for(n+=Sc(i);n=0&&fce(Ba(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function gKe(t,n,e){for(;n>0;){var i=pce(t,n-2,e);if(i=56320&&t<57344}function gce(t){return t>=55296&&t<56320}function Ba(t,n){var e=t.charCodeAt(n);if(!gce(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return mce(i)?i-56320+(e-55296<<10)+65536:e}function S4(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Sc(t){return t<65536?1:2}var D4=/\r\n?|\n/,Ll=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ll||(Ll={})),C0=function(){function t(n){ke(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ll.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ll.Simple&&c>=n&&(i==Ll.TrackDel&&rn||i==Ll.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,C0);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return T4(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return E4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){T4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return C0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new n_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&dp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var _=y?"string"==typeof y?fo.of(y.split(o||D4)):y:fo.empty,C=_.length;if(m==v&&0==C)return;ml&&dl(s,m-l,-1),dl(s,v-m,C),dp(a,s,_),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function dp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function E4(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new n_(t),a=new n_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);dl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):C0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new n_(t),s=new n_(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):C0.create(i);if(0==o.ins)dl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;dl(i,l,u,a),r&&u&&dp(r,i,s.text)}else-1==s.ins?(dl(i,o.off?0:o.len,l,a),r&&dp(r,i,o.textBit(l))):(dl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&dp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else dl(i,0,s.ins,a),r&&dp(r,i,s.text),s.next()}}var n_=function(){function t(n){ke(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?fo.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?fo.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),uS=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return en.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return en.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return en.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),en=function(){function t(n,e){ke(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return uS.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return uS.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function yce(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var A4=0,Qn=function(){function t(n,e,i,r,o){ke(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=A4++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new dS([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:M4),!!n.static,n.enables)}}]),t}();function M4(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var dS=function(){function t(n,e,i,r){ke(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=A4++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||I4(m,h)){var v=o(m);if(c?!bce(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var _=hS(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Va)||g.field(C,!1)==m.field(C,!1)})||(c?bce(v=o(m),_,s):s(v=o(m),_)))return m.values[l]=_,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function bce(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,_ce.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(A4++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function i_(t){return function(n){return new xce(n,t)}}var k0={highest:i_(0),high:i_(1),default:i_(2),low:i_(3),lowest:i_(4)},xce=Se(function t(n,e){ke(this,t),this.inner=n,this.prec=e}),hp=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new N4(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),N4=Se(function t(n,e){ke(this,t),this.compartment=n,this.inner=e}),wce=function(){function t(n,e,i,r,o,s){for(ke(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,S,M,$,G,o=[],s=Object.create(null),a=new Map,l=Re((C=n,S=e,M=a,$=[[],[],[],[],[]],G=new Map,function R(z,U){var q=G.get(z);if(null!=q){if(q<=U)return;var re=$[q].indexOf(z);re>-1&&$[q].splice(re,1),z instanceof N4&&M.delete(z.compartment)}if(G.set(z,U),Array.isArray(z)){var L,X=Re(z);try{for(X.s();!(L=X.n()).done;)R(L.value,U)}catch(he){X.e(he)}finally{X.f()}}else if(z instanceof N4){if(M.has(z.compartment))throw new RangeError("Duplicate use of compartment in extensions");var Z=S.get(z.compartment)||z.inner;M.set(z.compartment,Z),R(Z,U)}else if(z instanceof xce)R(z.inner,z.prec);else if(z instanceof Va)$[U].push(z),z.provides&&R(z.provides,U);else if(z instanceof dS)$[U].push(z),z.facet.extensions&&R(z.facet.extensions,2);else{var H=z.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(z,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,U)}}(C,2),$.reduce(function(z,U){return z.concat(U)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Va?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(S){return C.slot(S)})},p=0,m=o;p>1;function F(N){for(var Y=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function hS(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Cce=Qn.define(),kce=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Sce=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Dce=Qn.define(),Tce=Qn.define(),Ece=Qn.define(),Ace=Qn.define({combine:function(t){return!!t.length&&t[0]}}),fp=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new _Ke}}]),t}(),_Ke=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new fp(this,n)}}]),t}(),xKe=function(){function t(n){ke(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new hr(this,n)}}]),t}(),hr=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new xKe((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();hr.reconfigure=hr.define(),hr.appendConfig=hr.define();var Ql=function(){function t(n,e,i,r,o,s){ke(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&yce(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{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(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function wKe(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Mce(u,O4(l,h,a.changes.newLength),!0))}return u==a?a:Ql.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Dce));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:wKe(u,h))}}catch(_){d.e(_)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Ql.create(c,f,a.selection&&a.selection.map(p),hr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet(Tce),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Ql?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Ql?y[0]:Ice(c,S0(y),!1)}return a}(s):s)}Ql.time=fp.define(),Ql.userEvent=fp.define(),Ql.addToHistory=fp.define(),Ql.remote=fp.define();var CKe=[];function S0(t){return null==t?CKe:Array.isArray(t)?t:[t]}var j4,cs=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(cs||(cs={})),kKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{j4=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var No=function(){function t(n,e,i,r,o,s){ke(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return r_(this,i),hS(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return fo.of(n.split(this.facet(t.lineSeparator)||D4))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(r_(this,e),hS(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Va&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Ace)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Cce));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function SKe(t){return function(n){if(!/\S/.test(n))return cs.Space;if(function(i){if(j4)return j4.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||kKe.test(o)))return!0}return!1}(n))return cs.Word;for(var e=0;e-1)return cs.Word;return cs.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Pl(i,a,!1);if(s(i.slice(c,a))!=cs.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:en.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=wce.resolve(n.extensions||[],new Map),i=n.doc instanceof fo?n.doc:fo.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||D4)),r=n.selection?n.selection instanceof en?n.selection:en.single(n.selection.anchor,n.selection.head):en.single(0);return yce(r,i.length),e.staticFacet(kce)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function su(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();Um.prototype.startSide=Um.prototype.endSide=0,Um.prototype.point=!1,Um.prototype.mapMode=Ll.TrackDel;var P4=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function L4(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var DKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Go=function(){function t(n,e,i,r){ke(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(L4)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Nce(this,null,-1).goto(0),h=0,f=[],p=new Gm;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return R4.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R4.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=Fce(s,a,i),c=new o_(s,l,o),u=new o_(a,l,o);i.iterGaps(function(d,h,f){return Oce(c,d,u,h,f,r)}),i.empty&&0==i.length&&Oce(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=Fce(o,s),l=new o_(o,a,0).goto(i),c=new o_(s,a,0).goto(i);;){if(l.to!=c.to||!B4(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new o_(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Gm,o=Re(n instanceof P4?[n]:i?function TKe(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(L4);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Go.empty=new Go([],[],null,-1),Go.empty.nextLayer=Go.empty;var Gm=function(){function t(){ke(this,t),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 Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new DKe(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,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.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=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Go.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Go.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function Fce(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{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(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)$4(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)$4(this.heap,o);(this.to-n||this.value.endSide-e)<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 n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),$4(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Nce(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function $4(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var o_=function(){function t(n,e,i){ke(this,t),this.minPoint=i,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=R4.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){fS(this.active,n),fS(this.activeTo,n),fS(this.activeRank,n),this.minActive=jce(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&fS(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Oce(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&B4(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!B4(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function B4(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function jce(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Pl(t,r)}return!0===i?-1:t.length}for(var Pce=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),H4=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Lce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},pp=function(){function t(n,e){ke(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==bn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Lce[Pce]||1;return Lce[Pce]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[H4]||new EKe(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),mS=null,EKe=function(){function t(n){if(ke(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(mS)return n.adoptedStyleSheets=[mS.sheet].concat(n.adoptedStyleSheets),n[H4]=mS;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),mS=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[H4]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Rce=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),AKe=typeof navigator<"u"&&/Mac/.test(navigator.platform),MKe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),IKe=AKe||Rce&&+Rce[1]<57,Ha=0;Ha<10;Ha++)mp[48+Ha]=mp[96+Ha]=String(Ha);for(Ha=1;Ha<=24;Ha++)mp[Ha+111]="F"+Ha;for(Ha=65;Ha<=90;Ha++)mp[Ha]=String.fromCharCode(Ha+32),a_[Ha]=String.fromCharCode(Ha);for(var z4 in mp)a_.hasOwnProperty(z4)||(a_[z4]=mp[z4]);function gS(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function D0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function vS(t,n){if(!n.anchorNode)return!1;try{return D0(t,n.anchorNode)}catch{return!1}}function l_(t){return 3==t.nodeType?E0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function yS(t,n,e,i){return!!e&&($ce(t,n,e,i,-1)||$ce(t,n,e,i,1))}function bS(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function $ce(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:c_(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=bS(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?c_(t):0}}}function c_(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Bce={left:0,right:0,top:0,bottom:0};function U4(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function FKe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Vce,NKe=function(){function t(){ke(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),T0=null;function Hce(t){if(t.setActive)return t.setActive();if(T0)return t.focus(T0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==T0?{get preventScroll(){return T0={preventScroll:!0},!0}}:void 0),!T0){T0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Vce||(Vce=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function A0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function zce(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ke(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,bS(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,bS(n)+1,e)}}]),t}(),G4=[],ws=function(){function t(){ke(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{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(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=Uce(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=Uce(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==c_(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G4;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function Uce(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ws.prototype.breakAfter=0;var Gce=function(){function t(n,e,i){ke(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function Wce(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:Qce||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:_S,ie_version:Xce?W4.documentMode||6:X4?+X4[1]:q4?+q4[1]:0,gecko:Yce,gecko_version:Yce?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Y4,chrome_version:Y4?+Y4[1]:0,ios:Qce,android:/Android\b/.test(Tc.userAgent),webkit:Jce,safari:Kce,webkit_version:Jce?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=W4.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},u_=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return J4(this.dom,i,r)}}]),e}(),Wm=function(t){wt(e,ws);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ke(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(zce(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),pr(qi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}}]),e}();function J4(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?U4(l,s<0):l||null}var K4=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:U4(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){pr(qi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),Zce=function(t){wt(e,K4);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Q4(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?eue(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Q4(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return J4(a,l,c)}):J4(a,i,r)}},{key:"destroy",value:function(){var i;pr(qi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Q4(t,n,e,i,r,o){if(e instanceof Wm){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ws.get(s);if(!a)return o(t,n);var l=D0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return fo.empty}}]),e}();function tue(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof Wm&&r.length&&(i=r[r.length-1])instanceof Wm&&i.mark.eq(n.mark)?nue(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function iue(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new rue(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new d_(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=oue(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new d_(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new ij(i)}},{key:"set",value:function(i){return Go.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();yi.none=Go.empty;var rue=function(t){wt(e,yi);var n=Ct(e);function e(i){var r;ke(this,e);var o=oue(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&tj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();rue.prototype.point=!1;var ij=function(t){wt(e,yi);var n=Ct(e);function e(i){return ke(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&tj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();ij.prototype.mapMode=Ll.TrackBefore,ij.prototype.point=!0;var d_=function(t){wt(e,yi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return ke(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ll.TrackBefore:Ll.TrackAfter:Ll.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();function oue(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function rj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}d_.prototype.point=!0;var od=function(t){wt(e,ws);var n=Ct(e);function e(){var i;return ke(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),qce(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){tj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){nue(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=ej(r,this.attrs||{})),o&&(this.attrs=ej({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(zce(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&&(nj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),pr(qi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ws.get(s)instanceof Wm;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ws.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof u_})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof u_)||/[^ -~]/.test(s.text))return null;var a=l_(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return _o.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),oj=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(xS(new Z4(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(xS(new u_(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof d_){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof d_)if(i.block){var l=i.type;l!=_o.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new oj(i.widget||new sue("div"),a,l))}else{var c=K4.create(i.widget||new sue("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(xS(new Z4(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(xS(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);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=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Go.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function xS(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new Wm(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var sue=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),aue=Qn.define(),lue=Qn.define(),cue=Qn.define(),uue=Qn.define(),sj=Qn.define(),due=Qn.define(),hue=Qn.define(),fue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),pue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),mue=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ke(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),gue=hr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(uue);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var wS=Qn.define({combine:function(t){return!t.length||t[0]}}),PKe=0,h_=Qn.define(),ka=function(){function t(n,e,i,r){ke(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(PKe++,n,i.eventHandlers,function(a){var l=[h_.of(a)];return s&&l.push(f_.of(function(c){var u=c.plugin(a);return u?s(u):yi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),aj=function(){function t(n){ke(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),vue=Qn.define(),lj=Qn.define(),f_=Qn.define(),yue=Qn.define(),bue=Qn.define(),p_=Qn.define(),M0=function(){function t(n,e,i,r){ke(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),_ue=function(){function t(n,e,i){ke(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new M0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{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(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),us=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(us||(us={})),cj=us.LTR,LKe=us.RTL;function xue(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),ds=[];function Due(t){return[new I0(0,t,0)]}var Tue="";function HKe(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=I0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Pl(t.text,s,u);if(Tue=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return en.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ws.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Aue(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Mue=Se(function t(n,e){ke(this,t),this.node=n,this.offset=e,this.pos=-1}),Iue=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).view=i,r.compositionDeco=yi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new M0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=yi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Nue(a);if(!c)return yi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Eue([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=jKe.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,_=v.off,C=o.findPos(l,-1);Wce(this,C.i,C.off,y,_,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function zKe(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&yS(l.node,l.offset,d.anchorNode,d.anchorOffset)&&yS(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function qKe(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=gS(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function GKe(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=gS(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||vS(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ws.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=_o.WidgetBefore&&a.type!=_o.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==_o.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==us.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?l_(g):[];if(v.length){var y=v[v.length-1],_=u?y.right-m.left:m.right-y.left;_>c&&(c=_,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?us.RTL:us.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=l_(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new Gce(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(yi.replace({widget:new Fue(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return yi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(f_).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(bue).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,S,M,$,G,R,z,U){for(var q=C.ownerDocument,re=q.defaultView||window,L=C;L;)if(1==L.nodeType){var X=void 0,Z=L==q.body;if(Z)X=FKe(re);else{if(L.scrollHeight<=L.clientHeight&&L.scrollWidth<=L.clientWidth){L=L.assignedSlot||L.parentNode;continue}var H=L.getBoundingClientRect();X={left:H.left,right:H.left+L.clientWidth,top:H.top,bottom:H.top+L.clientHeight}}var he=0,E=0;if("nearest"==G)S.top0&&S.bottom>X.bottom+E&&(E=S.bottom-X.bottom+E+z)):S.bottom>X.bottom&&(E=S.bottom-X.bottom+z,M<0&&S.top-E0&&S.right>X.right+he&&(he=S.right-X.right+he+R)):S.right>X.right&&(he=S.right-X.right+R,M<0&&S.left0&&e<=0)n=c_(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var WKe=function(){function t(){ke(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){rj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){rj(n,e,this.changes)}}]),t}();function XKe(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function YKe(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function hj(t,n){return t.topn.top+1}function jue(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function fj(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=l_(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&hj(c,m)?c=Pue(c,m.bottom):u&&hj(u,m)&&(u=jue(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var _=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Lue(i,_,e):d&&"false"!=i.contentEditable?fj(i,_,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Lue(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&E0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Rue(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=_o.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:$ue(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,_=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,_=C.offset)}else if(m.caretRangeFromPoint){var S=m.caretRangeFromPoint(c,u);S&&(_=S.startOffset,(!t.contentDOM.contains(y=S.startContainer)||Zn.safari&&function JKe(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return E0(t,i-1,i).getBoundingClientRect().left>e}(y,_,c)||Zn.chrome&&function KKe(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():E0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,_,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var M=od.find(t.docView,p);if(!M)return d>r.top+r.height/2?r.to:r.from;var $=fj(M.dom,c,u);y=$.node,_=$.offset}var G=t.docView.nearest(y);if(!G)return null;if(G.isWidget){var R=G.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+V4(s,o,t.state.tabSize)}function Bue(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=HKe(r,o,s,a,e),u=Tue;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=en.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function pj(t,n,e){for(var i=t.state.facet(yue).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?en.cursor(a,1):en.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var ZKe=function(){function t(n){var e=this;ke(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=la[s];n.contentDOM.addEventListener(s,function(l){zue(n,l)&&i(a,l)},mj[s]),e.registeredEvents.push(s)};for(var o in la)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(la.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){zue(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,A0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Vue=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],eQe="dthko",Hue=[16,17,18,20,91,92,224,225];function CS(t){return.7*t+8}var tQe=function(){function t(n,e,i,r){ke(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(No.allowMultipleSelections)&&(a=e,(l=n.state.facet(aue)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(lue);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=gS(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Zue(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-CS(o.left-n.clientX):n.clientX>=o.right&&(i=CS(n.clientX-o.right)),n.clientY<=o.top?r=-CS(o.top-n.clientY):n.clientY>=o.bottom&&(r=CS(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.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:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function zue(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ws.get(i))&&e.ignoreEvent(n))return!1;return!0}var la=Object.create(null),mj=Object.create(null),Uue=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function Gue(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=gj&&i.selection.ranges.every(function(c){return c.empty})&&gj==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:en.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:en.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function Wue(t,n,e,i){if(1==i)return en.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return en.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Pl(h.text,f,!1):m=Pl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Pl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(cue));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=Yue(s=t,a=n),c=Zue(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=Yue(s,d),m=Wue(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=Wue(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(_){return _.eq(m)})?function(_,C){for(var S=0;;S++)if(_.ranges[S].eq(C))return en.create(_.ranges.slice(0,S).concat(_.ranges.slice(S+1)),_.mainIndex==S?0:_.mainIndex-(_.mainIndex>S?1:0))}(u,m):f?u.addRange(m):en.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new tQe(t,n,i,o)),o&&t.observer.ignore(function(){return Hce(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var que=function(t,n){return t>=n.top&&t<=n.bottom},Xue=function(t,n,e){return que(n,e)&&t>=e.left&&t<=e.right};function nQe(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&Xue(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&Xue(e,i,a)?1:s&&que(i,s)?-1:1}function Yue(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:nQe(t,e,n.clientX,n.clientY)}}var iQe=Zn.ie&&Zn.ie_version<=11,Jue=null,Kue=0,Que=0;function Zue(t){if(!iQe)return t.detail;var n=Jue,e=Que;return Jue=t,Que=Date.now(),Kue=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Kue+1)%3:1}function ede(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}la.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},la.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&ede(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(_){g.e(_)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){gj=o?i:null;var s=Uue?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var tde=fp.define();function nde(t,n){var e,i=[],r=Re(t.facet(hue));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:tde.of(!0)}):null}function ide(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=nde(t.state,n);e?t.dispatch(e):t.update([])}},10)}la.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ide(t)},la.blur=function(t){t.observer.clearSelectionRange(),ide(t)},la.compositionstart=la.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},la.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},la.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},la.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Vue.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var rde=["pre-wrap","normal","pre-line","break-spaces"],rQe=function(){function t(n){ke(this,t),this.lineWrapping=n,this.doc=fo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return rde.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ke(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Wo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Wo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),fh=function(t){wt(e,ode);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i,r,_o.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof F0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof F0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),F0=function(t){wt(e,sd);var n=Ct(e);function e(i){return ke(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new qm(f.from,f.length,m,p,_o.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new qm(v.from,v.length,o+u*g,u,_o.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Wo.ByHeight)return this.blockAt(i,o,s,a);if(r==Wo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new qm(c,l.to-c,0,0,_o.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new qm(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,_o.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new qm(m.from,m.length,p,v,_o.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new fh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),sQe=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Wo.ByPosNoHeight?Wo.ByPosNoHeight:Wo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Wo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&sde(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function sde(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof F0&&(i=t[n+1])instanceof F0&&t.splice(n-1,3,new F0(e.length+1+i.length))}var aQe=function(){function t(n,e){ke(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof fh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new fh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new fh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new F0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof fh)return n;var e=new fh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=_o.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=_o.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof fh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function dQe(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var vj=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return yi.replace({widget:new hQe(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new kS(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?lde:new pQe(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:m_(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(f_).filter(function(c){return"function"!=typeof c});var o=M0.extendWithRanges(n.changedRanges,function lQe(t,n,e){var i=new cQe;return Go.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(pue)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?us.RTL:us.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?dQe:uQe)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var _=n.docView.measureTextSize(),C=_.lineHeight,S=_.charWidth;(s=C>0&&r.refresh(o,C,S,v/S,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var M,$=Re(this.viewports);try{for($.s();!(M=$.n()).done;){var G=M.value,R=G.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(G);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,fo.empty,this.heightOracle,[new M0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oQe(G.from,R))}}catch(U){$.e(U)}finally{$.f()}r.heightChanged&&(c|=2)}var z=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return z&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.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(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new kS(r.lineAt(this.visibleTop-1e3*i,Wo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Wo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Wo.ByPos,o,0,0);l=new kS(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Wo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Wo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=us.LTR&&!r)return[];var l,c=[],u=function q(re,L,X,Z){if(!(L-rere&&N=X.from&&oe.to<=X.to&&Math.abs(oe.from-re)fe})});if(!Y){if(L=L})){var V=e.moveToLineBoundary(en.cursor(L),!1,!0).head;V>re&&(L=V)}Y=new vj(re,L,i.gapSize(X,re,L,Z))}c.push(Y)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||m_(this.heightMap.lineAt(n,Wo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return m_(this.heightMap.lineAt(this.scaler.fromDOM(n),Wo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return m_(this.heightMap.blockAt(this.scaler.fromDOM(n),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}}]),t}(),kS=Se(function t(n,e){ke(this,t),this.from=n,this.to=e});function fQe(t,n,e){var i=[],r=t,o=0;return Go.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function DS(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var lde={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},pQe=function(){function t(n,e,i){ke(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Wo.ByPos,n,0,0).top,p=e.lineAt(h,Wo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),bj=pp.newName(),cde=pp.newName(),ude=pp.newName(),dde={"&light":"."+cde,"&dark":"."+ude};function _j(t,n,e){return new pp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var mQe=_j("."+bj,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .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-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',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"}},dde),gQe=Se(function t(n,e,i,r){ke(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,_=m.focusOffset;return g&&(p.push(new Mue(g,v)),y==g&&_==v||p.push(new Mue(y,_))),p}(n),c=new Eue(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?en.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!D0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!D0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=en.single(h,d)}});function hde(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&Z>0&&R.charCodeAt(X-1)==z.charCodeAt(Z-1);)X--,Z--;return"end"==q&&(U-=X+Math.max(0,L-Math.min(X,Z))-L),X=X?L-U:0)+(Z-X),X=L):Z=Z?L-U:0)+(X-Z),Z=L),{from:L,toA:X,toB:Z}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:fo.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(wS)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&A0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&A0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&A0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(due).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),_=Nue(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,S=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var z=R.to-C,U=z-y.length;if(R.to-R.from!=S||t.state.sliceDoc(U,z)!=y||_&&R.to>=_.from&&R.from<=_.to)return{range:R};var q=d.changes({from:U,to:z,insert:e.insert}),re=R.to-r.to;return{changes:q,range:v?en.range(Math.max(0,v.anchor+re),Math.max(0,v.head+re)):R.map(q)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var M="input.type";return t.composing&&(M+=".compose",t.inputState.compositionFirstChange&&(M+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:M}),!0}if(i&&!i.main.eq(r)){var $=!1,G="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&($=!0),G=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:$,userEvent:G}),!0}return!1}var vQe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xj=Zn.ie&&Zn.ie_version<=11,yQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.active=!1,this.selectionRange=new NKe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),xj&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.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 i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(wS)?i.root.activeElement==this.dom:vS(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&yS(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(yS(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||gS(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=vS(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&vS(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gQe(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=hde(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=fde(e,n.previousSibling||n.target.previousSibling,-1),r=fde(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function fde(t,n,e){for(;n;){var i=ws.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function OKe(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new ade(e.state||No.create(e)),this.plugins=this.state.facet(h_).map(function(s){return new aj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new yQe(this),this.inputState=new ZKe(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Iue(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Ql?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(tde)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=nde(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(No.phrases)!=this.state.facet(No.phrases))return this.setState(a);(i=_ue.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var _=y.state.selection.main;m=new mue(_.empty?_:en.cursor(_.head,_.head>_.anchor?-1:1))}var C,S=Re(y.effects);try{for(S.s();!(C=S.n()).done;){var M=C.value;M.is(gue)&&(m=M.value)}}catch(R){S.e(R)}finally{S.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=mde.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(p_)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(TS)!=i.state.facet(TS)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var $,G=Re(this.state.facet(sj));try{for(G.s();!($=G.n()).done;)(0,$.value)(i)}catch(R){G.e(R)}finally{G.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!hde(e,p)&&f.force&&A0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){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=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new ade(n),this.plugins=n.facet(h_).map(function(a){return new aj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Iue(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(h_),i=n.state.facet(h_);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new aj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!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&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(z){return Ec(n.state,z),pde}}),g=_ue.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var _=0;_1||S<-1)&&(this.scrollDOM.scrollTop+=S,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var M,$=Re(this.state.facet(sj));try{for($.s();!(M=$.n()).done;)(0,M.value)(i)}catch(R){$.e(R)}finally{$.f()}}}}},{key:"themeClasses",get:function(){return bj+" "+(this.state.facet(yj)?ude:cde)+" "+this.state.facet(TS)}},{key:"updateAttrs",value:function(){var n=this,e=gde(this,vue,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(wS)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),gde(this,lj,i);var r=this.observer.ignore(function(){var o=nj(n.contentDOM,n.contentAttrs,i),s=nj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(p_),pp.mount(this.root,this.styleModules.concat(mQe).reverse())}},{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(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==us.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return en.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return en.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return pj(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return en.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var _=u+(v+y)*c,C=Rue(r,{x:g,y:_},!1,c);if(_h.bottom||(c<0?Cl))return en.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Rue(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return U4(i,o[I0.find(o,n-r.from,-1,e)].dir==us.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(fue)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>bQe)return Due(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==cj?1:2,d=l==cj?2:1;if(!a||1==u&&!VKe.test(a))return Due(c);for(var h=0,f=u,p=u;h=0;re-=3)if(hh[re+1]==-G){var L=hh[re+2],X=2&L?u:4&L?1&L?d:u:0;X&&(ds[z]=ds[hh[re]]=X),U=re;break}}else{if(189==hh.length)break;hh[U++]=z,hh[U++]=$,hh[U++]=q}else if(2==(R=ds[z])||1==R){var Z=R==u;q=Z?0:1;for(var H=U-3;H>=0;H-=3){var he=hh[H+2];if(2&he)break;if(Z)hh[H+2]|=2;else{if(4&he)break;hh[H+2]|=4}}}for(var E=0;EFe;){for(var ze=tt,ot=2!=ds[--tt];tt>Fe&&ot==(2!=ds[tt-1]);)tt--;oe.push(new I0(tt,ze,ot?2:1))}else oe.push(new I0(Fe,fe,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){Hce(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gue.of(new mue("number"==typeof n?en.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ka.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=pp.newName(),r=[TS.of(i),p_.of(_j(".".concat(i),n))];return e&&e.dark&&r.push(yj.of(!0)),r}},{key:"baseTheme",value:function(n){return k0.lowest(p_.of(_j("."+bj,n,dde)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ws.get(i)||ws.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=p_,Wn.inputHandler=due,Wn.focusChangeEffect=hue,Wn.perLineTextDirection=fue,Wn.exceptionSink=uue,Wn.updateListener=sj,Wn.editable=wS,Wn.mouseSelectionStyle=cue,Wn.dragMovesSelection=lue,Wn.clickAddsSelectionRange=aue,Wn.decorations=f_,Wn.atomicRanges=yue,Wn.scrollMargins=bue,Wn.darkTheme=yj,Wn.contentAttributes=lj,Wn.editorAttributes=vue,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=hr.define();var bQe=4096,pde={},mde=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:us.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&ej(s,e)}return e}var _Qe=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function ES(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var wQe=k0.default(Wn.domEventHandlers({keydown:function(t,n){return bde(yde(n.state),t,n,"editor")}})),AS=Qn.define({enables:wQe}),vde=new WeakMap;function yde(t){var n=t.facet(AS),e=vde.get(n);return e||vde.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_Qe,s=Object.create(null),a=Object.create(null),l=function(M,$){var G=a[M];if(null==G)a[M]=$;else if(G!=$)throw new Error("Key binding "+M+" is used both as a regular binding and as a multi-stroke prefix")},c=function(M,$,G,R){for(var z,U,q=s[M]||(s[M]=Object.create(null)),re=$.split(/ (?!$)/).map(function(he){return function xQe(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==us.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=_de(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=wde(t,i),f=wde(t,r),p=h.type==_o.Text?h:null,m=f.type==_o.Text?f:null;if(t.lineWrapping&&(p&&(p=xde(t,i,p)),m&&(m=xde(t,r,m))),p&&m&&p.from==m.from)return C(S(e.from,e.to,p));var g=p?S(e.from,null,p):M(h,!1),v=m?S(null,e.to,m):M(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(_(u,g.bottom,d,v.top)):g.bottomX&&he.from=F)break;Fe>E&&re(Math.max(fe,E),null==$&&fe<=X,Math.min(Fe,F),null==G&&Fe>=Z,oe.dir)}}catch(xe){V.e(xe)}finally{V.f()}if((E=Y.to+1)>=F)break}}}catch(xe){H.e(xe)}finally{H.f()}return 0==q.length&&re(X,null==$,Z,null==G,t.textDirection),{top:z,bottom:U,horizontal:q}}function M($,G){var R=a.top+(G?$.top:$.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function _de(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==us.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function xde(t,n,e){var i=en.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:_o.Text}}function wde(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==_o.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var kQe=function(){function t(n,e){ke(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(MS)!=n.state.facet(MS)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(MS);e0&&void 0!==arguments[0]?arguments[0]:{}),DQe,TQe,EQe,pue.of(!0)]}function Sde(t){return t.startState.facet(g_)!=t.state.facet(g_)}var DQe=Cde({above:!0,markers:function(t){var n,e=t.state,i=e.facet(g_),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||kde:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:en.cursor(s.head,s.head>s.anchor?-1:1),d=Re(wj.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Sde(t);return e&&Dde(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Dde(n.state,t)},class:"cm-cursorLayer"});function Dde(t,n){n.style.animationDuration=t.facet(g_).cursorBlinkRate+"ms"}var TQe=Cde({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:wj.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Sde(t)},class:"cm-selectionLayer"}),Tde={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kde&&(Tde[".cm-line"].caretColor="transparent !important");var EQe=k0.highest(Wn.theme(Tde)),Ede=hr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),v_=Va.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Ede)?i.value:e},t)}}),AQe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(v_);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(v_)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(v_),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(v_)!=n&&this.view.dispatch({effects:Ede.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Ade(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var MQe=function(){function t(n){ke(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new Gm,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(_){m.e(_)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Ade(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),Cj=null!=/x/.unicode?"gu":"g",IQe=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",Cj),FQe={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"},kj=null,IS=Qn.define({combine:function(t){var n=su(t,{render:null,specialChars:IQe,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==kj&&typeof document<"u"&&document.body){var i=document.body.style;kj=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return kj||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,Cj)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,Cj)),n}});function NQe(){return[IS.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Mde||(Mde=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=yi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(IS)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new MQe({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Ba(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=s_(l.text,c,o-l.from);return yi.replace({widget:new PQe((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=yi.replace({widget:new jQe(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(IS);n.startState.facet(IS)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Mde=null,jQe=function(t){wt(e,gp);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(FQe[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),PQe=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),LQe=yi.line({class:"cm-activeLine"}),RQe=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(LQe.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return yi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Ide(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):s_(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function BQe(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function $Qe(t,n){var e=Ide(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Ide(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(en.range(y.from+m,y.to+g))}else for(var _=Math.min(u.col,d.col),C=Math.max(u.col,d.col),S=h;S<=f;S++){var M=c.doc.line(S),$=V4(M.text,_,c.tabSize,!0);if($<0)p.push(en.cursor(M.to));else{var G=V4(M.text,C,c.tabSize);p.push(en.range(M.from+$,M.from+G))}}return p}(t.state,e,a);return l.length?en.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var VQe={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},HQe={style:"cursor: crosshair"};function zQe(){var n=Un(VQe[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ka.fromClass(function(){function o(s){ke(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?HQe:null})]}var Fde=function(){function t(n,e,i){ke(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(Sj);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(Sj).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Nde.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||WQe,v=this.view.textDirection==us.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),_=!!a.above;!a.strictSide&&(_?u.top-(d.bottom-d.top)-g.yr.bottom)&&_==r.bottom-u.bottom>u.top-r.top&&(_=!_);var C=(_?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topS&&(S=_?R.top-m-2-f:R.bottom+f+2)}}catch(z){G.e(z)}finally{G.f()}}"absolute"==this.position?(c.style.top=S-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=S+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:S,right:M,bottom:S+m}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(n.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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),GQe=Wn.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"}}}),WQe={x:0,y:0},FS=Qn.define({enables:[Ode,GQe]}),NS=Qn.define(),qQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Fde(n,NS,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),XQe=FS.compute([NS],function(t){var n=t.facet(NS).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,si(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,si(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:qQe.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),YQe=function(){function t(n,e,i,r,o){ke(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==us.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=hr.define(),i=Va.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ll.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(QQe)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return NS.from(r)}});return[i,ka.define(function(r){return new YQe(r,t,i,e,n.hoverTime||300)}),XQe]}var QQe=hr.define(),Pde=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function y_(t,n){var e=t.plugin(Lde),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Lde=ka.fromClass(function(){function t(n){ke(this,t),this.input=n.state.facet(b_),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Pde);this.top=new OS(n,!0,e.topContainer),this.bottom=new OS(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Pde);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new OS(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new OS(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(b_);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),zde=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Vde(e.markers(n)),e.initialSpacer&&(this.spacer=new Ude(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Vde(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Go.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),Ude=function(){function t(n,e,i,r){ke(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Bde(),iZe]}function Gde(t){for(var n=9;ni&&(i=s,e.push(oZe.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Go.of(e)}),aZe=0,Aj=Se(function t(n,e){ke(this,t),this.from=n,this.to=e}),gr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.id=aZe++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=au.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();gr.closedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.openedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.group=new gr({deserialize:function(t){return t.split(" ")}}),gr.contextHash=new gr({perNode:!0}),gr.lookAhead=new gr({perNode:!0}),gr.mounted=new gr({perNode:!0});var lZe=Object.create(null),au=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.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(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(gr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):lZe,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(gr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();au.none=new au("",Object.create(null),0,8);var za,cZe=function(){function t(n){ke(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=PS.get(this)||this.topNode,r=new $S(i);return r.moveTo(n,e),PS.set(this,r._tree),r}},{key:"topNode",get:function(){return new w_(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(PS.get(this)||this.topNode,n,e,!1);return PS.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(Wde.get(this)||this.topNode,n,e,!0);return Wde.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|za.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:Fj(au.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(au.none,i,r,o)})}}],[{key:"build",value:function(n){return function hZe(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new uZe(e,e.length):e,d=i.types,h=0,f=0;function p(S,M,$,G,R){for(var z=u.id,U=u.start,q=u.end,re=u.size,L=f;re<0;){if(u.next(),-1==re)return $.push(a[z]),void G.push(U-S);if(-3==re)return void(h=z);if(-4==re)return void(f=z);throw new RangeError("Unrecognized record size: ".concat(re))}var Z,H,ot,he=d[z],E=U-S;if(q-U<=o&&(H=function(ot,B){var ne=u.fork(),ie=0,Ie=0,Ye=0,Le=ne.end-o,_t={size:0,start:0,skip:0};e:for(var At=ne.pos-ot;ne.pos>At;){var _n=ne.size;if(ne.id==B&&_n>=0)_t.size=ie,_t.start=Ie,_t.skip=Ye,Ye+=4,ie+=4,ne.next();else{var ci=ne.pos-_n;if(_n<0||ci=c?4:0,Fi=ne.start;for(ne.next();ne.pos>ci;){if(ne.size<0){if(-3!=ne.size)break e;on+=4}else ne.id>=c&&(on+=4);ne.next()}Ie=Fi,ie+=_n,Ye+=on}}return(B<0||ie==ot)&&(_t.size=ie,_t.start=Ie,_t.skip=Ye),_t.size>4?_t:void 0}(u.pos-M,R))){for(var F=new Uint16Array(H.size-H.skip),N=u.pos-H.size,Y=F.length;u.pos>N;)Y=v(H.start,F,Y);Z=new x_(F,q-H.start,i),E=H.start-S}else{var V=u.pos-re;u.next();for(var oe=[],fe=[],Fe=z>=c?z:-1,xe=0,tt=q;u.pos>V;)Fe>=0&&u.id==Fe&&u.size>=0?(u.end<=tt-o&&(m(oe,fe,U,xe,u.end,tt,Fe,L),xe=oe.length,tt=u.end),u.next()):p(U,V,oe,fe,Fe);if(Fe>=0&&xe>0&&xe-1&&xe>0){var ze=(ot=he,function(B,ne,ie){var Ie,Ye,Le=0,_t=B.length-1;if(_t>=0&&(Ie=B[_t])instanceof Ua){if(!_t&&Ie.type==ot&&Ie.length==ie)return Ie;(Ye=Ie.prop(gr.lookAhead))&&(Le=ne[_t]+Ie.length+Ye)}return g(ot,B,ne,ie,Le)});Z=Fj(he,oe,fe,0,oe.length,0,q-U,ze,ze)}else Z=g(he,oe,fe,q-U,L-q)}$.push(Z),G.push(E)}function m(S,M,$,G,R,z,U,q){for(var re=[],L=[];S.length>G;)re.push(S.pop()),L.push(M.pop()+$-R);S.push(g(i.types[U],re,L,z-R,q-z)),M.push(R-$)}function g(S,M,$,G){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0;if(h){var U=[gr.contextHash,h];z=z?[U].concat(z):[U]}if(R>25){var q=[gr.lookAhead,R];z=z?[q].concat(z):[q]}return new Ua(S,M,$,G,z)}function v(S,M,$){var G=u.id,R=u.start,z=u.end,U=u.size;if(u.next(),U>=0&&G4)for(var re=u.pos-(U-4);u.pos>re;)$=v(S,M,$);M[--$]=q,M[--$]=z-S,M[--$]=R-S,M[--$]=G}else-3==U?h=G:-4==U&&(f=G);return $}for(var y=[],_=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,_,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?_[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),_.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(au.none,[],[],0);var uZe=function(){function t(n,e){ke(this,t),this.buffer=n,this.index=e}return Se(t,[{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 t(this.buffer,this.index)}}]),t}(),x_=function(){function t(n,e,i){ke(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return au.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function Xde(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function O0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(qde(r,i,h,h+d.length))if(d instanceof x_){if(o&za.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new Mj(new dZe(s,d,n,h),null,f)}else if(o&za.IncludeAnonymous||!d.type.isAnonymous||Ij(d)){var p=void 0;if(!(o&za.IgnoreMounts)&&d.props&&(p=d.prop(gr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&za.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&za.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._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(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&za.IgnoreOverlays)&&(i=this._tree.prop(gr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}();function LS(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function RS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var dZe=Se(function t(n,e,i,r){ke(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),Mj=function(){function t(n,e,i){ke(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(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(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&za.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);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(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}(),$S=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ke(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof w_)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof w_?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);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(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&za.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&za.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&za.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&za.IncludeAnonymous||u instanceof x_||!u.type.isAnonymous||Ij(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return RS(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function Ij(t){return t.children.some(function(n){return n instanceof x_||!n.type.isAnonymous||Ij(n)})}var Yde=new WeakMap;function BS(t,n){if(!t.isAnonymous||n instanceof x_||n.type!=t)return 1;var e=Yde.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=BS(t,o)}}catch(s){r.e(s)}finally{r.f()}Yde.set(n,e)}return e}function Fj(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;$+=G}if(C==S+1){if($>d){var R=m[S];p(R.children,R.positions,0,R.children.length,g[S]+_);continue}h.push(m[S])}else h.push(Fj(t,m,g,S,C,M,g[C-1]+m[C-1].length-M,null,l));f.push(M+_-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var VS=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ke(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Kde.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),mZe=0,Kde=function(){function t(){ke(this,t),this.instances=[],this.id=mZe++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,_){return y==v[_]});var g,v});if(i)return i;var r,o=[],s=new yp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=Qde(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function Qde(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new gZe(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return ehe.add(n)}var ehe=new gr,gZe=function(){function t(n,e,i,r){ke(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new bZe(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var Nj,bZe=function(){function t(n,e,i){ke(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function($){return!$.scope||$.scope(s)}));for(var c=r,u=s.prop(ehe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=vZe(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(gr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function($){return!$.scope||$.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var _=v=C)&&n.nextSibling()););if(!_||C>i)break;(y=_.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,_.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),kn=yp.define,HS=kn(),bp=kn(),nhe=kn(bp),ihe=kn(bp),_p=kn(),zS=kn(_p),Oj=kn(_p),mh=kn(),Xm=kn(mh),gh=kn(),vh=kn(),jj=kn(),C_=kn(jj),US=kn(),fn={comment:HS,lineComment:kn(HS),blockComment:kn(HS),docComment:kn(HS),name:bp,variableName:kn(bp),typeName:nhe,tagName:kn(nhe),propertyName:ihe,attributeName:kn(ihe),className:kn(bp),labelName:kn(bp),namespace:kn(bp),macroName:kn(bp),literal:_p,string:zS,docString:kn(zS),character:kn(zS),attributeValue:kn(zS),number:Oj,integer:kn(Oj),float:kn(Oj),bool:kn(_p),regexp:kn(_p),escape:kn(_p),color:kn(_p),url:kn(_p),keyword:gh,self:kn(gh),null:kn(gh),atom:kn(gh),unit:kn(gh),modifier:kn(gh),operatorKeyword:kn(gh),controlKeyword:kn(gh),definitionKeyword:kn(gh),moduleKeyword:kn(gh),operator:vh,derefOperator:kn(vh),arithmeticOperator:kn(vh),logicOperator:kn(vh),bitwiseOperator:kn(vh),compareOperator:kn(vh),updateOperator:kn(vh),definitionOperator:kn(vh),typeOperator:kn(vh),controlOperator:kn(vh),punctuation:jj,separator:kn(jj),bracket:C_,angleBracket:kn(C_),squareBracket:kn(C_),paren:kn(C_),brace:kn(C_),content:mh,heading:Xm,heading1:kn(Xm),heading2:kn(Xm),heading3:kn(Xm),heading4:kn(Xm),heading5:kn(Xm),heading6:kn(Xm),contentSeparator:kn(mh),list:kn(mh),quote:kn(mh),emphasis:kn(mh),strong:kn(mh),link:kn(mh),monospace:kn(mh),strikethrough:kn(mh),inserted:kn(),deleted:kn(),changed:kn(),invalid:kn(),meta:US,documentMeta:kn(US),annotation:kn(US),processingInstruction:kn(US),definition:yp.defineModifier(),constant:yp.defineModifier(),function:yp.defineModifier(),standard:yp.defineModifier(),local:yp.defineModifier(),special:yp.defineModifier()};the([{tag:fn.link,class:"tok-link"},{tag:fn.heading,class:"tok-heading"},{tag:fn.emphasis,class:"tok-emphasis"},{tag:fn.strong,class:"tok-strong"},{tag:fn.keyword,class:"tok-keyword"},{tag:fn.atom,class:"tok-atom"},{tag:fn.bool,class:"tok-bool"},{tag:fn.url,class:"tok-url"},{tag:fn.labelName,class:"tok-labelName"},{tag:fn.inserted,class:"tok-inserted"},{tag:fn.deleted,class:"tok-deleted"},{tag:fn.literal,class:"tok-literal"},{tag:fn.string,class:"tok-string"},{tag:fn.number,class:"tok-number"},{tag:[fn.regexp,fn.escape,fn.special(fn.string)],class:"tok-string2"},{tag:fn.variableName,class:"tok-variableName"},{tag:fn.local(fn.variableName),class:"tok-variableName tok-local"},{tag:fn.definition(fn.variableName),class:"tok-variableName tok-definition"},{tag:fn.special(fn.variableName),class:"tok-variableName2"},{tag:fn.definition(fn.propertyName),class:"tok-propertyName tok-definition"},{tag:fn.typeName,class:"tok-typeName"},{tag:fn.namespace,class:"tok-namespace"},{tag:fn.className,class:"tok-className"},{tag:fn.macroName,class:"tok-macroName"},{tag:fn.propertyName,class:"tok-propertyName"},{tag:fn.operator,class:"tok-operator"},{tag:fn.comment,class:"tok-comment"},{tag:fn.meta,class:"tok-meta"},{tag:fn.invalid,class:"tok-invalid"},{tag:fn.punctuation,class:"tok-punctuation"}]);var j0=new gr,_Ze=new gr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ke(this,t),this.data=n,this.name=r,No.prototype.hasOwnProperty("tree")||Object.defineProperty(No.prototype,"tree",{get:function(){return hl(this)}}),this.parser=e,this.extension=[xp.of(this),No.languageData.of(function(o,s,a){var l=rhe(o,s,a),c=l.type.prop(j0);if(!c)return[];var u=o.facet(c),d=l.type.prop(_Ze);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return rhe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(j0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(xp);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(j0)!=e.data){var l=s.prop(gr.mounted);if(l){if(l.tree.prop(j0)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),k_=null,CZe=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ke(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new wZe(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(VS.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=k_;k_=this;try{return n()}finally{k_=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=ohe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=VS.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=ohe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,Jde);var i=Ct(r);function r(){return ke(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=k_;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(au.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return k_}}]),t}();function ohe(t,n,e){return VS.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var Pj=function(){function t(n){ke(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=CZe.create(n.facet(xp).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Va.define({create:Pj.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(xp)!=n.state.facet(xp)?Pj.init(n.state):t.apply(n)}});var she=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(she=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var Lj=typeof navigator<"u"&&null!==(Nj=navigator.scheduling)&&void 0!==Nj&&Nj.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,kZe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=she(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return Lj&&Lj()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new Pj(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),xp=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,kZe,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),SZe=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ke(this,t),this.language=n,this.support=e,this.extension=[n,e]}),DZe=Qn.define(),GS=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function P0(t){var n=t.facet(GS);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function S_(t,n){var e="",i=t.tabSize,r=t.facet(GS)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ke(this,t),this.state=n,this.options=e,this.unit=P0(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return s_(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),ahe=new gr;function TZe(t){var n=t.type.prop(ahe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(gr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),_=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,S=g.state.doc.lineAt(y.from),M=null==C||C<=S.from?S.to:Math.min(S.to,C),$=y.to;;){var G=v.childAfter($);if(!G||G==_)return null;if(!G.type.isSkipped)return G.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var IZe=Qn.define(),uhe=new gr;function qS(t,n,e){var i,r=Re(t.facet(IZe));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=hl(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function dhe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var XS=hr.define({map:dhe}),D_=hr.define({map:dhe});function hhe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Ym=Va.define({create:function(){return yi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(XS)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[vhe.range(a.value.from,a.value.to)]}):a.is(D_)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function fhe(t,n){return t.field(Ym,!1)?n:n.concat(hr.appendConfig.of(ghe()))}function phe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var FZe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(hhe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=qS(t.state,i.from,i.to);if(r)return t.dispatch({effects:fhe(t.state,[XS.of(r),phe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Ym,!1))return!1;var n,e=[],i=Re(hhe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=YS(t.state,r.from,r.to);o&&e.push(D_.of(o),phe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},OZe),t),e=new $j(n,!0),i=new $j(n,!1),r=ka.fromClass(function(){function s(a){ke(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(xp)!=a.state.facet(xp)||a.startState.field(Ym,!1)!=a.state.field(Ym,!1)||hl(a.startState)!=hl(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new Gm,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=YS(a.state,d.from,d.to)?i:qS(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,$de({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Go.empty},initialSpacer:function(){return new $j(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=YS(s.state,a.from,a.to);if(c)return s.dispatch({effects:D_.of(c)}),!0;var u=qS(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:XS.of(u)}),!0)}})}),ghe()]}var PZe=Wn.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"}}),Bj=function(){function t(n,e){var i;function r(a){var l=pp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ke(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(j0)==s.data}:s?function(a){return a==s}:void 0,this.style=the(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new pp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),Vj=Qn.define(),yhe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function Hj(t){var n=t.facet(Vj);return n.length?n:t.facet(yhe)}function bhe(t,n){var e,i=[RZe];return t instanceof Bj&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?yhe.of(t):e?Vj.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):Vj.of(t)),i}var LZe=function(){function t(n){ke(this,t),this.markCache=Object.create(null),this.tree=hl(n.state),this.decorations=this.buildDeco(n,Hj(n.state))}return Se(t,[{key:"update",value:function(n){var e=hl(n.state),i=Hj(n.state),r=i!=Hj(n.startState);e.length0&&yh(n.state,s.head-1,1,r)||r.afterCursor&&(yh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),GZe]}var qZe=new gr;function zj(t,n,e){var i=t.prop(n<0?gr.openedBy:gr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function Uj(t){var n=t.type.prop(qZe);return n?n(t.node):t}function yh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=hl(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=zj(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return XZe(0,0,e,l,u,c,o)}}return function YZe(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function XZe(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(whe.push(t),console.warn(n))}function eet(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||fn[o];s?"function"==typeof s?i?i=s(i):Wj(o,"Modifier ".concat(o," used at start of tag")):i?Wj(o,"Tag ".concat(o," used as modifier")):i=s:Wj(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=au.define({id:xhe.length,name:a,props:[Zde(ql({},a,i))]});return xhe.push(l),l.id}function qj(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var tet=qj(function oet(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=Xj(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var re,L=[],X=Re(r);try{for(X.s();!(re=X.n()).done;){var Z=re.value,H=Z.line,he=Z.comment;if(he>=0){var F=H.from+he,N=F+Z.token.length;" "==H.text[N-H.from]&&N++,L.push({from:F,to:N})}}}catch(Y){X.e(Y)}finally{X.f()}return{changes:L}}return null},0),net=qj(She,0),iet=qj(function(t,n){return She(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function Xj(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function She(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return Xj(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function ret(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?Kj:"historyRedo"==n.inputType?KS:null;return!!i&&(n.preventDefault(),i(e))}})]}function JS(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(Jj,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var Kj=JS(0,!1),KS=JS(1,!1),uet=JS(0,!0),det=JS(1,!0);function The(t){return function(n){var e=n.field(Jj,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var het=The(0),fet=The(1),df=function(){function t(n,e,i,r,o){ke(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&C0.fromJSON(n.mapped),n.startSelection&&en.fromJSON(n.startSelection),n.selectionsAfter.map(en.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=lu,o=Re(n.startState.facet(aet));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,lu)}},{key:"selection",value:function(n){return new t(void 0,lu,void 0,void 0,n)}}]),t}();function QS(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Ehe(t,n){return t.length?n.length?t.concat(n):t:n}var lu=[];function Ahe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),QS(t,t.length-1,1e9,e.setSelAfter(i)))}return[df.selection([n])]}function pet(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Qj(t,n){if(!t.length)return t;for(var e=t.length,i=lu;e;){var r=met(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[df.selection(i)]:lu}function met(t,n,e){var i=Ehe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):lu,e);if(!t.changes)return df.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new df(r,hr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var get=/^(input\.type|delete)($|\.)/,T_=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ke(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||get.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?QS(s,s.length-1,r.minDepth,new df(n.changes.compose(a.changes),Ehe(n.effects,a.effects),a.mapped,a.startSelection,lu)):QS(s,s.length,r.minDepth,n),lu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:lu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function eD(t,n,e){for(var i=hl(t).resolveInner(n.head),r=e?gr.closedBy:gr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;yet(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?yh(t,i.from,1):yh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,en.cursor(l,e?-1:1)}function Ohe(t,n){return ld(t,function(e){if(!e.empty)return ZS(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var jhe=function(t){return Ohe(t,!1)},Phe=function(t){return Ohe(t,!0)};function Lhe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=nD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=nD(t,s,!1),a=nD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:en.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function nD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var efe=function(t,n){return tD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function ofe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(iD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(en.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(en.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:en.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function sfe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(iD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var bet=afe(!1),_et=afe(!0);function afe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=hl(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(gr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new WS(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=Rj(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:en.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var lfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){r.push({from:i.from,insert:n.facet(GS)})}),{userEvent:"input.indent"})),!0)},cfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=s_(o,n.tabSize),a=0,l=S_(n,Math.max(0,s-P0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:rfe}].concat(xet.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Cet=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return eD(t.state,n,!fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,!fl(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return eD(t.state,n,fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,fl(t))})}},{key:"Alt-ArrowUp",run:function(t){return ofe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return sfe(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return ofe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return sfe(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=en.create([i.main]):i.main.empty||(r=en.create([en.cursor(i.main.head)])),!!r&&(e(bh(n,r)),!0)}},{key:"Mod-Enter",run:_et},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=iD(n).map(function(r){return en.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:en.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=L0(n.selection,function(r){for(var o,s=hl(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return en.range(s.to,s.from)});return e(bh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:cfe},{key:"Mod-]",run:lfe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new WS(n,{overrideIndentation:function(s){return i[s]??-1}}),o=tP(n,function(s,a,l){var c=Rj(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=S_(n,c);(u!=d||l.from0?o--:s0&&yh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ke(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(dfe(a))}:dfe,this.query=this.normalize(e)}return Se(t,[{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 Ba(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=S4(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=Sc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ke(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=hfe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new mfe(n,e,i,r,o);this.re=new RegExp(e,nP+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=rD(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=rD(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return iP.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=rD(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pfe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function rD(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function rP(t){var n=Oo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Un(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:oD.of(!1),selection:en.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Oo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:oD.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Oo("label",t.state.phrase("Go to line"),": ",n)," ",Oo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(ffe.prototype[Symbol.iterator]=mfe.prototype[Symbol.iterator]=function(){return this});var oD=hr.define(),gfe=Va.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(oD)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n?rP:null})}}),Det=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Tet={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vfe=Qn.define({combine:function(t){return su(t,Tet,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Eet=yi.mark({class:"cm-selectionMatch"}),Aet=yi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yfe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==cs.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==cs.Word)}var Met=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(vfe),i=n.state,r=i.selection;if(r.ranges.length>1)return yi.none;var o,y,_,C,S,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return yi.none;var l=i.wordAt(s.head);if(!l)return yi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return yi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!yfe(a=i.charCategorizer(s.head),i,s.from,s.to)||(S=s.to,(y=a)((_=i).sliceDoc(C=s.from,C+1))!=cs.Word||y(_.sliceDoc(S-1,S))!=cs.Word))return yi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return yi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new R0(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||yfe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Aet.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Eet.range(g,v)),d.length>e.maxMatches))return yi.none}}catch(y){h.e(y)}finally{h.f()}return yi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Iet=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),sD=Qn.define({combine:function(t){return su(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Vet(n)}})}});function Fet(t){return t?[sD.of(t),hP]:hP}var bfe=function(){function t(n){ke(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,nP),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Oet(this):new Net(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:No.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?B0(this,r,e,i):$0(this,r,e,i)}}]),t}(),_fe=Se(function t(n){ke(this,t),this.spec=n});function $0(t,n,e,i){return new R0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=$0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function B0(t,n,e,i){return new ffe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(aD(a.input,a.index))!=cs.Word||r(lD(a.input,a.index))!=cs.Word)&&(r(lD(a.input,a.index+a[0].length))!=cs.Word||r(aD(a.input,a.index+a[0].length))!=cs.Word)}):void 0},e,i);var r}function aD(t,n){return t.slice(Pl(t,n,!1),n)}function lD(t,n){return t.slice(n,Pl(t,n))}var Oet=function(t){wt(e,_fe);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=B0(this.spec,i,o,i.doc.length).next();return s.done&&(s=B0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=B0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=B0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),E_=hr.define(),oP=hr.define(),Cp=Va.define({create:function(t){return new sP(lP(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(E_)?t=new sP(r.value.create(),t.panel):r.is(oP)&&(t=new sP(t.query,r.value?aP:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n.panel})}}),sP=Se(function t(n,e){ke(this,t),this.query=n,this.panel=e}),jet=yi.mark({class:"cm-searchMatch"}),Pet=yi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Let=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Cp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Cp);(e!=n.startState.field(Cp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return yi.none;for(var i=this.view,r=new Gm,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Pet:jet)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function A_(t){return function(n){var e=n.state.field(Cp,!1);return e&&e.query.spec.valid?t(n,e):cP(n)}}var cD=A_(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:dP(t,r),userEvent:"select.search"}),!0)}),uD=A_(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:dP(t,o),userEvent:"select.search"}),!0)}),Ret=A_(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:en.create(e.map(function(i){return en.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),xfe=A_(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(dP(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),$et=A_(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function aP(t){return t.state.facet(sD).createPanel(t)}function lP(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(sD);return new bfe({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var cP=function(t){var n=t.state.field(Cp,!1);if(n&&n.panel){var e=y_(t,aP);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=lP(t.state,n.query.spec);r.valid&&t.dispatch({effects:E_.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[oP.of(!0),n?E_.of(lP(t.state,n.query.spec)):hr.appendConfig.of(hP)]});return!0},uP=function(t){var n=t.state.field(Cp,!1);if(!n||!n.panel)return!1;var e=y_(t,aP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:oP.of(!1)}),!0},Bet=[{key:"Mod-f",run:cP,scope:"editor search-panel"},{key:"F3",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:uP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new R0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(en.range(c.value.from,c.value.to))}return e(n.update({selection:en.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=y_(t,rP);if(!n){var e=[oD.of(!0)];null==t.state.field(gfe,!1)&&e.push(hr.appendConfig.of([gfe,Det])),t.dispatch({effects:e}),n=y_(t,rP)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=en.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||en.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var _=s.wordAt(y.value.from);if(!_||_.from!=y.value.from||_.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new R0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new R0(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===bn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(en.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Vet=function(){function t(n){var e=this;ke(this,t),this.view=n;var i=this.query=n.state.field(Cp).query.spec;function r(o,s,a){return Oo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Oo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Oo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Oo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Oo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Oo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Oo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return cD(n)},[Ac(n,"next")]),r("prev",function(){return uD(n)},[Ac(n,"previous")]),r("select",function(){return Ret(n)},[Ac(n,"all")]),Oo("label",null,[this.caseField,Ac(n,"match case")]),Oo("label",null,[this.reField,Ac(n,"regexp")]),Oo("label",null,[this.wordField,Ac(n,"by word")])].concat(si(n.state.readOnly?[]:[Oo("br"),this.replaceField,r("replace",function(){return xfe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return $et(n)},[Ac(n,"replace all")])]),[Oo("button",{name:"close",onclick:function(){return uP(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new bfe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:E_.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return bde(yde(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?uD:cD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),xfe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(E_)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(sD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var dD=/[\s\.,:;?!]/;function dP(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!dD.test(l[c+1])&&dD.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!dD.test(l[u-1])&&dD.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Het=Wn.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"}}),hP=[Cp,k0.lowest(Let),Het],wfe=function(){function t(n,e,i){ke(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=hl(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Sfe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Cfe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var kfe=Se(function t(n,e,i){ke(this,t),this.completion=n,this.source=e,this.match=i});function kp(t){return t.selection.main.head}function Sfe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Dfe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:en.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:en.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var Tfe=new WeakMap;function Uet(t){if(!Array.isArray(t))return t;var n=Tfe.get(t);return n||Tfe.set(t,n=function zet(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Un(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(z=S4(R))!=z.toLowerCase()?1:z!=z.toUpperCase()?2:0;(!M||1==U&&C||0==G&&0!=U)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=M:s.length&&(S=!1)),G=U,M+=Sc(R)}return m==c&&0==s[0]&&S?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,_]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,_]:m==c?this.result((g?-200:0)-100-700+(S?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?Sc(Ba(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_h=Qn.define({combine:function(t){return su(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Efe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Wet=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_h);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,si(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,_))),C.className="cm-completionMatchedText",g=_}return g=this.range.to)&&(this.range=Efe(i.options.length,i.selected,this.view.state.facet(_h).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Mfe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,_=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=[1e9-m++];if(_){var $,G=Re(_(S));try{for(G.s();!($=G.n()).done;)M.push($.value)}catch(N){G.e(N)}finally{G.f()}}p.push(new kfe(S,v,M))}}catch(N){C.e(N)}finally{C.f()}}else{var z,U=new Get(h.sliceDoc(v.from,v.to)),q=void 0,re=Re(v.result.options);try{for(re.s();!(z=re.n()).done;){var L=z.value;(q=U.match(L.label))&&(null!=L.boost&&(q[0]+=L.boost),p.push(new kfe(L,v,q)))}}catch(N){re.e(N)}finally{re.f()}}}}catch(N){g.e(N)}finally{g.f()}var X,Z=[],H=null,he=h.facet(_h).compareCompletions,E=Re(p.sort(function(N,Y){return Y.match[0]-N.match[0]||he(N.completion,Y.completion)}));try{for(E.s();!(X=E.n()).done;){var F=X.value;!H||H.label!=F.completion.label||H.detail!=F.completion.detail||null!=H.type&&null!=F.completion.type&&H.type!=F.completion.type||H.apply!=F.completion.apply?Z.push(F):Afe(F.completion)>Afe(H)&&(Z[Z.length-1]=F),H=F.completion}}catch(N){E.e(N)}finally{E.f()}return Z}(n,e);if(!s.length)return null;var a,l=e.facet(_h).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var Jet=[];function fP(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var Jm=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ke(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=fP(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(pP))r=new t(r.source,1,a.value?kp(n.state):-1);else if(a.is(hD))r=new t(r.source,0);else if(a.is(Ife)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(kp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),Ket=function(t){wt(e,Jm);var n=Ct(e);function e(i,r,o,s,a){var l;return ke(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=kp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&kp(i.startState)==this.from)return new Jm(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Sfe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new wfe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:kp(i.state)):new Jm(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new Jm(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),pP=hr.define(),hD=hr.define(),Ife=hr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),Ffe=hr.define(),uu=Va.define({create:function(){return Xet.start()},update:function(t,n){return t.update(n)},provide:function(t){return[FS.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function fD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(uu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function KQe(t,n){var e=t.plugin(Ode);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:Ffe.of(a)}),!0}}var Qet=Se(function t(n,e){ke(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),Zet=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(uu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(uu);if(n.selectionSet||n.docChanged||n.startState.field(uu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!fP(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,si(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==fP(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(uu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=kp(i),o=new wfe(i,r,n.explicitPos==r),s=new Qet(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:hD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_h),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new Ket(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:kp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(uu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new Jm(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),pD={brackets:["(","[","{","'",'"'],before:")]}:;>"},Km=hr.define({map:function(t,n){return n.mapPos(t,-1,Ll.TrackAfter)??void 0}}),mP=hr.define({map:function(t,n){return n.mapPos(t)}}),gP=new(function(t){wt(e,Um);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e)}());gP.startSide=1,gP.endSide=-1;var Nfe=Va.define({create:function(){return Go.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Go.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(Km)?t=t.update({add:[gP.range(a.value,a.value+1)]}):a.is(mP)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Ofe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return S4(t<128?t:t+1)}function jfe(t,n){return t.languageDataAt("closeBrackets",n)[0]||pD}var ttt="object"==(typeof navigator>"u"?"undefined":bn(navigator))&&/Android\b/.test(navigator.userAgent),ntt=Wn.inputHandler.of(function(t,n,e,i){if((ttt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==Sc(Ba(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=jfe(s,s.selection.main.head),u=c.brackets||pD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Ofe(Ba(h,0));if(a==h)return f==h?stt(s,h,u.indexOf(h+h+h)>-1):rtt(s,h,f,c.before||pD.before);if(a==f&&Pfe(s,s.selection.main.from))return ott(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),itt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=jfe(n,n.selection.main.head).brackets||pD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=Sc(Ba(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&mD(n.doc,s.head)==Ofe(Ba(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:en.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Pfe(t,n){var e=!1;return t.field(Nfe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function mD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,Sc(Ba(e,0)))}function rtt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Km.of(s.to+n.length),range:en.range(s.anchor+n.length,s.head+n.length)};var a=mD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Km.of(s.head+n.length),range:en.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function ott(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&mD(t.doc,o.head)==e?en.cursor(o.head+e.length):i=o});return i?null:t.update({selection:en.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return mP.of(o.from)})})}function stt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Km.of(o.to+n.length),range:en.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=mD(t.doc,s);if(a==n){if(Lfe(t,s))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(Pfe(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:en.cursor(s+n.length*(l?3:1)),effects:mP.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Lfe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=cs.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=cs.Word&&!function(u,d,h){for(var f=hl(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lfe(t,n){var e=hl(t).resolveInner(n+1);return e.parent&&e.from==n}function att(){return[uu,_h.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Zet,ltt,ett]}var Rfe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(uu,!1)&&(t.dispatch({effects:pP.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(uu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:hD.of(null)}),0))}},{key:"ArrowDown",run:fD(!0)},{key:"ArrowUp",run:fD(!1)},{key:"PageDown",run:fD(!0,"page")},{key:"PageUp",run:fD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(uu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Dfe(t,n.open.options[n.open.selected]),0))}}],ltt=k0.highest(AS.computeN([_h],function(t){return t.facet(_h).defaultKeymap?[Rfe]:[]})),ctt=Se(function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.diagnostic=i}),M_=function(){function t(n,e,i){ke(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Qm).markerFilter;o&&(r=o(r));var s=yi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?yi.widget({widget:new ptt(a),diagnostic:a}).range(a.from):yi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,V0(s))}}]),t}();function V0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new ctt(r,o,a.diagnostic),!1}),i}function $fe(t,n){return!(!t.effects.some(function(e){return e.is(gD)})&&!t.changes.touchesRange(n.pos))}function Bfe(t,n){return t.field(Mc,!1)?n:n.concat(hr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?yi.set([utt.range(r.from,r.to)]):yi.none}),JQe(dtt,{hideOn:$fe}),mtt]))}var gD=hr.define(),vP=hr.define(),Vfe=hr.define(),Mc=Va.define({create:function(){return new M_(yi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=V0(e,t.selected.diagnostic,r)||V0(e,null,r)}t=new M_(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(gD)?t=M_.init(a.value,t.panel,n.state):a.is(vP)?t=new M_(t.diagnostics,a.value?qfe.open:null,t.selected):a.is(Vfe)&&(t=new M_(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[b_.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),utt=yi.mark({class:"cm-lintRange cm-lintRange-active"});function dtt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=Ufe(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=V0(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Vfe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function vD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function yP(t){return vD(''),'width="6" height="3"')}var mtt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:yP("#d11")},".cm-lintRange-warning":{backgroundImage:yP("orange")},".cm-lintRange-info":{backgroundImage:yP("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gtt=function(t){wt(e,ph);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(yD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:bP.of({pos:f.from,above:!1,create:function(){return{dom:Hfe(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var _=m.getBoundingClientRect();if(!(y.clientX>_.left-10&&y.clientX<_.right+10&&y.clientY>_.top-10&&y.clientY<_.bottom+10)){for(var C=y.target;C;C=C.parentNode)if(1==C.nodeType&&C.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",v),p.state.field(Yfe)&&p.dispatch({effects:bP.of(null)})}})}var d=a.state.facet(yD).hoverTime,h=setTimeout(u,d);l.onmouseout=function(){clearTimeout(h),l.onmouseout=l.onmousemove=null},l.onmousemove=function(){clearTimeout(h),h=setTimeout(u,d)}}(i,r,o)}),r}}]),e}();function vtt(t,n){var e,i=Object.create(null),r=Re(n);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t.lineAt(o.from);(i[s.from]||(i[s.from]=[])).push(o)}}catch(c){r.e(c)}finally{r.f()}var a=[];for(var l in i)a.push(new gtt(i[l]).range(+l));return Go.of(a,!0)}var ytt=$de({class:"cm-gutter-lint",markers:function(t){return t.state.field(Xfe)}}),Xfe=Va.define({create:function(){return Go.empty},update:function(t,n){t=t.map(n.changes);var e,i=n.state.facet(yD).markerFilter,r=Re(n.effects);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.is(gD)){var s=o.value;i&&(s=i(s||[])),t=vtt(n.state.doc,s.slice(0))}}}catch(a){r.e(a)}finally{r.f()}return t}}),bP=hr.define(),Yfe=Va.define({create:function(){return null},update:function(t,n){return t&&n.docChanged&&(t=$fe(n,t)?null:Object.assign(Object.assign({},t),{pos:n.changes.mapPos(t.pos)})),n.effects.reduce(function(e,i){return i.is(bP)?i.value:e},t)},provide:function(t){return FS.from(t)}}),btt=Wn.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:vD('')},".cm-lint-marker-warning":{content:vD('')},".cm-lint-marker-error":{content:vD('')}}),yD=Qn.define({combine:function(t){return su(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function _tt(){return[yD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Xfe,ytt,btt,Yfe]}var Jfe,xtt=function(){return[rZe(),sZe,NQe(),cet(),jZe(),SQe(),[v_,AQe],No.allowMultipleSelections.of(!0),No.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=Rj(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=S_(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),bhe($Ze,{fallback:!0}),WZe(),[ntt,Nfe],att(),BQe(),zQe(),RQe,(n=[Iet,Met],n),AS.of([].concat(itt,si(Cet),Bet,vet,FZe,Rfe,htt))];var n}(),wtt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ke(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%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(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ctt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!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 n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Kfe(r,r.start):null,0,null)}}]),t}(),Kfe=Se(function t(n,e){ke(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Jfe||(Jfe={}));var Ctt=function(){function t(n){ke(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),ktt=function(){function t(n,e,i){ke(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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 t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),bD=Se(function t(){ke(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),Qfe=new bD,Stt=function(){function t(n,e){ke(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qfe,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=Qfe,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),_D=function(){function t(n,e){ke(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function xD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}_D.prototype.contextual=_D.prototype.fallback=_D.prototype.extend=!1;var Zfe,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),_P=null;function epe(t,n,e){var i=t.cursor(za.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Zfe||(Zfe={}));var tpe,Dtt=function(){function t(n,e){ke(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?epe(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?epe(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Ttt=function(){function t(n,e){ke(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new bD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new bD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new bD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Dtt(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,_=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=S.p.stoppedAt;(S.pos==S.p.stream.end||null!=M&&S.pos>M)&&S.p.parser.stateFlag(S.state,2)&&(!_||_.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(gr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(_):i.push(_)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return npe(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),npe(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],_=-v;_>0;_--)d(p[g++],m,y);g++}}}}catch(M){f.e(M)}finally{f.f()}}o.nodeSet=new cZe(s.map(function(M,$){return au.define({name:$>=o.minRepeatTerm?void 0:M,id:$,props:c[$],top:l.indexOf($)>-1,error:0==$,skipped:i.skippedNodes&&i.skippedNodes.indexOf($)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,si(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=xD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var S=0;S2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=hf(this.data,o+2)}if(r==hf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=hf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=ipe(this.data,this.tokenPrecTable,r);return o<0||ipe(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&ape(t);return{c:function(){n=be("div"),r&&r.c(),e=it(),o&&o.c(),i=it(),s&&s.c(),P(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),de(n,e),o&&o.m(n,null),de(n,i),s&&s.m(n,null)},p:function(a,l){var c=Un(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=ope(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=spe(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=ape(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:Lt,o:Lt,d:function(a){a&&je(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ptt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Ltt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ptt,jtt,ys,{editorState:3},Ott),r}return Se(e)}(),xP=Bj.define([{tag:fn.propertyName,color:"var(--jse-key-color)"},{tag:fn.number,color:"var(--jse-value-color-number)"},{tag:fn.bool,color:"var(--jse-value-color-boolean)"},{tag:fn.string,color:"var(--jse-value-color-string)"},{tag:fn.keyword,color:"var(--jse-value-color-null)"}]),Rtt=bhe(xP),$tt=xP.style;function wP(t){return t.doc.lineAt(t.selection.main.head)}function lpe(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=lpe(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=lpe(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=wP(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,_=g.from;_<=y;){var C=f.doc.lineAt(_);p.has(C)||p.add(C),_=C.to+1}}catch(S){m.e(S)}finally{m.f()}return p}(this.view,n),o=new Btt(r,n,this.unitWidth),s=n.facet(wD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Htt(c,this.unitWidth,s);i.add(l.from,l.from,yi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Utt(){return[wD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Vtt,ka.fromClass(ztt,{decorations:function(n){return n.decorations}})]}function Gtt(t){pi(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function CP(t){var n=t.slice();return n[93]=0===n[10].length,n}function cpe(t){var n,e;return n=new hKe({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wtt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function qtt(t){var n,e,i,r,o,s=t[92]&&upe(t),a=!t[92]&&dpe(t);return{c:function(){n=be("div"),e=it(),s&&s.c(),i=it(),a&&a.c(),r=_r(),P(n,"class","jse-contents svelte-1yqirn0"),Mt(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Mt(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&Q(s,1)):((s=upe(l)).c(),Q(s,1),s.m(i.parentNode,i)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),l[92]?a&&($t(),ce(a,1,1,function(){a=null}),Bt()):a?(a.p(l,c),1152&c[0]&&Q(a,1)):((a=dpe(l)).c(),Q(a,1),a.m(r.parentNode,r))},i:function(l){o||(Q(s),Q(a),o=!0)},o:function(l){ce(s),ce(a),o=!1},d:function(l){l&&je(n),t[50](null),l&&je(e),s&&s.d(l),l&&je(i),a&&a.d(l),l&&je(r)}}}function upe(t){var n,e,i,r,o,s=oh(t[10]||"",2e4)+"";return n=new nd({props:{icon:$m,type:"error",message:"The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=tn(s),P(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){ft(n,a,l),Pe(a,e,l),Pe(a,i,l),de(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=oh(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(Q(n.$$.fragment,a),o=!0)},o:function(a){ce(n.$$.fragment,a),o=!1},d:function(a){pt(n,a),a&&je(e),a&&je(i)}}}function dpe(t){var n,e,i,r,o,s=!t[13]&&t[8]&&hoe(t[10]),a=t[2]&&hpe(t),l=t[13]&&fpe(t),c=s&&ppe(t);return r=new l4({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=it(),l&&l.c(),e=it(),c&&c.c(),i=it(),mt(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),ft(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&Q(a,1)):((a=hpe(u)).c(),Q(a,1),a.m(n.parentNode,n)):a&&($t(),ce(a,1,1,function(){a=null}),Bt()),u[13]?l?(l.p(u,d),8192&d[0]&&Q(l,1)):((l=fpe(u)).c(),Q(l,1),l.m(e.parentNode,e)):l&&($t(),ce(l,1,1,function(){l=null}),Bt()),9472&d[0]&&(s=!u[13]&&u[8]&&hoe(u[10])),s?c?(c.p(u,d),9472&d[0]&&Q(c,1)):((c=ppe(u)).c(),Q(c,1),c.m(i.parentNode,i)):c&&($t(),ce(c,1,1,function(){c=null}),Bt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!0)},o:function(u){ce(a),ce(l),ce(c),ce(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&je(n),l&&l.d(u),u&&je(e),c&&c.d(u),u&&je(i),pt(r,u)}}}function hpe(t){var n,e;return n=new Ltt({props:{editorState:t[6]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fpe(t){var n,e;return n=new nd({props:{type:"error",icon:$m,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ppe(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Xtt(t){var n,e,i,r,o,s=t[1]&&cpe(CP(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[qtt,Wtt][i](c(t,i)),{c:function(){n=be("div"),s&&s.c(),e=it(),r.c(),P(n,"class","jse-text-mode svelte-1yqirn0"),Mt(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),de(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(CP(u),d),2&d[0]&&Q(s,1)):((s=cpe(CP(u))).c(),Q(s,1),s.m(n,e)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),r.p(c(u,i),d),(!o||2&d[0])&&Mt(n,"no-main-menu",!u[1])},i:function(u){o||(Q(s),Q(r),o=!0)},o:function(u){ce(s),ce(r),o=!1},d:function(u){u&&je(n),s&&s.d(),l[i].d(),t[52](null)}}}function mpe(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function Ytt(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,_=n.onChange,C=n.onChangeMode,S=n.onError,M=n.onFocus,$=n.onBlur,G=n.onRenderMenu,R=n.onSortModal,z=n.onTransformModal,U=wa("jsoneditor:TextMode"),q={key:"Mod-i",run:ie,shift:Ie,preventDefault:!0},re=typeof window>"u";U("isSSR:",re);var L=!1,X=!0,Z=[],H=new hp,he=new hp,E=new hp,F=new hp,N=new hp,Y=new hp,V=h,oe=Nk(V,f,g),fe=m;Wc(Zi(vn().mark(function gt(){return vn().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!re){On.next=2;break}return On.abrupt("return");case 2:try{s=ci({target:o,initialText:jo(oe,L)?"":i.escapeValue(oe),readOnly:c,indentation:f})}catch(ai){console.error(ai)}case 3:case"end":return On.stop()}},gt)}))),Hu(function(){s&&(U("Destroy CodeMirror editor"),s.destroy())});var Fe=!1,xe=!1,tt=ep(),ze=ep();function ot(){s&&(U("focus"),s.focus())}var B=!1;function ne(gt){U("patch",gt);var On=g.parse(oe),ai=Yu(On,gt),bi=FQ(On,gt);return Nr({text:g.stringify(ai,null,f)}),{json:ai,previousJson:On,undo:bi,redo:gt}}function ie(){if(U("format"),c)return!1;try{var gt=g.parse(oe);return Nr({text:g.stringify(gt,null,f)}),e(8,X=!0),!0}catch(On){S(On)}return!1}function Ie(){if(U("compact"),c)return!1;try{var gt=g.parse(oe);return Nr({text:g.stringify(gt)}),e(8,X=!1),!0}catch(On){S(On)}return!1}function Ye(){if(U("repair"),!c)try{Nr({text:Yd(oe)}),e(49,Nn="valid"),e(13,xt=null)}catch(gt){S(gt)}}function Le(gt){var On=gt.id,ai=gt.rootPath,bi=gt.onTransform,Er=gt.onClose;try{var qr=g.parse(oe);B=!0,z({id:On||ze,json:qr,rootPath:ai||[],onTransform:function(ao){bi?bi({operations:ao,json:qr,transformedJson:Yu(qr,ao)}):(U("onTransform",ao),ne(ao))},onClose:function(){B=!1,ot(),Er&&Er()}})}catch(ao){S(ao)}}function _t(gt,On){U("setSelection",{anchor:gt,head:On}),s&&s.dispatch(s.state.update({selection:{anchor:gt,head:On},scrollIntoView:!0}))}function At(gt,On){if(1===On.state.selection.ranges.length){var ai=On.state.selection.ranges[0],bi=oe.slice(ai.from,ai.to);if("{"===bi||"["===bi){var Er=O2.parse(oe),qr=Object.keys(Er.pointers).find(function(Js){var vr;return(null===(vr=Er.pointers[Js].value)||void 0===vr?void 0:vr.pos)===ai.from}),ao=Er.pointers[qr];qr&&ao&&ao.value&&ao.valueEnd&&(U("pointer found, selecting inner contents of path:",qr,ao),_t(ao.value.pos+1,ao.valueEnd.pos-1))}}}function _n(){return function(gt){return Qm.of({source:gt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ui,{delay:300})}function ci(gt){var On=gt.target,ai=gt.initialText,bi=gt.readOnly,Er=gt.indentation;U("Create CodeMirror editor",{readOnly:bi,indentation:Er});var qr=No.create({doc:ai,extensions:[AS.of([ket,q]),H.of(_n()),_tt(),xtt,Rtt,Utt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:At}),Wn.updateListener.of(function(ao){e(6,l=ao.state),ao.docChanged&&Ai()}),new SZe(Ntt),Fet({top:!0}),E.of(No.readOnly.of(bi)),he.of(Wn.editable.of(!bi)),N.of(No.tabSize.of(p)),F.of(wr(Er)),Y.of(Wn.theme({},{dark:on()})),Wn.lineWrapping]});return s=new Wn({state:qr,parent:On})}function on(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Fi(gt){var On=gt.path,ai=gt.message,bi=function(Er,qr){try{var ao=O2.parse(Er),Js=ln(qr),vr=ao.pointers[Js];if(vr)return{path:qr,line:vr.key?vr.key.line:vr.value?vr.value.line:0,column:vr.key?vr.key.column:vr.value?vr.value.column:0,from:vr.key?vr.key.pos:vr.value?vr.value.pos:0,to:vr.keyEnd?vr.keyEnd.pos:vr.valueEnd?vr.valueEnd.pos:0}}catch(Ks){console.error(Ks)}return null}(i.escapeValue(oe),On);return{path:On,line:bi.line,column:bi.column,from:bi.from,to:bi.to,message:ai,severity:Xd.warning,actions:[]}}function pn(gt,On){var Er=gt.position;return{path:[],line:gt.line,column:gt.column,from:Er,to:Er,severity:Xd.error,message:gt.message,actions:On&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function Nr(gt){var On=arguments.length>1&&void 0!==arguments[1]&&arguments[1],ai=Nk(gt,f,g),bi=!or(gt,V),Er=V;V=gt,e(10,oe=ai),U("setCodeMirrorContent",{isChanged:bi,forceUpdate:On}),s&&(bi||On)&&(jo(oe,L)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}}),Or(),bi&&Wr(V,Er))}function $r(){if(s){var gt=s?i.unescapeValue(s.state.doc.toString()):"",On=gt!==oe;if(U("onChangeCodeMirrorValue",{isChanged:On}),On){var ai=V;e(10,oe=gt),V={text:oe},Or(),Wr(V,ai)}}}function wr(gt){return GS.of("number"==typeof gt?" ".repeat(gt):gt)}function Or(){e(11,Fe=het(s.state)>0),e(12,xe=fet(s.state)>0),U({canUndo:Fe,canRedo:xe})}a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(a)},hasFocus:function(){return B&&document.hasFocus()||jk(a)},onFocus:M,onBlur:$});var Ai=Gv($r,300);function Wr(gt,On){_&&_(gt,On,{contentErrors:Ni(),patchResult:null})}function jo(gt,On){return!!gt&>.length>10485760&&!On}var Nn="valid",xt=null;function ui(){if(jo(oe,L))return[];var gt=Ni();return Dae(gt)?[mpe(pn(gt.parseError,gt.isRepairable))]:function Jqe(t){return Io(t)&&Array.isArray(t.validationErrors)}(gt)?gt.validationErrors.map(Fi).map(mpe):[]}function Ni(){U("validate:start"),Ai.flush();var gt=Cr(i.escapeValue(oe),v,g,y);return Dae(gt)?(e(49,Nn=gt.isRepairable?"repairable":"invalid"),e(13,xt=gt.parseError),e(9,Z=[])):(e(49,Nn="valid"),e(13,xt=null),e(9,Z=gt?.validationErrors||[])),U("validate:end"),gt}var Cr=Zb(Oqe);function xo(){xt&&function(gt){U("select parse error",gt);var On=pn(gt,!1);_t(On.from,On.to),ot()}(xt)}var Qo={icon:xWe,text:"Show me",title:"Move to the parse error location",onClick:xo};return t.$$set=function(gt){"readOnly"in gt&&e(0,c=gt.readOnly),"mainMenuBar"in gt&&e(1,u=gt.mainMenuBar),"statusBar"in gt&&e(2,d=gt.statusBar),"externalContent"in gt&&e(29,h=gt.externalContent),"indentation"in gt&&e(30,f=gt.indentation),"tabSize"in gt&&e(31,p=gt.tabSize),"escapeUnicodeCharacters"in gt&&e(32,m=gt.escapeUnicodeCharacters),"parser"in gt&&e(33,g=gt.parser),"validator"in gt&&e(34,v=gt.validator),"validationParser"in gt&&e(35,y=gt.validationParser),"onChange"in gt&&e(36,_=gt.onChange),"onChangeMode"in gt&&e(37,C=gt.onChangeMode),"onError"in gt&&e(38,S=gt.onError),"onFocus"in gt&&e(39,M=gt.onFocus),"onBlur"in gt&&e(40,$=gt.onBlur),"onRenderMenu"in gt&&e(3,G=gt.onRenderMenu),"onSortModal"in gt&&e(41,R=gt.onSortModal),"onTransformModal"in gt&&e(42,z=gt.onTransformModal)},t.$$.update=function(){var gt;2&t.$$.dirty[1]&&(i=TO({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&Nr(h),8&t.$$.dirty[1]&&(U("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(_n())})),1073741824&t.$$.dirty[0]&&(gt=f,s&&(U("updateIndentation",gt),s.dispatch({effects:F.reconfigure(wr(gt))}))),1&t.$$.dirty[1]&&function(gt){s&&(U("updateTabSize",gt),s.dispatch({effects:N.reconfigure(No.tabSize.of(gt))}))}(p),1&t.$$.dirty[0]&&function(gt){s&&(U("updateReadOnly",gt),s.dispatch({effects:[E.reconfigure(No.readOnly.of(gt)),he.reconfigure(Wn.editable.of(!gt))]}))}(c),131074&t.$$.dirty[1]&&fe!==m&&(e(48,fe=m),U("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Nn||c?[Qo]:[{icon:zk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},Qo])},[c,u,d,G,o,a,l,L,X,Z,oe,Fe,xe,xt,r,re,ie,Ie,function(){var gt;if(!c)try{var On=g.parse(oe);B=!0,R({id:tt,json:On,rootPath:[],onSort:(gt=Zi(vn().mark(function ai(bi){var Er;return vn().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:U("onSort",Er=bi.operations),ne(Er);case 3:case"end":return qr.stop()}},ai)})),function(ai){return gt.apply(this,arguments)}),onClose:function(){B=!1,ot()}})}catch(ai){S(ai)}},function(){c||Le({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?uP(s):cP(s))},function(){c||s&&(Kj(s),ot())},function(){c||s&&(KS(s),ot())},function(){e(7,L=!0),Nr(h,!0)},function(){C(Jo.tree)},function(){$r()},function(gt){U("select validation error",gt);var On=Fi(gt);_t(On.from,On.to),ot()},jo,xo,h,f,p,m,g,v,y,_,C,S,M,$,R,z,ot,ne,Le,function(){U("refresh"),Xl().then(function(){if(s){var gt=on();U("updateTheme",{dark:gt}),s.dispatch({effects:[Y.reconfigure(Wn.theme({},{dark:gt}))]})}})},Ni,fe,Nn,function(gt){Vi[gt?"unshift":"push"](function(){e(4,o=gt)})},function(){return e(8,X=!1)},function(gt){Vi[gt?"unshift":"push"](function(){e(5,a=gt)})}]}var Jtt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ytt,Xtt,Ei,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Gtt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function Ktt(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Qtt(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:bse,title:xF,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var Ztt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Qtt,Ktt,Ei,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function gpe(t,n,e){var i=t.slice();return i[9]=n[e],i}function vpe(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],_=Xi(v);_.length>0&&!Xc(m,_);)y.unshift({op:"add",path:ln(_),value:{}}),_=Xi(_);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&ip(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var nnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,tnt,ent,Ei,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function int(t){pi(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function rnt(t){var n,e,i,r,o=oh(t[2].stringify(t[1]),50)+"";return{c:function(){n=be("button"),e=tn(o),P(n,"type","button"),P(n,"class","jse-inline-value svelte-l28mqd"),Mt(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),de(n,e),i||(r=Nt(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Un(a,1)[0];6&l&&o!==(o=oh(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&Mt(n,"jse-selected",s[3])},i:Lt,o:Lt,d:function(s){s&&je(n),i=!1,r()}}}function ont(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=oo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var snt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ont,rnt,Ei,{path:0,value:1,parser:2,isSelected:3,onEdit:4},int),r}return Se(e)}();function ant(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function ype(t){var n,e,i,r;return e=new sr({props:{data:t[1]===qc.asc?ru:yse}}),{c:function(){n=be("span"),mt(e.$$.fragment),P(n,"class","jse-column-sort-icon svelte-h4fort"),P(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),ft(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===qc.asc?ru:yse),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&P(n,"title",i)},i:function(o){r||(Q(e.$$.fragment,o),r=!0)},o:function(o){ce(e.$$.fragment,o),r=!1},d:function(o){o&&je(n),pt(e)}}}function lnt(t){var n,e,i,r,o,s,a,l,c=oh(t[3],50)+"",u=void 0!==t[1]&&ype(t);return{c:function(){n=be("button"),e=be("span"),i=tn(c),r=it(),u&&u.c(),P(e,"class","jse-column-name"),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Mt(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),de(n,e),de(e,i),de(n,r),u&&u.m(n,null),s=!0,a||(l=Nt(n,"click",t[4]),a=!0)},p:function(d,h){var f=Un(h,1)[0];(!s||8&f)&&c!==(c=oh(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&Q(u,1)):((u=ype(d)).c(),Q(u,1),u.m(n,null)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&P(n,"title",o),(!s||1&f)&&Mt(n,"jse-readonly",d[0])},i:function(d){s||(Q(u),s=!0)},o:function(d){ce(u),s=!1},d:function(d){d&&je(n),u&&u.d(),a=!1,l()}}}function cnt(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Hi(s)?"values":tu(Kl(s))),96&t.$$.dirty&&e(1,r=or(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=H7e[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===qc.asc?qc.desc:qc.asc})},s,a,c]}var CD,kD,unt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cnt,lnt,Ei,{path:5,sortedColumn:6,readOnly:0,onSort:7},ant),r}return Se(e)}();function bpe(t,n){return CD||(kD=new WeakMap,CD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=kD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),kD.set(t,n),CD.observe(t),{destroy:function(){kD.delete(t),CD.unobserve(t)}}}function dnt(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,_=n.onEditValue,C=n.onEditRow,S=n.onToggleEnforceString,M=n.onCut,$=n.onCopy,G=n.onPaste,R=n.onRemove,z=n.onDuplicateRow,U=n.onInsertBeforeRow,q=n.onInsertAfterRow,re=n.onRemoveRow;function L(){y(),_()}function X(){y(),C()}function Z(){y(),S()}function H(){y(),M(!0)}function he(){y(),M(!1)}function E(){y(),$(!0)}function F(){y(),$(!1)}function N(){y(),G()}function Y(){y(),R()}function V(){y(),z()}function oe(){y(),U()}function fe(){y(),q()}function Fe(){y(),re()}return t.$$set=function(xe){"json"in xe&&e(2,p=xe.json),"documentState"in xe&&e(3,m=xe.documentState),"parser"in xe&&e(4,g=xe.parser),"showTip"in xe&&e(0,v=xe.showTip),"onCloseContextMenu"in xe&&e(5,y=xe.onCloseContextMenu),"onEditValue"in xe&&e(6,_=xe.onEditValue),"onEditRow"in xe&&e(7,C=xe.onEditRow),"onToggleEnforceString"in xe&&e(8,S=xe.onToggleEnforceString),"onCut"in xe&&e(9,M=xe.onCut),"onCopy"in xe&&e(10,$=xe.onCopy),"onPaste"in xe&&e(11,G=xe.onPaste),"onRemove"in xe&&e(12,R=xe.onRemove),"onDuplicateRow"in xe&&e(13,z=xe.onDuplicateRow),"onInsertBeforeRow"in xe&&e(14,U=xe.onInsertBeforeRow),"onInsertAfterRow"in xe&&e(15,q=xe.onInsertAfterRow),"onRemoveRow"in xe&&e(16,re=xe.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Hi(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Fr(i)||xs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Fr(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&zb(i)&&!s&&Array.isArray(Sn(p,Xi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&zb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!Ho(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Io(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Ho(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&lf(a,m.enforceStringMap,ln(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:L,icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:L,disabled:!c},{type:"button",icon:h?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Z,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:he,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:F,disabled:!l}]},{type:"button",onClick:N,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:Y,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:X,icon:h0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:wse,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:oe,icon:f0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:fe,icon:f0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Fe,icon:XO,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,_,C,S,M,$,G,R,z,U,q,re,o,l,u,h,c,i,a,d,r,s]}var fnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,hnt,dnt,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function pnt(t){pi(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function _pe(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function mnt(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&je(n),i&&je(e)}}}function gnt(t){var n;return{c:function(){n=tn("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,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function xpe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=tu(Kl(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=be("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=be("span"),a=tn("("),l=tn(m),c=it(),u=tn(g),d=tn(")"),P(s,"class","jse-nested-array-count svelte-1te5h1h"),P(n,"type","button"),P(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,_){Pe(y,n,_),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(s,u),de(s,d),h||(f=Nt(n,"click",v),h=!0)},p:function(y,_){t=y,64&_&&qn(e,t[6]),8&_&&p!==(p=tu(Kl(t[12]))+"")&&qn(r,p),9&_&&m!==(m=t[13]+"")&&qn(l,m),9&_&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&je(n),h=!1,f()}}}function vnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(G,R){return G[4]?gnt:mnt}for(var _=y(t),C=_(t),S=t[3],M=[],$=0;$1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Mo(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Hi(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Mo(l)?"An object":oo(l)?"An empty array":"A ".concat(VF(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Jo.tree)}]}var bnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ynt,vnt,Ei,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},pnt),r}return Se(e)}();function _nt(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function xnt(t){var n,e,i,r,o,s;return e=new sr({props:{data:TWe}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=Nt(n,"click",t[3]),o=!0)},p:function(a,l){var c=Un(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&P(n,"title",i)},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,s()}}}function wnt(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Cnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,wnt,xnt,Ei,{count:0,maxSampleCount:1,onRefresh:2},_nt),r}return Se(e)}();function knt(t){pi(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function wpe(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Cpe(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function kpe(t,n,e){var i=t.slice();return i[125]=n[e],i}function Spe(t){var n,e;return n=new Ztt({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Snt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Dnt(t){var n,e,i,r,o,s,a,l,c,u=[Ant,Ent,Tnt],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-hs49xj"),P(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),de(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Nt(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[71](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function Tnt(t){var n,e;return n=new bnt({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Ent(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[35]}]}}),i=new tce({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function Ant(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R=!Hi(null===(n=t[21])||void 0===n?void 0:n.root),z=R&&Dpe(t),U=t[9],q=[],re=0;re"u";a("isSSR:",m);var g,v,y,_,C,S,M=n.readOnly,$=n.externalContent,G=n.mainMenuBar,R=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,U=n.flattenColumns,q=n.parser,re=n.parseMemoizeOne,L=n.validator,X=n.validationParser,Z=n.indentation,H=n.onChange,he=n.onChangeMode,E=n.onRenderValue,F=n.onRenderMenu,N=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(v)},hasFocus:function(){return ot&&document.hasFocus()||jk(v)},onFocus:function(){N&&N()},onBlur:function(){Y&&Y()}});var Fe,xe=void 0,tt=1e4,ze=[],ot=!1,B={},ne=600,ie=0;function Ie(Ee){a("updateSelection",Ee);var St="function"==typeof Ee?Ee(Le.selection):Ee;or(St,Le.selection)||e(10,Le=Ze(Ze({},Le),{},{selection:St}))}function Ye(Ee){void 0!==Le.selection&&void 0!==Ee&&(Le.selection&&Xc(Ee,Le.selection.anchorPath)&&Xc(Ee,Le.selection.focusPath)||(a("clearing selection: path does not exist anymore",Le.selection),e(10,Le=Ze(Ze({},Le),{},{selection:s0(Ee,Le)}))))}var At,Le=Lk(),_t=!1,_n=fae({onChange:function(Ee){e(19,ci=Ee)}}),ci=_n.getState();function Fi(Ee){var St=Ee.previousJson,Ht=Ee.previousState,sn=Ee.previousText,hn=Ee.previousTextIsRepaired;void 0===St&&void 0===sn||(void 0!==C?_n.add(void 0!==St?{undo:{patch:[{op:"replace",path:"",value:St}],state:ul(Ht),json:void 0,text:sn,textIsRepaired:hn},redo:{patch:[{op:"replace",path:"",value:C}],state:ul(Le),json:void 0,text:S,textIsRepaired:_t}}:{undo:{patch:void 0,json:void 0,text:sn,state:ul(Ht),textIsRepaired:hn},redo:{patch:void 0,json:C,state:ul(Le),text:S,textIsRepaired:_t}}):void 0!==St&&_n.add({undo:{patch:void 0,json:St,state:ul(Ht),text:sn,textIsRepaired:hn},redo:{patch:void 0,json:void 0,text:S,textIsRepaired:_t,state:ul(Le)}}))}var pn=[],Nr=Zb(pae);function $r(Ee,St,Ht,sn){g0(function(){var hn;try{hn=Nr(Ee,St,Ht,sn)}catch(ri){hn=[{path:[],message:"Failed to validate: "+ri.message,severity:Xd.warning}]}or(hn,pn)||(a("validationErrors changed:",hn),e(11,pn=hn))},function(hn){return a("validationErrors updated in ".concat(hn," ms"))})}function wr(){return a("validate"),xe?{parseError:xe,isRepairable:!1}:($r(C,L,q,X),Hi(pn)?null:{validationErrors:pn})}function Or(Ee,St){if(a("patch",Ee,St),void 0===C)throw new Error("Cannot apply patch: no JSON");var Ht={json:C},sn=C,hn=Le,ri=_t,Oi=ose(C,Ee),Bn=$oe(C,Le,Ee).json,ei=function MJe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=ou(Xu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return or(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ze(Ze({},t),{},{sortedColumn:void 0}):t}(Le,Ee,ze),Yn="function"==typeof St?St(Bn,ei):void 0;e(7,C=Yn&&void 0!==Yn.json?Yn.json:Bn);var br=Yn&&void 0!==Yn.state?Yn.state:ei;e(10,Le=br),e(15,S=void 0),e(18,_t=!1),e(17,Fe=void 0),_n.add({undo:{patch:Oi,json:void 0,text:void 0,state:ul(hn),textIsRepaired:ri},redo:{patch:Ee,json:void 0,state:ul(br),text:void 0,textIsRepaired:_t}});var Ar={json:C,previousJson:sn,undo:Oi,redo:Ee};return Wr(Ht,Ar),Ar}function Ai(Ee,St){if(!M)return Or(Ee,St)}function Wr(Ee,St){(void 0!==Ee.json||void 0!==Ee?.text)&&(void 0!==S?H({text:S,json:void 0},Ee,{contentErrors:wr(),patchResult:St}):void 0!==C&&H({text:void 0,json:C},Ee,{contentErrors:wr(),patchResult:St}))}function jo(Ee){a("handleFind",Ee)}function Nn(Ee){a("pasted json as text",Ee),e(17,Fe=Ee)}function xt(Ee){var St=parseInt(Ee[0]),Ht=[String(St+1)].concat(si(Ee.slice(1)));return Xc(C,Ht)?mr(Ht,!1):mr(Ee,!1)}function ui(){_&&(_.focus(),_.select())}function Ni(){Le.selection||Ie(function(){if(oo(C)&&!Hi(C)&&!Hi(ze))return mr(["0"].concat(si(ze[0])),!1)}())}function Cr(Ee){var St=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ht=b4(Ee,ze,B,18),sn=Ht-ie,hn=gt(Ee);a("scrollTo",{path:Ee,top:Ht,scrollTop:ie,elem:hn});var ri=y.getBoundingClientRect();if(hn&&!St){var Oi=hn.getBoundingClientRect();if(Oi.bottom>ri.top&&Oi.topHt.right&&e(13,y.scrollLeft+=sn.right-Ht.right,y),sn.left(Bn=ie+ri.height-18)&&e(13,y.scrollTop+=hn-Bn,y),sn0&&void 0!==Ht[0])||Ht[0],void 0!==C){sn.next=3;break}return sn.abrupt("return");case 3:return sn.next=5,Kle({json:C,documentState:Le,indentation:St?Z:void 0,parser:q});case 5:case"end":return sn.stop()}},Ee)})),Xa.apply(this,arguments)}function Ic(){Zle({json:C,text:S,documentState:Le,keepSelection:!0,readOnly:M,onChange:H,onPatch:Ai})}function we(){!function IJe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&c0(e.selection)){var s=ou(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;jl("duplicate row",{rowIndex:a});var c=[String(a)];o(nse(n,[c]),function(u,d){var h=mr(zm({rowIndex:a0?a-1:void 0,h=void 0!==d?mr(zm({rowIndex:d,columnIndex:l},i),!1):void 0;return jl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ze(Ze({},u),{},{selection:h})}})}}({json:C,documentState:Le,columns:ze,readOnly:M,onPatch:Ai})}function Ue(){return(Ue=Zi(vn().mark(function Ee(St){return vn().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ece({char:St,selectInside:!1,refJsonEditor:v,json:C,documentState:Le,readOnly:M,parser:q,onPatch:Ai,onReplaceJson:Dn,onSelect:Ie});case 2:case"end":return Ht.stop()}},Ee)}))).apply(this,arguments)}function Dn(Ee,St){var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t,Bn=nu(C,Le,[],sh),ei="function"==typeof St?St(Ee,Bn):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Ee),e(10,Le=ei&&void 0!==ei.state?ei.state:Bn),e(15,S=void 0),e(18,_t=!1),Ye(C),Fi({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function ii(Ee,St){a("handleChangeText");var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t;try{e(7,C=re(Ee)),e(10,Le=nu(C,Le,[],sh)),e(15,S=void 0),e(18,_t=!1)}catch{try{e(7,C=re(Yd(Ee))),e(10,Le=nu(C,Le,[],sh)),e(15,S=Ee),e(18,_t=!0)}catch{e(7,C=void 0),e(10,Le=Lk({json:C,expand:sh})),e(15,S=Ee),e(18,_t=!1)}}if("function"==typeof St){var Bn=St(C,Le);e(7,C=Bn&&Bn.json?Bn.json:C),e(10,Le=Bn&&Bn.state?Bn.state:Le)}Ye(C),Fi({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function hi(Ee){var Ht=Ee.rootPath,sn=Ee.onTransform,hn=Ee.onClose;M||void 0===C||(ot=!0,oe({id:Ee.id||p,json:C,rootPath:Ht||[],onTransform:sn?function(ri){sn({operations:ri,json:C,transformedJson:Yu(C,ri)})}:function(ri){a("onTransform",Ht,ri),Ai(ri)},onClose:function(){ot=!1,ui(),hn&&hn()}}))}function di(Ee){a("openJSONEditorModal",{path:Ee}),ot=!0,fe({content:{json:Sn(C,Ee)},path:Ee,onPatch:At.onPatch,onClose:function(){ot=!1,ui()}})}function kr(Ee,St){l(jae,{text:Ee,onParse:Ik,onRepair:soe,onApply:St},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ui()}})}function Qr(){if(!M&&_n.getState().canUndo){var Ee=_n.undo();if(Ee){var St={json:C,text:S};e(7,C=Ee.undo.patch?Yu(C,Ee.undo.patch):Ee.undo.json),e(10,Le=Ee.undo.state),e(15,S=Ee.undo.text),e(18,_t=Ee.undo.textIsRepaired),a("undo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.undo.patch,undo:Ee.redo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function gi(){if(!M&&_n.getState().canRedo){var Ee=_n.redo();if(Ee){var St={json:C,text:S};e(7,C=Ee.redo.patch?Yu(C,Ee.redo.patch):Ee.redo.json),e(10,Le=Ee.redo.state),e(15,S=Ee.redo.text),e(18,_t=Ee.redo.textIsRepaired),a("redo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.redo.patch,undo:Ee.undo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function yr(Ee,St){e(68,B[St]=Ee.getBoundingClientRect().height,B)}return t.$$set=function(Ee){"readOnly"in Ee&&e(0,M=Ee.readOnly),"externalContent"in Ee&&e(47,$=Ee.externalContent),"mainMenuBar"in Ee&&e(1,G=Ee.mainMenuBar),"escapeControlCharacters"in Ee&&e(48,R=Ee.escapeControlCharacters),"escapeUnicodeCharacters"in Ee&&e(49,z=Ee.escapeUnicodeCharacters),"flattenColumns"in Ee&&e(50,U=Ee.flattenColumns),"parser"in Ee&&e(2,q=Ee.parser),"parseMemoizeOne"in Ee&&e(51,re=Ee.parseMemoizeOne),"validator"in Ee&&e(52,L=Ee.validator),"validationParser"in Ee&&e(53,X=Ee.validationParser),"indentation"in Ee&&e(3,Z=Ee.indentation),"onChange"in Ee&&e(54,H=Ee.onChange),"onChangeMode"in Ee&&e(4,he=Ee.onChangeMode),"onRenderValue"in Ee&&e(55,E=Ee.onRenderValue),"onRenderMenu"in Ee&&e(5,F=Ee.onRenderMenu),"onFocus"in Ee&&e(56,N=Ee.onFocus),"onBlur"in Ee&&e(57,Y=Ee.onBlur),"onSortModal"in Ee&&e(58,V=Ee.onSortModal),"onTransformModal"in Ee&&e(59,oe=Ee.onTransformModal),"onJSONEditorModal"in Ee&&e(60,fe=Ee.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=TO({escapeControlCharacters:R,escapeUnicodeCharacters:z})),65536&t.$$.dirty[1]&&function on(Ee){var St=C,Ht=Qv(Ee)?Ee.text!==S:!or(St,Ee.json);if(a("update external content",{isChanged:Ht}),Ht){var sn={json:C,text:S},hn=C,ri=Le,Oi=S,Bn=_t;if(Qv(Ee))try{e(7,C=re(Ee.text)),e(15,S=Ee.text),e(18,_t=!1),e(16,xe=void 0)}catch(ei){try{e(7,C=re(Yd(Ee.text))),e(15,S=Ee.text),e(18,_t=!0),e(16,xe=void 0)}catch{e(7,C=void 0),e(15,S=$.text),e(18,_t=!1),e(16,xe=Fk(S,ei.message||ei.toString()))}}else e(7,C=Ee.json),e(15,S=void 0),e(18,_t=!1),e(16,xe=void 0);Ye(C),Le.sortedColumn&&e(10,Le=Ze(Ze({},Le),{},{sortedColumn:void 0})),Fi({previousJson:hn,previousState:ri,previousText:Oi,previousTextIsRepaired:Bn}),Wr(sn,null)}}($),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,ze=oo(C)?function(Ee,St){var Ht,sn=new Set(St.map(ln)),hn=new Set(Ee.map(ln)),ri=Re(sn);try{for(ri.s();!(Ht=ri.n()).done;){var Oi=Ht.value;hn.has(Oi)||sn.delete(Oi)}}catch(br){ri.e(br)}finally{ri.f()}var Bn,ei=Re(hn);try{for(ei.s();!(Bn=ei.n()).done;){var Yn=Bn.value;sn.has(Yn)||sn.add(Yn)}}catch(br){ei.e(br)}finally{ei.f()}return si(sn).map(Xu)}(function(Ee,St){var Ht=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,sn={};Array.isArray(Ee)&&function LUe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rtt),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Ee,St,Ht,sn,hn){for(var ri=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Oi=oo(Ht)?Ht.length:0,Bn=function TJe(t,n){var e=Object.values(t);return Hi(e)?n:e.reduce(function(r,o){return r+o})/e.length}(sn,hn),ei=Ee-ri,Yn=St+2*ri,br=function(gd){return sn[gd]||hn},Ar=0,Po=0;Po0&&(Po-=br(--Ar));for(var ca=Ar,md=0;md0?mr(zm({rowIndex:br.rowIndex,columnIndex:Po-1},ei),!1):Yn;Ie(Ht),Qo(Ht.focusPath)}if("ArrowRight"===St&&(Ee.preventDefault(),Ni(),Le.selection)){var sn=function(ei,Yn){var br=ou(Yn.focusPath,ei),Po=br.columnIndex;return Po0?mr(zm({rowIndex:Ar-1,columnIndex:br.columnIndex},ei),!1):Yn}(ze,Le.selection);Ie(hn),Qo(hn.focusPath)}if("ArrowDown"===St&&(Ee.preventDefault(),Ni(),Le.selection)){var ri=function(ei,Yn,br){var Ar=ou(br.focusPath,Yn),Po=Ar.rowIndex;return Po1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Rpe({props:{mode:Ln(t[18]).mode,content:Ln(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:dh,onBlur:dh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&$pe(t),S=t[18].length>1&&Bpe(t);function M(R,z){return R[0]?Vnt:Hnt}var $=M(t),G=$(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).innerHTML='
    Path
    ',s=it(),a=be("input"),l=it(),(c=be("div")).innerHTML='
    Contents
    ',u=it(),d=be("div"),mt(h.$$.fragment),f=it(),p=be("div"),C&&C.c(),m=it(),S&&S.c(),g=it(),G.c(),P(o,"class","jse-label svelte-1hibiw3"),P(a,"class","jse-path svelte-1hibiw3"),P(a,"type","text"),a.readOnly=!0,P(a,"title","Selected path"),a.value=t[21],P(c,"class","jse-label svelte-1hibiw3"),P(d,"class","jse-modal-inline-editor svelte-1hibiw3"),P(p,"class","jse-actions svelte-1hibiw3"),P(r,"class","jse-modal-contents svelte-1hibiw3"),P(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(r,l),de(r,c),de(r,u),de(r,d),ft(h,d,null),de(r,f),de(r,p),C&&C.m(p,null),de(p,m),S&&S.m(p,null),de(p,g),G.m(p,null),v=!0,y||(_=_a(iS.call(null,n,t[23])),y=!0)},p:function(R,z){var U={};262144&z[0]&&(U.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(U),(!v||2097152&z[0]&&a.value!==R[21])&&(a.value=R[21]);var q={};262144&z[0]&&(q.mode=Ln(R[18]).mode),262144&z[0]&&(q.content=Ln(R[18]).content),1&z[0]&&(q.readOnly=R[0]),2&z[0]&&(q.indentation=R[1]),4&z[0]&&(q.tabSize=R[2]),32&z[0]&&(q.statusBar=R[5]),8&z[0]&&(q.mainMenuBar=R[3]),16&z[0]&&(q.navigationBar=R[4]),64&z[0]&&(q.escapeControlCharacters=R[6]),128&z[0]&&(q.escapeUnicodeCharacters=R[7]),256&z[0]&&(q.flattenColumns=R[8]),512&z[0]&&(q.parser=R[9]),1048576&z[0]&&(q.parseMemoizeOne=R[20]),1024&z[0]&&(q.validator=R[10]),2048&z[0]&&(q.validationParser=R[11]),4096&z[0]&&(q.pathParser=R[12]),8192&z[0]&&(q.onRenderValue=R[13]),16384&z[0]&&(q.onClassName=R[14]),32768&z[0]&&(q.onRenderMenu=R[15]),65536&z[0]&&(q.onSortModal=R[16]),131072&z[0]&&(q.onTransformModal=R[17]),h.$set(q),R[19]?C?C.p(R,z):((C=$pe(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?S?(S.p(R,z),262144&z[0]&&Q(S,1)):((S=Bpe(R)).c(),Q(S,1),S.m(p,g)):S&&($t(),ce(S,1,1,function(){S=null}),Bt()),$===($=M(R))&&G?G.p(R,z):(G.d(1),(G=$(R))&&(G.c(),G.m(p,null)))},i:function(R){v||(Q(e.$$.fragment,R),Q(h.$$.fragment,R),Q(S),v=!0)},o:function(R){ce(e.$$.fragment,R),ce(h.$$.fragment,R),ce(S),v=!1},d:function(R){R&&je(n),pt(e),pt(h),C&&C.d(),S&&S.d(),G.d(),y=!1,_()}}}function Vpe(t){t.focus()}function Unt(t,n,e){var i,r,o,s=wa("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,_=n.parser,C=n.validator,S=n.validationParser,M=n.pathParser,$=n.onRenderValue,G=n.onClassName,R=n.onRenderMenu,z=n.onSortModal,U=n.onTransformModal,q=xa("simple-modal").close,re=[{mode:X(a),content:a,relativePath:l}],L=void 0;function X(H){return DO(H)&&oo(H.json)?Jo.table:Jo.tree}function Z(H){s("handleChange",H);var he=Ze(Ze({},Ln(re)),{},{content:H});e(18,re=[].concat(si(Xi(re)),[he]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,_=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,S=H.validationParser),"pathParser"in H&&e(12,M=H.pathParser),"onRenderValue"in H&&e(13,$=H.onRenderValue),"onClassName"in H&&e(14,G=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,z=H.onSortModal),"onTransformModal"in H&&e(17,U=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=re.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Hi(i)?"(whole document)":tu(Kl(i))),512&t.$$.dirty[0]&&e(20,o=Zb(_.parse))},[u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,re,L,o,r,function(){if(s("handleApply"),!u)try{e(19,L=void 0);var H=[{op:"replace",path:ln(Ln(re).relativePath),value:loe(Ln(re).content,_).json}];if(re.length>1){var he={json:Yu(loe(re[re.length-2].content,_).json,H)};e(18,re=Xi(re)),Z(he)}else c(H),q()}catch(E){e(19,L=E.toString())}},function(){s("handleClose"),re.length>1?(e(18,re=Xi(re)),e(19,L=void 0)):q()},Z,function(H){s("handleChangeMode",H);var he=Ze(Ze({},Ln(re)),{},{mode:H});e(18,re=[].concat(si(Xi(re)),[he]))},function(H){e(19,L=H.toString()),console.error(H)},function(H){var he=H.content,E=H.path;s("handleJSONEditorModal",{content:he,path:E});var F={mode:X(he),content:he,relativePath:E};e(18,re=[].concat(si(re),[F]))},a,l,c,i]}var Gnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Unt,znt,Ei,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Bnt,[-1,-1]),r}return Se(e)}();function Wnt(t,n,e){var i=xa("simple-modal");return[i.open,i.close]}var qnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wnt,null,Ei,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Xnt(t){pi(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function Hpe(t){var n,e;return n=new Rpe({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){mt(n.$$.fragment)},m:function(r,o){ft(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(Q(n.$$.fragment,r),e=!0)},o:function(r){ce(n.$$.fragment,r),e=!1},d:function(r){t[56](null),pt(n,r)}}}function Ynt(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new qnt({props:l}),Vi.push(function(){return Uu(n,"open",a)});var c=Hpe(t);return{c:function(){mt(n.$$.fragment),i=it(),r=be("div"),c.c(),P(r,"class","jse-main svelte-sxaskb"),Mt(r,"jse-focus",t[20])},m:function(u,d){ft(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],zu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ei(s,s=u[19])?($t(),ce(c,1,1,Lt),Bt(),(c=Hpe(u)).c(),Q(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Mt(r,"jse-focus",u[20])},i:function(u){o||(Q(n.$$.fragment,u),Q(c),o=!0)},o:function(u){ce(n.$$.fragment,u),ce(c),o=!1},d:function(u){pt(n,u),u&&je(i),u&&je(r),c.d(u)}}}function Jnt(t){var n,e;return n=new CQ({props:{closeOnEsc:!1,$$slots:{default:[Ynt]},$$scope:{ctx:t}}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Knt(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},kQ,{closeOnEsc:!1}],o={$$slots:{default:[Jnt]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ke(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return ke(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(RW||(RW=Ae([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)($W||($W=Ae(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return ke(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ze(Ze({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var _=this._scope[m]||(this._scope[m]=[]),C=_.length;return _[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(BW||(BW=Ae(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(_){var C=d[_];if(!C)return"continue";var S=p[_]=p[_]||new Map;C.forEach(function(M){if(!S.has(M)){S.set(M,n.Started);var $=h(M);if($){var G=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(VW||(VW=Ae(["",""," "," = ",";",""])),g,G,M,$,f.opts._n)}else{if(!($=m?.(M)))throw new i(M);g=(0,e._)(HW||(HW=Ae(["","","",""])),g,$,f.opts._n)}S.set(M,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(eme)),eme}function xr(){return Zpe||(Zpe=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=DD(),e=tme(),i=DD();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=tme();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function N(){ke(this,N)}return Se(N,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(Y,V){return this}}]),N}(),s=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).varKind=oe,xe.name=fe,xe.rhs=Fe,xe}return Se(V,[{key:"render",value:function(oe){var Fe=oe._n,xe=oe.es5?e.varKinds.var:this.varKind,tt=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(xe," ").concat(this.name).concat(tt,";")+Fe}},{key:"optimizeNames",value:function(oe,fe){if(oe[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,oe,fe)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).lhs=oe,xe.rhs=fe,xe.sideEffects=Fe,xe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+fe}},{key:"optimizeNames",value:function(oe,fe){if(!(this.lhs instanceof n.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,oe,fe),this}},{key:"names",get:function(){return re(this.lhs instanceof n.Name?{}:Ze({},this.lhs.names),this.rhs)}}]),V}(o),l=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this,oe,Fe,xe)).op=fe,tt}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+fe}}]),V}(a),c=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.label,":")+fe}}]),V}(o),u=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n,Fe=this.label?" ".concat(this.label):"";return"break".concat(Fe,";")+fe}}]),V}(o),d=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"throw ".concat(this.error,";")+fe}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).code=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.code,";")+fe}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(oe,fe){return this.code=L(this.code,oe,fe),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(N){wt(V,N);var Y=Ct(V);function V(){var oe,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ke(this,V),(oe=Y.call(this)).nodes=fe,oe}return Se(V,[{key:"render",value:function(oe){return this.nodes.reduce(function(fe,Fe){return fe+Fe.render(oe)},"")}},{key:"optimizeNodes",value:function(){for(var oe=this.nodes,fe=oe.length;fe--;){var Fe=oe[fe].optimizeNodes();Array.isArray(Fe)?oe.splice.apply(oe,[fe,1].concat(si(Fe))):Fe?oe[fe]=Fe:oe.splice(fe,1)}return oe.length>0?this:void 0}},{key:"optimizeNames",value:function(oe,fe){for(var Fe=this.nodes,xe=Fe.length;xe--;){var tt=Fe[xe];tt.optimizeNames(oe,fe)||(X(oe,tt.names),Fe.splice(xe,1))}return Fe.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(oe,fe){return q(oe,fe.names)},{})}}]),V}(o),p=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"{"+oe._n+pr(qi(V.prototype),"render",this).call(this,oe)+"}"+oe._n}}]),V}(f),m=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(f),g=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe){var Fe;return ke(this,V),(Fe=Y.call(this,fe)).condition=oe,Fe}return Se(V,[{key:"render",value:function(oe){var fe="if(".concat(this.condition,")")+pr(qi(V.prototype),"render",this).call(this,oe);return this.else&&(fe+="else "+this.else.render(oe)),fe}},{key:"optimizeNodes",value:function(){pr(qi(V.prototype),"optimizeNodes",this).call(this);var oe=this.condition;if(!0===oe)return this.nodes;var fe=this.else;if(fe){var Fe=fe.optimizeNodes();fe=this.else=Array.isArray(Fe)?new g(Fe):Fe}return fe?!1===oe?fe instanceof V?fe:fe.nodes:this.nodes.length?this:new V(Z(oe),fe instanceof V?[fe]:fe.nodes):!1!==oe&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(oe,fe){var Fe;if(this.else=null===(Fe=this.else)||void 0===Fe?void 0:Fe.optimizeNames(oe,fe),pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe)||this.else)return this.condition=L(this.condition,oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return re(oe,this.condition),this.else&&q(oe,this.else.names),oe}}]),V}(p);v.kind="if";var y=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);y.kind="for";var _=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).iteration=oe,fe}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.iteration,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iteration=L(this.iteration,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this)).varKind=oe,tt.name=fe,tt.from=Fe,tt.to=xe,tt}return Se(V,[{key:"render",value:function(oe){var Fe=this.name,xe=this.from,tt=this.to;return"for(".concat(oe.es5?e.varKinds.var:this.varKind," ").concat(Fe,"=").concat(xe,"; ").concat(Fe,"<").concat(tt,"; ").concat(Fe,"++)")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"names",get:function(){var oe=re(pr(qi(V.prototype),"names",this),this.from);return re(oe,this.to)}}]),V}(y),S=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this)).loop=oe,tt.varKind=fe,tt.name=Fe,tt.iterable=xe,tt}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iterable=L(this.iterable,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),M=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).name=oe,xe.args=fe,xe.async=Fe,xe}return Se(V,[{key:"render",value:function(oe){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);M.kind="func";var $=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"return "+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(f);$.kind="return";var G=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){var fe="try"+pr(qi(V.prototype),"render",this).call(this,oe);return this.catch&&(fe+=this.catch.render(oe)),this.finally&&(fe+=this.finally.render(oe)),fe}},{key:"optimizeNodes",value:function(){var oe,fe;return pr(qi(V.prototype),"optimizeNodes",this).call(this),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(fe=this.finally)||void 0===fe||fe.optimizeNodes(),this}},{key:"optimizeNames",value:function(oe,fe){var Fe,xe;return pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe),null===(Fe=this.catch)||void 0===Fe||Fe.optimizeNames(oe,fe),null===(xe=this.finally)||void 0===xe||xe.optimizeNames(oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return this.catch&&q(oe,this.catch.names),this.finally&&q(oe,this.finally.names),oe}}]),V}(p),R=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){return"catch(".concat(this.error,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);R.kind="catch";var z=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"finally"+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);z.kind="finally";var U=function(){function N(Y){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ke(this,N),this._values={},this._blockStarts=[],this._constants={},this.opts=Ze(Ze({},V),{},{_n:V.lines?"\n":""}),this._extScope=Y,this._scope=new e.Scope({parent:Y}),this._nodes=[new m]}return Se(N,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(Y){return this._scope.name(Y)}},{key:"scopeName",value:function(Y){return this._extScope.name(Y)}},{key:"scopeValue",value:function(Y,V){var oe=this._extScope.value(Y,V);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}},{key:"getScopeValue",value:function(Y,V){return this._extScope.getValue(Y,V)}},{key:"scopeRefs",value:function(Y){return this._extScope.scopeRefs(Y,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(Y,V,oe,fe){var Fe=this._scope.toName(V);return void 0!==oe&&fe&&(this._constants[Fe.str]=oe),this._leafNode(new s(Y,Fe,oe)),Fe}},{key:"const",value:function(Y,V,oe){return this._def(e.varKinds.const,Y,V,oe)}},{key:"let",value:function(Y,V,oe){return this._def(e.varKinds.let,Y,V,oe)}},{key:"var",value:function(Y,V,oe){return this._def(e.varKinds.var,Y,V,oe)}},{key:"assign",value:function(Y,V,oe){return this._leafNode(new a(Y,V,oe))}},{key:"add",value:function(Y,V){return this._leafNode(new l(Y,t.operators.ADD,V))}},{key:"code",value:function(Y){return"function"==typeof Y?Y():Y!==n.nil&&this._leafNode(new h(Y)),this}},{key:"object",value:function(){for(var Y=["{"],V=arguments.length,oe=new Array(V),fe=0;fe1&&Y.push(","),Y.push(ze),(ze!==ot||this.opts.es5)&&(Y.push(":"),(0,n.addCodeArg)(Y,ot))}return Y.push("}"),new n._Code(Y)}},{key:"if",value:function(Y,V,oe){if(this._blockNode(new v(Y)),V&&oe)this.code(V).else().code(oe).endIf();else if(V)this.code(V).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(Y){return this._elseNode(new v(Y))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(Y,V){return this._blockNode(Y),V&&this.code(V).endFor(),this}},{key:"for",value:function(Y,V){return this._for(new _(Y),V)}},{key:"forRange",value:function(Y,V,oe,fe){var Fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,xe=this._scope.toName(Y);return this._for(new C(Fe,xe,V,oe),function(){return fe(xe)})}},{key:"forOf",value:function(Y,V,oe){var fe=this,Fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,xe=this._scope.toName(Y);if(this.opts.es5){var tt=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(zW||(zW=Ae(["",".length"])),tt),function(ze){fe.var(xe,(0,n._)(UW||(UW=Ae(["","[","]"])),tt,ze)),oe(xe)})}return this._for(new S("of",Fe,xe,V),function(){return oe(xe)})}},{key:"forIn",value:function(Y,V,oe){var fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(Y,(0,n._)(GW||(GW=Ae(["Object.keys(",")"])),V),oe);var Fe=this._scope.toName(Y);return this._for(new S("in",fe,Fe,V),function(){return oe(Fe)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(Y){return this._leafNode(new c(Y))}},{key:"break",value:function(Y){return this._leafNode(new u(Y))}},{key:"return",value:function(Y){var V=new $;if(this._blockNode(V),this.code(Y),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}},{key:"try",value:function(Y,V,oe){if(!V&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');var fe=new G;if(this._blockNode(fe),this.code(Y),V){var Fe=this.name("e");this._currNode=fe.catch=new R(Fe),V(Fe)}return oe&&(this._currNode=fe.finally=new z,this.code(oe)),this._endBlockNode(R,z)}},{key:"throw",value:function(Y){return this._leafNode(new d(Y))}},{key:"block",value:function(Y,V){return this._blockStarts.push(this._nodes.length),Y&&this.code(Y).endBlock(V),this}},{key:"endBlock",value:function(Y){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var oe=this._nodes.length-V;if(oe<0||void 0!==Y&&oe!==Y)throw new Error("CodeGen: wrong number of nodes: ".concat(oe," vs ").concat(Y," expected"));return this._nodes.length=V,this}},{key:"func",value:function(Y){var fe=arguments.length>3?arguments[3]:void 0;return this._blockNode(new M(Y,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),fe&&this.code(fe).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(M)}},{key:"optimize",value:function(){for(var Y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(Y){return this._currNode.nodes.push(Y),this}},{key:"_blockNode",value:function(Y){this._currNode.nodes.push(Y),this._nodes.push(Y)}},{key:"_endBlockNode",value:function(Y,V){var oe=this._currNode;if(oe instanceof Y||V&&oe instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(Y.kind,"/").concat(V.kind):Y.kind,'"'))}},{key:"_elseNode",value:function(Y){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=Y,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var Y=this._nodes;return Y[Y.length-1]},set:function(Y){var V=this._nodes;V[V.length-1]=Y}}]),N}();function q(N,Y){for(var V in Y)N[V]=(N[V]||0)+(Y[V]||0);return N}function re(N,Y){return Y instanceof n._CodeOrName?q(N,Y.names):N}function L(N,Y,V){return N instanceof n.Name?oe(N):(fe=N)instanceof n._Code&&fe._items.some(function(Fe){return Fe instanceof n.Name&&1===Y[Fe.str]&&void 0!==V[Fe.str]})?new n._Code(N._items.reduce(function(fe,Fe){return Fe instanceof n.Name&&(Fe=oe(Fe)),Fe instanceof n._Code?fe.push.apply(fe,si(Fe._items)):fe.push(Fe),fe},[])):N;var fe;function oe(fe){var Fe=V[fe.str];return void 0===Fe||1!==Y[fe.str]?fe:(delete Y[fe.str],Fe)}}function X(N,Y){for(var V in Y)N[V]=(N[V]||0)-(Y[V]||0)}function Z(N){return"boolean"==typeof N||"number"==typeof N||null===N?!N:(0,n._)(WW||(WW=Ae(["!",""])),F(N))}t.CodeGen=U,t.not=Z;var H=E(t.operators.AND);t.and=function(){for(var N=arguments.length,Y=new Array(N),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,_,C,S){var M=void 0===C?_:C instanceof n.Name?(_ instanceof n.Name?p(y,_,C):m(y,_,C),C):_ instanceof n.Name?(m(y,C,_),_):g(_,C);return S!==n.Name||M instanceof n.Name?M:v(y,M)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(aq||(aq=Ae(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(lq||(lq=Ae(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(YW||(YW=Ae(["",""])),p)}return(0,n._)(JW||(JW=Ae(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(KW||(KW=Ae([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(QW||(QW=Ae([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(ZW||(ZW=Ae([""," || {}"])),m)).code((0,n._)(eq||(eq=Ae(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(tq||(tq=Ae([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(nq||(nq=Ae([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Ze(Ze({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(iq||(iq=Ae([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(rq||(rq=Ae([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(oq||(oq=Ae([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(sq||(sq=Ae([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?cq||(cq=Ae(['"[" + ',' + "]"'])):uq||(uq=Ae(['"[\'" + ',' + "\']"'])):g?dq||(dq=Ae(['"/" + ',""])):hq||(hq=Ae(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Hr);var nme,ime,rme,TD={};function Sp(){if(nme)return TD;nme=1,Object.defineProperty(TD,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return TD.default=n,TD}function ED(){return ime||(ime=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Hr,i=Sp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(Dq||(Dq=Ae([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(Tq||(Tq=Ae(["[","]"])),f))},(0,n._)(Eq||(Eq=Ae(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(Aq||(Aq=Ae(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(Mq||(Mq=Ae(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(Iq||(Iq=Ae(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(fq||(fq=Ae(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(pq||(pq=Ae(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(mq||(mq=Ae(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,_=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,_):o(m,(0,n._)(gq||(gq=Ae(["[","]"])),_))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(vq||(vq=Ae([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(yq||(yq=Ae(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(_){h.const(y,(0,n._)(bq||(bq=Ae(["","[","]"])),i.default.vErrors,_)),h.if((0,n._)(_q||(_q=Ae(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(xq||(xq=Ae(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(wq||(wq=Ae(["",".schemaPath"])),y),(0,n.str)(Cq||(Cq=Ae(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(kq||(kq=Ae(["",".schema"])),y),p),h.assign((0,n._)(Sq||(Sq=Ae(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(Fq||(Fq=Ae(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,_=d.it,C=_.opts,S=_.propertyName,M=_.topSchemaRef,$=_.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(Pq||(Pq=Ae(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(Lq||(Lq=Ae(["","",""])),M,$)],[i.default.data,v]),S&&f.push([s.propertyName,S])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(Nq||(Nq=Ae(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(Oq||(Oq=Ae(["","/",""])),p,f);return m&&(g=(0,n.str)(jq||(jq=Ae(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(Ype)),Ype}var I_={},tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.getRules=tg.isJSONType=void 0;var ait=new Set(["string","number","integer","boolean","null","object","array"]);tg.isJSONType=function(t){return"string"==typeof t&&ait.has(t)},tg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ze(Ze({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var ome,pf={};function sme(){if(ome)return pf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return ome=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.shouldUseRule=pf.shouldUseGroup=pf.schemaHasRulesForType=void 0,pf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},pf.shouldUseGroup=t,pf.shouldUseRule=n,pf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=tg,i=sme(),r=ED(),o=xr(),s=Hr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var M,m=f.gen,g=f.data,v=f.opts,y=(M=v.coerceTypes)?p.filter(function($){return l.has($)||"array"===M&&"array"===$}):[],_=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(_){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(S,M,$){var G=S.gen,R=S.data,z=S.opts,U=G.let("dataType",(0,o._)($q||($q=Ae(["typeof ",""])),R)),q=G.let("coerced",(0,o._)(Bq||(Bq=Ae(["undefined"]))));"array"===z.coerceTypes&&G.if((0,o._)(Vq||(Vq=Ae([""," == 'object' && Array.isArray(",") && ",".length == 1"])),U,R,R),function(){return G.assign(R,(0,o._)(Hq||(Hq=Ae(["","[0]"])),R)).assign(U,(0,o._)(zq||(zq=Ae(["typeof ",""])),R)).if(u(M,R,z.strictNumbers),function(){return G.assign(q,R)})}),G.if((0,o._)(Uq||(Uq=Ae([""," !== undefined"])),q));var re,L=Re($);try{for(L.s();!(re=L.n()).done;){var X=re.value;(l.has(X)||"array"===X&&"array"===z.coerceTypes)&&Z(X)}}catch(H){L.e(H)}finally{L.f()}function Z(H){switch(H){case"string":return void G.elseIf((0,o._)(Wq||(Wq=Ae(["",' == "number" || ',' == "boolean"'])),U,U)).assign(q,(0,o._)(qq||(qq=Ae(['"" + ',""])),R)).elseIf((0,o._)(Xq||(Xq=Ae([""," === null"])),R)).assign(q,(0,o._)(Yq||(Yq=Ae(['""']))));case"number":return void G.elseIf((0,o._)(Jq||(Jq=Ae(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),U,R,U,R,R,R)).assign(q,(0,o._)(Kq||(Kq=Ae(["+",""])),R));case"integer":return void G.elseIf((0,o._)(Qq||(Qq=Ae(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),U,R,U,R,R,R,R)).assign(q,(0,o._)(Zq||(Zq=Ae(["+",""])),R));case"boolean":return void G.elseIf((0,o._)(eX||(eX=Ae(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(q,!1).elseIf((0,o._)(tX||(tX=Ae(["",' === "true" || '," === 1"])),R,R)).assign(q,!0);case"null":return G.elseIf((0,o._)(nX||(nX=Ae(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void G.assign(q,null);case"array":G.elseIf((0,o._)(iX||(iX=Ae(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),U,U,U,R)).assign(q,(0,o._)(rX||(rX=Ae(["[","]"])),R))}}G.else(),h(S),G.endIf(),G.if((0,o._)(Gq||(Gq=Ae([""," !== undefined"])),q),function(){var H,he,E,F,N;G.assign(R,q),he=q,F=(H=S).parentData,N=H.parentDataProperty,(E=H.gen).if((0,o._)(oX||(oX=Ae([""," !== undefined"])),F),function(){return E.assign((0,o._)(sX||(sX=Ae(["","[","]"])),F,N),he)})})}(f,p,y):h(f)})}return _};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(aX||(aX=Ae([""," "," null"])),p,y);case"array":g=(0,o._)(lX||(lX=Ae(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(cX||(cX=Ae([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=_((0,o._)(uX||(uX=Ae(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=_();break;default:return(0,o._)(dX||(dX=Ae(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function _(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(hX||(hX=Ae(["typeof ",' == "number"'])),p),C,m?(0,o._)(fX||(fX=Ae(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var _=(0,o._)(pX||(pX=Ae(["typeof ",' != "object"'])),p);v=y.null?_:(0,o._)(mX||(mX=Ae(["!"," || ",""])),p,_),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(gX||(gX=Ae(["{type: ","}"])),p):(0,o._)(vX||(vX=Ae(["{type: ","}"])),m)}};function h(f){var m,g,v,y,_,p=(g=(m=f).gen,v=m.data,_=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:_,schemaValue:_,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(I_);var ame,lme,cme,F_={},ud={},po={};function dd(){if(lme)return po;lme=1,Object.defineProperty(po,"__esModule",{value:!0}),po.validateUnion=po.validateArray=po.usePattern=po.callValidateCode=po.schemaProperties=po.allSchemaProperties=po.noPropertyInData=po.propertyInData=po.isOwnProperty=po.hasPropFunc=po.reportMissingProp=po.checkMissingProp=po.checkReportMissingProp=void 0;var t=xr(),n=Hr,e=Sp(),i=Hr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(kX||(kX=Ae(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(SX||(SX=Ae(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(EX||(EX=Ae(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}po.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(wX||(wX=Ae(["",""])),u)},!0),c.error()})},po.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,si(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(CX||(CX=Ae([""," = ",""])),d,m))})))},po.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},po.hasPropFunc=r,po.isOwnProperty=o,po.propertyInData=function(c,u,d,h){var f=(0,t._)(DX||(DX=Ae(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(TX||(TX=Ae([""," && ",""])),f,o(c,u,d)):f},po.noPropertyInData=s,po.allSchemaProperties=a,po.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},po.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,_=m.errorPath,C=c.it,S=h?(0,t._)(AX||(AX=Ae(["",", ",", ","",""])),f,p,v,y):p,M=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,_)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&M.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var $=(0,t._)(MX||(MX=Ae(["",", ",""])),S,g.object.apply(g,M));return d!==t.nil?(0,t._)(IX||(IX=Ae(["",".call(",", ",")"])),u,d,$):(0,t._)(FX||(FX=Ae(["","(",")"])),u,$)};var l=(0,t._)(NX||(NX=Ae(["new RegExp"])));return po.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(OX||(OX=Ae(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},po.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(jX||(jX=Ae(["",".length"])),d));u.forRange("i",0,y,function(_){c.subschema({keyword:h,dataProp:_,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},po.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(PX||(PX=Ae([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},po}var ume,mf={},Ga={},dme=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==bn(n)&&"object"==bn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},kP={},cit={get exports(){return kP},set exports(t){kP=t}},Dp=cit.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),AD(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function AD(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==bn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Dp.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!SP(t):!!n&&hme(t)<=n)};var pit=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function SP(t){for(var n in t){if(pit.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(SP)||"object"==bn(e)&&SP(e))return!0}return!1}function hme(t){var n=0;for(var e in t)if("$ref"===e||(n++,!fit.has(e)&&("object"==bn(t[e])&&(0,uit.eachItem)(t[e],function(i){return n+=hme(i)}),n===1/0)))return 1/0;return n}function fme(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=z0(n));var i=t.parse(n);return pme(t,i)}function pme(t,n){return t.serialize(n).split("#")[0]+"#"}Ga.getFullPath=fme,Ga._getFullPath=pme;var mit=/#\/?$/;function z0(t){return t?t.replace(mit,""):""}Ga.normalizeId=z0,Ga.resolveUrl=function(t,n,e){return e=z0(e),t.resolve(n,e)};var mme,git=/^[a-z_][-a-z0-9._]*$/i;function MD(){if(mme)return ff;mme=1,Object.defineProperty(ff,"__esModule",{value:!0}),ff.getData=ff.KeywordCxt=ff.validateFunctionCode=void 0;var t=function(){if(rme)return eg;rme=1,Object.defineProperty(eg,"__esModule",{value:!0}),eg.boolOrEmptySchema=eg.topBoolOrEmptySchema=void 0;var L=ED(),X=xr(),Z=Sp(),H={message:"boolean schema is false"};function he(E,F){(0,L.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,F)}return eg.topBoolOrEmptySchema=function(E){var F=E.gen,N=E.schema,Y=E.validateName;!1===N?he(E,!1):"object"==bn(N)&&!0===N.$async?F.return(Z.default.data):(F.assign((0,X._)(Rq||(Rq=Ae(["",".errors"])),Y),null),F.return(!0))},eg.boolOrEmptySchema=function(E,F){var N=E.gen;!1===E.schema?(N.var(F,!1),he(E)):N.var(F,!0)},eg}(),n=I_,e=sme(),i=I_,r=function(){if(ame)return F_;ame=1,Object.defineProperty(F_,"__esModule",{value:!0}),F_.assignDefaults=void 0;var L=xr(),X=Hr;function Z(H,he,E){var F=H.gen,N=H.compositeRule,Y=H.data,V=H.opts;if(void 0!==E){var oe=(0,L._)(yX||(yX=Ae(["","",""])),Y,(0,L.getProperty)(he));if(N)(0,X.checkStrictMode)(H,"default is ignored for: ".concat(oe));else{var fe=(0,L._)(bX||(bX=Ae([""," === undefined"])),oe);"empty"===V.useDefaults&&(fe=(0,L._)(_X||(_X=Ae([""," || "," === null || ",' === ""'])),fe,oe,oe)),F.if(fe,(0,L._)(xX||(xX=Ae([""," = ",""])),oe,(0,L.stringify)(E)))}}}return F_.assignDefaults=function(H,he){var E=H.schema,F=E.properties,N=E.items;if("object"===he&&F)for(var Y in F)Z(H,Y,F[Y].default);else"array"===he&&Array.isArray(N)&&N.forEach(function(V,oe){return Z(H,oe,V.default)})},F_}(),o=function lit(){if(cme)return ud;cme=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Sp(),e=dd(),i=ED();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(zX||(zX=Ae(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,S){if(S.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(VX||(VX=Ae(["await "]))):t.nil,S=p.opts.passContext?n.default.this:n.default.self,M=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(HX||(HX=Ae(["","",""])),C,(0,e.callValidateCode)(s,g,S,M)),a.modifying)}function _(C){var S;c.if((0,t.not)(null!==(S=a.valid)&&void 0!==S?S:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),_(function(){return s.error()});else{var C=a.async?(M=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(LX||(LX=Ae(["await "]))))},function($){return c.assign(v,!1).if((0,t._)(RX||(RX=Ae([""," instanceof ",""])),$,p.ValidationError),function(){return c.assign(M,(0,t._)($X||($X=Ae(["",".errors"])),$))},function(){return c.throw($)})}),M):(S=(0,t._)(BX||(BX=Ae(["",".errors"])),g),c.assign(S,null),y(t.nil),S);a.modifying&&r(s),_(function(){return function(M,$){var G=M.gen;G.if((0,t._)(UX||(UX=Ae(["Array.isArray(",")"])),$),function(){G.assign(n.default.vErrors,(0,t._)(GX||(GX=Ae([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,$,n.default.vErrors,$)).assign(n.default.errors,(0,t._)(WX||(WX=Ae(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(M)},function(){return M.error()})}(s,C)})}var M,S}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==bn(s)&&!Array.isArray(s):bn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(ume)return mf;ume=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.extendSubschemaMode=mf.extendSubschemaData=mf.getSubschema=void 0;var L=xr(),X=Hr;return mf.getSubschema=function(Z,H){var he=H.keyword,E=H.schemaProp,F=H.schema,N=H.schemaPath,Y=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==he&&void 0!==F)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==he){var oe=Z.schema[he];return void 0===E?{schema:oe,schemaPath:(0,L._)(qX||(qX=Ae(["","",""])),Z.schemaPath,(0,L.getProperty)(he)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he)}:{schema:oe[E],schemaPath:(0,L._)(XX||(XX=Ae(["","","",""])),Z.schemaPath,(0,L.getProperty)(he),(0,L.getProperty)(E)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he,"/").concat((0,X.escapeFragment)(E))}}if(void 0!==F){if(void 0===N||void 0===Y||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:F,schemaPath:N,topSchemaRef:V,errSchemaPath:Y}}throw new Error('either "keyword" or "schema" must be passed')},mf.extendSubschemaData=function(Z,H,he){var E=he.dataProp,F=he.dataPropType,N=he.data,Y=he.dataTypes,V=he.propertyName;if(void 0!==N&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var oe=H.gen;if(void 0!==E){var fe=H.errorPath,Fe=H.dataPathArr,xe=H.opts;tt(oe.let("data",(0,L._)(YX||(YX=Ae(["","",""])),H.data,(0,L.getProperty)(E)),!0)),Z.errorPath=(0,L.str)(JX||(JX=Ae(["","",""])),fe,(0,X.getErrorPath)(E,F,xe.jsPropertySyntax)),Z.parentDataProperty=(0,L._)(KX||(KX=Ae(["",""])),E),Z.dataPathArr=[].concat(si(Fe),[Z.parentDataProperty])}function tt(ze){Z.data=ze,Z.dataLevel=H.dataLevel+1,Z.dataTypes=[],H.definedProperties=new Set,Z.parentData=H.data,Z.dataNames=[].concat(si(H.dataNames),[ze])}void 0!==N&&(tt(N instanceof L.Name?N:oe.let("data",N,!0)),void 0!==V&&(Z.propertyName=V)),Y&&(Z.dataTypes=Y)},mf.extendSubschemaMode=function(Z,H){var he=H.jtdDiscriminator,E=H.jtdMetadata,F=H.compositeRule,N=H.createErrors,Y=H.allErrors;void 0!==F&&(Z.compositeRule=F),void 0!==N&&(Z.createErrors=N),void 0!==Y&&(Z.allErrors=Y),Z.jtdDiscriminator=he,Z.jtdMetadata=E},mf}(),a=xr(),l=Sp(),c=Ga,u=Hr,d=ED();function h(L,X){var N,Z=L.gen,H=L.validateName,he=L.schema,E=L.schemaEnv,F=L.opts;F.code.es5?Z.func(H,(0,a._)(QX||(QX=Ae(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var N,Y;Z.code((0,a._)(ZX||(ZX=Ae(['"use strict"; ',""])),f(he,F))),Y=F,(N=Z).if(l.default.valCxt,function(){N.var(l.default.instancePath,(0,a._)(iY||(iY=Ae(["",".",""])),l.default.valCxt,l.default.instancePath)),N.var(l.default.parentData,(0,a._)(rY||(rY=Ae(["",".",""])),l.default.valCxt,l.default.parentData)),N.var(l.default.parentDataProperty,(0,a._)(oY||(oY=Ae(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),N.var(l.default.rootData,(0,a._)(sY||(sY=Ae(["",".",""])),l.default.valCxt,l.default.rootData)),Y.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(aY||(aY=Ae(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){N.var(l.default.instancePath,(0,a._)(lY||(lY=Ae(['""'])))),N.var(l.default.parentData,(0,a._)(cY||(cY=Ae(["undefined"])))),N.var(l.default.parentDataProperty,(0,a._)(uY||(uY=Ae(["undefined"])))),N.var(l.default.rootData,l.default.data),Y.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(dY||(dY=Ae(["{}"]))))}),Z.code(X)}):Z.func(H,(0,a._)(eY||(eY=Ae(["",", ",""])),l.default.data,(N=F,(0,a._)(tY||(tY=Ae(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,N.dynamicRef?(0,a._)(nY||(nY=Ae([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return Z.code(f(he,F)).code(X)})}function f(L,X){var Z="object"==bn(L)&&L[X.schemaId];return Z&&(X.code.source||X.code.process)?(0,a._)(bY||(bY=Ae(["/*# sourceURL="," */"])),Z):a.nil}function m(L){var X=L.schema,Z=L.self;if("boolean"==typeof X)return!X;for(var H in X)if(Z.RULES.all[H])return!0;return!1}function g(L){return"boolean"!=typeof L.schema}function v(L){var X,Z,H,E;(0,u.checkUnknownRules)(L),H=(X=L).errSchemaPath,E=X.self,(Z=X.schema).$ref&&X.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(Z,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(L,X){if(L.opts.jtd)return C(L,[],!1,X);var Z=(0,n.getSchemaTypes)(L.schema);C(L,Z,!(0,n.coerceAndCheckDataType)(L,Z),X)}function _(L){var X=L.gen,Z=L.schemaEnv,he=L.errSchemaPath,E=L.opts,F=L.schema.$comment;if(!0===E.$comment)X.code((0,a._)(xY||(xY=Ae(["",".logger.log(",")"])),l.default.self,F));else if("function"==typeof E.$comment){var N=(0,a.str)(wY||(wY=Ae(["","/$comment"])),he),Y=X.scopeValue("root",{ref:Z.root});X.code((0,a._)(CY||(CY=Ae(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,F,N,Y))}}function C(L,X,Z,H){var fe,Fe,xe,tt,he=L.gen,E=L.schema,F=L.data,N=L.allErrors,Y=L.opts,V=L.self.RULES;function oe(fe){(0,e.shouldUseGroup)(E,fe)&&(fe.type?(he.if((0,i.checkDataType)(fe.type,F,Y.strictNumbers)),S(L,fe),1===X.length&&X[0]===fe.type&&Z&&(he.else(),(0,i.reportTypeError)(L)),he.endIf()):S(L,fe),N||he.if((0,a._)(MY||(MY=Ae([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(Y.jtd||(Fe=X,(fe=L).schemaEnv.meta||!fe.opts.strictTypes||(function(xe,tt){if(tt.length){if(!xe.dataTypes.length)return void(xe.dataTypes=tt);tt.forEach(function(ze){$(xe.dataTypes,ze)||G(xe,'type "'.concat(ze,'" not allowed by context "').concat(xe.dataTypes.join(","),'"'))}),function(ze,ot){var B,ne=[],ie=Re(ze.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Ie=B.value;$(ot,Ie)?ne.push(Ie):ot.includes("integer")&&"number"===Ie&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}ze.dataTypes=ne}(xe,tt)}}(fe,Fe),fe.opts.allowUnionTypes||(xe=fe,(tt=Fe).length>1&&(2!==tt.length||!tt.includes("null"))&&G(xe,"use allowUnionTypes to allow union type keyword")),function(xe,tt){var ze=xe.self.RULES.all;for(var ot in ze){var B=ze[ot];if("object"==bn(B)&&(0,e.shouldUseRule)(xe.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return M(tt,ie)})&&G(xe,'missing type "'.concat(ne.join(","),'" for keyword "').concat(ot,'"'))}}}(fe,fe.dataTypes))),he.block(function(){var fe,Fe=Re(V.rules);try{for(Fe.s();!(fe=Fe.n()).done;)oe(fe.value)}catch(xe){Fe.e(xe)}finally{Fe.f()}oe(V.post)})):he.block(function(){return z(L,"$ref",V.all.$ref.definition)})}function S(L,X){var Z=L.gen,H=L.schema;L.opts.useDefaults&&(0,r.assignDefaults)(L,X.type),Z.block(function(){var he,E=Re(X.rules);try{for(E.s();!(he=E.n()).done;){var F=he.value;(0,e.shouldUseRule)(H,F)&&z(L,F.keyword,F.definition,X.type)}}catch(N){E.e(N)}finally{E.f()}})}function M(L,X){return L.includes(X)||"number"===X&&L.includes("integer")}function $(L,X){return L.includes(X)||"integer"===X&&L.includes("number")}function G(L,X){X+=' at "'.concat(L.schemaEnv.baseId+L.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(L,X,L.opts.strictTypes)}ff.validateFunctionCode=function(L){var X,Z,H,he;g(L)&&(v(L),m(L))?(Z=(X=L).schema,H=X.opts,he=X.gen,h(X,function(){var E,N;H.$comment&&Z.$comment&&_(X),N=(E=X).opts,void 0!==E.schema.default&&N.useDefaults&&N.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),he.let(l.default.vErrors,null),he.let(l.default.errors,0),H.unevaluated&&function(E){var F=E.gen,N=E.validateName;E.evaluated=F.const("evaluated",(0,a._)(hY||(hY=Ae(["",".evaluated"])),N)),F.if((0,a._)(fY||(fY=Ae(["",".dynamicProps"])),E.evaluated),function(){return F.assign((0,a._)(pY||(pY=Ae(["",".props"])),E.evaluated),(0,a._)(mY||(mY=Ae(["undefined"]))))}),F.if((0,a._)(gY||(gY=Ae(["",".dynamicItems"])),E.evaluated),function(){return F.assign((0,a._)(vY||(vY=Ae(["",".items"])),E.evaluated),(0,a._)(yY||(yY=Ae(["undefined"]))))})}(X),y(X),function(E){var fe,Fe,xe,tt,ze,F=E.gen,Y=E.validateName,V=E.ValidationError,oe=E.opts;E.schemaEnv.$async?F.if((0,a._)(kY||(kY=Ae([""," === 0"])),l.default.errors),function(){return F.return(l.default.data)},function(){return F.throw((0,a._)(SY||(SY=Ae(["new ","(",")"])),V,l.default.vErrors))}):(F.assign((0,a._)(DY||(DY=Ae(["",".errors"])),Y),l.default.vErrors),oe.unevaluated&&(Fe=(fe=E).gen,xe=fe.evaluated,ze=fe.items,(tt=fe.props)instanceof a.Name&&Fe.assign((0,a._)(EY||(EY=Ae(["",".props"])),xe),tt),ze instanceof a.Name&&Fe.assign((0,a._)(AY||(AY=Ae(["",".items"])),xe),ze)),F.return((0,a._)(TY||(TY=Ae([""," === 0"])),l.default.errors)))}(X)})):h(L,function(){return(0,t.topBoolOrEmptySchema)(L)})};var R=function(){function L(X,Z,H){if(ke(this,L),(0,o.validateKeywordUsage)(X,Z,H),this.gen=X.gen,this.allErrors=X.allErrors,this.keyword=H,this.data=X.data,this.schema=X.schema[H],this.$data=Z.$data&&X.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(X,this.schema,H,this.$data),this.schemaType=Z.schemaType,this.parentSchema=X.schema,this.params={},this.it=X,this.def=Z,this.$data)this.schemaCode=X.gen.const("vSchema",re(this.$data,X));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,Z.schemaType,Z.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(Z.schemaType)));("code"in Z?Z.trackErrors:!1!==Z.errors)&&(this.errsCount=X.gen.const("_errs",l.default.errors))}return Se(L,[{key:"result",value:function(X,Z,H){this.failResult((0,a.not)(X),Z,H)}},{key:"failResult",value:function(X,Z,H){this.gen.if(X),H?H():this.error(),Z?(this.gen.else(),Z(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(X,Z){this.failResult((0,a.not)(X),void 0,Z)}},{key:"fail",value:function(X){if(void 0===X)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(X),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(X){if(!this.$data)return this.fail(X);var Z=this.schemaCode;this.fail((0,a._)(IY||(IY=Ae([""," !== undefined && (",")"])),Z,(0,a.or)(this.invalid$data(),X)))}},{key:"error",value:function(X,Z,H){if(Z)return this.setParams(Z),this._error(X,H),void this.setParams({});this._error(X,H)}},{key:"_error",value:function(X,Z){(X?d.reportExtraError:d.reportError)(this,this.def.error,Z)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(X){this.allErrors||this.gen.if(X)}},{key:"setParams",value:function(X,Z){Z?Object.assign(this.params,X):this.params=X}},{key:"block$data",value:function(X,Z){var H=this,he=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(X,he),Z()})}},{key:"check$data",value:function(){var X=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,Z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,he=this.schemaCode,E=this.schemaType,F=this.def;H.if((0,a.or)((0,a._)(FY||(FY=Ae([""," === undefined"])),he),Z)),X!==a.nil&&H.assign(X,!0),(E.length||F.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),X!==a.nil&&H.assign(X,!1)),H.else()}}},{key:"invalid$data",value:function(){var X=this.gen,Z=this.schemaCode,H=this.schemaType,he=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(Z instanceof a.Name))throw new Error("ajv implementation error");var F=Array.isArray(H)?H:[H];return(0,a._)(NY||(NY=Ae(["",""])),(0,i.checkDataTypes)(F,Z,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(he.validateSchema){var F=X.scopeValue("validate$data",{ref:he.validateSchema});return(0,a._)(OY||(OY=Ae(["!","(",")"])),F,Z)}return a.nil}())}},{key:"subschema",value:function(X,Z){var H=(0,s.getSubschema)(this.it,X);(0,s.extendSubschemaData)(H,this.it,X),(0,s.extendSubschemaMode)(H,X);var he=Ze(Ze(Ze({},this.it),H),{},{items:void 0,props:void 0});return function p(L,X){g(L)&&(v(L),m(L))?function(Z,H){var N,Y,E=Z.gen;Z.opts.$comment&&Z.schema.$comment&&_(Z),(Y=(N=Z).schema[N.opts.schemaId])&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,Y)),function(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}(Z);var F=E.const("_errs",l.default.errors);y(Z,F),E.var(H,(0,a._)(_Y||(_Y=Ae([""," === ",""])),F,l.default.errors))}(L,X):(0,t.boolOrEmptySchema)(L,X)}(he,Z),he}},{key:"mergeEvaluated",value:function(X,Z){var H=this.it,he=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==X.props&&(H.props=u.mergeEvaluated.props(he,X.props,H.props,Z)),!0!==H.items&&void 0!==X.items&&(H.items=u.mergeEvaluated.items(he,X.items,H.items,Z)))}},{key:"mergeValidEvaluated",value:function(X,Z){var H=this,he=this.it;if(he.opts.unevaluated&&(!0!==he.props||!0!==he.items))return this.gen.if(Z,function(){return H.mergeEvaluated(X,a.Name)}),!0}}]),L}();function z(L,X,Z,H){var he=new R(L,Z,X);"code"in Z?Z.code(he,H):he.$data&&Z.validate?(0,o.funcKeywordCode)(he,Z):"macro"in Z?(0,o.macroKeywordCode)(he,Z):(Z.compile||Z.validate)&&(0,o.funcKeywordCode)(he,Z)}ff.KeywordCxt=R;var U=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(L,X){var Z,H,he=X.dataLevel,E=X.dataNames,F=X.dataPathArr;if(""===L)return l.default.rootData;if("/"===L[0]){if(!U.test(L))throw new Error("Invalid JSON-pointer: ".concat(L));Z=L,H=l.default.rootData}else{var N=q.exec(L);if(!N)throw new Error("Invalid JSON-pointer: ".concat(L));var Y=+N[1];if("#"===(Z=N[2])){if(Y>=he)throw new Error(xe("property/index",Y));return F[he-Y]}if(Y>he)throw new Error(xe("data",Y));if(H=E[he-Y],!Z)return H}var V,oe=H,fe=Re(Z.split("/"));try{for(fe.s();!(V=fe.n()).done;){var Fe=V.value;Fe&&(H=(0,a._)(jY||(jY=Ae(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Fe))),oe=(0,a._)(PY||(PY=Ae([""," && ",""])),oe,H))}}catch(tt){fe.e(tt)}finally{fe.f()}return oe;function xe(tt,ze){return"Cannot access ".concat(tt," ").concat(ze," levels up, current level is ").concat(he)}}return ff.getData=re,ff}Ga.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=z0(t[r]||n),a={"":s},l=fme(o,s,!1),c={},u=new Set;return hit(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=_.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function _(S){if(S=z0(y?(0,this.opts.uriResolver.resolve)(y,S):S),u.has(S))throw h(S);u.add(S);var $=this.refs[S];return"string"==typeof $&&($=this.refs[$]),"object"==bn($)?d(f,$.schema,S):S!==z0(v)&&("#"===S[0]?(d(f,c[S],S),c[S]=f):this.refs[S]=v),S}function C(S){if("string"==typeof S){if(!git.test(S))throw new Error('invalid anchor "'.concat(S,'"'));_.call(this,"#".concat(S))}}}),c;function d(f,p,m){if(void 0!==p&&!dit(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var gme,ID={};function DP(){if(gme)return ID;gme=1,Object.defineProperty(ID,"__esModule",{value:!0});var t=function(n){wt(i,lb(Error));var e=Ct(i);function i(r){var o;return ke(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return ID.default=t,ID}var vme,FD={};function TP(){if(vme)return FD;vme=1,Object.defineProperty(FD,"__esModule",{value:!0});var t=Ga,n=function(e){wt(r,lb(Error));var i=Ct(r);function r(o,s,a,l){var c;return ke(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return FD.default=n,FD}var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.resolveSchema=Zl.getCompilingSchema=Zl.resolveRef=Zl.compileSchema=Zl.SchemaEnv=void 0;var hd=xr(),vit=DP(),ng=Sp(),fd=Ga,yme=Hr,yit=MD(),ND=Se(function t(n){var e,i;ke(this,t),this.refs={},this.dynamicAnchors={},"object"==bn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function EP(t){var n=bme.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:vit.default,code:(0,hd._)(LY||(LY=Ae(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:ng.default.data,parentData:ng.default.parentData,parentDataProperty:ng.default.parentDataProperty,dataNames:[ng.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(RY||(RY=Ae(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,yit.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(ng.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(ng.default.self),"".concat(ng.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function bit(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:EP.call(this,t)}function bme(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function _it(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||OD.call(this,t,n)}function OD(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return AP.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=OD.call(this,t,s);return"object"!==bn(a?.schema)?void 0:AP.call(this,e,a)}if("object"===bn(s?.schema)){if(s.validate||EP.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new ND({schema:l,schemaId:c,root:t,baseId:r})}return AP.call(this,e,s)}}Zl.SchemaEnv=ND,Zl.compileSchema=EP,Zl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=_it.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new ND({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=bit.call(this,o):void 0},Zl.getCompilingSchema=bme,Zl.resolveSchema=OD;var xit=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function AP(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,yme.unescapeFragment)(c)];if(void 0===u)return;var d="object"===bn(r=u)&&r[this.opts.schemaId];!xit.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,yme.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=OD.call(this,o,h)}return(a=a||new ND({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var wit={$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},MP={},_me={};(function(t){function n(){for(var we=arguments.length,He=Array(we),qe=0;qe1){He[0]=He[0].slice(0,-1);for(var ut=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,U=String.fromCharCode;function q(we){throw new RangeError(G[we])}function L(we,He){var qe=we.split("@"),ut="";return qe.length>1&&(ut=qe[0]+"@",we=qe[1]),ut+function re(we,He){for(var qe=[],ut=we.length;ut--;)qe[ut]=He(we[ut]);return qe}((we=we.replace($,".")).split("."),He).join(".")}function X(we){for(var He=[],qe=0,ut=we.length;qe=55296&&Ue<=56319&&qe>1,we+=z(we/He);we>455;ut+=f)we=z(we/35);return z(ut+36*we/(we+38))},F=function(we){var He=[],qe=we.length,ut=0,Ue=128,Dn=72,ii=we.lastIndexOf("-");ii<0&&(ii=0);for(var hi=0;hi=128&&q("not-basic"),He.push(we.charCodeAt(hi));for(var di=ii>0?ii+1:0;di=qe&&q("invalid-input");var yr=H(we.charCodeAt(di++));(yr>=f||yr>z((h-ut)/Qr))&&q("overflow"),ut+=yr*Qr;var Ee=gi<=Dn?1:gi>=Dn+26?26:gi-Dn;if(yrz(h/St)&&q("overflow"),Qr*=St}var Ht=He.length+1;Dn=E(ut-kr,Ht,0==kr),z(ut/Ht)>h-Ue&&q("overflow"),Ue+=z(ut/Ht),ut%=Ht,He.splice(ut++,0,Ue)}return String.fromCodePoint.apply(String,He)},N=function(we){var He=[],qe=(we=X(we)).length,ut=128,Ue=0,Dn=72,ii=!0,hi=!1,di=void 0;try{for(var kr,Qr=we[Symbol.iterator]();!(ii=(kr=Qr.next()).done);ii=!0){var gi=kr.value;gi<128&&He.push(U(gi))}}catch(vd){hi=!0,di=vd}finally{try{!ii&&Qr.return&&Qr.return()}finally{if(hi)throw di}}var yr=He.length,Ee=yr;for(yr&&He.push("-");Ee=ut&&Bnz((h-Ue)/ei)&&q("overflow"),Ue+=(St-ut)*ei,ut=St;var Yn=!0,br=!1,Ar=void 0;try{for(var Po,ca=we[Symbol.iterator]();!(Yn=(Po=ca.next()).done);Yn=!0){var md=Po.value;if(mdh&&q("overflow"),md==ut){for(var hu=Ue,ua=f;;ua+=f){var Rl=ua<=Dn?1:ua>=Dn+26?26:ua-Dn;if(hu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function xe(we){for(var He="",qe=0,ut=we.length;qe=194&&Ue<224){if(ut-qe>=6){var Dn=parseInt(we.substr(qe+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&Dn)}else He+=we.substr(qe,6);qe+=6}else if(Ue>=224){if(ut-qe>=9){var ii=parseInt(we.substr(qe+4,2),16),hi=parseInt(we.substr(qe+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ii)<<6|63&hi)}else He+=we.substr(qe,9);qe+=9}else He+=we.substr(qe,3),qe+=3}return He}function tt(we,He){function qe(ut){var Ue=xe(ut);return Ue.match(He.UNRESERVED)?Ue:ut}return we.scheme&&(we.scheme=String(we.scheme).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==we.userinfo&&(we.userinfo=String(we.userinfo).replace(He.PCT_ENCODED,qe).replace(He.NOT_USERINFO,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.host&&(we.host=String(we.host).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_HOST,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.path&&(we.path=String(we.path).replace(He.PCT_ENCODED,qe).replace(we.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.query&&(we.query=String(we.query).replace(He.PCT_ENCODED,qe).replace(He.NOT_QUERY,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.fragment&&(we.fragment=String(we.fragment).replace(He.PCT_ENCODED,qe).replace(He.NOT_FRAGMENT,Fe).replace(He.PCT_ENCODED,r)),we}function ze(we){return we.replace(/^0*(.*)/,"$1")||"0"}function ot(we,He){var qe=we.match(He.IPV4ADDRESS)||[],ut=u(qe,2)[1];return ut?ut.split(".").map(ze).join("."):we}function B(we,He){var qe=we.match(He.IPV6ADDRESS)||[],ut=u(qe,3),Ue=ut[1],Dn=ut[2];if(Ue){for(var ii=Ue.toLowerCase().split("::").reverse(),hi=u(ii,2),di=hi[0],kr=hi[1],Qr=kr?kr.split(":").map(ze):[],gi=di.split(":").map(ze),yr=He.IPV4ADDRESS.test(gi[gi.length-1]),Ee=yr?7:8,St=gi.length-Ee,Ht=Array(Ee),sn=0;sn1){var Oi=Ht.slice(0,hn.index),Bn=Ht.slice(hn.index+hn.length);ri=Oi.join(":")+"::"+Bn.join(":")}else ri=Ht.join(":");return Dn&&(ri+="%"+Dn),ri}return we}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Ie(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe={},ut=!1!==He.iri?c:l;"suffix"===He.reference&&(we=(He.scheme?He.scheme+":":"")+"//"+we);var Ue=we.match(ne);if(Ue){ie?(qe.scheme=Ue[1],qe.userinfo=Ue[3],qe.host=Ue[4],qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=Ue[7],qe.fragment=Ue[8],isNaN(qe.port)&&(qe.port=Ue[5])):(qe.scheme=Ue[1]||void 0,qe.userinfo=-1!==we.indexOf("@")?Ue[3]:void 0,qe.host=-1!==we.indexOf("//")?Ue[4]:void 0,qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=-1!==we.indexOf("?")?Ue[7]:void 0,qe.fragment=-1!==we.indexOf("#")?Ue[8]:void 0,isNaN(qe.port)&&(qe.port=we.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),qe.host&&(qe.host=B(ot(qe.host,ut),ut)),qe.reference=void 0!==qe.scheme||void 0!==qe.userinfo||void 0!==qe.host||void 0!==qe.port||qe.path||void 0!==qe.query?void 0===qe.scheme?"relative":void 0===qe.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==qe.reference&&(qe.error=qe.error||"URI is not a "+He.reference+" reference.");var Dn=fe[(He.scheme||qe.scheme||"").toLowerCase()];if(He.unicodeSupport||Dn&&Dn.unicodeSupport)tt(qe,ut);else{if(qe.host&&(He.domainHost||Dn&&Dn.domainHost))try{qe.host=oe.toASCII(qe.host.replace(ut.PCT_ENCODED,xe).toLowerCase())}catch(ii){qe.error=qe.error||"Host's domain name can not be converted to ASCII via punycode: "+ii}tt(qe,l)}Dn&&Dn.parse&&Dn.parse(qe,He)}else qe.error=qe.error||"URI can not be parsed.";return qe}var Le=/^\.\.?\//,_t=/^\/\.(\/|$)/,At=/^\/\.\.(\/|$)/,_n=/^\/?(?:.|\n)*?(?=\/|$)/;function ci(we){for(var He=[];we.length;)if(we.match(Le))we=we.replace(Le,"");else if(we.match(_t))we=we.replace(_t,"/");else if(we.match(At))we=we.replace(At,"/"),He.pop();else if("."===we||".."===we)we="";else{var qe=we.match(_n);if(!qe)throw new Error("Unexpected dot segment condition");var ut=qe[0];we=we.slice(ut.length),He.push(ut)}return He.join("")}function on(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe=He.iri?c:l,ut=[],Ue=fe[(He.scheme||we.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(we,He),we.host&&!qe.IPV6ADDRESS.test(we.host)&&(He.domainHost||Ue&&Ue.domainHost))try{we.host=He.iri?oe.toUnicode(we.host):oe.toASCII(we.host.replace(qe.PCT_ENCODED,xe).toLowerCase())}catch(hi){we.error=we.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+hi}tt(we,qe),"suffix"!==He.reference&&we.scheme&&(ut.push(we.scheme),ut.push(":"));var Dn=function Ye(we,He){var qe=!1!==He.iri?c:l,ut=[];return void 0!==we.userinfo&&(ut.push(we.userinfo),ut.push("@")),void 0!==we.host&&ut.push(B(ot(String(we.host),qe),qe).replace(qe.IPV6ADDRESS,function(Ue,Dn,ii){return"["+Dn+(ii?"%25"+ii:"")+"]"})),"number"!=typeof we.port&&"string"!=typeof we.port||(ut.push(":"),ut.push(String(we.port))),ut.length?ut.join(""):void 0}(we,He);if(void 0!==Dn&&("suffix"!==He.reference&&ut.push("//"),ut.push(Dn),we.path&&"/"!==we.path.charAt(0)&&ut.push("/")),void 0!==we.path){var ii=we.path;He.absolutePath||Ue&&Ue.absolutePath||(ii=ci(ii)),void 0===Dn&&(ii=ii.replace(/^\/\//,"/%2F")),ut.push(ii)}return void 0!==we.query&&(ut.push("?"),ut.push(we.query)),void 0!==we.fragment&&(ut.push("#"),ut.push(we.fragment)),ut.join("")}function Fi(we,He){var qe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ut={};return arguments[3]||(we=Ie(on(we,qe),qe),He=Ie(on(He,qe),qe)),!(qe=qe||{}).tolerant&&He.scheme?(ut.scheme=He.scheme,ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(He.path?("/"===He.path.charAt(0)?ut.path=ci(He.path):(ut.path=void 0===we.userinfo&&void 0===we.host&&void 0===we.port||we.path?we.path?we.path.slice(0,we.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,ut.path=ci(ut.path)),ut.query=He.query):(ut.path=we.path,ut.query=void 0!==He.query?He.query:we.query),ut.userinfo=we.userinfo,ut.host=we.host,ut.port=we.port),ut.scheme=we.scheme),ut.fragment=He.fragment,ut}function Or(we,He){return we&&we.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,xe)}var Ai={scheme:"http",domainHost:!0,parse:function(we,He){return we.host||(we.error=we.error||"HTTP URIs must have a host."),we},serialize:function(we,He){var qe="https"===String(we.scheme).toLowerCase();return we.port!==(qe?443:80)&&""!==we.port||(we.port=void 0),we.path||(we.path="/"),we}},Wr={scheme:"https",domainHost:Ai.domainHost,parse:Ai.parse,serialize:Ai.serialize};function jo(we){return"boolean"==typeof we.secure?we.secure:"wss"===String(we.scheme).toLowerCase()}var Nn={scheme:"ws",domainHost:!0,parse:function(we,He){var qe=we;return qe.secure=jo(qe),qe.resourceName=(qe.path||"/")+(qe.query?"?"+qe.query:""),qe.path=void 0,qe.query=void 0,qe},serialize:function(we,He){if(we.port!==(jo(we)?443:80)&&""!==we.port||(we.port=void 0),"boolean"==typeof we.secure&&(we.scheme=we.secure?"wss":"ws",we.secure=void 0),we.resourceName){var qe=we.resourceName.split("?"),ut=u(qe,2),Ue=ut[0],Dn=ut[1];we.path=Ue&&"/"!==Ue?Ue:void 0,we.query=Dn,we.resourceName=void 0}return we.fragment=void 0,we}},xt={scheme:"wss",domainHost:Nn.domainHost,parse:Nn.parse,serialize:Nn.serialize},ui={},Ni="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",xo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),gt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ai=new RegExp(Ni,"g"),bi=new RegExp(xo,"g"),Er=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',gt),"g"),qr=new RegExp(n("[^]",Ni,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ao=qr;function Js(we){var He=xe(we);return He.match(ai)?He:we}var vr={scheme:"mailto",parse:function(we,He){var qe=we,ut=qe.to=qe.path?qe.path.split(","):[];if(qe.path=void 0,qe.query){for(var Ue=!1,Dn={},ii=qe.query.split("&"),hi=0,di=ii.length;hi 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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=function(){function E(){var F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,F=this.opts=Ze(Ze({},F),function y(E){var F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne,ie,Ie,Ye,Le,_t,At,_n,ci,on,Fi,pn,Nr,$r=E.strict,wr=null===(F=E.code)||void 0===F?void 0:F.optimize,Or=!0===wr||void 0===wr?1:wr||0,Ai=null!==(Y=null===(N=E.code)||void 0===N?void 0:N.regExp)&&void 0!==Y?Y:f,Wr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(fe=null!==(oe=E.strictSchema)&&void 0!==oe?oe:$r)||void 0===fe||fe,strictNumbers:null===(xe=null!==(Fe=E.strictNumbers)&&void 0!==Fe?Fe:$r)||void 0===xe||xe,strictTypes:null!==(ze=null!==(tt=E.strictTypes)&&void 0!==tt?tt:$r)&&void 0!==ze?ze:"log",strictTuples:null!==(B=null!==(ot=E.strictTuples)&&void 0!==ot?ot:$r)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:$r)&&void 0!==ie&&ie,code:E.code?Ze(Ze({},E.code),{},{optimize:Or,regExp:Ai}):{optimize:Or,regExp:Ai},loopRequired:null!==(Ie=E.loopRequired)&&void 0!==Ie?Ie:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(Le=E.meta)||void 0===Le||Le,messages:null===(_t=E.messages)||void 0===_t||_t,inlineRefs:null===(At=E.inlineRefs)||void 0===At||At,schemaId:null!==(_n=E.schemaId)&&void 0!==_n?_n:"$id",addUsedSchema:null===(ci=E.addUsedSchema)||void 0===ci||ci,validateSchema:null===(on=E.validateSchema)||void 0===on||on,validateFormats:null===(Fi=E.validateFormats)||void 0===Fi||Fi,unicodeRegExp:null===(pn=E.unicodeRegExp)||void 0===pn||pn,int32range:null===(Nr=E.int32range)||void 0===Nr||Nr,uriResolver:Wr}}(F));var N=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:N.es5,lines:N.lines}),this.logger=function U(E){if(!1===E)return z;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")}(F.logger);var oe=F.validateFormats;F.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,F,"NOT SUPPORTED"),C.call(this,v,F,"DEPRECATED","warn"),this._metaOpts=R.call(this),F.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),F.keywords&&G.call(this,F.keywords),"object"==bn(F.meta)&&this.addMetaSchema(F.meta),M.call(this),F.validateFormats=oe}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var F=this.opts,N=F.$data,Y=F.meta,V=F.schemaId,oe=d;"id"===V&&((oe=Ze({},d)).id=oe.$id,delete oe.$id),Y&&N&&this.addMetaSchema(oe,oe[V],!1)}},{key:"defaultMeta",value:function(){var F=this.opts,N=F.meta,Y=F.schemaId;return this.opts.defaultMeta="object"==bn(N)?N[Y]||N:void 0}},{key:"validate",value:function(F,N){var Y;if("string"==typeof F){if(!(Y=this.getSchema(F)))throw new Error('no schema with key or ref "'.concat(F,'"'))}else Y=this.compile(F);var V=Y(N);return"$async"in Y||(this.errors=Y.errors),V}},{key:"compile",value:function(F,N){var Y=this._addSchema(F,N);return Y.validate||this._compileSchemaEnv(Y)}},{key:"compileAsync",value:function(F,N){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var Y=this.opts.loadSchema;return V.call(this,F,N);function V(Ie,Ye){return oe.apply(this,arguments)}function oe(){return(oe=Zi(vn().mark(function Ie(Ye,Le){var _t;return vn().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,fe.call(this,Ye.$schema);case 2:return _t=this._addSchema(Ye,Le),At.abrupt("return",_t.validate||xe.call(this,_t));case 4:case"end":return At.stop()}},Ie,this)}))).apply(this,arguments)}function fe(Ie){return Fe.apply(this,arguments)}function Fe(){return(Fe=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!Ye||this.getSchema(Ye)){Le.next=3;break}return Le.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return Le.stop()}},Ie,this)}))).apply(this,arguments)}function xe(Ie){return tt.apply(this,arguments)}function tt(){return(tt=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.prev=0,Le.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(Le.prev=4,Le.t0=Le.catch(0),Le.t0 instanceof r.default){Le.next=8;break}throw Le.t0;case 8:return ze.call(this,Le.t0),Le.next=11,ot.call(this,Le.t0.missingSchema);case 11:return Le.abrupt("return",xe.call(this,Ye));case 12:case"end":return Le.stop()}},Ie,this,[[0,4]])}))).apply(this,arguments)}function ze(Ie){var Ye=Ie.missingSchema,Le=Ie.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(Le," cannot be resolved"))}function ot(Ie){return B.apply(this,arguments)}function B(){return(B=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,ne.call(this,Ye);case 2:if(Le=_t.sent,this.refs[Ye]){_t.next=6;break}return _t.next=6,fe.call(this,Le.$schema);case 6:this.refs[Ye]||this.addSchema(Le,Ye,N);case 7:case"end":return _t.stop()}},Ie,this)}))).apply(this,arguments)}function ne(Ie){return ie.apply(this,arguments)}function ie(){return(ie=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(!(Le=this._loading[Ye])){_t.next=3;break}return _t.abrupt("return",Le);case 3:return _t.prev=3,_t.next=6,this._loading[Ye]=Y(Ye);case 6:return _t.abrupt("return",_t.sent);case 7:return _t.prev=7,delete this._loading[Ye],_t.finish(7);case 10:case"end":return _t.stop()}},Ie,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(F,N,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(F)){var fe,Fe=Re(F);try{for(Fe.s();!(fe=Fe.n()).done;)this.addSchema(fe.value,void 0,Y,oe)}catch(ze){Fe.e(ze)}finally{Fe.f()}return this}if("object"===bn(F)){var tt=this.opts.schemaId;if(void 0!==(V=F[tt])&&"string"!=typeof V)throw new Error("schema ".concat(tt," must be string"))}return N=(0,l.normalizeId)(N||V),this._checkUnique(N),this.schemas[N]=this._addSchema(F,Y,N,oe,!0),this}},{key:"addMetaSchema",value:function(F,N){return this.addSchema(F,N,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(F,N){if("boolean"==typeof F)return!0;var Y;if(void 0!==(Y=F.$schema)&&"string"!=typeof Y)throw new Error("$schema must be a string");if(!(Y=Y||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(Y,F);if(!V&&N){var oe="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(oe);this.logger.error(oe)}return V}},{key:"getSchema",value:function(F){for(var N;"string"==typeof(N=S.call(this,F));)F=N;if(void 0===N){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(N=s.resolveSchema.call(this,V,F)))return;this.refs[F]=N}return N.validate||this._compileSchemaEnv(N)}},{key:"removeSchema",value:function(F){if(F instanceof RegExp)return this._removeAllSchemas(this.schemas,F),this._removeAllSchemas(this.refs,F),this;switch(bn(F)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var N=S.call(this,F);return"object"==bn(N)&&this._cache.delete(N.schema),delete this.schemas[F],delete this.refs[F],this;case"object":this._cache.delete(F);var V=F[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(F){var N,Y=Re(F);try{for(Y.s();!(N=Y.n()).done;)this.addKeyword(N.value)}catch(oe){Y.e(oe)}finally{Y.f()}return this}},{key:"addKeyword",value:function(F,N){var Y,V=this;if("string"==typeof F)Y=F,"object"==bn(N)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),N.keyword=Y);else{if("object"!=bn(F)||void 0!==N)throw new Error("invalid addKeywords parameters");if(Y=(N=F).keyword,Array.isArray(Y)&&!Y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(re.call(this,Y,N),!N)return(0,u.eachItem)(Y,function(fe){return L.call(V,fe)}),this;Z.call(this,N);var oe=Ze(Ze({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)});return(0,u.eachItem)(Y,0===oe.type.length?function(fe){return L.call(V,fe,oe)}:function(fe){return oe.type.forEach(function(Fe){return L.call(V,fe,oe,Fe)})}),this}},{key:"getKeyword",value:function(F){var N=this.RULES.all[F];return"object"==bn(N)?N.definition:!!N}},{key:"removeKeyword",value:function(F){var N=this.RULES;delete N.keywords[F],delete N.all[F];var Y,V=Re(N.rules);try{for(V.s();!(Y=V.n()).done;){var oe=Y.value,fe=oe.rules.findIndex(function(Fe){return Fe.keyword===F});fe>=0&&oe.rules.splice(fe,1)}}catch(Fe){V.e(Fe)}finally{V.f()}return this}},{key:"addFormat",value:function(F,N){return"string"==typeof N&&(N=new RegExp(N)),this.formats[F]=N,this}},{key:"errorsText",value:function(){var F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Y=N.separator,V=void 0===Y?", ":Y,oe=N.dataVar,fe=void 0===oe?"data":oe;return F&&0!==F.length?F.map(function(Fe){return"".concat(fe).concat(Fe.instancePath," ").concat(Fe.message)}).reduce(function(Fe,xe){return Fe+V+xe}):"No errors"}},{key:"$dataMetaSchema",value:function(F,N){var Y=this.RULES.all;F=JSON.parse(JSON.stringify(F));var V,oe=Re(N);try{for(oe.s();!(V=oe.n()).done;){var fe,Fe=V.value.split("/").slice(1),xe=F,tt=Re(Fe);try{for(tt.s();!(fe=tt.n()).done;)xe=xe[fe.value]}catch(ie){tt.e(ie)}finally{tt.f()}for(var ze in Y){var ot=Y[ze];if("object"==bn(ot)){var ne=xe[ze];ot.definition.$data&&ne&&(xe[ze]=he(ne))}}}}catch(ie){oe.e(ie)}finally{oe.f()}return F}},{key:"_removeAllSchemas",value:function(F,N){for(var Y in F){var V=F[Y];N&&!N.test(Y)||("string"==typeof V?delete F[Y]:V&&!V.meta&&(this._cache.delete(V.schema),delete F[Y]))}}},{key:"_addSchema",value:function(F,N,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Fe=this.opts.schemaId;if("object"==bn(F))V=F[Fe];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof F)throw new Error("schema must be object or boolean")}var xe=this._cache.get(F);if(void 0!==xe)return xe;Y=(0,l.normalizeId)(V||Y);var tt=l.getSchemaRefs.call(this,F,Y);return xe=new s.SchemaEnv({schema:F,schemaId:Fe,meta:N,baseId:Y,localRefs:tt}),this._cache.set(xe.schema,xe),fe&&!Y.startsWith("#")&&(Y&&this._checkUnique(Y),this.refs[Y]=xe),oe&&this.validateSchema(F,!0),xe}},{key:"_checkUnique",value:function(F){if(this.schemas[F]||this.refs[F])throw new Error('schema with key or id "'.concat(F,'" already exists'))}},{key:"_compileSchemaEnv",value:function(F){if(F.meta?this._compileMetaSchema(F):s.compileSchema.call(this,F),!F.validate)throw new Error("ajv implementation error");return F.validate}},{key:"_compileMetaSchema",value:function(F){var N=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,F)}finally{this.opts=N}}}]),E}();function C(E,F,N){var Y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var oe=V;oe in F&&this.logger[Y]("".concat(N,": option ").concat(V,". ").concat(E[oe]))}}function S(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function M(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var F in E)this.addSchema(E[F],F)}function $(){for(var E in this.opts.formats){var F=this.opts.formats[E];F&&this.addFormat(E,F)}}function G(E){if(Array.isArray(E))this.addVocabulary(E);else for(var F in this.logger.warn("keywords option as map is deprecated, pass array"),E){var N=E[F];N.keyword||(N.keyword=F),this.addKeyword(N)}}function R(){var E,F=Ze({},this.opts),N=Re(p);try{for(N.s();!(E=N.n()).done;)delete F[E.value]}catch(Y){N.e(Y)}finally{N.f()}return F}t.default=_,_.ValidationError=i.default,_.MissingRefError=r.default;var z={log:function(){},warn:function(){},error:function(){}},q=/^[a-z_$][a-z0-9_$:-]*$/i;function re(E,F){var N=this.RULES;if((0,u.eachItem)(E,function(Y){if(N.keywords[Y])throw new Error("Keyword ".concat(Y," is already defined"));if(!q.test(Y))throw new Error("Keyword ".concat(Y," has invalid name"))}),F&&F.$data&&!("code"in F)&&!("validate"in F))throw new Error('$data keyword must have "code" or "validate" function')}function L(E,F,N){var Y,V=this,oe=F?.post;if(N&&oe)throw new Error('keyword with "post" flag cannot have "type"');var fe=this.RULES,Fe=oe?fe.post:fe.rules.find(function(tt){return tt.type===N});if(Fe||fe.rules.push(Fe={type:N,rules:[]}),fe.keywords[E]=!0,F){var xe={keyword:E,definition:Ze(Ze({},F),{},{type:(0,c.getJSONTypes)(F.type),schemaType:(0,c.getJSONTypes)(F.schemaType)})};F.before?X.call(this,Fe,xe,F.before):Fe.rules.push(xe),fe.all[E]=xe,null===(Y=F.implements)||void 0===Y||Y.forEach(function(tt){return V.addKeyword(tt)})}}function X(E,F,N){var Y=E.rules.findIndex(function(V){return V.keyword===N});Y>=0?E.rules.splice(Y,0,F):(E.rules.push(F),this.logger.warn("rule ".concat(N," is not defined")))}function Z(E){var F=E.metaSchema;void 0!==F&&(E.$data&&this.opts.$data&&(F=he(F)),E.validateSchema=this.compile(F,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(E){return{anyOf:[E,H]}}}(Xpe);var IP={},FP={},NP={};Object.defineProperty(NP,"__esModule",{value:!0}),NP.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.callRef=ig.getValidate=void 0;var kit=TP(),wme=dd(),ec=xr(),U0=Sp(),Cme=Zl,jD=Hr,Sit={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return PD(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return PD(t,(0,ec._)($Y||($Y=Ae(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Cme.resolveRef.call(l,c,r,e);if(void 0===p)throw new kit.default(i.opts.uriResolver,r,e);return p instanceof Cme.SchemaEnv?(g=kme(t,m=p),void PD(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,ec.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:ec.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function kme(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,ec._)(BY||(BY=Ae(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function PD(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?U0.default.this:ec.nil;function c(d){var h=(0,ec._)(zY||(zY=Ae(["",".errors"])),d);r.assign(U0.default.vErrors,(0,ec._)(UY||(UY=Ae([""," === null ? "," : ",".concat(",")"])),U0.default.vErrors,h,U0.default.vErrors,h)),r.assign(U0.default.errors,(0,ec._)(GY||(GY=Ae(["",".length"])),U0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=jD.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,ec._)(WY||(WY=Ae(["",".evaluated.props"])),d));o.props=jD.mergeEvaluated.props(r,p,o.props,ec.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=jD.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,ec._)(qY||(qY=Ae(["",".evaluated.items"])),d));o.items=jD.mergeEvaluated.items(r,m,o.items,ec.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,ec._)(VY||(VY=Ae(["await ",""])),(0,wme.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,ec._)(HY||(HY=Ae(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,wme.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}ig.getValidate=kme,ig.callRef=PD,ig.default=Sit,Object.defineProperty(FP,"__esModule",{value:!0}),FP.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",NP.default,ig.default];var OP={},jP={};Object.defineProperty(jP,"__esModule",{value:!0});var LD=xr(),Tp=LD.operators,RD={maximum:{okStr:"<=",ok:Tp.LTE,fail:Tp.GT},minimum:{okStr:">=",ok:Tp.GTE,fail:Tp.LT},exclusiveMaximum:{okStr:"<",ok:Tp.LT,fail:Tp.GTE},exclusiveMinimum:{okStr:">",ok:Tp.GT,fail:Tp.LTE}},Eit={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD.str)(XY||(XY=Ae(["must be "," ",""])),RD[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD._)(YY||(YY=Ae(["{comparison: ",", limit: ","}"])),RD[n].okStr,e)}},Ait={keyword:Object.keys(RD),type:"number",schemaType:"number",$data:!0,error:Eit,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,LD._)(JY||(JY=Ae([""," "," "," || isNaN(",")"])),e,RD[n].fail,i,e))}};jP.default=Ait;var PP={};Object.defineProperty(PP,"__esModule",{value:!0});var N_=xr(),Mit={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,N_.str)(KY||(KY=Ae(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,N_._)(QY||(QY=Ae(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,N_._)(ZY||(ZY=Ae(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,N_._)(eJ||(eJ=Ae([""," !== parseInt(",")"])),o,o);t.fail$data((0,N_._)(tJ||(tJ=Ae(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};PP.default=Mit;var LP={},RP={};function Sme(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(P_.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,j_.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:_=v}),void n.forOf(_,i,function(){n.assign(C,(0,j_.propertyInData)(n,r,_,a.ownProperties)),n.if((0,P_.not)(C),function(){t.error(),n.break()})},P_.nil);var _,C}),t.ok(y)}else n.if((0,j_.checkMissingProp)(t,e,v)),(0,j_.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,$it.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,j_.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};VP.default=Bit;var HP={};Object.defineProperty(HP,"__esModule",{value:!0});var L_=xr(),Vit={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,L_.str)(gJ||(gJ=Ae(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,L_._)(vJ||(vJ=Ae(["{limit: ","}"])),n)}},Hit={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Vit,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?L_.operators.GT:L_.operators.LT;t.fail$data((0,L_._)(yJ||(yJ=Ae(["",".length "," ",""])),e,r,i))}};HP.default=Hit;var zP={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});var Dme=dme;Dme.code='require("ajv/dist/runtime/equal").default',R_.default=Dme,Object.defineProperty(zP,"__esModule",{value:!0});var UP=I_,Wa=xr(),zit=Hr,Uit=R_,Git={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa.str)(bJ||(bJ=Ae(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa._)(_J||(_J=Ae(["{i: ",", j: ","}"])),e,i)}},Wit={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Git,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,UP.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Wa._)(wJ||(wJ=Ae(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Wa._)(CJ||(CJ=Ae([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Wa._)(xJ||(xJ=Ae([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,UP.checkDataTypes)(c,p,a.opts.strictNumbers,UP.DataType.Wrong),g=n.const("indices",(0,Wa._)(kJ||(kJ=Ae(["{}"]))));n.for((0,Wa._)(SJ||(SJ=Ae([";","--;"])),h),function(){n.let(p,(0,Wa._)(DJ||(DJ=Ae(["","[","]"])),e,h)),n.if(m,(0,Wa._)(TJ||(TJ=Ae(["continue"])))),c.length>1&&n.if((0,Wa._)(EJ||(EJ=Ae(["typeof ",' == "string"'])),p),(0,Wa._)(AJ||(AJ=Ae(["",' += "_"'])),p)),n.if((0,Wa._)(MJ||(MJ=Ae(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Wa._)(IJ||(IJ=Ae(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Wa._)(FJ||(FJ=Ae(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,zit.useFunc)(n,Uit.default),m=n.name("outer");n.label(m).for((0,Wa._)(NJ||(NJ=Ae([";","--;"])),h),function(){return n.for((0,Wa._)(OJ||(OJ=Ae([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Wa._)(jJ||(jJ=Ae(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};zP.default=Wit;var GP={};Object.defineProperty(GP,"__esModule",{value:!0});var WP=xr(),qit=Hr,Xit=R_,Yit={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,WP._)(PJ||(PJ=Ae(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==bn(o)?t.fail$data((0,WP._)(LJ||(LJ=Ae(["!","(",", ",")"])),(0,qit.useFunc)(n,Xit.default),e,r)):t.fail((0,WP._)(RJ||(RJ=Ae([""," !== ",""])),o,e))}};GP.default=Yit;var qP={};Object.defineProperty(qP,"__esModule",{value:!0});var $_=xr(),Jit=Hr,Kit=R_,Qit={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,$_._)($J||($J=Ae(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,Jit.useFunc)(n,Kit.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,$_._)(BJ||(BJ=Ae(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=$_.or.apply(void 0,si(r.map(function(h,f){return p=d,"object"===bn(g=r[m=f])&&null!==g?(0,$_._)(VJ||(VJ=Ae(["","(",", ","[","])"])),u(),e,p,m):(0,$_._)(HJ||(HJ=Ae([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};qP.default=Qit,Object.defineProperty(OP,"__esModule",{value:!0}),OP.default=[jP.default,PP.default,LP.default,$P.default,BP.default,VP.default,HP.default,zP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},GP.default,qP.default];var XP={},G0={};Object.defineProperty(G0,"__esModule",{value:!0}),G0.validateAdditionalItems=void 0;var og=xr(),YP=Hr,crt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,og.str)(zJ||(zJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,og._)(UJ||(UJ=Ae(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?Tme(t,i):(0,YP.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function Tme(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,og._)(GJ||(GJ=Ae(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,og._)(WJ||(WJ=Ae([""," <= ",""])),a,n.length));else if("object"==bn(i)&&!(0,YP.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,og._)(qJ||(qJ=Ae([""," <= ",""])),a,n.length));e.if((0,og.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:YP.Type.Num},c),s.allErrors||e.if((0,og.not)(c),function(){return e.break()})});var c}),t.ok(l)}}G0.validateAdditionalItems=Tme,G0.default=crt;var JP={},W0={};Object.defineProperty(W0,"__esModule",{value:!0}),W0.validateTuple=void 0;var Eme=xr(),BD=Hr,urt=dd(),drt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Ame(t,"additionalItems",n);e.items=!0,(0,BD.alwaysValidSchema)(e,n)||t.ok((0,urt.validateArray)(t))}};function Ame(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,BD.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=BD.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Eme._)(XJ||(XJ=Ae(["",".length"])),o));e.forEach(function(d,h){(0,BD.alwaysValidSchema)(a,d)||(i.if((0,Eme._)(YJ||(YJ=Ae([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}W0.validateTuple=Ame,W0.default=drt,Object.defineProperty(JP,"__esModule",{value:!0});var hrt=W0,frt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,hrt.validateTuple)(t,"items")}};JP.default=frt;var KP={};Object.defineProperty(KP,"__esModule",{value:!0});var Mme=xr(),prt=Hr,mrt=dd(),grt=G0,vrt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Mme.str)(JJ||(JJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Mme._)(KJ||(KJ=Ae(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,prt.alwaysValidSchema)(i,n)||(r?(0,grt.validateAdditionalItems)(t,r):t.ok((0,mrt.validateArray)(t)))}};KP.default=vrt;var QP={};Object.defineProperty(QP,"__esModule",{value:!0});var du=xr(),VD=Hr,yrt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du.str)(QJ||(QJ=Ae(["must contain at least "," valid item(s)"])),e):(0,du.str)(ZJ||(ZJ=Ae(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du._)(eK||(eK=Ae(["{minContains: ","}"])),e):(0,du._)(tK||(tK=Ae(["{minContains: ",", maxContains: ","}"])),e,i)}},brt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:yrt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,du._)(nK||(nK=Ae(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,VD.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,VD.alwaysValidSchema)(a,r)){var d=(0,du._)(iK||(iK=Ae([""," >= ",""])),u,n);return void 0!==e&&(d=(0,du._)(rK||(rK=Ae([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,du._)(oK||(oK=Ae(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,VD.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,du._)(sK||(sK=Ae(["","++"])),v)),void(void 0===e?i.if((0,du._)(aK||(aK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,du._)(lK||(lK=Ae([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,du._)(cK||(cK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:VD.Type.Num,compositeRule:!0},m),g()})}}};QP.default=brt;var Ime={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Hr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(uK||(uK=Ae(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(dK||(dK=Ae(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Un(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,_=Re(g);try{for(_.s();!(y=_.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(S){_.e(S)}finally{_.f()}}):(c.if((0,n._)(hK||(hK=Ae([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Ime);var ZP={};Object.defineProperty(ZP,"__esModule",{value:!0});var Fme=xr(),_rt=Hr,xrt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,Fme._)(fK||(fK=Ae(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,_rt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,Fme.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};ZP.default=xrt;var HD={};Object.defineProperty(HD,"__esModule",{value:!0});var zD=dd(),pd=xr(),wrt=Sp(),UD=Hr,Crt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(pK||(pK=Ae(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,UD.alwaysValidSchema)(s,e)){var c=(0,zD.allSchemaProperties)(i.properties),u=(0,zD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,UD.schemaRefOrVal)(s,i.properties,"properties");g=(0,zD.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,si(c.map(function(y){return(0,pd._)(gK||(gK=Ae([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(si(u.map(function(y){return(0,pd._)(vK||(vK=Ae(["",".test(",")"])),(0,zD.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(mK||(mK=Ae([""," === ",""])),o,wrt.default.errors))}function d(p){n.code((0,pd._)(yK||(yK=Ae(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==bn(e)&&!(0,UD.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:UD.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};HD.default=Crt;var eL={};Object.defineProperty(eL,"__esModule",{value:!0});var krt=MD(),Nme=dd(),tL=Hr,Ome=HD,Srt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Ome.default.code(new krt.KeywordCxt(o,Ome.default,"additionalProperties"));var s,a=(0,Nme.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=tL.mergeEvaluated.props(n,(0,tL.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,tL.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Nme.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};eL.default=Srt;var nL={};Object.defineProperty(nL,"__esModule",{value:!0});var jme=dd(),GD=xr(),Pme=Hr,Lme=Hr,Drt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,jme.allSchemaProperties)(e),l=a.filter(function(p){return(0,Pme.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof GD.Name||(o.props=(0,Lme.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Pme.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,GD._)(bK||(bK=Ae(["",".test(",")"])),(0,jme.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Lme.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,GD._)(_K||(_K=Ae(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,GD.not)(u),function(){return n.break()})})})}}};nL.default=Drt;var iL={};Object.defineProperty(iL,"__esModule",{value:!0});var Trt=Hr,Ert={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Trt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};iL.default=Ert;var rL={};Object.defineProperty(rL,"__esModule",{value:!0});var Art={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};rL.default=Art;var oL={};Object.defineProperty(oL,"__esModule",{value:!0});var WD=xr(),Mrt=Hr,Irt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,WD._)(xK||(xK=Ae(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Mrt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,WD._)(wK||(wK=Ae([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,WD._)(CK||(CK=Ae(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,WD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};oL.default=Irt;var sL={};Object.defineProperty(sL,"__esModule",{value:!0});var Frt=Hr,Nrt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Frt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};sL.default=Nrt;var aL={};Object.defineProperty(aL,"__esModule",{value:!0});var qD=xr(),Rme=Hr,Ort={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,qD.str)(kK||(kK=Ae(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,qD._)(SK||(SK=Ae(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Rme.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=$me(i,"then"),o=$me(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,qD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,qD._)(DK||(DK=Ae(["",""])),d)):t.setParams({ifClause:d})}}}};function $me(t,n){var e=t.schema[n];return void 0!==e&&!(0,Rme.alwaysValidSchema)(t,e)}aL.default=Ort;var lL={};Object.defineProperty(lL,"__esModule",{value:!0});var jrt=Hr,Prt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,jrt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};lL.default=Prt,Object.defineProperty(XP,"__esModule",{value:!0});var Lrt=G0,Rrt=JP,$rt=W0,Brt=KP,Vrt=QP,Hrt=Ime,zrt=ZP,Urt=HD,Grt=eL,Wrt=nL,qrt=iL,Xrt=rL,Yrt=oL,Jrt=sL,Krt=aL,Qrt=lL;XP.default=function(){var n=[qrt.default,Xrt.default,Yrt.default,Jrt.default,Krt.default,Qrt.default,zrt.default,Urt.default,Hrt.default,Grt.default,Wrt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Rrt.default,Brt.default):n.push(Lrt.default,$rt.default),n.push(Vrt.default),n};var cL={},uL={};Object.defineProperty(uL,"__esModule",{value:!0});var js=xr(),Zrt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,js.str)(TK||(TK=Ae(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,js._)(EK||(EK=Ae(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,js._)(AK||(AK=Ae(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,js._)(MK||(MK=Ae(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,js._)(IK||(IK=Ae(["",'.type || "string"'])),f)).assign(m,(0,js._)(FK||(FK=Ae(["",".validate"])),f))},function(){return e.assign(p,(0,js._)(NK||(NK=Ae(['"string"'])))).assign(m,f)}),t.fail$data((0,js.or)(!1===l.strictSchema?js.nil:(0,js._)(OK||(OK=Ae([""," && !",""])),s,m),(g=u.$async?(0,js._)(jK||(jK=Ae(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,js._)(PK||(PK=Ae(["","(",")"])),m,i),v=(0,js._)(LK||(LK=Ae(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,js._)(RK||(RK=Ae([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Un(function(v){var y=v instanceof RegExp?(0,js.regexpCode)(v):l.code.formats?(0,js._)($K||($K=Ae(["","",""])),l.code.formats,(0,js.getProperty)(o)):void 0,_=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=bn(v)||v instanceof RegExp?["string",v,_]:[v.type||"string",v.validate,(0,js._)(BK||(BK=Ae(["",".validate"])),_)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==bn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,js._)(VK||(VK=Ae(["await ","(",")"])),g,i)}return(0,js._)("function"==typeof m?HK||(HK=Ae(["","(",")"])):zK||(zK=Ae(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};uL.default=Zrt,Object.defineProperty(cL,"__esModule",{value:!0}),cL.default=[uL.default];var q0={};Object.defineProperty(q0,"__esModule",{value:!0}),q0.contentVocabulary=q0.metadataVocabulary=void 0,q0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],q0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(IP,"__esModule",{value:!0});var iot=cL,Bme=q0,rot=[FP.default,OP.default,(0,XP.default)(),iot.default,Bme.metadataVocabulary,Bme.contentVocabulary];IP.default=rot;var dL={},Vme={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Vme),Object.defineProperty(dL,"__esModule",{value:!0});var X0=xr(),hL=Vme,Hme=Zl,oot=Hr,sot={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===hL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,X0._)(UK||(UK=Ae(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,X0._)(GK||(GK=Ae(["","",""])),e,(0,X0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,X0.Name),h}n.if((0,X0._)(WK||(WK=Ae(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",_="Expref",C="Pipe",$="EQ",G="GT",R="LT",z="GTE",U="LTE",q="NE",re="Flatten",L="Star",X="Filter",Z="Dot",he="Lbrace",E="Lbracket",F="Lparen",N="Literal",Y={".":Z,"*":L,",":p,":":m,"{":he,"}":g,"]":h,"(":F,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},oe={" ":!0,"\t":!0,"\n":!0};function fe(B){return B>="0"&&B<="9"||"-"===B}function Fe(){}Fe.prototype={tokenize:function(B){var ne,ie,Ie,Ye,Le=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),Le.push({type:u,value:ie,start:ne});else if(void 0!==Y[B[this._current]])Le.push({type:Y[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(fe(B[this._current]))Ie=this._consumeNumber(B),Le.push(Ie);else if("["===B[this._current])Ie=this._consumeLBracket(B),Le.push(Ie);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),Le.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),Le.push({type:N,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var _t=this._consumeLiteral(B);Le.push({type:N,value:_t,start:ne})}else if(void 0!==V[B[this._current]])Le.push(this._consumeOperator(B));else if(void 0!==oe[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,Le.push({type:"And",value:"&&",start:ne})):Le.push({type:_,value:"&",start:ne});else{if("|"!==B[this._current]){var At=new Error("Unknown character:"+B[this._current]);throw At.name="LexerError",At}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,Le.push({type:"Or",value:"||",start:ne})):Le.push({type:C,value:"|",start:ne})}return Le},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:z,value:">=",start:ne}):{type:G,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:$,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Ie=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var xe={};function tt(){}function ze(B){this.runtime=B}function ot(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}xe.EOF=0,xe.UnquotedIdentifier=0,xe.QuotedIdentifier=0,xe.Rbracket=0,xe.Rparen=0,xe.Comma=0,xe.Rbrace=0,xe.Number=0,xe.Current=0,xe.Expref=0,xe.Pipe=1,xe.Or=2,xe.And=3,xe.EQ=5,xe.GT=5,xe.LT=5,xe.GTE=5,xe.LTE=5,xe.NE=5,xe.Flatten=9,xe.Star=20,xe.Filter=21,xe.Dot=40,xe.Not=45,xe.Lbrace=50,xe.Lbracket=55,xe.Lparen=60,tt.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Ie=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Ie.name="ParserError",Ie}return ne},_loadTokens:function(B){var ne=(new Fe).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Ie=this._lookahead(0);B=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===he?(this._match(he),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(xe[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===X)ne=this.expression(B);else{if(this._lookahead(0)!==Z){var ie=this._lookaheadToken(0),Ie=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Ie.name="ParserError",Ie}this._match(Z),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Ie=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Ie.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Ie}}},ze.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Ie,Ye,Le,_t,At,_n,ci,on;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(At=ne[B.name])?null:At:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),on=1;on0)for(on=$r;onwr;on+=Or)Ye.push(ne[on]);return Ye;case"Projection":var Ai=this.visit(B.children[0],ne);if(!n(Ai))return null;for(ci=[],on=0;on_t;break;case z:Ye=Le>=_t;break;case R:Ye=Le<_t;break;case U:Ye=Le<=_t;break;default:throw new Error("Unknown comparator: "+B.name)}return Ye;case re:var ui=this.visit(B.children[0],ne);if(!n(ui))return null;var Ni=[];for(on=0;on=B&&(ne=ie<0?B-1:B),ne}},ot.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Ie,Ye,Le,_t;if(ie[ie.length-1].variadic){if(ne.length=0;Ie--)ie+=ne[Ie];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Ie=0;Ie=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Ie=B[0],Ye=B[1],Le=0;Le0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Ie0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Iepn?1:Fi_t&&(_t=ie,ne=Ye[At]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],Le=this.createKeyFunction(B[1],[s,a]),_t=1/0,At=0;At1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var dot=function(){function t(n,e,i,r){fL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=XD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=XD(p,4),_=m[3];void 0===_&&(_=1),o.rgba=[m[0],m[1],m[2],_]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return pL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return Gme(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return Gme(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.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=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,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=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=uot[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=XD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),hot=function(){function t(){fL(this,t),this._events=[]}return pL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function mL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function xh(t,n){return(n||document).querySelector(t)}function Wme(t){t.preventDefault(),t.stopPropagation()}function gL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&Wme(o),i(o))})}var qme=function(){function t(n){fL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new hot,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return pL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),gL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(Wme(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new dot(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=xh(".picker_hue",o),this._domSL=xh(".picker_sl",o),this._domA=xh(".picker_alpha",o),this._domEdit=xh(".picker_editor input",o),this._domSample=xh(".picker_sample",o),this._domOkay=xh(".picker_done button",o),this._domCancel=xh(".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 n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),mL(r,this._domH,function(l,c){return e._setHSLA(l)}),mL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&mL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),gL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),gL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=xh(".picker_selector",this._domH),d=xh(".picker_selector",l),h=xh(".picker_selector",c);_(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,_(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), 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",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function _(S,M,$){M.style.left=100*$+"%"}function C(S,M,$){M.style.top=100*$+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),vL=document.createElement("style");vL.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(vL),qme.StyleElement=vL;var fot=Object.freeze({__proto__:null,default:qme});const pot=["editor"];function mot(t,n){if(1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",39),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while modifying storage object: ",e.error,"")}}function got(t,n){1&t&&(b(0,"ngb-alert",40),ge(1,"img",41),b(2,"h6",39),I(3,"Storage object was modified successfully."),x()()),2&t&&k("dismissible",!1)}function vot(t,n){1&t&&(b(0,"span"),I(1,"Save as a copy"),x())}function yot(t,n){1&t&&I(0,"Save")}function bot(t,n){if(1&t&&(b(0,"button",42),J(1,vot,2,0,"span",43),J(2,yot,1,0,"ng-template",null,44,Ur),x()),2&t){const e=uo(3),i=j();k("disabled",i.updating),w(1),k("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const yL=function(){return["/storage"]},_ot=function(t){return{collection:t}},xot=function(t,n){return{collection:t,key:n}},wot=function(t,n,e){return{collection:t,key:n,user_id:e}},bL=function(t){return{"is-invalid":t}};let Cot=(()=>{class t{ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Do.required],keyname:["",Do.required],user_id:["",Do.required],permission_read:[0,Do.required],permission_write:[0,Do.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"object",void 0),K(this,"objectForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(pot,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Object"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),I(6,"Storage"),x(),b(7,"li",4)(8,"a",5),I(9),x()(),b(10,"li",4)(11,"a",5),I(12),x()(),b(13,"li",4)(14,"a",5),I(15),x()()()()(),J(16,mot,4,2,"ngb-alert",6),J(17,got,4,1,"ngb-alert",7),b(18,"form",8),ye("ngSubmit",function(){return i.updateObject()}),b(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),I(23,"Collection"),x()(),ge(24,"input",13),b(25,"div",14),I(26,"Collection is required"),x()(),b(27,"div",10)(28,"div",11)(29,"label",15),I(30,"Key"),x()(),ge(31,"input",16),b(32,"div",14),I(33,"Key is required"),x()()(),b(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),I(38,"User ID"),x()(),ge(39,"input",18),b(40,"div",14),I(41,"User ID is required"),x()(),b(42,"div",19)(43,"div",11)(44,"label",20),I(45,"Read Permission"),x()(),b(46,"div",21)(47,"label",22),ge(48,"input",23),I(49," No Read "),x(),b(50,"label",22),ge(51,"input",23),I(52," Owner Read "),x(),b(53,"label",22),ge(54,"input",23),I(55," Public Read "),x()()()(),b(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),I(60,"Version"),x()(),ge(61,"input",25),x(),b(62,"div",19)(63,"div",11)(64,"label",26),I(65,"Write Permission"),x()(),b(66,"div",27)(67,"label",22),ge(68,"input",23),I(69," No Write "),x(),b(70,"label",22),ge(71,"input",23),I(72," Owner Write "),x()()()(),b(73,"div",28)(74,"div",10)(75,"div",11)(76,"label",29),I(77,"Create Time"),x()(),ge(78,"input",30),x(),b(79,"div",10)(80,"div",11)(81,"label",31),I(82,"Update Time"),x()(),ge(83,"input",32),x()(),b(84,"div",33),ge(85,"div",34,35),x(),J(87,bot,4,3,"button",36),x()),2&e&&(w(8),k("routerLink",wl(32,yL))("queryParams",lr(33,_ot,i.object.collection)),w(1),Dt(i.object.collection),w(2),k("routerLink",wl(35,yL))("queryParams",Sr(36,xot,i.object.collection,i.object.key)),w(1),Dt(i.object.key),w(2),k("routerLink",wl(39,yL))("queryParams",Ug(40,wot,i.object.collection,i.object.key,i.object.user_id)),w(1),Dt(i.object.user_id),w(1),k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.objectForm),w(6),k("ngClass",lr(44,bL,i.f.collection.dirty&&i.f.collection.errors)),w(1),k("hidden",i.f.collection.disabled||i.f.collection.valid||i.f.collection.pristine),w(6),k("ngClass",lr(46,bL,i.f.keyname.dirty&&i.f.keyname.errors)),w(1),k("hidden",i.f.keyname.disabled||i.f.keyname.valid||i.f.keyname.pristine),w(7),k("ngClass",lr(48,bL,i.f.user_id.dirty&&i.f.user_id.errors)),w(1),k("hidden",i.f.user_id.disabled||i.f.user_id.valid||i.f.user_id.pristine),w(8),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(3),k("disabled",!i.updateAllowed())("value",2),w(7),k("value",i.object.version),w(7),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(7),k("value",i.object.create_time),w(5),k("value",i.object.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Fu,Rh,gn,To,AC,F3,IH,sl,Na,rl,ol,Ff,fa,ja],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),kot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sot(t,n){if(1&t&&(b(0,"ngb-alert",18),ge(1,"img",19),b(2,"h6",20),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Dot(t,n){1&t&&(b(0,"th",21),I(1,"Remove"),x())}function Tot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Eot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Aot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Mot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Iot(t,n){if(1&t){const e=vt();b(0,"td",26)(1,"button",27),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLeaderboard(r,s,a))}),I(2,"Delete"),x()()}}function Fot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(2),x(),b(3,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(4),x(),b(5,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(6),x(),b(7,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(8),x(),J(9,Tot,2,0,"td",23),J(10,Eot,2,0,"td",23),J(11,Aot,2,0,"td",23),J(12,Mot,2,0,"td",23),J(13,Iot,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(i.orderString[e.sort_order]),w(2),Dt(i.operatorString[e.operator]),w(2),Dt(""===e.reset_schedule?"-":e.reset_schedule),w(1),k("ngIf",e.authoritative),w(1),k("ngIf",!e.authoritative),w(1),k("ngIf",e.tournament),w(1),k("ngIf",!e.tournament),w(1),k("ngIf",i.deleteAllowed())}}function Not(t,n){1&t&&(b(0,"tr")(1,"td",28),I(2,"No leaderboards were found."),x()())}let Oot=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"authService",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"leaderboards",[]),K(this,"nextCursor",""),K(this,"leaderboardsCount",0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),this.route=e,this.router=i,this.authService=r,this.consoleService=o}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Xo),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),I(4,"Leaderboards"),x(),b(5,"h6",4),I(6),x()(),b(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return i.search(0)}),ge(10,"img",8),x(),b(11,"button",7),ye("click",function(){return i.search(1)}),ge(12,"img",9),x()()()()(),J(13,Sot,4,2,"ngb-alert",10),b(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),I(18,"Leaderboard ID"),x(),b(19,"th",13),I(20,"Sort Order"),x(),b(21,"th",13),I(22,"Operator"),x(),b(23,"th",13),I(24,"Reset Schedule"),x(),b(25,"th",14),I(26,"Authoritative"),x(),b(27,"th",14),I(28,"Tournament"),x(),J(29,Dot,2,0,"th",15),x()(),b(30,"tbody"),J(31,Fot,14,9,"tr",16),J(32,Not,3,0,"tr",17),x()()),2&e&&(w(6),xn("",i.leaderboardsCount," leaderboards found."),w(3),k("disabled",0===i.leaderboards.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(16),k("ngIf",i.deleteAllowed()),w(2),k("ngForOf",i.leaderboards),w(1),k("ngIf",0===i.leaderboards.length))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),jot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Pot(t,n){if(1&t&&(b(0,"ngb-alert",31),ge(1,"img",32),b(2,"h6",33),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying accounts: ",e.error,"")}}function Lot(t,n){1&t&&(b(0,"th",34),I(1,"Remove"),x())}function Rot(t,n){1&t&&(b(0,"tr")(1,"td",35),I(2,"No users found - change the filter criteria or add new user accounts."),x()())}function $ot(t,n){1&t&&ge(0,"td")}function Bot(t,n){if(1&t){const e=vt();b(0,"td",38)(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteAccount(r,s,a))}),I(2,"Delete"),x()()}}function Vot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(8),x(),J(9,$ot,1,0,"td",29),J(10,Bot,3,0,"td",37),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.username),w(2),Dt(e.display_name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Hot=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"accountsCount",0),K(this,"accounts",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"})},o=>{this.error=o})}deleteAccount(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Accounts"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"span",9),ye("click",function(){return i.f.filter.setValue(i.systemUserId)}),ge(12,"img",10),x()(),b(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return i.f.filter_type.setValue(0),i.search(0)}),I(16,"Search"),x(),b(17,"div",13),ge(18,"button",14),b(19,"div",15)(20,"button",16),ye("click",function(){return i.f.filter_type.setValue(1),i.search(0)}),I(21,"Tombstones"),x()()()()()()()(),b(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return i.search(0)}),ge(25,"img",20),x(),b(26,"button",19),ye("click",function(){return i.search(1)}),ge(27,"img",21),x()()()()(),J(28,Pot,4,2,"ngb-alert",22),b(29,"div",23)(30,"table",24)(31,"thead",25)(32,"tr")(33,"th",26),I(34,"User ID"),x(),b(35,"th"),I(36,"Username"),x(),b(37,"th"),I(38,"Display Name"),x(),b(39,"th",27),I(40,"Last Update"),x(),J(41,Lot,2,0,"th",28),x()(),b(42,"tbody"),J(43,Rot,3,0,"tr",29),J(44,Vot,11,6,"tr",30),x()()()),2&e&&(w(3),xn("",i.accountsCount," accounts found."),w(4),k("formGroup",i.searchForm),w(11),k("disabled",!i.f.filter.value||""===i.f.filter.value),w(6),k("disabled",0===i.accounts.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.accounts.length),w(1),k("ngForOf",i.accounts))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),zot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Uot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().exportAccount(r))}),ge(1,"img",16),I(2,"Export"),x()}}function Got(t,n){1&t&&(b(0,"span"),I(1,"Unban"),x())}function Wot(t,n){1&t&&(b(0,"span"),I(1,"Ban"),x())}function qot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().banUnbanAccount(r))}),ge(1,"img",17),J(2,Got,2,0,"span",18),J(3,Wot,2,0,"span",18),x()}if(2&t){const e=j();w(2),k("ngIf",e.account.disable_time),w(1),k("ngIf",!e.account.disable_time)}}function Xot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!1))}),ge(1,"img",20),I(2,"Delete"),x()}}function Yot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!0))}),ge(1,"img",21),I(2,"Recorded delete"),x()}}function Jot(t,n){if(1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const Kot=function(t,n){return["/accounts",t,n]};function Qot(t,n){if(1&t&&(b(0,"div"),ta(1,25),b(2,"a",26),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,Kot,i.account.user.id,e.path)),w(1),Dt(e.label)}}const Zot=function(){return["/accounts"]},est=function(){return["/storage"]},tst=function(t){return{user_id:t}};let nst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"account",void 0),K(this,"error",""),K(this,"views",[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rF.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Account"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Account"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,Uot,3,0,"button",7),J(12,qot,4,2,"button",7),J(13,Xot,3,0,"button",8),J(14,Yot,3,0,"button",8),x()(),J(15,Jot,4,2,"ngb-alert",9),b(16,"nav",10,11),J(18,Qot,4,6,"div",12),b(19,"div"),ta(20,13),b(21,"a",14),I(22," Storage "),x(),na(),x()(),ge(23,"router-outlet")),2&e&&(w(6),k("routerLink",wl(10,Zot)),w(3),Dt(i.account.user.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.banAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views),w(3),k("routerLink",wl(11,est))("queryParams",lr(12,tst,i.account.user.id)))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),ist=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const rst=["editor"];function ost(t,n){if(1&t&&(b(0,"ngb-alert",29),ge(1,"img",30),b(2,"h6",31),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function sst(t,n){1&t&&(b(0,"ngb-alert",32),ge(1,"img",33),b(2,"h6",31),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function ast(t,n){1&t&&(b(0,"button",34),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const lst=function(t){return{"is-invalid":t}};let cst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Do.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(rst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ost,4,2,"ngb-alert",0),J(1,sst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"User ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Username"),x()(),ge(13,"input",9),b(14,"div",10),I(15,"Username is required"),x()()(),b(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),I(20,"Display Name"),x()(),ge(21,"input",12),x(),b(22,"div",13)(23,"div",5)(24,"label",14),I(25,"Avatar URL"),x()(),ge(26,"input",15),x()(),b(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),I(31,"Location"),x()(),ge(32,"input",17),x(),b(33,"div",13)(34,"div",5)(35,"label",18),I(36,"Timezone"),x()(),ge(37,"input",19),x()(),b(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),I(42,"Create Time"),x()(),ge(43,"input",22),x(),b(44,"div",4)(45,"div",5)(46,"label",23),I(47,"Update Time"),x()(),ge(48,"input",24),x()(),b(49,"div",25),ge(50,"div",26,27),x(),J(52,ast,2,1,"button",28),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(6),k("value",i.account.user.id),w(5),k("ngClass",lr(9,lst,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(29),k("value",i.account.user.create_time),w(5),k("value",i.account.user.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Rh,gn,To,sl,Na,rl,ol,Ff,fa,ja]})),t})();function ust(t,n){if(1&t&&(b(0,"ngb-alert",36),ge(1,"img",37),b(2,"h6",38),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function dst(t,n){1&t&&(b(0,"ngb-alert",39),ge(1,"img",40),b(2,"h6",38),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function hst(t,n){if(1&t&&(b(0,"option",41),I(1),x()),2&t){const e=n.$implicit,i=n.index;Nh("value",i),k("selected",0===i),w(1),Dt(e.id)}}function fst(t,n){1&t&&(b(0,"button",42),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}let pst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ust,4,2,"ngb-alert",0),J(1,dst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Device IDs"),x()(),b(8,"div",7)(9,"button",8),ye("click",function(){return i.copyDeviceIdToClipboard(i.f.selected_device_id_index.value)}),ge(10,"img",9),I(11," Copy "),x(),b(12,"select",10),J(13,hst,2,3,"option",11),x(),b(14,"div",12)(15,"button",13),ye("click",function(o){return i.unlinkDeviceId(o)}),I(16,"Unlink"),x()()()(),b(17,"div",4)(18,"div",5)(19,"label",14),I(20,"Custom ID"),x()(),b(21,"div",7),ge(22,"input",15),b(23,"div",12)(24,"button",13),ye("click",function(o){return i.unlinkCustomID(o)}),I(25,"Unlink"),x()()()()(),b(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),I(30,"Facebook ID"),x()(),b(31,"div",7),ge(32,"input",17),b(33,"div",12)(34,"button",13),ye("click",function(o){return i.unlinkFacebook(o)}),I(35,"Unlink"),x()()()(),b(36,"div",18)(37,"div",5)(38,"label",19),I(39,"FB Instant Game ID"),x()(),b(40,"div",7),ge(41,"input",20),b(42,"div",12)(43,"button",13),ye("click",function(o){return i.unlinkFacebookInstantGames(o)}),I(44,"Unlink"),x()()()()(),b(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),I(49,"Apple ID"),x()(),b(50,"div",7),ge(51,"input",22),b(52,"div",12)(53,"button",13),ye("click",function(o){return i.unlinkApple(o)}),I(54,"Unlink"),x()()()(),b(55,"div",18)(56,"div",5)(57,"label",23),I(58,"GameCenter ID"),x()(),b(59,"div",7),ge(60,"input",24),b(61,"div",12)(62,"button",13),ye("click",function(o){return i.unlinkGameCenter(o)}),I(63,"Unlink"),x()()()()(),b(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),I(68,"Google ID"),x()(),b(69,"div",7),ge(70,"input",26),b(71,"div",12)(72,"button",13),ye("click",function(o){return i.unlinkGoogle(o)}),I(73,"Unlink"),x()()()(),b(74,"div",4)(75,"div",5)(76,"label",27),I(77,"Steam ID"),x()(),b(78,"div",7),ge(79,"input",28),b(80,"div",12)(81,"button",13),ye("click",function(o){return i.unlinkSteam(o)}),I(82,"Unlink"),x()()()()(),b(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),I(87,"Email"),x(),ge(88,"br"),x(),ge(89,"input",30),x(),b(90,"div",4)(91,"div",5)(92,"label",31),I(93,"Password"),x()(),ge(94,"input",32),x()(),b(95,"div",33)(96,"div",4),ge(97,"div",5),b(98,"span",34),I(99),x()(),ge(100,"div",4),x(),J(101,fst,2,1,"button",35),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(11),k("ngForOf",i.account.devices),w(2),k("disabled",!i.updateAllowed()||0===i.account.devices.length),w(7),k("value",i.account.custom_id),w(2),k("disabled",!i.updateAllowed()||!i.account.custom_id||""===i.account.custom_id),w(8),k("value",i.account.user.facebook_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_id||""===i.account.user.facebook_id),w(7),k("value",i.account.user.facebook_instant_game_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_instant_game_id||""===i.account.user.facebook_instant_game_id),w(8),k("value",i.account.user.apple_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.apple_id||""===i.account.user.apple_id),w(7),k("value",i.account.user.gamecenter_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.gamecenter_id||""===i.account.user.gamecenter_id),w(8),k("value",i.account.user.google_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.google_id||""===i.account.user.google_id),w(7),k("value",i.account.user.steam_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.steam_id||""===i.account.user.steam_id),w(18),xn("Verification Status: ",null===i.account.verify_time?"Not Verified":"Verified",""),w(2),k("ngIf",i.updateAllowed()))},dependencies:[jn,gn,To,sl,xy,wy,Na,ov,rl,ol,fa,ja],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})),t})();const mst=["editor"];function gst(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vst(t,n){1&t&&(b(0,"ngb-alert",27),ge(1,"img",28),b(2,"h6",26),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function yst(t,n){if(1&t){const e=vt();b(0,"button",29),ye("click",function(){return $e(e),Be(j().updateWallet())}),I(1,"Save"),x()}2&t&&k("disabled",j().updating)}function bst(t,n){1&t&&(b(0,"th",30),I(1,"Remove"),x())}function _st(t,n){1&t&&(b(0,"tr")(1,"td",31),I(2,"No wallet ledger items found."),x()())}function xst(t,n){1&t&&ge(0,"div",37)}function wst(t,n){1&t&&ge(0,"div",38)}function Cst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLedgerItem(r,s,a))}),I(2,"Delete"),x()()}}function kst(t,n){if(1&t&&(b(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Sst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=$e(e).index,s=j();return Be(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),J(3,xst,1,0,"div",33),J(4,wst,1,0,"div",34),x(),I(5),x(),b(6,"td",35)(7,"pre",36),I(8),x()(),b(9,"td"),I(10),x(),J(11,Cst,3,0,"td",22),x(),J(12,kst,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),k("ngIf",r.walletLedgerMetadataOpen[e]),w(1),xn(" ",i.id," "),w(3),Dt(i.changeset),w(2),Dt(i.update_time),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.walletLedgerMetadataOpen[e])}}let Dst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"walletLedger",[]),K(this,"walletLedgerMetadataOpen",[]),K(this,"updating",!1),K(this,"updated",!1),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"limit",100),K(this,"userID",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,gst,4,2,"ngb-alert",0),J(1,vst,4,1,"ngb-alert",1),b(2,"div",2),ge(3,"div",3,4),x(),J(5,yst,2,1,"button",5),ge(6,"hr",6),b(7,"div",7)(8,"div",8),ge(9,"div",9),b(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return i.loadData("")}),ge(13,"img",13),x(),b(14,"button",12),ye("click",function(){return i.loadData(i.prevCursor)}),ge(15,"img",14),x(),b(16,"button",12),ye("click",function(){return i.loadData(i.nextCursor)}),ge(17,"img",15),x()()()()(),b(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),I(23,"ID"),x(),b(24,"th"),I(25,"Changeset"),x(),b(26,"th",20),I(27,"Update Time"),x(),J(28,bst,2,0,"th",21),x()(),b(29,"tbody"),J(30,_st,3,0,"tr",22),J(31,Sst,13,7,"ng-template",23),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(4),k("ngIf",i.updateAllowed()),w(7),k("disabled",0===i.walletLedger.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(12),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.walletLedger.length),w(1),k("ngForOf",i.walletLedger))},dependencies:[jn,gn,To],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})),t})(),Tst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Est(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Ast(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Mst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No friends found."),x()())}function Ist(t,n){1&t&&(b(0,"span"),I(1,"Friend (0)"),x())}function Fst(t,n){1&t&&(b(0,"span"),I(1,"Invite Sent (1)"),x())}function Nst(t,n){1&t&&(b(0,"span"),I(1,"Invite Received (2)"),x())}function Ost(t,n){1&t&&(b(0,"span"),I(1,"Blocked (3)"),x())}function jst(t,n){if(1&t){const e=vt();b(0,"td",16)(1,"button",17),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteFriend(r,s,a))}),I(2,"Delete"),x()()}}function Pst(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),J(6,Ist,2,0,"span",8),J(7,Fst,2,0,"span",8),J(8,Nst,2,0,"span",8),J(9,Ost,2,0,"span",8),x(),b(10,"td"),I(11),x(),J(12,jst,3,0,"td",15),x()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Lst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"friends",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,Est,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"User ID"),x(),b(7,"th"),I(8,"Username"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Ast,2,0,"th",7),x()(),b(14,"tbody"),J(15,Mst,3,0,"tr",8),J(16,Pst,13,8,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.friends.length),w(1),k("ngForOf",i.friends))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Rst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function $st(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Bst(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Vst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No group membership found."),x()())}function Hst(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function zst(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function Ust(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function Gst(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function Wst(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function qst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",16),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function Xst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,Hst,2,0,"span",8),J(7,zst,2,0,"span",8),J(8,Ust,2,0,"span",8),J(9,Gst,2,0,"span",8),J(10,Wst,2,0,"span",8),x(),b(11,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,qst,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.group.id),w(2),Dt(e.group.name),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.group.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Yst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"groups",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,$st,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"Group ID"),x(),b(7,"th"),I(8,"Name"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Bst,2,0,"th",7),x()(),b(14,"tbody"),J(15,Vst,3,0,"tr",8),J(16,Xst,14,9,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Jst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Kst=["editor"];function Qst(t,n){if(1&t&&(b(0,"ngb-alert",34),ge(1,"img",35),b(2,"h6",36),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Zst(t,n){1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",36),I(3,"Group was modified successfully."),x()()),2&t&&k("dismissible",!1)}function eat(t,n){1&t&&(b(0,"button",39),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const tat=function(t){return["/accounts",t]},nat=function(t){return{"is-invalid":t}};let iat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"groupForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Do.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(Kst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,Qst,4,2,"ngb-alert",0),J(1,Zst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateGroup()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Group ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Creator ID"),x()(),b(13,"a",9),ge(14,"input",10),x()()(),b(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),I(19,"Name"),x()(),ge(20,"input",12),b(21,"div",13),I(22,"Name is required"),x()(),b(23,"div",4)(24,"div",5)(25,"label",14),I(26,"Description"),x()(),ge(27,"input",15),x()(),b(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),I(32,"Avatar URL"),x()(),ge(33,"input",18),x(),b(34,"div",4)(35,"div",5)(36,"label",19),I(37,"Language"),x()(),ge(38,"input",20),x()(),b(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),I(43,"Members"),x()(),ge(44,"input",21),x(),b(45,"div",16)(46,"div",5)(47,"label",22),I(48,"Max Count"),x()(),ge(49,"input",23),x()(),b(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),I(54,"Open"),x()(),ge(55,"input",24),x()(),b(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),I(60,"Create Time"),x()(),ge(61,"input",27),x(),b(62,"div",4)(63,"div",5)(64,"label",28),I(65,"Update Time"),x()(),ge(66,"input",29),x()(),b(67,"div",30),ge(68,"div",31,32),x(),J(70,eat,2,1,"button",33),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.groupForm),w(6),k("value",i.group.id),w(5),k("routerLink",lr(12,tat,i.group.creator_id)),w(1),k("value",i.group.creator_id),w(6),k("ngClass",lr(14,nat,i.f.name.dirty&&i.f.name.errors)),w(1),k("hidden",i.f.name.disabled||i.f.name.valid||i.f.name.pristine),w(23),k("value",i.group.edge_count),w(17),k("value",i.group.create_time),w(5),k("value",i.group.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Fu,Rh,gn,To,sl,Na,aC,rl,ol,Ff,fa,ja]})),t})();function rat(t,n){if(1&t&&(b(0,"ngb-alert",13),ge(1,"img",14),b(2,"h6",15),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function oat(t,n){1&t&&(b(0,"span"),I(1,"Add by membership state"),x())}function sat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j(2);w(1),Dt(e.activeState)}}function aat(t,n){if(1&t){const e=vt();b(0,"button",20),ye("click",function(){const o=$e(e).$implicit;return Be(j(2).activeState=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function lat(t,n){if(1&t&&(b(0,"div",16)(1,"button",17),J(2,oat,2,0,"span",11),J(3,sat,2,1,"span",11),x(),b(4,"div",18),J(5,aat,2,1,"button",19),x()()),2&t){const e=j();w(2),k("ngIf",!e.activeState||""===e.activeState),w(1),k("ngIf",e.activeState&&""!==e.activeState),w(2),k("ngForOf",e.states)}}function cat(t,n){if(1&t){const e=vt();b(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ge(5,"input",26),b(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return $e(e),Be(j().add())}),I(9,"Add"),x()()()()()()()()}if(2&t){const e=j();w(3),k("formGroup",e.addForm)}}function uat(t,n){1&t&&(b(0,"th",30),I(1,"Demote"),x())}function dat(t,n){1&t&&(b(0,"th",30),I(1,"Promote"),x())}function hat(t,n){1&t&&(b(0,"th",31),I(1,"Remove"),x())}function fat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No group membership found."),x()())}function pat(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function mat(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function gat(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function vat(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function yat(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function bat(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().demoteGroupUser(r,s,a))}),at(),b(2,"svg",38),ge(3,"path",39),x()()()}}function _at(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().promoteGroupUser(r,s,a))}),at(),b(2,"svg",40),ge(3,"path",41),x()()()}}function xat(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function wat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,pat,2,0,"span",11),J(7,mat,2,0,"span",11),J(8,gat,2,0,"span",11),J(9,vat,2,0,"span",11),J(10,yat,2,0,"span",11),x(),b(11,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,bat,4,0,"td",34),J(14,_at,4,0,"td",34),J(15,xat,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.user.update_time),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed())}}let Cat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"members",[]),K(this,"activeState","Add Member"),K(this,"states",["Add Member","Join"]),K(this,"addForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,rat,4,2,"ngb-alert",0),J(1,lat,6,3,"div",1),J(2,cat,10,1,"div",2),b(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),I(8,"User ID"),x(),b(9,"th"),I(10,"Name"),x(),b(11,"th",7),I(12,"State"),x(),b(13,"th",8),I(14,"Update Time"),x(),J(15,uat,2,0,"th",9),J(16,dat,2,0,"th",9),J(17,hat,2,0,"th",10),x()(),b(18,"tbody"),J(19,fat,3,0,"tr",11),J(20,wat,16,11,"tr",12),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",!i.group.open&&i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(13),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(2),k("ngIf",0===i.members.length),w(1),k("ngForOf",i.members))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),kat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sat(t,n){if(1&t&&(b(0,"ngb-alert",28),ge(1,"img",29),b(2,"h6",30),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Dat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeType)}}function Tat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeType=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Eat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeNode)}}function Aat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeNode=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Mat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No realtime matches were found."),x()())}function Iat(t,n){1&t&&ge(0,"div",40)}function Fat(t,n){1&t&&ge(0,"div",41)}function Nat(t,n){if(1&t){const e=vt();b(0,"div",37),ye("click",function(){$e(e);const r=j(),o=r.index,s=r.$implicit,a=j();return a.getMatchState(o,s),Be(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),J(1,Iat,1,0,"div",38),J(2,Fat,1,0,"div",39),x()}if(2&t){const e=j().index,i=j();w(1),k("ngIf",!i.matchStatesOpen[e]),w(1),k("ngIf",i.matchStatesOpen[e])}}function Oat(t,n){1&t&&ge(0,"div",42)}function jat(t,n){1&t&&(b(0,"span"),I(1,"Yes"),x())}function Pat(t,n){1&t&&(b(0,"span"),I(1,"No"),x())}function Lat(t,n){1&t&&ge(0,"img",51)}function Rat(t,n){if(1&t&&(b(0,"div")(1,"small")(2,"b"),I(3,"Current Tick"),x()(),b(4,"pre",47)(5,"small"),I(6),x()(),b(7,"small")(8,"b"),I(9,"Match State"),x()(),b(10,"pre",47)(11,"small"),I(12),x()()()),2&t){const e=j(2).index,i=j();w(6),Dt(i.matchStates[e].tick),w(6),Dt(i.matchStates[e].state)}}function $at(t,n){1&t&&ge(0,"img",51)}function Bat(t,n){if(1&t&&(b(0,"pre",47)(1,"small"),I(2),x()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.getMatchPresencesString(i.matchStates[e].presences))}}function Vat(t,n){if(1&t&&(b(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),I(6,"Match Label"),x()(),b(7,"pre",47)(8,"small"),I(9),x()()(),b(10,"div",48),J(11,Lat,1,0,"img",49),J(12,Rat,13,2,"div",7),x(),b(13,"div",48)(14,"small")(15,"b"),I(16,"Match Presences"),x()(),J(17,$at,1,0,"img",49),J(18,Bat,3,1,"pre",50),x()()()()),2&t){const e=j(),i=e.$implicit,r=e.index,o=j();w(9),Dt(i.api_match.label),w(2),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r]),w(5),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r])}}function Hat(t,n){if(1&t&&(b(0,"tr")(1,"td"),J(2,Nat,3,2,"div",33),J(3,Oat,1,0,"div",34),I(4),x(),b(5,"td"),I(6),x(),b(7,"td",35),J(8,jat,2,0,"span",7),J(9,Pat,2,0,"span",7),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x()(),J(16,Vat,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=j();w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(1),xn(" ",i.api_match.match_id," "),w(2),Dt(i.api_match.size),w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(2),Dt(i.node),w(2),Dt(i.api_match.handler_name),w(2),Dt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),k("ngIf",r.matchStatesOpen[e])}}let zat=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"formBuilder",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"matches",[]),K(this,"matchStates",[]),K(this,"matchStatesOpen",[]),K(this,"updated",!1),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"activeType","All"),K(this,"types",["All","Authoritative","Relayed"]),K(this,"activeNode","All Nodes"),K(this,"nodes",["All Nodes"]),this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));let i=e.get("type");this.type=Number(i);let r=e.get("node");if(this.route.data.subscribe(o=>{console.log(o),o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1==this.type||2==this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,Xme(this.consoleService,e,0==e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Tl),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Active Matches"),x(),b(2,"h6",1),I(3),x(),J(4,Sat,4,2,"ngb-alert",2),b(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),J(9,Dat,2,1,"span",7),x(),b(10,"div",8),J(11,Tat,2,1,"button",9),x()()(),b(12,"div",10)(13,"button",11),ye("click",function(){return i.search()}),I(14,"Search"),x()()(),b(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return i.search()}),b(19,"div",16),ge(20,"input",17),x()(),b(21,"form",15),ye("ngSubmit",function(){return i.search()}),b(22,"div",16),ge(23,"input",17),x()(),b(24,"form",15),ye("ngSubmit",function(){return i.search()}),b(25,"div",16),ge(26,"input",18),b(27,"div",10)(28,"div",5)(29,"button",19),J(30,Eat,2,1,"span",7),x(),b(31,"div",8),J(32,Aat,2,1,"button",9),x()()()()()()()(),b(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),I(39,"Match ID"),x()(),b(40,"th",23),I(41,"Presence Count"),x(),b(42,"th",24),I(43,"Authoritative"),x(),b(44,"th",24),I(45,"Node"),x(),b(46,"th",25),I(47,"Handler Name"),x(),b(48,"th",26),I(49,"Tick Rate"),x()()(),b(50,"tbody"),J(51,Mat,3,0,"tr",7),J(52,Hat,17,10,"ng-template",27),x()()()),2&e&&(w(3),xn("",i.matches.length," running matches found."),w(1),k("ngIf",i.error),w(5),k("ngIf",i.activeType&&""!==i.activeType),w(2),k("ngForOf",i.types),w(7),k("hidden","All"!==i.activeType)("formGroup",i.searchForm1),w(3),k("hidden","Relayed"!==i.activeType)("formGroup",i.searchForm2),w(3),k("hidden","Authoritative"!==i.activeType)("formGroup",i.searchForm3),w(6),k("ngIf",i.activeNode&&""!==i.activeNode),w(2),k("ngForOf",i.nodes),w(6),Mn("pl-3",i.matches.length>0),w(13),k("ngIf",0===i.matches.length),w(1),k("ngForOf",i.matches))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),Uat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));return Xme(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Xme(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $n(null)}let Gat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Wat(t,n){if(1&t&&(b(0,"ngb-alert",25),ge(1,"img",26),b(2,"h6",27),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying groups: ",e.error,"")}}function qat(t,n){1&t&&(b(0,"th",28),I(1,"Remove"),x())}function Xat(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No groups found - change the filter criteria or add new user groups."),x()())}function Yat(t,n){1&t&&ge(0,"td")}function Jat(t,n){if(1&t){const e=vt();b(0,"td",32)(1,"button",33),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroup(r,s,a))}),I(2,"Delete"),x()()}}function Kat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(2),x(),b(3,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(4),x(),b(5,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(6),x(),J(7,Yat,1,0,"td",23),J(8,Jat,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Qat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"groupsCount",0),K(this,"groups",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Groups"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return i.search(0)}),I(13,"Search"),x()()()()()(),b(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return i.search(0)}),ge(17,"img",14),x(),b(18,"button",13),ye("click",function(){return i.search(1)}),ge(19,"img",15),x()()()()(),J(20,Wat,4,2,"ngb-alert",16),b(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),I(26,"Group ID"),x(),b(27,"th"),I(28,"Name"),x(),b(29,"th",21),I(30,"Last Update"),x(),J(31,qat,2,0,"th",22),x()(),b(32,"tbody"),J(33,Xat,3,0,"tr",23),J(34,Kat,9,5,"tr",24),x()()()),2&e&&(w(3),xn("",i.groupsCount," groups found."),w(4),k("formGroup",i.searchForm),w(9),k("disabled",0===i.groups.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(11),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Zat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function elt(t,n){if(1&t){const e=vt();b(0,"button",13),ye("click",function(r){return $e(e),Be(j().exportGroup(r))}),ge(1,"img",14),I(2,"Export"),x()}}function tlt(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().deleteGroup(r,!1))}),ge(1,"img",16),I(2,"Delete"),x()}}function nlt(t,n){if(1&t&&(b(0,"ngb-alert",17),ge(1,"img",18),b(2,"h6",19),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ilt=function(t,n){return["/groups",t,n]};function rlt(t,n){if(1&t&&(b(0,"div"),ta(1,20),b(2,"a",21),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ilt,i.group.id,e.path)),w(1),Dt(e.label)}}const olt=function(){return["/groups"]};let slt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"group",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Members",path:"members"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rF.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Group"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Group"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,elt,3,0,"button",7),J(12,tlt,3,0,"button",8),x()(),J(13,nlt,4,2,"ngb-alert",9),b(14,"nav",10,11),J(16,rlt,4,6,"div",12),x(),ge(17,"router-outlet")),2&e&&(w(6),k("routerLink",wl(6,olt)),w(3),Dt(i.group.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),alt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function llt(t,n){if(1&t){const e=vt();b(0,"button",12),ye("click",function(r){return $e(e),Be(j().deleteLeaderboard(r))}),ge(1,"img",13),I(2,"Delete Leaderboard"),x()}}function clt(t,n){if(1&t&&(b(0,"ngb-alert",14),ge(1,"img",15),b(2,"h6",16),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ult=function(t,n){return["/leaderboards",t,n]};function dlt(t,n){if(1&t&&(b(0,"div"),ta(1,17),b(2,"a",18),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ult,i.leaderboard.id,e.path)),w(1),Dt(e.label)}}const hlt=function(){return["/leaderboards"]};let flt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"leaderboard",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Records",path:"records"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Leaderboard"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Leaderboards"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,llt,3,0,"button",7),x()(),J(12,clt,4,2,"ngb-alert",8),b(13,"nav",9,10),J(15,dlt,4,6,"div",11),x(),ge(16,"router-outlet")),2&e&&(w(6),k("routerLink",wl(5,hlt)),w(3),Dt(i.leaderboard.id),w(2),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),plt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const mlt=["editor"];function glt(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vlt(t,n){if(1&t&&(b(0,"div",27)(1,"h6"),I(2,"Tournament"),x(),ge(3,"hr",28),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),I(8,"Title"),x()(),ge(9,"input",30),x(),b(10,"div",3)(11,"div",4)(12,"label",31),I(13,"Description"),x()(),ge(14,"input",32),x()(),b(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),I(19,"Category"),x()(),ge(20,"input",34),x(),b(21,"div",3)(22,"div",4)(23,"label",35),I(24,"Max Num Score"),x()(),ge(25,"input",36),x()(),b(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),I(30,"Size"),x()(),ge(31,"input",38),x(),b(32,"div",3)(33,"div",4)(34,"label",39),I(35,"Max Size"),x()(),ge(36,"input",40),x()(),b(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),I(41,"Duration"),x()(),ge(42,"input",42),x(),b(43,"div",3)(44,"div",4)(45,"label",43),I(46,"Join Required"),x()(),ge(47,"input",44),x()(),b(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),I(52,"Start Time"),x()(),ge(53,"input",46),x(),b(54,"div",3)(55,"div",4)(56,"label",47),I(57,"End Time"),x()(),ge(58,"input",48),x()(),b(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),I(63,"Start Active"),x()(),ge(64,"input",50),x(),b(65,"div",3)(66,"div",4)(67,"label",51),I(68,"End Active"),x()(),ge(69,"input",52),x()()()),2&t){const e=j();w(9),k("value",e.leaderboard.title),w(5),k("value",e.leaderboard.description),w(6),k("value",e.leaderboard.category),w(5),k("value",e.leaderboard.max_num_score),w(6),k("value",e.leaderboard.size),w(5),k("value",e.leaderboard.max_size),w(6),k("value",e.leaderboard.duration),w(5),k("value",e.leaderboard.join_required),w(6),k("value",e.leaderboard.start_time),w(5),k("value",e.leaderboard.end_time),w(6),k("value",e.leaderboard.start_active),w(5),k("value",e.leaderboard.end_active)}}let ylt=(()=>{class t{constructor(e){K(this,"route",void 0),K(this,"editor",void 0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),K(this,"jsonEditor",void 0),K(this,"leaderboard",void 0),K(this,"error",""),this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mlt,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(e,i){1&e&&(J(0,glt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),I(6,"ID"),x()(),ge(7,"input",6),x(),b(8,"div",3)(9,"div",4)(10,"label",7),I(11,"Authoritative"),x()(),ge(12,"input",8),x()(),b(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),I(17,"Sort Order"),x()(),ge(18,"input",10),x(),b(19,"div",3)(20,"div",4)(21,"label",11),I(22,"Operator"),x()(),ge(23,"input",12),x()(),b(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),I(28,"Reset Schedule"),x()(),ge(29,"input",14),x(),b(30,"div",3)(31,"div",4)(32,"label",15),I(33,"Create Time"),x()(),ge(34,"input",16),x()(),b(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),I(39,"Prev Reset"),x()(),ge(40,"input",18),x(),b(41,"div",3)(42,"div",4)(43,"label",15),I(44,"Next Reset"),x()(),ge(45,"input",19),x()()(),J(46,vlt,70,12,"div",20),b(47,"div",21),ge(48,"div",22,23),x()),2&e&&(k("ngIf",i.error),w(7),k("value",i.leaderboard.id),w(5),k("value",i.leaderboard.authoritative),w(6),k("value",i.orderString[i.leaderboard.sort_order]),w(5),k("value",i.operatorString[i.leaderboard.operator]),w(6),k("value",i.leaderboard.reset_schedule),w(5),k("value",i.leaderboard.create_time),w(6),k("value",i.leaderboard.prev_reset),w(5),k("value",i.leaderboard.next_reset),w(1),k("ngIf",i.leaderboard.tournament))},dependencies:[gn,To],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})();function blt(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function _lt(t,n){1&t&&(b(0,"th",22),I(1,"Remove"),x())}function xlt(t,n){1&t&&(b(0,"tr")(1,"td",23),I(2,"No records found."),x()())}function wlt(t,n){1&t&&ge(0,"div",28)}function Clt(t,n){1&t&&ge(0,"div",29)}function klt(t,n){if(1&t){const e=vt();b(0,"td",30)(1,"button",31),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteRecord(r,s,a))}),I(2,"Delete"),x()()}}function Slt(t,n){if(1&t&&(b(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Dlt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=$e(e).index,s=j();return Be(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),J(3,wlt,1,0,"div",25),J(4,Clt,1,0,"div",26),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x(),b(16,"td"),I(17),x(),J(18,klt,3,0,"td",27),x(),J(19,Slt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.recordsMetadataOpen[e]),w(1),k("ngIf",r.recordsMetadataOpen[e]),w(1),xn(" ",i.owner_id," "),w(2),Dt(i.username),w(2),Dt(i.score),w(2),Dt(i.subscore),w(2),Dt(i.rank),w(2),Dt(i.num_score),w(2),Dt(i.expiry_time?i.expiry_time:"-"),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.recordsMetadataOpen[e])}}let Tlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"leaderboard",void 0),K(this,"records",[]),K(this,"recordsMetadataOpen",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),this.route=e,this.consoleService=i,this.authService=r}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,blt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadRecords(0)}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadRecords(-1)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadRecords(1)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),I(17,"Owner ID"),x(),b(18,"th"),I(19,"Username"),x(),b(20,"th",14),I(21,"Score"),x(),b(22,"th",14),I(23,"Subscore"),x(),b(24,"th",14),I(25,"Rank"),x(),b(26,"th",14),I(27,"No. of scores"),x(),b(28,"th",15),I(29,"Expiry Time"),x(),J(30,_lt,2,0,"th",16),x()(),b(31,"tbody"),J(32,xlt,3,0,"tr",17),J(33,Dlt,20,11,"ng-template",18),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.records.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(20),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.records.length),w(1),k("ngForOf",i.records))},dependencies:[jn,gn,To]})),t})(),Elt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Alt=["editor"],Mlt=["editorResponse"];function Ilt(t,n){if(1&t&&(b(0,"ngb-alert",23),ge(1,"img",24),b(2,"h6",25),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error whilst making RPC call: ",e.error,"")}}function Flt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Nh("value",e.method),w(1),Dt(e.method)}}function Nlt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Nh("value",e.method),w(1),Dt(e.method)}}let Olt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"editorResponse",void 0),K(this,"jsonEditor",void 0),K(this,"jsonEditorResponse",void 0),K(this,"error",""),K(this,"rpcEndpoints",[]),K(this,"endpoints",[]),K(this,"endpointCallForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Do.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0}}),this.jsonEditorResponse=new Zm({target:this.editorResponse.nativeElement,props:{mode:Jo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return void(this.error=o)}const i={user_id:this.f.user_id.value,body:e};let r=null;r=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,i):this.consoleService.callApiEndpoint("",this.f.method.value,i),r.subscribe(o=>{if(o.error_message&&""!==o.error_message)this.jsonEditorResponse.set({json:o.error_message});else{e="";try{e=JSON.stringify(JSON.parse(o.body),null,2)}catch(s){return void(this.error=s)}this.jsonEditorResponse.set({text:e})}},o=>{this.jsonEditorResponse.set({text:""}),this.error=o})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditor){if(!e||""===e)return this.jsonEditor.set({text:""}),void this.jsonEditor.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditor.set({text:i}),this.jsonEditor.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}else console.log("problem?")}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&(io(Alt,5),io(Mlt,5)),2&e){let r;cn(r=un())&&(i.editor=r.first),cn(r=un())&&(i.editorResponse=r.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"API Explorer"),x(),J(2,Ilt,4,2,"ngb-alert",1),b(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return i.sendRequest()}),b(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),I(11,"Select Endpoint"),x(),J(12,Flt,2,2,"option",10),b(13,"option",11),I(14,"----"),x(),J(15,Nlt,2,2,"option",10),x()(),ge(16,"input",12),b(17,"div",13)(18,"button",14),I(19,"Send Request"),x()()()()()()(),b(20,"div",15)(21,"div",16)(22,"h5"),I(23,"Request Body"),x(),ge(24,"hr",17),b(25,"div",18),ge(26,"div",19,20),x()(),b(28,"div",21)(29,"h5"),I(30,"Response"),x(),ge(31,"hr",17),b(32,"div",18),ge(33,"div",19,22),x()()()),2&e&&(w(2),k("ngIf",i.error),w(4),k("formGroup",i.endpointCallForm),w(4),k("value",""),w(2),k("ngForOf",i.rpcEndpoints),w(3),k("ngForOf",i.endpoints),w(3),k("disabled",i.f.method.invalid))},dependencies:[jn,gn,To,sl,xy,wy,Na,ov,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})),t})(),jlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Plt(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Llt(t,n){1&t&&ge(0,"div",23)}function Rlt(t,n){1&t&&ge(0,"div",24)}function $lt(t,n){if(1&t&&(b(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),I(6,"Provider Response"),x()()(),b(7,"div")(8,"pre",28)(9,"small"),I(10),x()()()()()()),2&t){const e=j().$implicit;w(10),Dt(e.provider_response)}}function Blt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=$e(e).index,s=j();return Be(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),J(3,Llt,1,0,"div",20),J(4,Rlt,1,0,"div",21),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x()(),J(14,$lt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.purchasesRowsOpen[e]),w(1),k("ngIf",r.purchasesRowsOpen[e]),w(1),xn(" ",i.product_id," "),w(2),Dt(i.transaction_id),w(2),Dt(r.getStoreText(i.store)),w(2),Dt(i.purchase_time),w(2),Dt(i.create_time),w(1),k("ngIf",r.purchasesRowsOpen[e])}}function Vlt(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No purchases were found."),x()())}let Hlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"purchases",[]),K(this,"purchasesRowsOpen",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.purchases=e[0].validated_purchases,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listPurchases("",this.userID,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-purchases"]],decls:29,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"]],template:function(e,i){1&e&&(J(0,Plt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Create Time"),x()()(),b(26,"tbody"),J(27,Blt,15,8,"ng-template",14),J(28,Vlt,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.purchases.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(17),k("ngForOf",i.purchases),w(1),k("ngIf",0===i.purchases.length))},dependencies:[jn,gn,To]})),t})(),zlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listPurchases("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Ult(t,n){1&t&&(b(0,"span"),I(1,"Filter by type"),x())}function Glt(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeFilter)}}function Wlt(t,n){if(1&t){const e=vt();b(0,"button",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeFilter=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function qlt(t,n){if(1&t&&(b(0,"h6"),I(1),x()),2&t){const e=j();w(1),xn("Showing results for chat room label: ",e.f1.label.value,"")}}const Xlt=function(t){return["/groups",t]};function Ylt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for group ID: "),b(2,"a",41),I(3),x()()),2&t){const e=j();w(2),k("routerLink",lr(2,Xlt,e.route.snapshot.queryParamMap.get("group_id"))),w(1),Dt(e.f2.group_id.value)}}const Yme=function(t){return["/accounts",t]};function Jlt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for user IDs: "),b(2,"a",41),I(3),x(),I(4,", "),b(5,"a",41),I(6),x()()),2&t){const e=j();w(2),k("routerLink",lr(4,Yme,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),Dt(e.f3.user_id_one.value),w(2),k("routerLink",lr(6,Yme,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),Dt(e.f3.user_id_two.value)}}function Klt(t,n){if(1&t&&(b(0,"ngb-alert",42),ge(1,"img",43),b(2,"h6",44),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying messages: ",e.error,"")}}function Qlt(t,n){1&t&&(b(0,"th",45),I(1,"Remove"),x())}function Zlt(t,n){if(1&t&&(b(0,"tr")(1,"td",46),I(2,"No messages found."),x()()),2&t){const e=j();w(1),ht("colspan",e.deleteAllowed()?6:5)}}function ect(t,n){1&t&&ge(0,"div",55)}function tct(t,n){1&t&&ge(0,"div",56)}function nct(t,n){1&t&&ge(0,"td")}function ict(t,n){if(1&t){const e=vt();b(0,"td",57)(1,"button",58),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteMessage(r,s,a))}),I(2,"Delete"),x()()}}function rct(t,n){if(1&t&&(b(0,"tr",59)(1,"td"),I(2),x()()),2&t){const e=j().$implicit,i=j();w(1),ht("colspan",i.deleteAllowed()?6:5),w(1),xn(" ",e.content," ")}}function oct(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td",47),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",48),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",49)(8,"div",50),ye("click",function(){const o=$e(e).index,s=j();return Be(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),J(9,ect,1,0,"div",51),J(10,tct,1,0,"div",52),x(),I(11),x(),b(12,"td"),I(13),x(),J(14,nct,1,0,"td",3),J(15,ict,3,0,"td",53),x(),J(16,rct,3,2,"tr",54)}if(2&t){const e=n.$implicit,i=n.index,r=j();w(2),Dt(e.code),w(2),Dt(e.sender_id),w(2),Dt(e.username),w(3),k("ngIf",!r.messageStatesOpen[i]),w(1),k("ngIf",r.messageStatesOpen[i]),w(1),xn(" ",e.content," "),w(2),Dt(e.create_time),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),k("ngIf",r.messageStatesOpen[i])}}function sct(t,n){if(1&t&&(b(0,"ngb-alert",60),ge(1,"img",43),b(2,"h6",44),I(3,"Failed to delete data."),x(),b(4,"p",61),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.deleteError)}}function act(t,n){if(1&t){const e=vt();b(0,"ngb-alert",62),ye("close",function(){return $e(e),Be(j().deleteSuccess=!1)}),ge(1,"img",63),b(2,"h6",44),I(3),x()()}if(2&t){const e=j();k("dismissible",!0),w(3),Ld("",e.total_deleted," messages ",e.total_deleted>0?"successfully":""," deleted.")}}const lct=function(t){return{"is-invalid":t}};function cct(t,n){if(1&t){const e=vt();b(0,"div",64)(1,"h5",65),I(2,"Delete messages"),x(),b(3,"button",66),ye("click",function(){return Be($e(e).$implicit.dismiss())}),b(4,"span",67),I(5,"\xd7"),x()()(),b(6,"div",68)(7,"div",69)(8,"form",70)(9,"div",71)(10,"p")(11,"b"),I(12,"Choose how many days to retain: "),x(),ge(13,"input",72),x()(),ge(14,"input",73),x()()(),b(15,"div",74)(16,"button",75),ye("click",function(){return Be($e(e).$implicit.dismiss())}),I(17,"Cancel"),x(),b(18,"button",76),ye("click",function(){return Be($e(e).$implicit.close())}),I(19,"DELETE"),x()()}if(2&t){const e=j();w(8),k("formGroup",e.confirmDeleteForm),w(6),k("ngClass",lr(3,lct,e.f.delete.touched&&e.f.delete.invalid)),w(4),k("disabled",e.f.delete.invalid)}}function uct(t,n){if(1&t){const e=vt();b(0,"button",76),ye("click",function(){$e(e);const r=j(),o=uo(68);return Be(r.openDeleteDataModal(o))}),I(1,"Delete messages"),x()}2&t&&k("disabled",j().deleting)}let dct=(()=>{class t{constructor(e,i,r,o,s,a){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"modalService",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"messages",[]),K(this,"nextCursor",""),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"confirmDeleteForm",void 0),K(this,"deleteError",""),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"total_deleted",0),K(this,"activeFilter",""),K(this,"filters",["Chat Room","Group Chat","Direct Chat"]),K(this,"messageStatesOpen",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])],days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");let i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2==this.type||3==this.type||4==this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}deleteData(){this.deleteError="",this.deleting=!0;let e=new Date;e.setDate(e.getDate()-this.f.days.value),this.consoleService.deleteChannelMessages("",e.toISOString(),null).subscribe(i=>{this.total_deleted=Number(i.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const r=this.route.snapshot.queryParamMap;let o=r.get("type"),s=r.get("label");s||(s="0");let a=r.get("group_id"),l=r.get("user_id_one"),c=r.get("user_id_two"),u=r.get("cursor");u||(u=""),o&&this.updateMessages(Number(o),s,a,l,c,u)},i=>{this.deleting=!1,this.deleteError=i})}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl),le(H3))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:70,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["confirmDelete",""],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],[1,"mt-2"],["type","number","value","30","min","0","formControlName","days",2,"width","80px"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Chat Messages"),x(),b(2,"div",1)(3,"button",2),J(4,Ult,2,0,"span",3),J(5,Glt,2,1,"span",3),x(),b(6,"div",4),J(7,Wlt,2,1,"button",5),x()(),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ge(13,"input",11),b(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return i.type=2,i.search(0)}),I(17,"Search"),x()()()()(),b(18,"form",9)(19,"div",10),ge(20,"input",15),b(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return i.type=3,i.search(0)}),I(24,"Search "),x()()()()(),b(25,"form",9)(26,"div",10),ge(27,"input",16),b(28,"div",12)(29,"span",17),ye("click",function(){return i.f3.user_id_one.setValue(i.systemUserId)}),ge(30,"img",18),x()(),ge(31,"input",19),b(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return i.type=4,i.search(0)}),I(35,"Search "),x()()()()()(),b(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return i.search(0)}),ge(39,"img",23),x(),b(40,"button",22),ye("click",function(){return i.search(1)}),ge(41,"img",24),x()()()()(),J(42,qlt,2,1,"h6",3),J(43,Ylt,4,4,"h6",3),J(44,Jlt,7,8,"h6",3),J(45,Klt,4,2,"ngb-alert",25),b(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),I(51,"Code"),x(),b(52,"th",30),I(53,"Sender ID"),x(),b(54,"th",31),I(55,"Username"),x(),b(56,"th"),I(57,"Content"),x(),b(58,"th",32),I(59,"Create Time"),x(),J(60,Qlt,2,0,"th",33),x()(),b(61,"tbody"),J(62,Zlt,3,1,"tr",3),J(63,oct,17,10,"ng-template",34),x()()(),J(64,sct,6,2,"ngb-alert",35),J(65,act,4,3,"ngb-alert",36),b(66,"div",37),J(67,cct,20,5,"ng-template",null,38,Ur),J(69,uct,2,1,"button",39),x()),2&e&&(w(4),k("ngIf",!i.activeFilter||""===i.activeFilter),w(1),k("ngIf",i.activeFilter&&""!==i.activeFilter),w(2),k("ngForOf",i.filters),w(4),k("hidden","Chat Room"!==i.activeFilter)("formGroup",i.searchForm1),w(7),k("hidden","Group Chat"!==i.activeFilter)("formGroup",i.searchForm2),w(7),k("hidden","Direct Chat"!==i.activeFilter)("formGroup",i.searchForm3),w(13),k("disabled",0===i.messages.length),w(2),k("disabled",""===i.nextCursor||null===i.nextCursor),w(2),k("ngIf",0!=i.messages.length&&""===i.error&&2==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&3==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&4==i.type),w(1),k("ngIf",i.error),w(15),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.messages.length),w(1),k("ngForOf",i.messages),w(1),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(4),k("ngIf",i.deleteMessagesAllowed()))},dependencies:[Fu,Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Na,c3,rl,ol,p3,fa,ja],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})),t})(),hct=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));default:return $n(null)}}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function fct(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function pct(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),I(6),x(),b(7,"td"),I(8),x(),b(9,"td"),I(10),x(),b(11,"td"),I(12),x()()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.product_id),w(2),Dt(e.original_transaction_id),w(2),Dt(i.getStoreText(e.store)),w(2),Dt(e.purchase_time),w(2),Dt(e.expiry_time),w(2),Dt(e.create_time)}}function mct(t,n){1&t&&(b(0,"tr")(1,"td",19),I(2,"No purchases were found."),x()())}const gct=[{path:"",component:yNe,canActivate:[tMe],canActivateChild:[bNe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:rBe,resolve:[oBe]},{path:"config",component:OBe,resolve:[jBe]},{path:"users",component:BBe,resolve:[VBe]},{path:"modules",component:t7e,resolve:[n7e]},{path:"storage",component:d7e,resolve:[h7e,f7e],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Cot,resolve:[kot],pathMatch:"full"},{path:"leaderboards",component:Oot,resolve:[jot]},{path:"leaderboards/:id",component:flt,resolve:[plt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:ylt,resolve:[]},{path:"records",component:Tlt,resolve:[Elt]}]},{path:"matches",component:zat,resolve:[Uat,Gat]},{path:"groups",component:Qat,resolve:[Zat]},{path:"groups/:id",component:slt,resolve:[alt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:iat,resolve:[]},{path:"members",component:Cat,resolve:[kat],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Hot,resolve:[zot]},{path:"accounts/:id",component:nst,resolve:[ist],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:cst,resolve:[]},{path:"authentication",component:pst,resolve:[]},{path:"wallet",component:Dst,resolve:[Tst]},{path:"friends",component:Lst,resolve:[Rst]},{path:"groups",component:Yst,resolve:[Jst]},{path:"purchases",component:Hlt,resolve:[zlt]},{path:"subscriptions",component:(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"subscriptions",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.subscriptions=e[0].validated_subscriptions,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listSubscriptions("",this.userID,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-subscriptions"]],decls:31,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colspan","6",1,"text-muted"]],template:function(e,i){1&e&&(J(0,fct,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Original Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Expiry Time"),x(),b(26,"th",13),I(27,"Create Time"),x()()(),b(28,"tbody"),J(29,pct,13,6,"ng-template",14),J(30,mct,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.subscriptions.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(19),k("ngForOf",i.subscriptions),w(1),k("ngIf",0===i.subscriptions.length))},dependencies:[jn,gn,To]})),t})(),resolve:[(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listSubscriptions("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})()]}]},{path:"apiexplorer",component:Olt,resolve:[jlt]},{path:"chat",component:dct,resolve:[hct]}]},{path:"login",component:ZAe,canActivate:[eMe]},{path:"**",redirectTo:""}];let vct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t})),K(t,"\u0275inj",Ci({imports:[J9.forRoot(gct,{useHash:!0}),J9]})),t})(),yct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp]})),t})();new class kct extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Dct=1;const Tct=Promise.resolve(),YD={};function Jme(t){return t in YD&&(delete YD[t],!0)}const Kme={setImmediate(t){const n=Dct++;return YD[n]=!0,Tct.then(()=>Jme(n)&&t()),n},clearImmediate(t){Jme(t)}};new class Act extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=Kme.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(Kme.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const Cs={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};Cs[Cs.Tab]="Tab",Cs[Cs.Enter]="Enter",Cs[Cs.Esc]="Esc",Cs[Cs.Space]="Space",Cs[Cs.ArrowUp]="ArrowUp",Cs[Cs.ArrowDown]="ArrowDown",Cs[Cs.Backspace]="Backspace";const ige=new zn("ng-select-selection-model");class jut{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}const Put=function Out(){return new jut};let Lut=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:ige,useValue:Put}],imports:[Vs]}),t})(),Rut=(()=>{class t{constructor(e){K(this,"authenticationService",void 0),this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),$ut=(()=>{class t{constructor(e,i){K(this,"authenticationService",void 0),K(this,"router",void 0),this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ul(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),qp(r.error.message||r.statusText))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),But=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t,bootstrap:[yct]})),K(t,"\u0275inj",Ci({providers:[JAe,Iz,{provide:C3,useValue:{host:document.location.origin,timeout:15e3}},{provide:x3,useClass:Rut,multi:!0},{provide:x3,useClass:$ut,multi:!0}],imports:[pBe,vct,qA,SSe,qAe,cNe,L$e,SAe.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),DSe,wAe,ZV,Lut]})),t})();g2e().bootstrapModule(But).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Tn)=>{"use strict";Tn.byteLength=function Ve(T){var O=et(T),Me=O[1];return 3*(O[0]+Me)/4-Me},Tn.toByteArray=function se(T){var O,wn,te=et(T),Me=te[0],Je=te[1],kt=new Oe(function ve(T,O,te){return 3*(O+te)/4-te}(0,Me,Je)),jt=0,Wt=Je>0?Me-4:Me;for(wn=0;wn>16&255,kt[jt++]=O>>8&255,kt[jt++]=255&O;return 2===Je&&(O=rt[T.charCodeAt(wn)]<<2|rt[T.charCodeAt(wn+1)]>>4,kt[jt++]=255&O),1===Je&&(O=rt[T.charCodeAt(wn)]<<10|rt[T.charCodeAt(wn+1)]<<4|rt[T.charCodeAt(wn+2)]>>2,kt[jt++]=O>>8&255,kt[jt++]=255&O),kt},Tn.fromByteArray=function D(T){for(var O,te=T.length,Me=te%3,Je=[],jt=0,Wt=te-Me;jtWt?Wt:jt+16383));return 1===Me?Je.push(De[(O=T[te-1])>>2]+De[O<<4&63]+"=="):2===Me&&Je.push(De[(O=(T[te-2]<<8)+T[te-1])>>10]+De[O>>4&63]+De[O<<2&63]+"="),Je.join("")};for(var De=[],rt=[],Oe=typeof Uint8Array<"u"?Uint8Array:Array,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=0,_e=dt.length;Ge<_e;++Ge)De[Ge]=dt[Ge],rt[dt.charCodeAt(Ge)]=Ge;function et(T){var O=T.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var te=T.indexOf("=");return-1===te&&(te=O),[te,te===O?0:4-te%4]}function ue(T){return De[T>>18&63]+De[T>>12&63]+De[T>>6&63]+De[63&T]}function ae(T,O,te){for(var Je=[],kt=O;kt{"use strict";var Oe=De(343),dt=De(461),Ge="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Tn.lW=ve,Tn.h2=50;var _e=2147483647;function Ve(Te){if(Te>_e)throw new RangeError('The value "'+Te+'" is invalid for option "size"');var W=new Uint8Array(Te);return Object.setPrototypeOf(W,ve.prototype),W}function ve(Te,W,ee){if("number"==typeof Te){if("string"==typeof W)throw new TypeError('The "string" argument must be of type string. Received type number');return D(Te)}return se(Te,W,ee)}function se(Te,W,ee){if("string"==typeof Te)return function T(Te,W){if(("string"!=typeof W||""===W)&&(W="utf8"),!ve.isEncoding(W))throw new TypeError("Unknown encoding: "+W);var ee=0|Wt(Te,W),Ne=Ve(ee),nt=Ne.write(Te,W);return nt!==ee&&(Ne=Ne.slice(0,nt)),Ne}(Te,W);if(ArrayBuffer.isView(Te))return function te(Te){if(da(Te,Uint8Array)){var W=new Uint8Array(Te);return Me(W.buffer,W.byteOffset,W.byteLength)}return O(Te)}(Te);if(null==Te)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te);if(da(Te,ArrayBuffer)||Te&&da(Te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(da(Te,SharedArrayBuffer)||Te&&da(Te.buffer,SharedArrayBuffer)))return Me(Te,W,ee);if("number"==typeof Te)throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=Te.valueOf&&Te.valueOf();if(null!=Ne&&Ne!==Te)return ve.from(Ne,W,ee);var nt=function Je(Te){if(ve.isBuffer(Te)){var W=0|kt(Te.length),ee=Ve(W);return 0===ee.length||Te.copy(ee,0,0,W),ee}return void 0!==Te.length?"number"!=typeof Te.length||co(Te.length)?Ve(0):O(Te):"Buffer"===Te.type&&Array.isArray(Te.data)?O(Te.data):void 0}(Te);if(nt)return nt;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Te[Symbol.toPrimitive])return ve.from(Te[Symbol.toPrimitive]("string"),W,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te)}function ue(Te){if("number"!=typeof Te)throw new TypeError('"size" argument must be of type number');if(Te<0)throw new RangeError('The value "'+Te+'" is invalid for option "size"')}function D(Te){return ue(Te),Ve(Te<0?0:0|kt(Te))}function O(Te){for(var W=Te.length<0?0:0|kt(Te.length),ee=Ve(W),Ne=0;Ne=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return 0|Te}function Wt(Te,W){if(ve.isBuffer(Te))return Te.length;if(ArrayBuffer.isView(Te)||da(Te,ArrayBuffer))return Te.byteLength;if("string"!=typeof Te)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Te);var ee=Te.length,Ne=arguments.length>2&&!0===arguments[2];if(!Ne&&0===ee)return 0;for(var nt=!1;;)switch(W){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return Nc(Te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return vu(Te).length;default:if(nt)return Ne?-1:Nc(Te).length;W=(""+W).toLowerCase(),nt=!0}}function wn(Te,W,ee){var Ne=!1;if((void 0===W||W<0)&&(W=0),W>this.length||((void 0===ee||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(W>>>=0))return"";for(Te||(Te="utf8");;)switch(Te){case"hex":return gu(this,W,ee);case"utf8":case"utf-8":return yn(this,W,ee);case"ascii":return Kn(this,W,ee);case"latin1":case"binary":return Fc(this,W,ee);case"base64":return Sa(this,W,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ro(this,W,ee);default:if(Ne)throw new TypeError("Unknown encoding: "+Te);Te=(Te+"").toLowerCase(),Ne=!0}}function rn(Te,W,ee){var Ne=Te[W];Te[W]=Te[ee],Te[ee]=Ne}function Mi(Te,W,ee,Ne,nt){if(0===Te.length)return-1;if("string"==typeof ee?(Ne=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),co(ee=+ee)&&(ee=nt?0:Te.length-1),ee<0&&(ee=Te.length+ee),ee>=Te.length){if(nt)return-1;ee=Te.length-1}else if(ee<0){if(!nt)return-1;ee=0}if("string"==typeof W&&(W=ve.from(W,Ne)),ve.isBuffer(W))return 0===W.length?-1:zr(Te,W,ee,Ne,nt);if("number"==typeof W)return W&=255,"function"==typeof Uint8Array.prototype.indexOf?nt?Uint8Array.prototype.indexOf.call(Te,W,ee):Uint8Array.prototype.lastIndexOf.call(Te,W,ee):zr(Te,[W],ee,Ne,nt);throw new TypeError("val must be string, number or Buffer")}function zr(Te,W,ee,Ne,nt){var st,zt=1,Qt=Te.length,nr=W.length;if(void 0!==Ne&&("ucs2"===(Ne=String(Ne).toLowerCase())||"ucs-2"===Ne||"utf16le"===Ne||"utf-16le"===Ne)){if(Te.length<2||W.length<2)return-1;zt=2,Qt/=2,nr/=2,ee/=2}function A(mn,pe){return 1===zt?mn[pe]:mn.readUInt16BE(pe*zt)}if(nt){var Tt=-1;for(st=ee;stQt&&(ee=Qt-nr),st=ee;st>=0;st--){for(var Ut=!0,Vt=0;Vtnt&&(Ne=nt):Ne=nt;var zt=W.length;Ne>zt/2&&(Ne=zt/2);for(var Qt=0;Qt>8,zt.push(ee%256),zt.push(Ne);return zt}(W,Te.length-ee),Te,ee,Ne)}function Sa(Te,W,ee){return Oe.fromByteArray(0===W&&ee===Te.length?Te:Te.slice(W,ee))}function yn(Te,W,ee){ee=Math.min(Te.length,ee);for(var Ne=[],nt=W;nt239?4:zt>223?3:zt>191?2:1;if(nt+nr<=ee)switch(nr){case 1:zt<128&&(Qt=zt);break;case 2:128==(192&(A=Te[nt+1]))&&(Ut=(31&zt)<<6|63&A)>127&&(Qt=Ut);break;case 3:st=Te[nt+2],128==(192&(A=Te[nt+1]))&&128==(192&st)&&(Ut=(15&zt)<<12|(63&A)<<6|63&st)>2047&&(Ut<55296||Ut>57343)&&(Qt=Ut);break;case 4:st=Te[nt+2],Tt=Te[nt+3],128==(192&(A=Te[nt+1]))&&128==(192&st)&&128==(192&Tt)&&(Ut=(15&zt)<<18|(63&A)<<12|(63&st)<<6|63&Tt)>65535&&Ut<1114112&&(Qt=Ut)}null===Qt?(Qt=65533,nr=1):Qt>65535&&(Ne.push((Qt-=65536)>>>10&1023|55296),Qt=56320|1023&Qt),Ne.push(Qt),nt+=nr}return function kd(Te){var W=Te.length;if(W<=Cd)return String.fromCharCode.apply(String,Te);for(var ee="",Ne=0;Nent.length?ve.from(Qt).copy(nt,zt):Uint8Array.prototype.set.call(nt,Qt,zt);else{if(!ve.isBuffer(Qt))throw new TypeError('"list" argument must be an Array of Buffers');Qt.copy(nt,zt)}zt+=Qt.length}return nt},ve.byteLength=Wt,ve.prototype._isBuffer=!0,ve.prototype.swap16=function(){var W=this.length;if(W%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ee=0;eeee&&(W+=" ... "),""},Ge&&(ve.prototype[Ge]=ve.prototype.inspect),ve.prototype.compare=function(W,ee,Ne,nt,zt){if(da(W,Uint8Array)&&(W=ve.from(W,W.offset,W.byteLength)),!ve.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(void 0===ee&&(ee=0),void 0===Ne&&(Ne=W?W.length:0),void 0===nt&&(nt=0),void 0===zt&&(zt=this.length),ee<0||Ne>W.length||nt<0||zt>this.length)throw new RangeError("out of range index");if(nt>=zt&&ee>=Ne)return 0;if(nt>=zt)return-1;if(ee>=Ne)return 1;if(this===W)return 0;for(var Qt=(zt>>>=0)-(nt>>>=0),nr=(Ne>>>=0)-(ee>>>=0),A=Math.min(Qt,nr),st=this.slice(nt,zt),Tt=W.slice(ee,Ne),Ut=0;Ut>>=0,isFinite(Ne)?(Ne>>>=0,void 0===nt&&(nt="utf8")):(nt=Ne,Ne=void 0)}var zt=this.length-ee;if((void 0===Ne||Ne>zt)&&(Ne=zt),W.length>0&&(Ne<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");nt||(nt="utf8");for(var Qt=!1;;)switch(nt){case"hex":return Xr(this,W,ee,Ne);case"utf8":case"utf-8":return hs(this,W,ee,Ne);case"ascii":case"latin1":case"binary":return Ya(this,W,ee,Ne);case"base64":return tr(this,W,ee,Ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mu(this,W,ee,Ne);default:if(Qt)throw new TypeError("Unknown encoding: "+nt);nt=(""+nt).toLowerCase(),Qt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(Te,W,ee){var Ne="";ee=Math.min(Te.length,ee);for(var nt=W;ntNe)&&(ee=Ne);for(var nt="",zt=W;ztee)throw new RangeError("Trying to access beyond buffer length")}function lo(Te,W,ee,Ne,nt,zt){if(!ve.isBuffer(Te))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>nt||WTe.length)throw new RangeError("Index out of range")}function Da(Te,W,ee,Ne,nt,zt){if(ee+Ne>Te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Zr(Te,W,ee,Ne,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,4),dt.write(Te,W,ee,Ne,23,4),ee+4}function pl(Te,W,ee,Ne,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,8),dt.write(Te,W,ee,Ne,52,8),ee+8}ve.prototype.slice=function(W,ee){var Ne=this.length;(W=~~W)<0?(W+=Ne)<0&&(W=0):W>Ne&&(W=Ne),(ee=void 0===ee?Ne:~~ee)<0?(ee+=Ne)<0&&(ee=0):ee>Ne&&(ee=Ne),ee>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W+--ee],zt=1;ee>0&&(zt*=256);)nt+=this[W+--ee]*zt;return nt},ve.prototype.readUint8=ve.prototype.readUInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),this[W]},ve.prototype.readUint16LE=ve.prototype.readUInt16LE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]|this[W+1]<<8},ve.prototype.readUint16BE=ve.prototype.readUInt16BE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]<<8|this[W+1]},ve.prototype.readUint32LE=ve.prototype.readUInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+16777216*this[W+3]},ve.prototype.readUint32BE=ve.prototype.readUInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),16777216*this[W]+(this[W+1]<<16|this[W+2]<<8|this[W+3])},ve.prototype.readIntLE=function(W,ee,Ne){W>>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt=(zt*=128)&&(nt-=Math.pow(2,8*ee)),nt},ve.prototype.readIntBE=function(W,ee,Ne){W>>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=ee,zt=1,Qt=this[W+--nt];nt>0&&(zt*=256);)Qt+=this[W+--nt]*zt;return Qt>=(zt*=128)&&(Qt-=Math.pow(2,8*ee)),Qt},ve.prototype.readInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),128&this[W]?-1*(255-this[W]+1):this[W]},ve.prototype.readInt16LE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Ne=this[W]|this[W+1]<<8;return 32768&Ne?4294901760|Ne:Ne},ve.prototype.readInt16BE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Ne=this[W+1]|this[W]<<8;return 32768&Ne?4294901760|Ne:Ne},ve.prototype.readInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},ve.prototype.readInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},ve.prototype.readFloatLE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!0,23,4)},ve.prototype.readFloatBE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!1,23,4)},ve.prototype.readDoubleLE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!0,52,8)},ve.prototype.readDoubleBE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!1,52,8)},ve.prototype.writeUintLE=ve.prototype.writeUIntLE=function(W,ee,Ne,nt){W=+W,ee>>>=0,Ne>>>=0,nt||lo(this,W,ee,Ne,Math.pow(2,8*Ne)-1,0);var Qt=1,nr=0;for(this[ee]=255&W;++nr>>=0,Ne>>>=0,nt||lo(this,W,ee,Ne,Math.pow(2,8*Ne)-1,0);var Qt=Ne-1,nr=1;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)this[ee+Qt]=W/nr&255;return ee+Ne},ve.prototype.writeUint8=ve.prototype.writeUInt8=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,1,255,0),this[ee]=255&W,ee+1},ve.prototype.writeUint16LE=ve.prototype.writeUInt16LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,65535,0),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeUint16BE=ve.prototype.writeUInt16BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,65535,0),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeUint32LE=ve.prototype.writeUInt32LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,4294967295,0),this[ee+3]=W>>>24,this[ee+2]=W>>>16,this[ee+1]=W>>>8,this[ee]=255&W,ee+4},ve.prototype.writeUint32BE=ve.prototype.writeUInt32BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,4294967295,0),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeIntLE=function(W,ee,Ne,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Ne-1);lo(this,W,ee,Ne,zt-1,-zt)}var Qt=0,nr=1,A=0;for(this[ee]=255&W;++Qt>0)-A&255;return ee+Ne},ve.prototype.writeIntBE=function(W,ee,Ne,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Ne-1);lo(this,W,ee,Ne,zt-1,-zt)}var Qt=Ne-1,nr=1,A=0;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)W<0&&0===A&&0!==this[ee+Qt+1]&&(A=1),this[ee+Qt]=(W/nr>>0)-A&255;return ee+Ne},ve.prototype.writeInt8=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,1,127,-128),W<0&&(W=255+W+1),this[ee]=255&W,ee+1},ve.prototype.writeInt16LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,32767,-32768),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeInt16BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,32767,-32768),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeInt32LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,2147483647,-2147483648),this[ee]=255&W,this[ee+1]=W>>>8,this[ee+2]=W>>>16,this[ee+3]=W>>>24,ee+4},ve.prototype.writeInt32BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeFloatLE=function(W,ee,Ne){return Zr(this,W,ee,!0,Ne)},ve.prototype.writeFloatBE=function(W,ee,Ne){return Zr(this,W,ee,!1,Ne)},ve.prototype.writeDoubleLE=function(W,ee,Ne){return pl(this,W,ee,!0,Ne)},ve.prototype.writeDoubleBE=function(W,ee,Ne){return pl(this,W,ee,!1,Ne)},ve.prototype.copy=function(W,ee,Ne,nt){if(!ve.isBuffer(W))throw new TypeError("argument should be a Buffer");if(Ne||(Ne=0),!nt&&0!==nt&&(nt=this.length),ee>=W.length&&(ee=W.length),ee||(ee=0),nt>0&&nt=this.length)throw new RangeError("Index out of range");if(nt<0)throw new RangeError("sourceEnd out of bounds");nt>this.length&&(nt=this.length),W.length-ee>>=0,Ne=void 0===Ne?this.length:Ne>>>0,W||(W=0),"number"==typeof W)for(Qt=ee;Qt55295&&ee<57344){if(!nt){if(ee>56319){(W-=3)>-1&&zt.push(239,191,189);continue}if(Qt+1===Ne){(W-=3)>-1&&zt.push(239,191,189);continue}nt=ee;continue}if(ee<56320){(W-=3)>-1&&zt.push(239,191,189),nt=ee;continue}ee=65536+(nt-55296<<10|ee-56320)}else nt&&(W-=3)>-1&&zt.push(239,191,189);if(nt=null,ee<128){if((W-=1)<0)break;zt.push(ee)}else if(ee<2048){if((W-=2)<0)break;zt.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((W-=3)<0)break;zt.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;zt.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return zt}function vu(Te){return Oe.toByteArray(function Sd(Te){if((Te=(Te=Te.split("=")[0]).trim().replace(nc,"")).length<2)return"";for(;Te.length%4!=0;)Te+="=";return Te}(Te))}function Ja(Te,W,ee,Ne){for(var nt=0;nt=W.length||nt>=Te.length);++nt)W[nt+ee]=Te[nt];return nt}function da(Te,W){return Te instanceof W||null!=Te&&null!=Te.constructor&&null!=Te.constructor.name&&Te.constructor.name===W.name}function co(Te){return Te!=Te}var ml=function(){for(var Te="0123456789abcdef",W=new Array(256),ee=0;ee<16;++ee)for(var Ne=16*ee,nt=0;nt<16;++nt)W[Ne+nt]=Te[ee]+Te[nt];return W}()},797:function(Yt){Yt.exports=function(Tn){var De={};function rt(Oe){if(De[Oe])return De[Oe].exports;var dt=De[Oe]={exports:{},id:Oe,loaded:!1};return Tn[Oe].call(dt.exports,dt,dt.exports,rt),dt.loaded=!0,dt.exports}return rt.m=Tn,rt.c=De,rt.p="",rt(0)}([function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(1),dt=rt(3),Ge=rt(8),_e=rt(15);function et(ae,D,T){var O=null,te=function(Mi,zr){T&&T(Mi,zr),O&&O.visit(Mi,zr)},Me="function"==typeof T?te:null,Je=!1;if(D){var kt="boolean"==typeof D.attachComment&&D.attachComment;((Je="boolean"==typeof D.comment&&D.comment)||kt)&&((O=new Oe.CommentHandler).attach=kt,D.comment=!0,Me=te)}var Wt,jt=!1;D&&"string"==typeof D.sourceType&&(jt="module"===D.sourceType),Wt=D&&"boolean"==typeof D.jsx&&D.jsx?new dt.JSXParser(ae,D,Me):new Ge.Parser(ae,D,Me);var rn=jt?Wt.parseModule():Wt.parseScript();return Je&&O&&(rn.comments=O.comments),Wt.config.tokens&&(rn.tokens=Wt.tokens),Wt.config.tolerant&&(rn.errors=Wt.errorHandler.errors),rn}De.parse=et,De.parseModule=function Ve(ae,D,T){var O=D||{};return O.sourceType="module",et(ae,O,T)},De.parseScript=function ve(ae,D,T){var O=D||{};return O.sourceType="script",et(ae,O,T)},De.tokenize=function se(ae,D,T){var te,O=new _e.Tokenizer(ae,D);te=[];try{for(;;){var Me=O.getNextToken();if(!Me)break;T&&(Me=T(Me)),te.push(Me)}}catch(Je){O.errorHandler.tolerate(Je)}return O.errorHandler.tolerant&&(te.errors=O.errors()),te};var ue=rt(2);De.Syntax=ue.Syntax,De.version="4.0.1"},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2),dt=function(){function Ge(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return Ge.prototype.insertInnerComments=function(_e,et){if(_e.type===Oe.Syntax.BlockStatement&&0===_e.body.length){for(var Ve=[],ve=this.leading.length-1;ve>=0;--ve){var se=this.leading[ve];et.end.offset>=se.start&&(Ve.unshift(se.comment),this.leading.splice(ve,1),this.trailing.splice(ve,1))}Ve.length&&(_e.innerComments=Ve)}},Ge.prototype.findTrailingComments=function(_e){var et=[];if(this.trailing.length>0){for(var Ve=this.trailing.length-1;Ve>=0;--Ve){var ve=this.trailing[Ve];ve.start>=_e.end.offset&&et.unshift(ve.comment)}return this.trailing.length=0,et}var se=this.stack[this.stack.length-1];if(se&&se.node.trailingComments){var ue=se.node.trailingComments[0];ue&&ue.range[0]>=_e.end.offset&&(et=se.node.trailingComments,delete se.node.trailingComments)}return et},Ge.prototype.findLeadingComments=function(_e){for(var Ve,et=[];this.stack.length>0&&(ve=this.stack[this.stack.length-1])&&ve.start>=_e.start.offset;)Ve=ve.node,this.stack.pop();if(Ve){for(var ue=(Ve.leadingComments?Ve.leadingComments.length:0)-1;ue>=0;--ue){var ae=Ve.leadingComments[ue];ae.range[1]<=_e.start.offset&&(et.unshift(ae),Ve.leadingComments.splice(ue,1))}return Ve.leadingComments&&0===Ve.leadingComments.length&&delete Ve.leadingComments,et}for(ue=this.leading.length-1;ue>=0;--ue){var ve;(ve=this.leading[ue]).start<=_e.start.offset&&(et.unshift(ve.comment),this.leading.splice(ue,1))}return et},Ge.prototype.visitNode=function(_e,et){if(!(_e.type===Oe.Syntax.Program&&_e.body.length>0)){this.insertInnerComments(_e,et);var Ve=this.findTrailingComments(et),ve=this.findLeadingComments(et);ve.length>0&&(_e.leadingComments=ve),Ve.length>0&&(_e.trailingComments=Ve),this.stack.push({node:_e,start:et.start.offset})}},Ge.prototype.visitComment=function(_e,et){var Ve="L"===_e.type[0]?"Line":"Block",ve={type:Ve,value:_e.value};if(_e.range&&(ve.range=_e.range),_e.loc&&(ve.loc=_e.loc),this.comments.push(ve),this.attach){var se={comment:{type:Ve,value:_e.value,range:[et.start.offset,et.end.offset]},start:et.start.offset};_e.loc&&(se.comment.loc=_e.loc),_e.type=Ve,this.leading.push(se),this.trailing.push(se)}},Ge.prototype.visit=function(_e,et){"LineComment"===_e.type||"BlockComment"===_e.type?this.visitComment(_e,et):this.attach&&this.visitNode(_e,et)},Ge}();De.CommentHandler=dt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Tn,De,rt){"use strict";var D,Oe=this&&this.__extends||(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,O){T.__proto__=O}||function(T,O){for(var te in O)O.hasOwnProperty(te)&&(T[te]=O[te])},function(T,O){function te(){this.constructor=T}D(T,O),T.prototype=null===O?Object.create(O):(te.prototype=O.prototype,new te)});Object.defineProperty(De,"__esModule",{value:!0});var dt=rt(4),Ge=rt(5),_e=rt(6),et=rt(7),Ve=rt(8),ve=rt(13),se=rt(14);function ue(D){var T;switch(D.type){case _e.JSXSyntax.JSXIdentifier:T=D.name;break;case _e.JSXSyntax.JSXNamespacedName:var te=D;T=ue(te.namespace)+":"+ue(te.name);break;case _e.JSXSyntax.JSXMemberExpression:var Me=D;T=ue(Me.object)+"."+ue(Me.property)}return T}ve.TokenName[100]="JSXIdentifier",ve.TokenName[101]="JSXText";var ae=function(D){function T(O,te,Me){return D.call(this,O,te,Me)||this}return Oe(T,D),T.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():D.prototype.parsePrimaryExpression.call(this)},T.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},T.prototype.finishJSX=function(){this.nextToken()},T.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},T.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.scanXHTMLEntity=function(O){for(var te="&",Me=!0,Je=!1,kt=!1,jt=!1;!this.scanner.eof()&&Me&&!Je;){var Wt=this.scanner.source[this.scanner.index];if(Wt===O)break;if(Je=";"===Wt,te+=Wt,++this.scanner.index,!Je)switch(te.length){case 2:kt="#"===Wt;break;case 3:kt&&(Me=(jt="x"===Wt)||dt.Character.isDecimalDigit(Wt.charCodeAt(0)),kt=kt&&!jt);break;default:Me=(Me=Me&&!(kt&&!dt.Character.isDecimalDigit(Wt.charCodeAt(0))))&&!(jt&&!dt.Character.isHexDigit(Wt.charCodeAt(0)))}}if(Me&&Je&&te.length>2){var wn=te.substr(1,te.length-2);kt&&wn.length>1?te=String.fromCharCode(parseInt(wn.substr(1),10)):jt&&wn.length>2?te=String.fromCharCode(parseInt("0"+wn.substr(1),16)):!kt&&!jt&&se.XHTMLEntities[wn]&&(te=se.XHTMLEntities[wn])}return te},T.prototype.lexJSX=function(){var O=this.scanner.source.charCodeAt(this.scanner.index);if(60===O||62===O||47===O||58===O||61===O||123===O||125===O)return{type:7,value:te=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===O||39===O){for(var Me=this.scanner.index,Je=this.scanner.source[this.scanner.index++],kt="";!this.scanner.eof()&&(jt=this.scanner.source[this.scanner.index++])!==Je;)kt+="&"===jt?this.scanXHTMLEntity(Je):jt;return{type:8,value:kt,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(46===O){var te,Wt=this.scanner.source.charCodeAt(this.scanner.index+1),wn=this.scanner.source.charCodeAt(this.scanner.index+2);return Me=this.scanner.index,this.scanner.index+=(te=46===Wt&&46===wn?"...":".").length,{type:7,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(96===O)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(dt.Character.isIdentifierStart(O)&&92!==O){for(Me=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var jt=this.scanner.source.charCodeAt(this.scanner.index);if(dt.Character.isIdentifierPart(jt)&&92!==jt)++this.scanner.index;else{if(45!==jt)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Me,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}return this.scanner.lex()},T.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var O=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(O)),O},T.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var O=this.scanner.index,te="";!this.scanner.eof();){var Me=this.scanner.source[this.scanner.index];if("{"===Me||"<"===Me)break;++this.scanner.index,te+=Me,dt.Character.isLineTerminator(Me.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Me&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:O,end:this.scanner.index};return te.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},T.prototype.peekJSXToken=function(){var O=this.scanner.saveState();this.scanner.scanComments();var te=this.lexJSX();return this.scanner.restoreState(O),te},T.prototype.expectJSX=function(O){var te=this.nextJSXToken();(7!==te.type||te.value!==O)&&this.throwUnexpectedToken(te)},T.prototype.matchJSX=function(O){var te=this.peekJSXToken();return 7===te.type&&te.value===O},T.prototype.parseJSXIdentifier=function(){var O=this.createJSXNode(),te=this.nextJSXToken();return 100!==te.type&&this.throwUnexpectedToken(te),this.finalize(O,new Ge.JSXIdentifier(te.value))},T.prototype.parseJSXElementName=function(){var O=this.createJSXNode(),te=this.parseJSXIdentifier();if(this.matchJSX(":")){var Me=te;this.expectJSX(":");var Je=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Me,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var kt=te;this.expectJSX(".");var jt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXMemberExpression(kt,jt))}return te},T.prototype.parseJSXAttributeName=function(){var te,O=this.createJSXNode(),Me=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Me;this.expectJSX(":");var kt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Je,kt))}else te=Me;return te},T.prototype.parseJSXStringLiteralAttribute=function(){var O=this.createJSXNode(),te=this.nextJSXToken();8!==te.type&&this.throwUnexpectedToken(te);var Me=this.getTokenRaw(te);return this.finalize(O,new et.Literal(te.value,Me))},T.prototype.parseJSXExpressionAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},T.prototype.parseJSXNameValueAttribute=function(){var O=this.createJSXNode(),te=this.parseJSXAttributeName(),Me=null;return this.matchJSX("=")&&(this.expectJSX("="),Me=this.parseJSXAttributeValue()),this.finalize(O,new Ge.JSXAttribute(te,Me))},T.prototype.parseJSXSpreadAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXSpreadAttribute(te))},T.prototype.parseJSXAttributes=function(){for(var O=[];!this.matchJSX("/")&&!this.matchJSX(">");){var te=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();O.push(te)}return O},T.prototype.parseJSXOpeningElement=function(){var O=this.createJSXNode();this.expectJSX("<");var te=this.parseJSXElementName(),Me=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(te,Je,Me))},T.prototype.parseJSXBoundaryElement=function(){var O=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var te=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(O,new Ge.JSXClosingElement(te))}var Me=this.parseJSXElementName(),Je=this.parseJSXAttributes(),kt=this.matchJSX("/");return kt&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(Me,kt,Je))},T.prototype.parseJSXEmptyExpression=function(){var O=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(O,new Ge.JSXEmptyExpression)},T.prototype.parseJSXExpressionContainer=function(){var te,O=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(te=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),te=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXChildren=function(){for(var O=[];!this.scanner.eof();){var te=this.createJSXChildNode(),Me=this.nextJSXText();if(Me.start0))break;jt=this.finalize(O.node,new Ge.JSXElement(O.opening,O.children,O.closing)),(O=te[te.length-1]).children.push(jt),te.pop()}}return O},T.prototype.parseJSXElement=function(){var O=this.createJSXNode(),te=this.parseJSXOpeningElement(),Me=[],Je=null;if(!te.selfClosing){var kt=this.parseComplexJSXElement({node:O,opening:te,closing:Je,children:Me});Me=kt.children,Je=kt.closing}return this.finalize(O,new Ge.JSXElement(te,Me,Je))},T.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var O=this.parseJSXElement();return this.finishJSX(),O},T.prototype.isStartOfExpression=function(){return D.prototype.isStartOfExpression.call(this)||this.match("<")},T}(Ve.Parser);De.JSXParser=ae},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};De.Character={fromCodePoint:function(Oe){return Oe<65536?String.fromCharCode(Oe):String.fromCharCode(55296+(Oe-65536>>10))+String.fromCharCode(56320+(Oe-65536&1023))},isWhiteSpace:function(Oe){return 32===Oe||9===Oe||11===Oe||12===Oe||160===Oe||Oe>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Oe)>=0},isLineTerminator:function(Oe){return 10===Oe||13===Oe||8232===Oe||8233===Oe},isIdentifierStart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||92===Oe||Oe>=128&&rt.NonAsciiIdentifierStart.test(De.Character.fromCodePoint(Oe))},isIdentifierPart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||Oe>=48&&Oe<=57||92===Oe||Oe>=128&&rt.NonAsciiIdentifierPart.test(De.Character.fromCodePoint(Oe))},isDecimalDigit:function(Oe){return Oe>=48&&Oe<=57},isHexDigit:function(Oe){return Oe>=48&&Oe<=57||Oe>=65&&Oe<=70||Oe>=97&&Oe<=102},isOctalDigit:function(Oe){return Oe>=48&&Oe<=55}}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(6);De.JSXClosingElement=function O(te){this.type=Oe.JSXSyntax.JSXClosingElement,this.name=te},De.JSXElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXElement,this.openingElement=te,this.children=Me,this.closingElement=Je},De.JSXEmptyExpression=function O(){this.type=Oe.JSXSyntax.JSXEmptyExpression},De.JSXExpressionContainer=function O(te){this.type=Oe.JSXSyntax.JSXExpressionContainer,this.expression=te},De.JSXIdentifier=function O(te){this.type=Oe.JSXSyntax.JSXIdentifier,this.name=te},De.JSXMemberExpression=function O(te,Me){this.type=Oe.JSXSyntax.JSXMemberExpression,this.object=te,this.property=Me},De.JSXAttribute=function O(te,Me){this.type=Oe.JSXSyntax.JSXAttribute,this.name=te,this.value=Me},De.JSXNamespacedName=function O(te,Me){this.type=Oe.JSXSyntax.JSXNamespacedName,this.namespace=te,this.name=Me},De.JSXOpeningElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXOpeningElement,this.name=te,this.selfClosing=Me,this.attributes=Je},De.JSXSpreadAttribute=function O(te){this.type=Oe.JSXSyntax.JSXSpreadAttribute,this.argument=te},De.JSXText=function O(te,Me){this.type=Oe.JSXSyntax.JSXText,this.value=te,this.raw=Me}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2);De.ArrayExpression=function We(Xe){this.type=Oe.Syntax.ArrayExpression,this.elements=Xe},De.ArrayPattern=function We(Xe){this.type=Oe.Syntax.ArrayPattern,this.elements=Xe},De.ArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!1},De.AssignmentExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.AssignmentExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.AssignmentPattern=function We(Xe,bt){this.type=Oe.Syntax.AssignmentPattern,this.left=Xe,this.right=bt},De.AsyncArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!0},De.AsyncFunctionDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AsyncFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AwaitExpression=function We(Xe){this.type=Oe.Syntax.AwaitExpression,this.argument=Xe},De.BinaryExpression=function We(Xe,bt,Cn){this.type="||"===Xe||"&&"===Xe?Oe.Syntax.LogicalExpression:Oe.Syntax.BinaryExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.BlockStatement=function We(Xe){this.type=Oe.Syntax.BlockStatement,this.body=Xe},De.BreakStatement=function We(Xe){this.type=Oe.Syntax.BreakStatement,this.label=Xe},De.CallExpression=function We(Xe,bt){this.type=Oe.Syntax.CallExpression,this.callee=Xe,this.arguments=bt},De.CatchClause=function We(Xe,bt){this.type=Oe.Syntax.CatchClause,this.param=Xe,this.body=bt},De.ClassBody=function We(Xe){this.type=Oe.Syntax.ClassBody,this.body=Xe},De.ClassDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassDeclaration,this.id=Xe,this.superClass=bt,this.body=Cn},De.ClassExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassExpression,this.id=Xe,this.superClass=bt,this.body=Cn},De.ComputedMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!0,this.object=Xe,this.property=bt},De.ConditionalExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ConditionalExpression,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ContinueStatement=function We(Xe){this.type=Oe.Syntax.ContinueStatement,this.label=Xe},De.DebuggerStatement=function We(){this.type=Oe.Syntax.DebuggerStatement},De.Directive=function We(Xe,bt){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe,this.directive=bt},De.DoWhileStatement=function We(Xe,bt){this.type=Oe.Syntax.DoWhileStatement,this.body=Xe,this.test=bt},De.EmptyStatement=function We(){this.type=Oe.Syntax.EmptyStatement},De.ExportAllDeclaration=function We(Xe){this.type=Oe.Syntax.ExportAllDeclaration,this.source=Xe},De.ExportDefaultDeclaration=function We(Xe){this.type=Oe.Syntax.ExportDefaultDeclaration,this.declaration=Xe},De.ExportNamedDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ExportNamedDeclaration,this.declaration=Xe,this.specifiers=bt,this.source=Cn},De.ExportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ExportSpecifier,this.exported=bt,this.local=Xe},De.ExpressionStatement=function We(Xe){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe},De.ForInStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForInStatement,this.left=Xe,this.right=bt,this.body=Cn,this.each=!1},De.ForOfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForOfStatement,this.left=Xe,this.right=bt,this.body=Cn},De.ForStatement=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.ForStatement,this.init=Xe,this.test=bt,this.update=Cn,this.body=jr},De.FunctionDeclaration=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.FunctionExpression=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.Identifier=function We(Xe){this.type=Oe.Syntax.Identifier,this.name=Xe},De.IfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.IfStatement,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ImportDeclaration=function We(Xe,bt){this.type=Oe.Syntax.ImportDeclaration,this.specifiers=Xe,this.source=bt},De.ImportDefaultSpecifier=function We(Xe){this.type=Oe.Syntax.ImportDefaultSpecifier,this.local=Xe},De.ImportNamespaceSpecifier=function We(Xe){this.type=Oe.Syntax.ImportNamespaceSpecifier,this.local=Xe},De.ImportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ImportSpecifier,this.local=Xe,this.imported=bt},De.LabeledStatement=function We(Xe,bt){this.type=Oe.Syntax.LabeledStatement,this.label=Xe,this.body=bt},De.Literal=function We(Xe,bt){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt},De.MetaProperty=function We(Xe,bt){this.type=Oe.Syntax.MetaProperty,this.meta=Xe,this.property=bt},De.MethodDefinition=function We(Xe,bt,Cn,jr,Y0){this.type=Oe.Syntax.MethodDefinition,this.key=Xe,this.computed=bt,this.value=Cn,this.kind=jr,this.static=Y0},De.Module=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="module"},De.NewExpression=function We(Xe,bt){this.type=Oe.Syntax.NewExpression,this.callee=Xe,this.arguments=bt},De.ObjectExpression=function We(Xe){this.type=Oe.Syntax.ObjectExpression,this.properties=Xe},De.ObjectPattern=function We(Xe){this.type=Oe.Syntax.ObjectPattern,this.properties=Xe},De.Property=function We(Xe,bt,Cn,jr,Y0,Gi){this.type=Oe.Syntax.Property,this.key=bt,this.computed=Cn,this.value=jr,this.kind=Xe,this.method=Y0,this.shorthand=Gi},De.RegexLiteral=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt,this.regex={pattern:Cn,flags:jr}},De.RestElement=function We(Xe){this.type=Oe.Syntax.RestElement,this.argument=Xe},De.ReturnStatement=function We(Xe){this.type=Oe.Syntax.ReturnStatement,this.argument=Xe},De.Script=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="script"},De.SequenceExpression=function We(Xe){this.type=Oe.Syntax.SequenceExpression,this.expressions=Xe},De.SpreadElement=function We(Xe){this.type=Oe.Syntax.SpreadElement,this.argument=Xe},De.StaticMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!1,this.object=Xe,this.property=bt},De.Super=function We(){this.type=Oe.Syntax.Super},De.SwitchCase=function We(Xe,bt){this.type=Oe.Syntax.SwitchCase,this.test=Xe,this.consequent=bt},De.SwitchStatement=function We(Xe,bt){this.type=Oe.Syntax.SwitchStatement,this.discriminant=Xe,this.cases=bt},De.TaggedTemplateExpression=function We(Xe,bt){this.type=Oe.Syntax.TaggedTemplateExpression,this.tag=Xe,this.quasi=bt},De.TemplateElement=function We(Xe,bt){this.type=Oe.Syntax.TemplateElement,this.value=Xe,this.tail=bt},De.TemplateLiteral=function We(Xe,bt){this.type=Oe.Syntax.TemplateLiteral,this.quasis=Xe,this.expressions=bt},De.ThisExpression=function We(){this.type=Oe.Syntax.ThisExpression},De.ThrowStatement=function We(Xe){this.type=Oe.Syntax.ThrowStatement,this.argument=Xe},De.TryStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.TryStatement,this.block=Xe,this.handler=bt,this.finalizer=Cn},De.UnaryExpression=function We(Xe,bt){this.type=Oe.Syntax.UnaryExpression,this.operator=Xe,this.argument=bt,this.prefix=!0},De.UpdateExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.UpdateExpression,this.operator=Xe,this.argument=bt,this.prefix=Cn},De.VariableDeclaration=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclaration,this.declarations=Xe,this.kind=bt},De.VariableDeclarator=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclarator,this.id=Xe,this.init=bt},De.WhileStatement=function We(Xe,bt){this.type=Oe.Syntax.WhileStatement,this.test=Xe,this.body=bt},De.WithStatement=function We(Xe,bt){this.type=Oe.Syntax.WithStatement,this.object=Xe,this.body=bt},De.YieldExpression=function We(Xe,bt){this.type=Oe.Syntax.YieldExpression,this.argument=Xe,this.delegate=bt}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(10),Ge=rt(11),_e=rt(7),et=rt(12),Ve=rt(2),ve=rt(13),se="ArrowParameterPlaceHolder",ue=function(){function ae(D,T,O){void 0===T&&(T={}),this.config={range:"boolean"==typeof T.range&&T.range,loc:"boolean"==typeof T.loc&&T.loc,source:null,tokens:"boolean"==typeof T.tokens&&T.tokens,comment:"boolean"==typeof T.comment&&T.comment,tolerant:"boolean"==typeof T.tolerant&&T.tolerant},this.config.loc&&T.source&&null!==T.source&&(this.config.source=String(T.source)),this.delegate=O,this.errorHandler=new dt.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new et.Scanner(D,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return ae.prototype.throwError=function(D){for(var T=[],O=1;O0&&this.delegate)for(var T=0;T>="===D||">>>="===D||"&="===D||"^="===D||"|="===D},ae.prototype.isolateCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=T,this.context.isAssignmentTarget=O,this.context.firstCoverInitializedNameError=te,Me},ae.prototype.inheritCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return this.context.isBindingElement=this.context.isBindingElement&&T,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&O,this.context.firstCoverInitializedNameError=te||this.context.firstCoverInitializedNameError,Me},ae.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},ae.prototype.parsePrimaryExpression=function(){var T,O,te,D=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),T=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(D,new _e.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(O.value,te));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal("true"===O.value,te));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(null,te));break;case 10:T=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,T=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":T=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":T=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,O=this.nextRegexToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.RegexLiteral(O.regex,te,O.pattern,O.flags));break;default:T=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?T=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?T=this.finalize(D,new _e.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?T=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),T=this.finalize(D,new _e.ThisExpression)):T=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:T=this.throwUnexpectedToken(this.nextToken())}return T},ae.prototype.parseSpreadElement=function(){var D=this.createNode();this.expect("...");var T=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(D,new _e.SpreadElement(T))},ae.prototype.parseArrayInitializer=function(){var D=this.createNode(),T=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),T.push(null);else if(this.match("...")){var O=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),T.push(O)}else T.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(D,new _e.ArrayExpression(T))},ae.prototype.parsePropertyMethod=function(D){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var T=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=D.simple;var te=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&D.firstRestricted&&this.tolerateUnexpectedToken(D.firstRestricted,D.message),this.context.strict&&D.stricted&&this.tolerateUnexpectedToken(D.stricted,D.message),this.context.strict=T,this.context.allowStrictDirective=O,te},ae.prototype.parsePropertyMethodFunction=function(){var T=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(T,new _e.FunctionExpression(null,te.params,Me,!1))},ae.prototype.parsePropertyMethodAsyncFunction=function(){var D=this.createNode(),T=this.context.allowYield,O=this.context.await;this.context.allowYield=!1,this.context.await=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=T,this.context.await=O,this.finalize(D,new _e.AsyncFunctionExpression(null,te.params,Me))},ae.prototype.parseObjectPropertyKey=function(){var O,D=this.createNode(),T=this.nextToken();switch(T.type){case 8:case 6:this.context.strict&&T.octal&&this.tolerateUnexpectedToken(T,Ge.Messages.StrictOctalLiteral);var te=this.getTokenRaw(T);O=this.finalize(D,new _e.Literal(T.value,te));break;case 3:case 1:case 5:case 4:O=this.finalize(D,new _e.Identifier(T.value));break;case 7:"["===T.value?(O=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):O=this.throwUnexpectedToken(T);break;default:O=this.throwUnexpectedToken(T)}return O},ae.prototype.isPropertyKey=function(D,T){return D.type===Ve.Syntax.Identifier&&D.name===T||D.type===Ve.Syntax.Literal&&D.value===T},ae.prototype.parseObjectProperty=function(D){var te,T=this.createNode(),O=this.lookahead,Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(3===O.type){var rn=O.value;this.nextToken(),kt=this.match("["),Me=(wn=!(this.hasLineTerminator||"async"!==rn||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(T,new _e.Identifier(rn))}else this.match("*")?this.nextToken():(kt=this.match("["),Me=this.parseObjectPropertyKey());var Mi=this.qualifiedPropertyName(this.lookahead);if(3===O.type&&!wn&&"get"===O.value&&Mi)te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===O.type&&!wn&&"set"===O.value&&Mi)te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===O.type&&"*"===O.value&&Mi)te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0;else if(Me||this.throwUnexpectedToken(this.lookahead),te="init",this.match(":")&&!wn)!kt&&this.isPropertyKey(Me,"__proto__")&&(D.value&&this.tolerateError(Ge.Messages.DuplicateProtoProperty),D.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0;else if(3===O.type)if(rn=this.finalize(T,new _e.Identifier(O.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Wt=!0;var zr=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(T,new _e.AssignmentPattern(rn,zr))}else Wt=!0,Je=rn;else this.throwUnexpectedToken(this.nextToken());return this.finalize(T,new _e.Property(te,Me,kt,Je,jt,Wt))},ae.prototype.parseObjectInitializer=function(){var D=this.createNode();this.expect("{");for(var T=[],O={value:!1};!this.match("}");)T.push(this.parseObjectProperty(O)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(D,new _e.ObjectExpression(T))},ae.prototype.parseTemplateHead=function(){Oe.assert(this.lookahead.head,"Template literal must start with a template head");var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateLiteral=function(){var D=this.createNode(),T=[],O=[],te=this.parseTemplateHead();for(O.push(te);!te.tail;)T.push(this.parseExpression()),te=this.parseTemplateElement(),O.push(te);return this.finalize(D,new _e.TemplateLiteral(O,T))},ae.prototype.reinterpretExpressionAsPattern=function(D){switch(D.type){case Ve.Syntax.Identifier:case Ve.Syntax.MemberExpression:case Ve.Syntax.RestElement:case Ve.Syntax.AssignmentPattern:break;case Ve.Syntax.SpreadElement:D.type=Ve.Syntax.RestElement,this.reinterpretExpressionAsPattern(D.argument);break;case Ve.Syntax.ArrayExpression:D.type=Ve.Syntax.ArrayPattern;for(var T=0;T")||this.expect("=>"),D={type:se,params:[],async:!1};else{var T=this.lookahead,O=[];if(this.match("..."))D=this.parseRestElement(O),this.expect(")"),this.match("=>")||this.expect("=>"),D={type:se,params:[D],async:!1};else{var te=!1;if(this.context.isBindingElement=!0,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Me=[];for(this.context.isAssignmentTarget=!1,Me.push(D);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(D.type===Ve.Syntax.Identifier&&"yield"===D.name&&(te=!0,D={type:se,params:[D],async:!1}),!te)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),D.type===Ve.Syntax.SequenceExpression)for(Je=0;Je")){for(var jt=0;jt0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Me=[D,this.lookahead],Je=T,kt=this.isolateCoverGrammar(this.parseExponentiationExpression),jt=[Je,O.value,kt],Wt=[te];!((te=this.binaryPrecedence(this.lookahead))<=0);){for(;jt.length>2&&te<=Wt[Wt.length-1];){kt=jt.pop();var wn=jt.pop();Wt.pop(),Je=jt.pop(),Me.pop();var rn=this.startNode(Me[Me.length-1]);jt.push(this.finalize(rn,new _e.BinaryExpression(wn,Je,kt)))}jt.push(this.nextToken().value),Wt.push(te),Me.push(this.lookahead),jt.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Mi=jt.length-1;T=jt[Mi];for(var zr=Me.pop();Mi>1;){var Xr=Me.pop();rn=this.startNode(Xr,zr&&zr.lineStart),T=this.finalize(rn,new _e.BinaryExpression(wn=jt[Mi-1],jt[Mi-2],T)),Mi-=2,zr=Xr}}return T},ae.prototype.parseConditionalExpression=function(){var D=this.lookahead,T=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var O=this.context.allowIn;this.context.allowIn=!0;var te=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=O,this.expect(":");var Me=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(D),new _e.ConditionalExpression(T,te,Me)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return T},ae.prototype.checkPatternParam=function(D,T){switch(T.type){case Ve.Syntax.Identifier:this.validateParam(D,T,T.name);break;case Ve.Syntax.RestElement:this.checkPatternParam(D,T.argument);break;case Ve.Syntax.AssignmentPattern:this.checkPatternParam(D,T.left);break;case Ve.Syntax.ArrayPattern:for(var O=0;O")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Me=D.async,Je=this.reinterpretAsCoverFormalsList(D);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var kt=this.context.strict,jt=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Wt=this.context.allowYield,wn=this.context.await;this.context.allowYield=!0,this.context.await=Me;var rn=this.startNode(T);this.expect("=>");var Mi=void 0;if(this.match("{")){var zr=this.context.allowIn;this.context.allowIn=!0,Mi=this.parseFunctionSourceElements(),this.context.allowIn=zr}else Mi=this.isolateCoverGrammar(this.parseAssignmentExpression);var Xr=Mi.type!==Ve.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),D=this.finalize(rn,Me?new _e.AsyncArrowFunctionExpression(Je.params,Mi,Xr):new _e.ArrowFunctionExpression(Je.params,Mi,Xr)),this.context.strict=kt,this.context.allowStrictDirective=jt,this.context.allowYield=Wt,this.context.await=wn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Ge.Messages.InvalidLHSInAssignment),this.context.strict&&D.type===Ve.Syntax.Identifier){var hs=D;this.scanner.isRestrictedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(D):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(O=this.nextToken()).value,tr=this.isolateCoverGrammar(this.parseAssignmentExpression);D=this.finalize(this.startNode(T),new _e.AssignmentExpression(Ya,D,tr)),this.context.firstCoverInitializedNameError=null}}return D},ae.prototype.parseExpression=function(){var D=this.lookahead,T=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var O=[];for(O.push(T);2!==this.lookahead.type&&this.match(",");)this.nextToken(),O.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(D),new _e.SequenceExpression(O))}return T},ae.prototype.parseStatementListItem=function(){var D;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalExportDeclaration),D=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalImportDeclaration),D=this.parseImportDeclaration();break;case"const":D=this.parseLexicalDeclaration({inFor:!1});break;case"function":D=this.parseFunctionDeclaration();break;case"class":D=this.parseClassDeclaration();break;case"let":D=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:D=this.parseStatement()}else D=this.parseStatement();return D},ae.prototype.parseBlock=function(){var D=this.createNode();this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseStatementListItem());return this.expect("}"),this.finalize(D,new _e.BlockStatement(T))},ae.prototype.parseLexicalBinding=function(D,T){var O=this.createNode(),Me=this.parsePattern([],D);this.context.strict&&Me.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(Me.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Je=null;return"const"===D?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Ge.Messages.DeclarationMissingInitializer,"const")):(!T.inFor&&Me.type!==Ve.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(O,new _e.VariableDeclarator(Me,Je))},ae.prototype.parseBindingList=function(D,T){for(var O=[this.parseLexicalBinding(D,T)];this.match(",");)this.nextToken(),O.push(this.parseLexicalBinding(D,T));return O},ae.prototype.isLexicalDeclaration=function(){var D=this.scanner.saveState();this.scanner.scanComments();var T=this.scanner.lex();return this.scanner.restoreState(D),3===T.type||7===T.type&&"["===T.value||7===T.type&&"{"===T.value||4===T.type&&"let"===T.value||4===T.type&&"yield"===T.value},ae.prototype.parseLexicalDeclaration=function(D){var T=this.createNode(),O=this.nextToken().value;Oe.assert("let"===O||"const"===O,"Lexical declaration must be either let or const");var te=this.parseBindingList(O,D);return this.consumeSemicolon(),this.finalize(T,new _e.VariableDeclaration(te,O))},ae.prototype.parseBindingRestElement=function(D,T){var O=this.createNode();this.expect("...");var te=this.parsePattern(D,T);return this.finalize(O,new _e.RestElement(te))},ae.prototype.parseArrayPattern=function(D,T){var O=this.createNode();this.expect("[");for(var te=[];!this.match("]");)if(this.match(","))this.nextToken(),te.push(null);else{if(this.match("...")){te.push(this.parseBindingRestElement(D,T));break}te.push(this.parsePatternWithDefault(D,T)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(O,new _e.ArrayPattern(te))},ae.prototype.parsePropertyPattern=function(D,T){var kt,jt,O=this.createNode(),te=!1,Me=!1;if(3===this.lookahead.type){var Wt=this.lookahead;kt=this.parseVariableIdentifier();var wn=this.finalize(O,new _e.Identifier(Wt.value));if(this.match("=")){D.push(Wt),Me=!0,this.nextToken();var rn=this.parseAssignmentExpression();jt=this.finalize(this.startNode(Wt),new _e.AssignmentPattern(wn,rn))}else this.match(":")?(this.expect(":"),jt=this.parsePatternWithDefault(D,T)):(D.push(Wt),Me=!0,jt=wn)}else te=this.match("["),kt=this.parseObjectPropertyKey(),this.expect(":"),jt=this.parsePatternWithDefault(D,T);return this.finalize(O,new _e.Property("init",kt,te,jt,!1,Me))},ae.prototype.parseObjectPattern=function(D,T){var O=this.createNode(),te=[];for(this.expect("{");!this.match("}");)te.push(this.parsePropertyPattern(D,T)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(O,new _e.ObjectPattern(te))},ae.prototype.parsePattern=function(D,T){var O;return this.match("[")?O=this.parseArrayPattern(D,T):this.match("{")?O=this.parseObjectPattern(D,T):(this.matchKeyword("let")&&("const"===T||"let"===T)&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.LetInLexicalBinding),D.push(this.lookahead),O=this.parseVariableIdentifier(T)),O},ae.prototype.parsePatternWithDefault=function(D,T){var O=this.lookahead,te=this.parsePattern(D,T);if(this.match("=")){this.nextToken();var Me=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Me,te=this.finalize(this.startNode(O),new _e.AssignmentPattern(te,Je))}return te},ae.prototype.parseVariableIdentifier=function(D){var T=this.createNode(),O=this.nextToken();return 4===O.type&&"yield"===O.value?this.context.strict?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(O):3!==O.type?this.context.strict&&4===O.type&&this.scanner.isStrictModeReservedWord(O.value)?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):(this.context.strict||"let"!==O.value||"var"!==D)&&this.throwUnexpectedToken(O):(this.context.isModule||this.context.await)&&3===O.type&&"await"===O.value&&this.tolerateUnexpectedToken(O),this.finalize(T,new _e.Identifier(O.value))},ae.prototype.parseVariableDeclaration=function(D){var T=this.createNode(),te=this.parsePattern([],"var");this.context.strict&&te.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(te.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Me=null;return this.match("=")?(this.nextToken(),Me=this.isolateCoverGrammar(this.parseAssignmentExpression)):te.type!==Ve.Syntax.Identifier&&!D.inFor&&this.expect("="),this.finalize(T,new _e.VariableDeclarator(te,Me))},ae.prototype.parseVariableDeclarationList=function(D){var T={inFor:D.inFor},O=[];for(O.push(this.parseVariableDeclaration(T));this.match(",");)this.nextToken(),O.push(this.parseVariableDeclaration(T));return O},ae.prototype.parseVariableStatement=function(){var D=this.createNode();this.expectKeyword("var");var T=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(D,new _e.VariableDeclaration(T,"var"))},ae.prototype.parseEmptyStatement=function(){var D=this.createNode();return this.expect(";"),this.finalize(D,new _e.EmptyStatement)},ae.prototype.parseExpressionStatement=function(){var D=this.createNode(),T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ExpressionStatement(T))},ae.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Ge.Messages.StrictFunction),this.parseStatement()},ae.prototype.parseIfStatement=function(){var T,D=this.createNode(),O=null;this.expectKeyword("if"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),O=this.parseIfClause())),this.finalize(D,new _e.IfStatement(te,T,O))},ae.prototype.parseDoWhileStatement=function(){var D=this.createNode();this.expectKeyword("do");var T=this.context.inIteration;this.context.inIteration=!0;var O=this.parseStatement();this.context.inIteration=T,this.expectKeyword("while"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(D,new _e.DoWhileStatement(O,te))},ae.prototype.parseWhileStatement=function(){var T,D=this.createNode();this.expectKeyword("while"),this.expect("(");var O=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var te=this.context.inIteration;this.context.inIteration=!0,T=this.parseStatement(),this.context.inIteration=te}return this.finalize(D,new _e.WhileStatement(O,T))},ae.prototype.parseForStatement=function(){var Me,Je,Xr,D=null,T=null,O=null,te=!0,kt=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){D=this.createNode(),this.nextToken();var jt=this.context.allowIn;this.context.allowIn=!1;var Wt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=jt,1===Wt.length&&this.matchKeyword("in")){var wn=Wt[0];wn.init&&(wn.id.type===Ve.Syntax.ArrayPattern||wn.id.type===Ve.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(Ge.Messages.ForInOfLoopInitializer,"for-in"),D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseExpression(),D=null}else 1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){D=this.createNode();var rn=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(jt=this.context.allowIn,this.context.allowIn=!1,Wt=this.parseBindingList(rn,{inFor:!0}),this.context.allowIn=jt,1===Wt.length&&null===Wt[0].init&&this.matchKeyword("in")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null):1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(this.consumeSemicolon(),D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)))):(D=this.finalize(D,new _e.Identifier(rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null)}else{var Mi=this.lookahead;if(jt=this.context.allowIn,this.context.allowIn=!1,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=jt,this.matchKeyword("in"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseExpression(),D=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1;else{if(this.match(",")){for(var zr=[D];this.match(",");)this.nextToken(),zr.push(this.isolateCoverGrammar(this.parseAssignmentExpression));D=this.finalize(this.startNode(Mi),new _e.SequenceExpression(zr))}this.expect(";")}}if(typeof Me>"u"&&(this.match(";")||(T=this.parseExpression()),this.expect(";"),this.match(")")||(O=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Xr=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var hs=this.context.inIteration;this.context.inIteration=!0,Xr=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=hs}return this.finalize(kt,typeof Me>"u"?new _e.ForStatement(D,T,O,Xr):te?new _e.ForInStatement(Me,Je,Xr):new _e.ForOfStatement(Me,Je,Xr))},ae.prototype.parseContinueStatement=function(){var D=this.createNode();this.expectKeyword("continue");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();T=O,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name)}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&this.throwError(Ge.Messages.IllegalContinue),this.finalize(D,new _e.ContinueStatement(T))},ae.prototype.parseBreakStatement=function(){var D=this.createNode();this.expectKeyword("break");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name),T=O}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(Ge.Messages.IllegalBreak),this.finalize(D,new _e.BreakStatement(T))},ae.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Ge.Messages.IllegalReturn);var D=this.createNode();this.expectKeyword("return");var O=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ReturnStatement(O))},ae.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Ge.Messages.StrictModeWith);var T,D=this.createNode();this.expectKeyword("with"),this.expect("(");var O=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseStatement()),this.finalize(D,new _e.WithStatement(O,T))},ae.prototype.parseSwitchCase=function(){var T,D=this.createNode();this.matchKeyword("default")?(this.nextToken(),T=null):(this.expectKeyword("case"),T=this.parseExpression()),this.expect(":");for(var O=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)O.push(this.parseStatementListItem());return this.finalize(D,new _e.SwitchCase(T,O))},ae.prototype.parseSwitchStatement=function(){var D=this.createNode();this.expectKeyword("switch"),this.expect("(");var T=this.parseExpression();this.expect(")");var O=this.context.inSwitch;this.context.inSwitch=!0;var te=[],Me=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Me&&this.throwError(Ge.Messages.MultipleDefaultsInSwitch),Me=!0),te.push(Je)}return this.expect("}"),this.context.inSwitch=O,this.finalize(D,new _e.SwitchStatement(T,te))},ae.prototype.parseLabelledStatement=function(){var O,D=this.createNode(),T=this.parseExpression();if(T.type===Ve.Syntax.Identifier&&this.match(":")){this.nextToken();var te=T,Me="$"+te.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Me)&&this.throwError(Ge.Messages.Redeclaration,"Label",te.name),this.context.labelSet[Me]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var kt=this.lookahead,jt=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(kt,Ge.Messages.StrictFunction):jt.generator&&this.tolerateUnexpectedToken(kt,Ge.Messages.GeneratorInLegacyContext),Je=jt}else Je=this.parseStatement();delete this.context.labelSet[Me],O=new _e.LabeledStatement(te,Je)}else this.consumeSemicolon(),O=new _e.ExpressionStatement(T);return this.finalize(D,O)},ae.prototype.parseThrowStatement=function(){var D=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Ge.Messages.NewlineAfterThrow);var T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ThrowStatement(T))},ae.prototype.parseCatchClause=function(){var D=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var T=[],O=this.parsePattern(T),te={},Me=0;Me0&&this.tolerateError(Ge.Messages.BadGetterArity);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseSetterMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();1!==te.params.length?this.tolerateError(Ge.Messages.BadSetterArity):te.params[0]instanceof _e.RestElement&&this.tolerateError(Ge.Messages.BadSetterRestParameter);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseGeneratorMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();this.context.allowYield=!1;var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,!0))},ae.prototype.isStartOfExpression=function(){var D=!0,T=this.lookahead.value;switch(this.lookahead.type){case 7:D="["===T||"("===T||"{"===T||"+"===T||"-"===T||"!"===T||"~"===T||"++"===T||"--"===T||"/"===T||"/="===T;break;case 4:D="class"===T||"delete"===T||"function"===T||"let"===T||"new"===T||"super"===T||"this"===T||"typeof"===T||"void"===T||"yield"===T}return D},ae.prototype.parseYieldExpression=function(){var D=this.createNode();this.expectKeyword("yield");var T=null,O=!1;if(!this.hasLineTerminator){var te=this.context.allowYield;this.context.allowYield=!1,(O=this.match("*"))?(this.nextToken(),T=this.parseAssignmentExpression()):this.isStartOfExpression()&&(T=this.parseAssignmentExpression()),this.context.allowYield=te}return this.finalize(D,new _e.YieldExpression(T,O))},ae.prototype.parseClassElement=function(D){var T=this.lookahead,O=this.createNode(),te="",Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(this.match("*"))this.nextToken();else if(kt=this.match("["),"static"===(Me=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(T=this.lookahead,Wt=!0,kt=this.match("["),this.match("*")?this.nextToken():Me=this.parseObjectPropertyKey()),3===T.type&&!this.hasLineTerminator&&"async"===T.value){var Mi=this.lookahead.value;":"!==Mi&&"("!==Mi&&"*"!==Mi&&(wn=!0,T=this.lookahead,Me=this.parseObjectPropertyKey(),3===T.type&&"constructor"===T.value&&this.tolerateUnexpectedToken(T,Ge.Messages.ConstructorIsAsync))}var zr=this.qualifiedPropertyName(this.lookahead);return 3===T.type?"get"===T.value&&zr?(te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===T.value&&zr&&(te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===T.type&&"*"===T.value&&zr&&(te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0),!te&&Me&&this.match("(")&&(te="init",Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0),te||this.throwUnexpectedToken(this.lookahead),"init"===te&&(te="method"),kt||(Wt&&this.isPropertyKey(Me,"prototype")&&this.throwUnexpectedToken(T,Ge.Messages.StaticPrototype),!Wt&&this.isPropertyKey(Me,"constructor")&&(("method"!==te||!jt||Je&&Je.generator)&&this.throwUnexpectedToken(T,Ge.Messages.ConstructorSpecialMethod),D.value?this.throwUnexpectedToken(T,Ge.Messages.DuplicateConstructor):D.value=!0,te="constructor")),this.finalize(O,new _e.MethodDefinition(Me,kt,Je,te,Wt))},ae.prototype.parseClassElementList=function(){var D=[],T={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():D.push(this.parseClassElement(T));return this.expect("}"),D},ae.prototype.parseClassBody=function(){var D=this.createNode(),T=this.parseClassElementList();return this.finalize(D,new _e.ClassBody(T))},ae.prototype.parseClassDeclaration=function(D){var T=this.createNode(),O=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var te=D&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Me=null;this.matchKeyword("extends")&&(this.nextToken(),Me=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=O,this.finalize(T,new _e.ClassDeclaration(te,Me,Je))},ae.prototype.parseClassExpression=function(){var D=this.createNode(),T=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var O=3===this.lookahead.type?this.parseVariableIdentifier():null,te=null;this.matchKeyword("extends")&&(this.nextToken(),te=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Me=this.parseClassBody();return this.context.strict=T,this.finalize(D,new _e.ClassExpression(O,te,Me))},ae.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Module(T))},ae.prototype.parseScript=function(){for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Script(T))},ae.prototype.parseModuleSpecifier=function(){var D=this.createNode();8!==this.lookahead.type&&this.throwError(Ge.Messages.InvalidModuleSpecifier);var T=this.nextToken(),O=this.getTokenRaw(T);return this.finalize(D,new _e.Literal(T.value,O))},ae.prototype.parseImportSpecifier=function(){var T,O,D=this.createNode();return 3===this.lookahead.type?(O=T=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseVariableIdentifier())):(O=T=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),O=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(D,new _e.ImportSpecifier(O,T))},ae.prototype.parseNamedImports=function(){this.expect("{");for(var D=[];!this.match("}");)D.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),D},ae.prototype.parseImportDefaultSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName();return this.finalize(D,new _e.ImportDefaultSpecifier(T))},ae.prototype.parseImportNamespaceSpecifier=function(){var D=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Ge.Messages.NoAsAfterImportNamespace),this.nextToken();var T=this.parseIdentifierName();return this.finalize(D,new _e.ImportNamespaceSpecifier(T))},ae.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalImportDeclaration);var D=this.createNode();this.expectKeyword("import");var T,O=[];return 8===this.lookahead.type||(this.match("{")?O=O.concat(this.parseNamedImports()):this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(O.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.match("{")?O=O.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),T=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(D,new _e.ImportDeclaration(O,T))},ae.prototype.parseExportSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName(),O=T;return this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseIdentifierName()),this.finalize(D,new _e.ExportSpecifier(T,O))},ae.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalExportDeclaration);var T,D=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var O=this.parseFunctionDeclaration(!0);T=this.finalize(D,new _e.ExportDefaultDeclaration(O))}else this.matchKeyword("class")?(O=this.parseClassDeclaration(!0),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):this.matchContextualKeyword("async")?(O=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):(this.matchContextualKeyword("from")&&this.throwError(Ge.Messages.UnexpectedToken,this.lookahead.value),O=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Me=this.parseModuleSpecifier();this.consumeSemicolon(),T=this.finalize(D,new _e.ExportAllDeclaration(Me))}else if(4===this.lookahead.type){switch(O=void 0,this.lookahead.value){case"let":case"const":O=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":O=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null))}else if(this.matchAsyncFunction())O=this.parseFunctionDeclaration(),T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null));else{var Je=[],kt=null,jt=!1;for(this.expect("{");!this.match("}");)jt=jt||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),kt=this.parseModuleSpecifier(),this.consumeSemicolon()):jt?this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),T=this.finalize(D,new _e.ExportNamedDeclaration(null,Je,kt))}return T},ae}();De.Parser=ue},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.assert=function rt(Oe,dt){if(!Oe)throw new Error("ASSERT: "+dt)}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt=function(){function Oe(){this.errors=[],this.tolerant=!1}return Oe.prototype.recordError=function(dt){this.errors.push(dt)},Oe.prototype.tolerate=function(dt){if(!this.tolerant)throw dt;this.recordError(dt)},Oe.prototype.constructError=function(dt,Ge){var _e=new Error(dt);try{throw _e}catch(et){Object.create&&Object.defineProperty&&(_e=Object.create(et),Object.defineProperty(_e,"column",{value:Ge}))}return _e},Oe.prototype.createError=function(dt,Ge,_e,et){var ve=this.constructError("Line "+Ge+": "+et,_e);return ve.index=dt,ve.lineNumber=Ge,ve.description=et,ve},Oe.prototype.throwError=function(dt,Ge,_e,et){throw this.createError(dt,Ge,_e,et)},Oe.prototype.tolerateError=function(dt,Ge,_e,et){var Ve=this.createError(dt,Ge,_e,et);if(!this.tolerant)throw Ve;this.recordError(Ve)},Oe}();De.ErrorHandler=rt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(4),Ge=rt(11);function _e(ve){return"0123456789abcdef".indexOf(ve.toLowerCase())}function et(ve){return"01234567".indexOf(ve)}var Ve=function(){function ve(se,ue){this.source=se,this.errorHandler=ue,this.trackComment=!1,this.isModule=!1,this.length=se.length,this.index=0,this.lineNumber=se.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ve.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ve.prototype.restoreState=function(se){this.index=se.index,this.lineNumber=se.lineNumber,this.lineStart=se.lineStart},ve.prototype.eof=function(){return this.index>=this.length},ve.prototype.throwUnexpectedToken=function(se){return void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.tolerateUnexpectedToken=function(se){void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.skipSingleLineComment=function(se){var ae,D,ue=[];for(this.trackComment&&(ue=[],ae=this.index-se,D={start:{line:this.lineNumber,column:this.index-this.lineStart-se},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(++this.index,dt.Character.isLineTerminator(T))return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart-1},ue.push({multiLine:!1,slice:[ae+se,this.index-1],range:[ae,this.index-1],loc:D})),13===T&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue}return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart},ue.push({multiLine:!1,slice:[ae+se,this.index],range:[ae,this.index],loc:D})),ue},ve.prototype.skipMultiLineComment=function(){var ue,ae,se=[];for(this.trackComment&&(se=[],ue=this.index-2,ae={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var D=this.source.charCodeAt(this.index);if(dt.Character.isLineTerminator(D))13===D&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===D){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index-2],range:[ue,this.index],loc:ae})),se;++this.index}else++this.index}return this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index],range:[ue,this.index],loc:ae})),this.tolerateUnexpectedToken(),se},ve.prototype.scanComments=function(){var se;this.trackComment&&(se=[]);for(var ue=0===this.index;!this.eof();){var ae=this.source.charCodeAt(this.index);if(dt.Character.isWhiteSpace(ae))++this.index;else if(dt.Character.isLineTerminator(ae))++this.index,13===ae&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue=!0;else if(47===ae)if(47===(ae=this.source.charCodeAt(this.index+1))){this.index+=2;var D=this.skipSingleLineComment(2);this.trackComment&&(se=se.concat(D)),ue=!0}else{if(42!==ae)break;this.index+=2,D=this.skipMultiLineComment(),this.trackComment&&(se=se.concat(D))}else if(ue&&45===ae){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,D=this.skipSingleLineComment(3),this.trackComment&&(se=se.concat(D))}else{if(60!==ae||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,D=this.skipSingleLineComment(4),this.trackComment&&(se=se.concat(D))}}return se},ve.prototype.isFutureReservedWord=function(se){switch(se){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ve.prototype.isStrictModeReservedWord=function(se){switch(se){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ve.prototype.isRestrictedWord=function(se){return"eval"===se||"arguments"===se},ve.prototype.isKeyword=function(se){switch(se.length){case 2:return"if"===se||"in"===se||"do"===se;case 3:return"var"===se||"for"===se||"new"===se||"try"===se||"let"===se;case 4:return"this"===se||"else"===se||"case"===se||"void"===se||"with"===se||"enum"===se;case 5:return"while"===se||"break"===se||"catch"===se||"throw"===se||"const"===se||"yield"===se||"class"===se||"super"===se;case 6:return"return"===se||"typeof"===se||"delete"===se||"switch"===se||"export"===se||"import"===se;case 7:return"default"===se||"finally"===se||"extends"===se;case 8:return"function"===se||"continue"===se||"debugger"===se;case 10:return"instanceof"===se;default:return!1}},ve.prototype.codePointAt=function(se){var ue=this.source.charCodeAt(se);if(ue>=55296&&ue<=56319){var ae=this.source.charCodeAt(se+1);ae>=56320&&ae<=57343&&(ue=1024*(ue-55296)+ae-56320+65536)}return ue},ve.prototype.scanHexEscape=function(se){for(var ue="u"===se?4:2,ae=0,D=0;D1114111||"}"!==se)&&this.throwUnexpectedToken(),dt.Character.fromCodePoint(ue)},ve.prototype.getIdentifier=function(){for(var se=this.index++;!this.eof();){var ue=this.source.charCodeAt(this.index);if(92===ue)return this.index=se,this.getComplexIdentifier();if(ue>=55296&&ue<57343)return this.index=se,this.getComplexIdentifier();if(!dt.Character.isIdentifierPart(ue))break;++this.index}return this.source.slice(se,this.index)},ve.prototype.getComplexIdentifier=function(){var ae,se=this.codePointAt(this.index),ue=dt.Character.fromCodePoint(se);for(this.index+=ue.length,92===se&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierStart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue=ae);!this.eof()&&(se=this.codePointAt(this.index),dt.Character.isIdentifierPart(se));)ue+=ae=dt.Character.fromCodePoint(se),this.index+=ae.length,92===se&&(ue=ue.substr(0,ue.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierPart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue+=ae);return ue},ve.prototype.octalToDecimal=function(se){var ue="0"!==se,ae=et(se);return!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ue=!0,ae=8*ae+et(this.source[this.index++]),"0123".indexOf(se)>=0&&!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ae=8*ae+et(this.source[this.index++]))),{code:ae,octal:ue}},ve.prototype.scanIdentifier=function(){var se,ue=this.index,ae=92===this.source.charCodeAt(ue)?this.getComplexIdentifier():this.getIdentifier();if(3!=(se=1===ae.length?3:this.isKeyword(ae)?4:"null"===ae?5:"true"===ae||"false"===ae?1:3)&&ue+ae.length!==this.index){var D=this.index;this.index=ue,this.tolerateUnexpectedToken(Ge.Messages.InvalidEscapedReservedWord),this.index=D}return{type:se,value:ae,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.scanPunctuator=function(){var se=this.index,ue=this.source[this.index];switch(ue){case"(":case"{":"{"===ue&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ue="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ue=this.source.substr(this.index,4))?this.index+=4:"==="===(ue=ue.substr(0,3))||"!=="===ue||">>>"===ue||"<<="===ue||">>="===ue||"**="===ue?this.index+=3:"&&"===(ue=ue.substr(0,2))||"||"===ue||"=="===ue||"!="===ue||"+="===ue||"-="===ue||"*="===ue||"/="===ue||"++"===ue||"--"===ue||"<<"===ue||">>"===ue||"&="===ue||"|="===ue||"^="===ue||"%="===ue||"<="===ue||">="===ue||"=>"===ue||"**"===ue?this.index+=2:"<>=!+-*%&|^/".indexOf(ue=this.source[this.index])>=0&&++this.index}return this.index===se&&this.throwUnexpectedToken(),{type:7,value:ue,lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanHexLiteral=function(se){for(var ue="";!this.eof()&&dt.Character.isHexDigit(this.source.charCodeAt(this.index));)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ue,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanBinaryLiteral=function(se){for(var ae,ue="";!this.eof()&&("0"===(ae=this.source[this.index])||"1"===ae);)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),this.eof()||(ae=this.source.charCodeAt(this.index),(dt.Character.isIdentifierStart(ae)||dt.Character.isDecimalDigit(ae))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ue,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanOctalLiteral=function(se,ue){var ae="",D=!1;for(dt.Character.isOctalDigit(se.charCodeAt(0))?(D=!0,ae="0"+this.source[this.index++]):++this.index;!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index));)ae+=this.source[this.index++];return!D&&0===ae.length&&this.throwUnexpectedToken(),(dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))||dt.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(ae,8),octal:D,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.isImplicitOctalLiteral=function(){for(var se=this.index+1;se=0&&(D=D.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(O,te,Me){var Je=parseInt(te||Me,16);return Je>1114111&&T.throwUnexpectedToken(Ge.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(D)}catch{this.throwUnexpectedToken(Ge.Messages.InvalidRegExp)}try{return new RegExp(se,ue)}catch{return null}},ve.prototype.scanRegExpBody=function(){var se=this.source[this.index];Oe.assert("/"===se,"Regular expression literal must start with a slash");for(var ue=this.source[this.index++],ae=!1,D=!1;!this.eof();)if(ue+=se=this.source[this.index++],"\\"===se)se=this.source[this.index++],dt.Character.isLineTerminator(se.charCodeAt(0))&&this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue+=se;else if(dt.Character.isLineTerminator(se.charCodeAt(0)))this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp);else if(ae)"]"===se&&(ae=!1);else{if("/"===se){D=!0;break}"["===se&&(ae=!0)}return D||this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue.substr(1,ue.length-2)},ve.prototype.scanRegExpFlags=function(){for(var ue="";!this.eof();){var ae=this.source[this.index];if(!dt.Character.isIdentifierPart(ae.charCodeAt(0)))break;if(++this.index,"\\"!==ae||this.eof())ue+=ae;else if("u"===(ae=this.source[this.index])){++this.index;var D=this.index,T=this.scanHexEscape("u");if(null!==T)for(ue+=T;D=55296&&se<57343&&dt.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ve}();De.Scanner=Ve},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.TokenName={},De.TokenName[1]="Boolean",De.TokenName[2]="",De.TokenName[3]="Identifier",De.TokenName[4]="Keyword",De.TokenName[5]="Null",De.TokenName[6]="Numeric",De.TokenName[7]="Punctuator",De.TokenName[8]="String",De.TokenName[9]="RegularExpression",De.TokenName[10]="Template"},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(10),dt=rt(12),Ge=rt(13),_e=function(){function Ve(){this.values=[],this.curly=this.paren=-1}return Ve.prototype.beforeFunctionExpression=function(ve){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ve)>=0},Ve.prototype.isRegexStart=function(){var ve=this.values[this.values.length-1],se=null!==ve;switch(ve){case"this":case"]":se=!1;break;case")":var ue=this.values[this.paren-1];se="if"===ue||"while"===ue||"for"===ue||"with"===ue;break;case"}":if(se=!1,"function"===this.values[this.curly-3])se=!!(ae=this.values[this.curly-4])&&!this.beforeFunctionExpression(ae);else if("function"===this.values[this.curly-4]){var ae;se=!(ae=this.values[this.curly-5])||!this.beforeFunctionExpression(ae)}}return se},Ve.prototype.push=function(ve){7===ve.type||4===ve.type?("{"===ve.value?this.curly=this.values.length:"("===ve.value&&(this.paren=this.values.length),this.values.push(ve.value)):this.values.push(null)},Ve}(),et=function(){function Ve(ve,se){this.errorHandler=new Oe.ErrorHandler,this.errorHandler.tolerant=!!se&&"boolean"==typeof se.tolerant&&se.tolerant,this.scanner=new dt.Scanner(ve,this.errorHandler),this.scanner.trackComment=!!se&&"boolean"==typeof se.comment&&se.comment,this.trackRange=!!se&&"boolean"==typeof se.range&&se.range,this.trackLoc=!!se&&"boolean"==typeof se.loc&&se.loc,this.buffer=[],this.reader=new _e}return Ve.prototype.errors=function(){return this.errorHandler.errors},Ve.prototype.getNextToken=function(){if(0===this.buffer.length){var ve=this.scanner.scanComments();if(this.scanner.trackComment)for(var se=0;se=ae.status}function et(ue){try{ue.dispatchEvent(new MouseEvent("click"))}catch{var ae=document.createEvent("MouseEvents");ae.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ue.dispatchEvent(ae)}}var Ve="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ve=Ve.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),se=Ve.saveAs||("object"!=typeof window||window!==Ve?function(){}:"download"in HTMLAnchorElement.prototype&&!ve?function(ue,ae,D){var T=Ve.URL||Ve.webkitURL,O=document.createElement("a");O.download=ae=ae||ue.name||"download",O.rel="noopener","string"==typeof ue?(O.href=ue,O.origin===location.origin?et(O):_e(O.href)?Ge(ue,ae,D):et(O,O.target="_blank")):(O.href=T.createObjectURL(ue),setTimeout(function(){T.revokeObjectURL(O.href)},4e4),setTimeout(function(){et(O)},0))}:"msSaveOrOpenBlob"in navigator?function(ue,ae,D){if(ae=ae||ue.name||"download","string"!=typeof ue)navigator.msSaveOrOpenBlob(function dt(ue,ae){return typeof ae>"u"?ae={autoBom:!1}:"object"!=typeof ae&&(console.warn("Deprecated: Expected third argument to be a object"),ae={autoBom:!ae}),ae.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ue.type)?new Blob(["\ufeff",ue],{type:ue.type}):ue}(ue,D),ae);else if(_e(ue))Ge(ue,ae,D);else{var T=document.createElement("a");T.href=ue,T.target="_blank",setTimeout(function(){et(T)})}}:function(ue,ae,D,T){if((T=T||open("","_blank"))&&(T.document.title=T.document.body.innerText="downloading..."),"string"==typeof ue)return Ge(ue,ae,D);var O="application/octet-stream"===ue.type,te=/constructor/i.test(Ve.HTMLElement)||Ve.safari,Me=/CriOS\/[\d]+/.test(navigator.userAgent);if((Me||O&&te||ve)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Wt=Je.result;Wt=Me?Wt:Wt.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=Wt:location=Wt,T=null},Je.readAsDataURL(ue)}else{var kt=Ve.URL||Ve.webkitURL,jt=kt.createObjectURL(ue);T?T.location=jt:location.href=jt,T=null,setTimeout(function(){kt.revokeObjectURL(jt)},4e4)}});Ve.saveAs=se.saveAs=se,Yt.exports=se})?De.apply(Tn,[]):De)&&(Yt.exports=Oe)},461:(Yt,Tn)=>{Tn.read=function(De,rt,Oe,dt,Ge){var _e,et,Ve=8*Ge-dt-1,ve=(1<>1,ue=-7,ae=Oe?Ge-1:0,D=Oe?-1:1,T=De[rt+ae];for(ae+=D,_e=T&(1<<-ue)-1,T>>=-ue,ue+=Ve;ue>0;_e=256*_e+De[rt+ae],ae+=D,ue-=8);for(et=_e&(1<<-ue)-1,_e>>=-ue,ue+=dt;ue>0;et=256*et+De[rt+ae],ae+=D,ue-=8);if(0===_e)_e=1-se;else{if(_e===ve)return et?NaN:1/0*(T?-1:1);et+=Math.pow(2,dt),_e-=se}return(T?-1:1)*et*Math.pow(2,_e-dt)},Tn.write=function(De,rt,Oe,dt,Ge,_e){var et,Ve,ve,se=8*_e-Ge-1,ue=(1<>1,D=23===Ge?Math.pow(2,-24)-Math.pow(2,-77):0,T=dt?0:_e-1,O=dt?1:-1,te=rt<0||0===rt&&1/rt<0?1:0;for(rt=Math.abs(rt),isNaN(rt)||rt===1/0?(Ve=isNaN(rt)?1:0,et=ue):(et=Math.floor(Math.log(rt)/Math.LN2),rt*(ve=Math.pow(2,-et))<1&&(et--,ve*=2),(rt+=et+ae>=1?D/ve:D*Math.pow(2,1-ae))*ve>=2&&(et++,ve/=2),et+ae>=ue?(Ve=0,et=ue):et+ae>=1?(Ve=(rt*ve-1)*Math.pow(2,Ge),et+=ae):(Ve=rt*Math.pow(2,ae-1)*Math.pow(2,Ge),et=0));Ge>=8;De[Oe+T]=255&Ve,T+=O,Ve/=256,Ge-=8);for(et=et<0;De[Oe+T]=255&et,T+=O,et/=256,se-=8);De[Oe+T-O]|=128*te}},870:(Yt,Tn,De)=>{"use strict";var rt=De(133);Yt.exports=rt},133:(Yt,Tn,De)=>{"use strict";var rt=De(840),Oe=De(34);function dt(Ge){return function(){throw new Error("Function "+Ge+" is deprecated and cannot be used.")}}Yt.exports.Type=De(647),Yt.exports.Schema=De(372),Yt.exports.FAILSAFE_SCHEMA=De(746),Yt.exports.JSON_SCHEMA=De(147),Yt.exports.CORE_SCHEMA=De(192),Yt.exports.DEFAULT_SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_FULL_SCHEMA=De(94),Yt.exports.load=rt.load,Yt.exports.loadAll=rt.loadAll,Yt.exports.safeLoad=rt.safeLoad,Yt.exports.safeLoadAll=rt.safeLoadAll,Yt.exports.dump=Oe.dump,Yt.exports.safeDump=Oe.safeDump,Yt.exports.YAMLException=De(314),Yt.exports.MINIMAL_SCHEMA=De(746),Yt.exports.SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_SCHEMA=De(94),Yt.exports.scan=dt("scan"),Yt.exports.parse=dt("parse"),Yt.exports.compose=dt("compose"),Yt.exports.addConstructor=dt("addConstructor")},997:Yt=>{"use strict";function Tn(_e){return typeof _e>"u"||null===_e}Yt.exports.isNothing=Tn,Yt.exports.isObject=function De(_e){return"object"==typeof _e&&null!==_e},Yt.exports.toArray=function rt(_e){return Array.isArray(_e)?_e:Tn(_e)?[]:[_e]},Yt.exports.repeat=function dt(_e,et){var ve,Ve="";for(ve=0;ve{"use strict";var rt=De(997),Oe=De(314),dt=De(94),Ge=De(31),_e=Object.prototype.toString,et=Object.prototype.hasOwnProperty,Ve=9,ve=10,se=13,ue=32,ae=33,D=34,T=35,O=37,te=38,Me=39,Je=42,kt=44,jt=45,Wt=58,wn=61,rn=62,Mi=63,zr=64,Xr=91,hs=93,Ya=96,tr=123,mu=124,Sa=125,yn={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(pe){var yt,Ft,Kt;if(yt=pe.toString(16).toUpperCase(),pe<=255)Ft="x",Kt=2;else if(pe<=65535)Ft="u",Kt=4;else{if(!(pe<=4294967295))throw new Oe("code point within a string may not be greater than 0xFFFFFFFF");Ft="U",Kt=8}return"\\"+Ft+rt.repeat("0",Kt-yt.length)+yt}function Fc(pe){this.schema=pe.schema||dt,this.indent=Math.max(1,pe.indent||2),this.noArrayIndent=pe.noArrayIndent||!1,this.skipInvalid=pe.skipInvalid||!1,this.flowLevel=rt.isNothing(pe.flowLevel)?-1:pe.flowLevel,this.styleMap=function kd(pe,yt){var Ft,Kt,Xt,Pt,dn,qt,We;if(null===yt)return{};for(Ft={},Xt=0,Pt=(Kt=Object.keys(yt)).length;Xt0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}else{for(Pt=0;PtKt&&" "!==pe[Cn+1],Cn=Pt);else if(!Da(dn))return Ja;qt=Pt>0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}Xe=Xe||bt&&Pt-Cn-1>Kt&&" "!==pe[Cn+1]}return We||Xe?Ft>9&&Sd(pe)?Ja:Xe?vu:Dd:jr&&!Xt(pe)?Nc:Oc}(yt,Kt||pe.flowLevel>-1&&Ft>=pe.flowLevel,pe.indent,Pt,function qt(We){return function Co(pe,yt){var Ft,Kt;for(Ft=0,Kt=pe.implicitTypes.length;Ft"+ml(yt,pe.indent)+Te(gu(function W(pe,yt){for(var Pt,dn,Ft=/(\n+)([^\n]*)/g,Kt=(Xe=void 0,Xe=pe.indexOf("\n"),Ft.lastIndex=Xe=-1!==Xe?Xe:pe.length,ee(pe.slice(0,Xe),yt)),Xt="\n"===pe[0]||" "===pe[0];dn=Ft.exec(pe);){var We=dn[2];Pt=" "===We[0],Kt+=dn[1]+(Xt||Pt||""===We?"":"\n")+ee(We,yt),Xt=Pt}var Xe;return Kt}(yt,Pt),Xt));case Ja:return'"'+function Ne(pe){for(var Ft,Kt,Xt,yt="",Pt=0;Pt=55296&&Ft<=56319&&(Kt=pe.charCodeAt(Pt+1))>=56320&&Kt<=57343?(yt+=Kn(1024*(Ft-55296)+Kt-56320+65536),Pt++):yt+=!(Xt=yn[Ft])&&Da(Ft)?pe[Pt]:Xt||Kn(Ft);return yt}(yt)+'"';default:throw new Oe("impossible error: invalid scalar style")}}()}function ml(pe,yt){var Ft=Sd(pe)?String(yt):"",Kt="\n"===pe[pe.length-1];return Ft+(!Kt||"\n"!==pe[pe.length-2]&&"\n"!==pe?Kt?"":"-":"+")+"\n"}function Te(pe){return"\n"===pe[pe.length-1]?pe.slice(0,-1):pe}function ee(pe,yt){if(""===pe||" "===pe[0])return pe;for(var Kt,Pt,Ft=/ [^ ]/g,Xt=0,dn=0,qt=0,We="";Kt=Ft.exec(pe);)(qt=Kt.index)-Xt>yt&&(We+="\n"+pe.slice(Xt,Pt=dn>Xt?dn:qt),Xt=Pt+1),dn=qt;return We+="\n",(We+=pe.length-Xt>yt&&dn>Xt?pe.slice(Xt,dn)+"\n"+pe.slice(dn+1):pe.slice(Xt)).slice(1)}function A(pe,yt,Ft){var Kt,Xt,Pt,dn,qt,We;for(Pt=0,dn=(Xt=Ft?pe.explicitTypes:pe.implicitTypes).length;Pt tag resolver accepts not "'+We+'" style');Kt=qt.represent[We](yt,We)}pe.dump=Kt}return!0}return!1}function st(pe,yt,Ft,Kt,Xt,Pt){pe.tag=null,pe.dump=Ft,A(pe,Ft,!1)||A(pe,Ft,!0);var dn=_e.call(pe.dump);Kt&&(Kt=pe.flowLevel<0||pe.flowLevel>yt);var We,Xe,qt="[object Object]"===dn||"[object Array]"===dn;if(qt&&(Xe=-1!==(We=pe.duplicates.indexOf(Ft))),(null!==pe.tag&&"?"!==pe.tag||Xe||2!==pe.indent&&yt>0)&&(Xt=!1),Xe&&pe.usedDuplicates[We])pe.dump="*ref_"+We;else{if(qt&&Xe&&!pe.usedDuplicates[We]&&(pe.usedDuplicates[We]=!0),"[object Object]"===dn)Kt&&0!==Object.keys(pe.dump).length?(function nr(pe,yt,Ft,Kt){var qt,We,Xe,bt,Cn,jr,Xt="",Pt=pe.tag,dn=Object.keys(Ft);if(!0===pe.sortKeys)dn.sort();else if("function"==typeof pe.sortKeys)dn.sort(pe.sortKeys);else if(pe.sortKeys)throw new Oe("sortKeys must be a boolean or a function");for(qt=0,We=dn.length;qt1024)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+="?":jr+="? "),jr+=pe.dump,Cn&&(jr+=Ro(pe,yt)),st(pe,yt+1,bt,!0,Cn)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+=":":jr+=": ",Xt+=jr+=pe.dump));pe.tag=Pt,pe.dump=Xt||"{}"}(pe,yt,pe.dump,Xt),Xe&&(pe.dump="&ref_"+We+pe.dump)):(function Qt(pe,yt,Ft){var dn,qt,We,Xe,bt,Kt="",Xt=pe.tag,Pt=Object.keys(Ft);for(dn=0,qt=Pt.length;dn1024&&(bt+="? "),bt+=pe.dump+(pe.condenseFlow?'"':"")+":"+(pe.condenseFlow?"":" "),st(pe,yt,Xe,!1,!1)&&(Kt+=bt+=pe.dump));pe.tag=Xt,pe.dump="{"+Kt+"}"}(pe,yt,pe.dump),Xe&&(pe.dump="&ref_"+We+" "+pe.dump));else if("[object Array]"===dn){var bt=pe.noArrayIndent&&yt>0?yt-1:yt;Kt&&0!==pe.dump.length?(function zt(pe,yt,Ft,Kt){var dn,qt,Xt="",Pt=pe.tag;for(dn=0,qt=Ft.length;dn "+pe.dump)}return!0}function Tt(pe,yt){var Xt,Pt,Ft=[],Kt=[];for(Ut(pe,Ft,Kt),Xt=0,Pt=Kt.length;Xt{"use strict";function Tn(De,rt){Error.call(this),this.name="YAMLException",this.reason=De,this.mark=rt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Tn.prototype=Object.create(Error.prototype)).constructor=Tn,Tn.prototype.toString=function(rt){var Oe=this.name+": ";return Oe+=this.reason||"(unknown reason)",!rt&&this.mark&&(Oe+=" "+this.mark.toString()),Oe},Yt.exports=Tn},840:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(48),Ge=De(31),_e=De(94),et=Object.prototype.hasOwnProperty,Ve=1,ve=2,se=3,ue=4,ae=1,D=2,T=3,O=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,te=/[\x85\u2028\u2029]/,Me=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,kt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jt(A){return Object.prototype.toString.call(A)}function Wt(A){return 10===A||13===A}function wn(A){return 9===A||32===A}function rn(A){return 9===A||32===A||10===A||13===A}function Mi(A){return 44===A||91===A||93===A||123===A||125===A}function zr(A){var st;return 48<=A&&A<=57?A-48:97<=(st=32|A)&&st<=102?st-97+10:-1}function Xr(A){return 120===A?2:117===A?4:85===A?8:0}function hs(A){return 48<=A&&A<=57?A-48:-1}function Ya(A){return 48===A?"\0":97===A?"\x07":98===A?"\b":116===A||9===A?"\t":110===A?"\n":118===A?"\v":102===A?"\f":114===A?"\r":101===A?"\x1b":32===A?" ":34===A?'"':47===A?"/":92===A?"\\":78===A?"\x85":95===A?"\xa0":76===A?"\u2028":80===A?"\u2029":""}function tr(A){return A<=65535?String.fromCharCode(A):String.fromCharCode(55296+(A-65536>>10),56320+(A-65536&1023))}for(var mu=new Array(256),Sa=new Array(256),yn=0;yn<256;yn++)mu[yn]=Ya(yn)?1:0,Sa[yn]=Ya(yn);function Cd(A,st){this.input=A,this.filename=st.filename||null,this.schema=st.schema||_e,this.onWarning=st.onWarning||null,this.legacy=st.legacy||!1,this.json=st.json||!1,this.listener=st.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=A.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function kd(A,st){return new Oe(st,new dt(A.filename,A.input,A.position,A.line,A.position-A.lineStart))}function Kn(A,st){throw kd(A,st)}function Fc(A,st){A.onWarning&&A.onWarning.call(null,kd(A,st))}var gu={YAML:function(st,Tt,Ut){var Vt,mn,pe;null!==st.version&&Kn(st,"duplication of %YAML directive"),1!==Ut.length&&Kn(st,"YAML directive accepts exactly one argument"),null===(Vt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(st,"ill-formed argument of the YAML directive"),mn=parseInt(Vt[1],10),pe=parseInt(Vt[2],10),1!==mn&&Kn(st,"unacceptable YAML version of the document"),st.version=Ut[0],st.checkLineBreaks=pe<2,1!==pe&&2!==pe&&Fc(st,"unsupported YAML version of the document")},TAG:function(st,Tt,Ut){var Vt,mn;2!==Ut.length&&Kn(st,"TAG directive accepts exactly two arguments"),mn=Ut[1],Je.test(Vt=Ut[0])||Kn(st,"ill-formed tag handle (first argument) of the TAG directive"),et.call(st.tagMap,Vt)&&Kn(st,'there is a previously declared suffix for "'+Vt+'" tag handle'),kt.test(mn)||Kn(st,"ill-formed tag prefix (second argument) of the TAG directive"),st.tagMap[Vt]=mn}};function Ro(A,st,Tt,Ut){var Vt,mn,pe,yt;if(st1&&(A.result+=rt.repeat("\n",st-1))}function Ja(A,st){var Tt,Ft,Ut=A.tag,Vt=A.anchor,mn=[],yt=!1;for(null!==A.anchor&&(A.anchorMap[A.anchor]=mn),Ft=A.input.charCodeAt(A.position);0!==Ft&&45===Ft&&rn(A.input.charCodeAt(A.position+1));)if(yt=!0,A.position++,Zr(A,!0,-1)&&A.lineIndent<=st)mn.push(null),Ft=A.input.charCodeAt(A.position);else if(Tt=A.line,W(A,st,se,!1,!0),mn.push(A.result),Zr(A,!0,-1),Ft=A.input.charCodeAt(A.position),(A.line===Tt||A.lineIndent>st)&&0!==Ft)Kn(A,"bad indentation of a sequence entry");else if(A.lineIndentst?Ft=1:A.lineIndent===st?Ft=0:A.lineIndentst?Ft=1:A.lineIndent===st?Ft=0:A.lineIndentst)&&(W(A,st,ue,!0,Vt)&&(We?dn=A.result:qt=A.result),We||(lo(A,Kt,Xt,Pt,dn,qt,mn,pe),Pt=dn=qt=null),Zr(A,!0,-1),bt=A.input.charCodeAt(A.position)),A.lineIndent>st&&0!==bt)Kn(A,"bad indentation of a mapping entry");else if(A.lineIndent=0))break;0===Xt?Kn(A,"bad explicit indentation width of a block scalar; it cannot be less than one"):pe?Kn(A,"repeat of an indentation width identifier"):(yt=st+Xt-1,pe=!0)}if(wn(Pt)){do{Pt=A.input.charCodeAt(++A.position)}while(wn(Pt));if(35===Pt)do{Pt=A.input.charCodeAt(++A.position)}while(!Wt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Da(A),A.lineIndent=0,Pt=A.input.charCodeAt(A.position);(!pe||A.lineIndentyt&&(yt=A.lineIndent),Wt(Pt))Ft++;else{if(A.lineIndent0){for(Vt=pe,mn=0;Vt>0;Vt--)(pe=zr(yt=A.input.charCodeAt(++A.position)))>=0?mn=(mn<<4)+pe:Kn(A,"expected hexadecimal character");A.result+=tr(mn),A.position++}else Kn(A,"unknown escape sequence");Tt=Ut=A.position}else Wt(yt)?(Ro(A,Tt,Ut,!0),nc(A,Zr(A,!1,st)),Tt=Ut=A.position):A.position===A.lineStart&&pl(A)?Kn(A,"unexpected end of the document within a double quoted scalar"):(A.position++,Ut=A.position)}Kn(A,"unexpected end of the stream within a double quoted scalar")}(A,We)?Xt=!0:function Te(A){var st,Tt,Ut;if(42!==(Ut=A.input.charCodeAt(A.position)))return!1;for(Ut=A.input.charCodeAt(++A.position),st=A.position;0!==Ut&&!rn(Ut)&&!Mi(Ut);)Ut=A.input.charCodeAt(++A.position);return A.position===st&&Kn(A,"name of an alias node must contain at least one character"),Tt=A.input.slice(st,A.position),A.anchorMap.hasOwnProperty(Tt)||Kn(A,'unidentified alias "'+Tt+'"'),A.result=A.anchorMap[Tt],Zr(A,!0,-1),!0}(A)?(Xt=!0,(null!==A.tag||null!==A.anchor)&&Kn(A,"alias node should not have any properties")):function Sd(A,st,Tt){var Vt,mn,pe,yt,Ft,Kt,Xt,qt,Pt=A.kind,dn=A.result;if(rn(qt=A.input.charCodeAt(A.position))||Mi(qt)||35===qt||38===qt||42===qt||33===qt||124===qt||62===qt||39===qt||34===qt||37===qt||64===qt||96===qt||(63===qt||45===qt)&&(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt)))return!1;for(A.kind="scalar",A.result="",mn=pe=A.position,yt=!1;0!==qt;){if(58===qt){if(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt))break}else if(35===qt){if(rn(A.input.charCodeAt(A.position-1)))break}else{if(A.position===A.lineStart&&pl(A)||Tt&&Mi(qt))break;if(Wt(qt)){if(Ft=A.line,Kt=A.lineStart,Xt=A.lineIndent,Zr(A,!1,-1),A.lineIndent>=st){yt=!0,qt=A.input.charCodeAt(A.position);continue}A.position=pe,A.line=Ft,A.lineStart=Kt,A.lineIndent=Xt;break}}yt&&(Ro(A,mn,pe,!1),nc(A,A.line-Ft),mn=pe=A.position,yt=!1),wn(qt)||(pe=A.position+1),qt=A.input.charCodeAt(++A.position)}return Ro(A,mn,pe,!1),!!A.result||(A.kind=Pt,A.result=dn,!1)}(A,We,Ve===Tt)&&(Xt=!0,null===A.tag&&(A.tag="?")),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):0===Ft&&(Xt=yt&&Ja(A,Xe))),null!==A.tag&&"!"!==A.tag)if("?"===A.tag){for(null!==A.result&&"scalar"!==A.kind&&Kn(A,'unacceptable node kind for ! tag; it should be "scalar", not "'+A.kind+'"'),Pt=0,dn=A.implicitTypes.length;Pt tag; it should be "'+qt.kind+'", not "'+A.kind+'"'),qt.resolve(A.result)?(A.result=qt.construct(A.result),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):Kn(A,"cannot resolve a node with !<"+A.tag+"> explicit tag")):Kn(A,"unknown tag !<"+A.tag+">");return null!==A.listener&&A.listener("close",A),null!==A.tag||null!==A.anchor||Xt}function ee(A){var Tt,Ut,Vt,pe,st=A.position,mn=!1;for(A.version=null,A.checkLineBreaks=A.legacy,A.tagMap={},A.anchorMap={};0!==(pe=A.input.charCodeAt(A.position))&&(Zr(A,!0,-1),pe=A.input.charCodeAt(A.position),!(A.lineIndent>0||37!==pe));){for(mn=!0,pe=A.input.charCodeAt(++A.position),Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);for(Vt=[],(Ut=A.input.slice(Tt,A.position)).length<1&&Kn(A,"directive name must not be less than one character in length");0!==pe;){for(;wn(pe);)pe=A.input.charCodeAt(++A.position);if(35===pe){do{pe=A.input.charCodeAt(++A.position)}while(0!==pe&&!Wt(pe));break}if(Wt(pe))break;for(Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);Vt.push(A.input.slice(Tt,A.position))}0!==pe&&Da(A),et.call(gu,Ut)?gu[Ut](A,Ut,Vt):Fc(A,'unknown document directive "'+Ut+'"')}Zr(A,!0,-1),0===A.lineIndent&&45===A.input.charCodeAt(A.position)&&45===A.input.charCodeAt(A.position+1)&&45===A.input.charCodeAt(A.position+2)?(A.position+=3,Zr(A,!0,-1)):mn&&Kn(A,"directives end mark is expected"),W(A,A.lineIndent-1,ue,!1,!0),Zr(A,!0,-1),A.checkLineBreaks&&te.test(A.input.slice(st,A.position))&&Fc(A,"non-ASCII line breaks are interpreted as content"),A.documents.push(A.result),A.position===A.lineStart&&pl(A)?46===A.input.charCodeAt(A.position)&&(A.position+=3,Zr(A,!0,-1)):A.position"u"&&(Tt=st,st=null);var Ut=Ne(A,Tt);if("function"!=typeof st)return Ut;for(var Vt=0,mn=Ut.length;Vt"u"&&(Tt=st,st=null),nt(A,st,rt.extend({schema:Ge},Tt))},Yt.exports.safeLoad=function nr(A,st){return zt(A,rt.extend({schema:Ge},st))}},48:(Yt,Tn,De)=>{"use strict";var rt=De(997);function Oe(dt,Ge,_e,et,Ve){this.name=dt,this.buffer=Ge,this.position=_e,this.line=et,this.column=Ve}Oe.prototype.getSnippet=function(Ge,_e){var et,Ve,ve,se,ue;if(!this.buffer)return null;for(Ge=Ge||4,_e=_e||75,et="",Ve=this.position;Ve>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(Ve-1));)if(this.position-(Ve-=1)>_e/2-1){et=" ... ",Ve+=5;break}for(ve="",se=this.position;se_e/2-1){ve=" ... ",se-=5;break}return ue=this.buffer.slice(Ve,se),rt.repeat(" ",Ge)+et+ue+ve+"\n"+rt.repeat(" ",Ge+this.position-Ve+et.length)+"^"},Oe.prototype.toString=function(Ge){var _e,et="";return this.name&&(et+='in "'+this.name+'" '),et+="at line "+(this.line+1)+", column "+(this.column+1),Ge||(_e=this.getSnippet())&&(et+=":\n"+_e),et},Yt.exports=Oe},372:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(647);function Ge(Ve,ve,se){var ue=[];return Ve.include.forEach(function(ae){se=Ge(ae,ve,se)}),Ve[ve].forEach(function(ae){se.forEach(function(D,T){D.tag===ae.tag&&D.kind===ae.kind&&ue.push(T)}),se.push(ae)}),se.filter(function(ae,D){return-1===ue.indexOf(D)})}function et(Ve){this.include=Ve.include||[],this.implicit=Ve.implicit||[],this.explicit=Ve.explicit||[],this.implicit.forEach(function(ve){if(ve.loadKind&&"scalar"!==ve.loadKind)throw new Oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ge(this,"implicit",[]),this.compiledExplicit=Ge(this,"explicit",[]),this.compiledTypeMap=function _e(){var ve,se,Ve={scalar:{},sequence:{},mapping:{},fallback:{}};function ue(ae){Ve[ae.kind][ae.tag]=Ve.fallback[ae.tag]=ae}for(ve=0,se=arguments.length;ve{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(147)]})},94:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=rt.DEFAULT=new rt({include:[De(31)],explicit:[De(771),De(632),De(716)]})},31:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(192)],implicit:[De(934),De(996)],explicit:[De(486),De(166),De(711),De(738)]})},746:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({explicit:[De(464),De(322),De(71)]})},147:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(746)],implicit:[De(568),De(911),De(877),De(615)]})},647:(Yt,Tn,De)=>{"use strict";var rt=De(314),Oe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dt=["scalar","sequence","mapping"];Yt.exports=function _e(et,Ve){if(Ve=Ve||{},Object.keys(Ve).forEach(function(ve){if(-1===Oe.indexOf(ve))throw new rt('Unknown option "'+ve+'" is met in definition of "'+et+'" YAML type.')}),this.tag=et,this.kind=Ve.kind||null,this.resolve=Ve.resolve||function(){return!0},this.construct=Ve.construct||function(ve){return ve},this.instanceOf=Ve.instanceOf||null,this.predicate=Ve.predicate||null,this.represent=Ve.represent||null,this.defaultStyle=Ve.defaultStyle||null,this.styleAliases=function Ge(et){var Ve={};return null!==et&&Object.keys(et).forEach(function(ve){et[ve].forEach(function(se){Ve[String(se)]=ve})}),Ve}(Ve.styleAliases||null),-1===dt.indexOf(this.kind))throw new rt('Unknown kind "'+this.kind+'" is specified for "'+et+'" YAML type.')}},486:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(172).lW}catch{}var dt=De(647),Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function _e(se){if(null===se)return!1;var ue,ae,D=0,T=se.length,O=Ge;for(ae=0;ae64)){if(ue<0)return!1;D+=6}return D%8==0},construct:function et(se){var ue,ae,D=se.replace(/[\r\n=]/g,""),T=D.length,O=Ge,te=0,Me=[];for(ue=0;ue>16&255),Me.push(te>>8&255),Me.push(255&te)),te=te<<6|O.indexOf(D.charAt(ue));return 0==(ae=T%4*6)?(Me.push(te>>16&255),Me.push(te>>8&255),Me.push(255&te)):18===ae?(Me.push(te>>10&255),Me.push(te>>2&255)):12===ae&&Me.push(te>>4&255),rt?rt.from?rt.from(Me):new rt(Me):Me},predicate:function ve(se){return rt&&rt.isBuffer(se)},represent:function Ve(se){var D,T,ue="",ae=0,O=se.length,te=Ge;for(D=0;D>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]),ae=(ae<<8)+se[D];return 0==(T=O%3)?(ue+=te[ae>>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]):2===T?(ue+=te[ae>>10&63],ue+=te[ae>>4&63],ue+=te[ae<<2&63],ue+=te[64]):1===T&&(ue+=te[ae>>2&63],ue+=te[ae<<4&63],ue+=te[64],ue+=te[64]),ue}})},911:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!1;var et=_e.length;return 4===et&&("true"===_e||"True"===_e||"TRUE"===_e)||5===et&&("false"===_e||"False"===_e||"FALSE"===_e)},construct:function dt(_e){return"true"===_e||"True"===_e||"TRUE"===_e},predicate:function Ge(_e){return"[object Boolean]"===Object.prototype.toString.call(_e)},represent:{lowercase:function(_e){return _e?"true":"false"},uppercase:function(_e){return _e?"TRUE":"FALSE"},camelcase:function(_e){return _e?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647),dt=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),et=/^[-+]?[0-9]+e/;Yt.exports=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:function Ge(se){return!(null===se||!dt.test(se)||"_"===se[se.length-1])},construct:function _e(se){var ue,ae,D,T;return ae="-"===(ue=se.replace(/_/g,"").toLowerCase())[0]?-1:1,T=[],"+-".indexOf(ue[0])>=0&&(ue=ue.slice(1)),".inf"===ue?1===ae?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ue?NaN:ue.indexOf(":")>=0?(ue.split(":").forEach(function(O){T.unshift(parseFloat(O,10))}),ue=0,D=1,T.forEach(function(O){ue+=O*D,D*=60}),ae*ue):ae*parseFloat(ue,10)},predicate:function ve(se){return"[object Number]"===Object.prototype.toString.call(se)&&(se%1!=0||rt.isNegativeZero(se))},represent:function Ve(se,ue){var ae;if(isNaN(se))switch(ue){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===se)switch(ue){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===se)switch(ue){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(rt.isNegativeZero(se))return"-0.0";return ae=se.toString(10),et.test(ae)?ae.replace("e",".e"):ae},defaultStyle:"lowercase"})},877:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647);function dt(se){return 48<=se&&se<=57||65<=se&&se<=70||97<=se&&se<=102}function Ge(se){return 48<=se&&se<=55}function _e(se){return 48<=se&&se<=57}Yt.exports=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:function et(se){if(null===se)return!1;var T,ue=se.length,ae=0,D=!1;if(!ue)return!1;if(("-"===(T=se[ae])||"+"===T)&&(T=se[++ae]),"0"===T){if(ae+1===ue)return!0;if("b"===(T=se[++ae])){for(ae++;ae=0?"0b"+se.toString(2):"-0b"+se.toString(2).slice(1)},octal:function(se){return se>=0?"0"+se.toString(8):"-0"+se.toString(8).slice(1)},decimal:function(se){return se.toString(10)},hexadecimal:function(se){return se>=0?"0x"+se.toString(16).toUpperCase():"-0x"+se.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(797)}catch{typeof window<"u"&&(rt=window.esprima)}var dt=De(647);Yt.exports=new dt("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function Ge(ve){if(null===ve)return!1;try{var ue=rt.parse("("+ve+")",{range:!0});return!("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)}catch{return!1}},construct:function _e(ve){var D,se="("+ve+")",ue=rt.parse(se,{range:!0}),ae=[];if("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)throw new Error("Failed to resolve function");return ue.body[0].expression.params.forEach(function(T){ae.push(T.name)}),D=ue.body[0].expression.body.range,new Function(ae,"BlockStatement"===ue.body[0].expression.body.type?se.slice(D[0]+1,D[1]-1):"return "+se.slice(D[0],D[1]))},predicate:function Ve(ve){return"[object Function]"===Object.prototype.toString.call(ve)},represent:function et(ve){return ve.toString()}})},632:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Oe(et){if(null===et||0===et.length)return!1;var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return!("/"===Ve[0]&&(ve&&(se=ve[1]),se.length>3||"/"!==Ve[Ve.length-se.length-1]))},construct:function dt(et){var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return"/"===Ve[0]&&(ve&&(se=ve[1]),Ve=Ve.slice(1,Ve.length-se.length-1)),new RegExp(Ve,se)},predicate:function _e(et){return"[object RegExp]"===Object.prototype.toString.call(et)},represent:function Ge(et){var Ve="/"+et.source+"/";return et.global&&(Ve+="g"),et.multiline&&(Ve+="m"),et.ignoreCase&&(Ve+="i"),Ve}})},771:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Oe(){return!0},construct:function dt(){},predicate:function _e(et){return typeof et>"u"},represent:function Ge(){return""}})},71:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Oe){return null!==Oe?Oe:{}}})},996:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Oe(dt){return"<<"===dt||null===dt}})},568:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!0;var et=_e.length;return 1===et&&"~"===_e||4===et&&("null"===_e||"Null"===_e||"NULL"===_e)},construct:function dt(){return null},predicate:function Ge(_e){return null===_e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function Ge(et){if(null===et)return!0;var ve,se,ue,ae,D,Ve=[],T=et;for(ve=0,se=T.length;ve{"use strict";var rt=De(647),Oe=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function dt(_e){if(null===_e)return!0;var et,Ve,ve,se,ue,ae=_e;for(ue=new Array(ae.length),et=0,Ve=ae.length;et{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Oe){return null!==Oe?Oe:[]}})},738:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty;Yt.exports=new rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function dt(_e){if(null===_e)return!0;var et,Ve=_e;for(et in Ve)if(Oe.call(Ve,et)&&null!==Ve[et])return!1;return!0},construct:function Ge(_e){return null!==_e?_e:{}}})},464:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Oe){return null!==Oe?Oe:""}})},934:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function Ge(Ve){return null!==Ve&&(null!==Oe.exec(Ve)||null!==dt.exec(Ve))},construct:function _e(Ve){var ve,se,ue,ae,D,T,O,jt,te=0,Me=null;if(null===(ve=Oe.exec(Ve))&&(ve=dt.exec(Ve)),null===ve)throw new Error("Date resolve error");if(se=+ve[1],ue=+ve[2]-1,ae=+ve[3],!ve[4])return new Date(Date.UTC(se,ue,ae));if(D=+ve[4],T=+ve[5],O=+ve[6],ve[7]){for(te=ve[7].slice(0,3);te.length<3;)te+="0";te=+te}return ve[9]&&(Me=6e4*(60*+ve[10]+ +(ve[11]||0)),"-"===ve[9]&&(Me=-Me)),jt=new Date(Date.UTC(se,ue,ae,D,T,O,te)),Me&&jt.setTime(jt.getTime()-Me),jt},instanceOf:Date,represent:function et(Ve){return Ve.toISOString()}})}},Yt=>{Yt(Yt.s=440)}]); \ No newline at end of file diff --git a/console/ui/dist/prod/static/main.9fe54d698b3be879.js b/console/ui/dist/prod/static/main.9fe54d698b3be879.js deleted file mode 100644 index c1c38cd303..0000000000 --- a/console/ui/dist/prod/static/main.9fe54d698b3be879.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{440:(Yt,Tn,De)=>{"use strict";function rt(t){return"function"==typeof t}let Oe=!1;const dt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Oe&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Oe=t},get useDeprecatedSynchronousErrorHandling(){return Oe}};function Ge(t){setTimeout(()=>{throw t},0)}const _e={closed:!0,next(t){},error(t){if(dt.useDeprecatedSynchronousErrorHandling)throw t;Ge(t)},complete(){}},et=Array.isArray||(t=>t&&"number"==typeof t.length);function Ve(t){return null!==t&&"object"==typeof t}const se=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ue{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ue)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof se?e.errors:e),[])}ue.EMPTY=((t=new ue).closed=!0,t);const D="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class O extends ue{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_e;break;case 1:if(!n){this.destination=_e;break}if("object"==typeof n){n instanceof O?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new te(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new te(this,n,e,i)}}[D](){return this}static create(n,e,i){const r=new O(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class te extends O{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;rt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==_e&&(s=Object.create(e),rt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;dt.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=dt;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Ge(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Ge(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);dt.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),dt.useDeprecatedSynchronousErrorHandling)throw i;Ge(i)}}__tryOrSetError(n,e,i){if(!dt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return dt.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Ge(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const kt="function"==typeof Symbol&&Symbol.observable||"@@observable";function jt(t){return t}function wn(t){return 0===t.length?jt:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let rn=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof O)return t;if(t[D])return t[D]()}return t||n||e?new O(t,n,e):new O(_e)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||dt.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),dt.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){dt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Me(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof O?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Mi(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[kt](){return this}pipe(...e){return 0===e.length?this:wn(e)(this)}toPromise(e){return new(e=Mi(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Mi(t){if(t||(t=dt.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Xr=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class hs extends ue{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends O{constructor(n){super(n),this.destination=n}}let tr=(()=>{class t extends rn{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[D](){return new Ya(this)}lift(e){const i=new mu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Xr;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mu(n,e),t})();class mu extends tr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ue.EMPTY}}function Sa(t){return t&&"function"==typeof t.schedule}function yn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new kd(n,this.project,this.thisArg))}}class kd extends O{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function pl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const nc=t=>{if(t&&"function"==typeof t[kt])return(t=>n=>{const e=t[kt]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Zr(t))return Kn(t);if(pl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Ge),n))(t);if(t&&"function"==typeof t[Ro])return(t=>n=>{const e=t[Ro]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Ve(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Oc(t,n){return new rn(e=>{const i=new ue;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function co(t,n){return n?function da(t,n){if(null!=t){if(function vu(t){return t&&"function"==typeof t[kt]}(t))return function Sd(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>{const r=t[kt]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(pl(t))return function Nc(t,n){return new rn(e=>{const i=new ue;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Zr(t))return Oc(t,n);if(function Ja(t){return t&&"function"==typeof t[Ro]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new rn(e=>{const i=new ue;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Ro](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof rn?t:new rn(nc(t))}class ml extends O{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class W extends O{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Ne(t,n){if(!n.closed)return t instanceof rn?t.subscribe(n):nc(t)(n)}function nt(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(nt((r,o)=>co(t(r,o)).pipe(yn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new zt(t,e)))}class zt{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Qt(n,this.project,this.concurrent))}}class Qt extends W{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function A(t=Number.POSITIVE_INFINITY){return nt(jt,t)}function st(t,n){return n?Oc(t,n):new rn(Kn(t))}function Tt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Sa(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof rn?t[0]:A(n)(st(t,e))}function Ut(){return function(n){return n.lift(new Vt(n))}}class Vt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new mn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class mn extends O{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class pe extends rn{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ue,n.add(this.source.subscribe(new Ft(this.getSubject(),this))),n.closed&&(this._connection=null,n=ue.EMPTY)),n}refCount(){return Ut()(this)}}const yt=(()=>{const t=pe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Ft extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class dn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function qt(){return new tr}function We(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new dn(r,n));const o=Object.create(i,yt);return o.source=i,o.subjectFactory=r,o}}(qt)(t))}function Xe(t){for(let n in t)if(t[n]===Xe)return n;throw Error("Could not find renamed property on target object.")}function bt(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Cn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Cn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function jr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const Y0=Xe({__forward_ref__:Xe});function Gi(t){return t.__forward_ref__=Gi,t.toString=function(){return Cn(this())},t}function wi(t){return tT(t)?t():t}function tT(t){return"function"==typeof t&&t.hasOwnProperty(Y0)&&t.__forward_ref__===Gi}function nT(t){return t&&!!t.\u0275providers}const U_="https://g.co/ng/security#xss";class Ot extends Error{constructor(n,e){super(G_(n,e)),this.code=n}}function G_(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Ri(t){return"string"==typeof t?t:null==t?"":String(t)}function W_(t,n){throw new Ot(-201,!1)}function jc(t,n){null==t&&function to(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}(n,t,null,"!=")}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ci(t){return{providers:t.providers||[],imports:t.imports||[]}}function q_(t){return _L(t,X_)||_L(t,wL)}function _L(t,n){return t.hasOwnProperty(n)?t[n]:null}function xL(t){return t&&(t.hasOwnProperty(iT)||t.hasOwnProperty(hge))?t[iT]:null}const X_=Xe({\u0275prov:Xe}),iT=Xe({\u0275inj:Xe}),wL=Xe({ngInjectableDef:Xe}),hge=Xe({ngInjectorDef:Xe});var ki=(()=>((ki=ki||{})[ki.Default=0]="Default",ki[ki.Host=1]="Host",ki[ki.Self=2]="Self",ki[ki.SkipSelf=4]="SkipSelf",ki[ki.Optional=8]="Optional",ki))();let rT;function Pc(t){const n=rT;return rT=t,n}function CL(t,n,e){const i=q_(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ki.Optional?null:void 0!==n?n:void W_(Cn(t))}const $o=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),J0={},oT="__NG_DI_FLAG__",Y_="ngTempTokenPath",pge="ngTokenPath",mge=/\n/gm,gge="\u0275",kL="__source";let K0;function sg(t){const n=K0;return K0=t,n}function vge(t,n=ki.Default){if(void 0===K0)throw new Ot(-203,!1);return null===K0?CL(t,void 0,n):K0.get(t,n&ki.Optional?null:void 0,n)}function ct(t,n=ki.Default){return(function fge(){return rT}()||vge)(wi(t),n)}function ar(t,n=ki.Default){return ct(t,J_(n))}function J_(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function sT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),yu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(yu||(yu={})),yu))();const kh={},Yr=[],K_=Xe({\u0275cmp:Xe}),aT=Xe({\u0275dir:Xe}),lT=Xe({\u0275pipe:Xe}),DL=Xe({\u0275mod:Xe}),Sh=Xe({\u0275fac:Xe}),Z0=Xe({__NG_ELEMENT_ID__:Xe});let xge=0;function Rt(t){return vf(()=>{const e=!0===t.standalone,i={},r={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&t.dependencies||null,getStandaloneInjector:null,selectors:t.selectors||Yr,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||yu.Emulated,id:"c"+xge++,styles:t.styles||Yr,_:null,setInput:null,schemas:t.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=t.dependencies,s=t.features;return r.inputs=AL(t.inputs,i),r.outputs=AL(t.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(TL).filter(EL):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(vl).filter(EL):null,r})}function TL(t){return no(t)||Ka(t)}function EL(t){return null!==t}function Di(t){return vf(()=>({type:t.type,bootstrap:t.bootstrap||Yr,declarations:t.declarations||Yr,imports:t.imports||Yr,exports:t.exports||Yr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AL(t,n){if(null==t)return kh;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}const Zt=Rt;function gl(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function no(t){return t[K_]||null}function Ka(t){return t[aT]||null}function vl(t){return t[lT]||null}function rc(t,n){const e=t[DL]||null;if(!e&&!0===n)throw new Error(`Type ${Cn(t)} does not have '\u0275mod' property.`);return e}const Dh=0,Rn=1,Ji=2,fs=3,bu=4,Ep=5,Qa=6,lg=7,ks=8,Q_=9,Z_=10,ir=11,cT=12,e1=13,ML=14,cg=15,Za=16,t1=17,ug=18,Ed=19,n1=20,IL=21,Bo=22,uT=1,FL=2,ex=7,tx=8,dg=9,yl=10;function oc(t){return Array.isArray(t)&&"object"==typeof t[uT]}function _u(t){return Array.isArray(t)&&!0===t[uT]}function dT(t){return 0!=(4&t.flags)}function i1(t){return t.componentOffset>-1}function nx(t){return 1==(1&t.flags)}function xu(t){return null!==t.template}function kge(t){return 0!=(256&t[Ji])}function Ap(t,n){return t.hasOwnProperty(Sh)?t[Sh]:null}class Tge{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Hn(){return jL}function jL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Age),Ege}function Ege(){const t=LL(this),n=t?.current;if(n){const e=t.previous;if(e===kh)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Age(t,n,e,i){const r=this.declaredInputs[e],o=LL(t)||function Mge(t,n){return t[PL]=n}(t,{previous:kh,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Tge(l&&l.currentValue,n,a===kh),t[i]=n}Hn.ngInherit=!0;const PL="__ngSimpleChanges__";function LL(t){return t[PL]||null}const Lc=function(t,n,e){},RL="svg";function Ta(t){for(;Array.isArray(t);)t=t[Dh];return t}function ix(t,n){return Ta(n[t])}function sc(t,n){return Ta(n[t.index])}function BL(t,n){return t.data[n]}function hg(t,n){return t[n]}function ac(t,n){const e=n[t];return oc(e)?e:e[Dh]}function rx(t){return 64==(64&t[Ji])}function yf(t,n){return null==n?null:t[n]}function VL(t){t[ug]=0}function fT(t,n){t[Ep]+=n;let e=t,i=t[fs];for(;null!==i&&(1===n&&1===e[Ep]||-1===n&&0===e[Ep]);)i[Ep]+=n,e=i,i=i[fs]}const $i={lFrame:KL(null),bindingsEnabled:!0};function zL(){return $i.bindingsEnabled}function Gt(){return $i.lFrame.lView}function Pr(){return $i.lFrame.tView}function $e(t){return $i.lFrame.contextLView=t,t[ks]}function Be(t){return $i.lFrame.contextLView=null,t}function Ea(){let t=UL();for(;null!==t&&64===t.type;)t=t.parent;return t}function UL(){return $i.lFrame.currentTNode}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function pT(){return $i.lFrame.isParent}function mT(){$i.lFrame.isParent=!1}function bl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function fg(){return $i.lFrame.bindingIndex++}function Eh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function zge(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,gT(n)}function gT(t){$i.lFrame.currentDirectiveIndex=t}function XL(){return $i.lFrame.currentQueryIndex}function yT(t){$i.lFrame.currentQueryIndex=t}function Gge(t){const n=t[Rn];return 2===n.type?n.declTNode:1===n.type?t[Qa]:null}function YL(t,n,e){if(e&ki.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&ki.Host||(r=Gge(o),null===r||(o=o[cg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=JL();return i.currentTNode=n,i.lView=t,!0}function bT(t){const n=JL(),e=t[Rn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function JL(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?KL(t):n}function KL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function QL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const ZL=QL;function _T(){const t=QL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function _l(){return $i.lFrame.selectedIndex}function Mp(t){$i.lFrame.selectedIndex=t}function es(){const t=$i.lFrame;return BL(t.tView,t.selectedIndex)}function at(){$i.lFrame.currentNamespace=RL}function Ip(){!function Yge(){$i.lFrame.currentNamespace=null}()}function ox(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[ug]+=65536),(a>11>16&&(3&t[Ji])===n){t[Ji]+=2048,Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}else{Lc(4,a,o);try{o.call(a)}finally{Lc(5,a,o)}}}const pg=-1;class o1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function CT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[cg],e--;return i}let kT=!0;function ux(t){const n=kT;return kT=t,n}const oR=255,sR=5;let ive=0;const Md={};function dx(t,n){const e=aR(t,n);if(-1!==e)return e;const i=n[Rn];i.firstCreatePass&&(t.injectorIndex=n.length,ST(i.data,t),ST(n,null),ST(i.blueprint,null));const r=DT(t,n),o=t.injectorIndex;if(rR(r)){const s=lx(r),a=cx(r,n),l=a[Rn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function ST(t,n){t.push(0,0,0,0,0,0,0,0,n)}function aR(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function DT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=pR(r),null===i)return pg;if(e++,r=r[cg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return pg}function TT(t,n,e){!function rve(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Z0)&&(i=e[Z0]),null==i&&(i=e[Z0]=ive++);const r=i&oR;n.data[t+(r>>sR)]|=1<=0?n&oR:lve:n}(e);if("function"==typeof o){if(!YL(n,t,i))return i&ki.Host?lR(r,0,i):cR(n,e,i,r);try{const s=o(i);if(null!=s||i&ki.Optional)return s;W_()}finally{ZL()}}else if("number"==typeof o){let s=null,a=aR(t,n),l=pg,c=i&ki.Host?n[Za][Qa]:null;for((-1===a||i&ki.SkipSelf)&&(l=-1===a?DT(t,n):n[a+8],l!==pg&&fR(i,!1)?(s=n[Rn],a=lx(l),n=cx(l,n)):a=-1);-1!==a;){const u=n[Rn];if(hR(o,a,u.data)){const d=sve(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==pg&&fR(i,n[Rn].data[a+8]===c)&&hR(o,a,n)?(s=u,a=lx(l),n=cx(l,n)):a=-1}}return r}function sve(t,n,e,i,r,o){const s=n[Rn],a=s.data[t+8],u=hx(a,s,e,null==i?i1(a)&&kT:i!=s&&0!=(3&a.type),r&ki.Host&&o===a);return null!==u?Fp(n,s,u,a):Md}function hx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xu(f)&&f.type===e)return l}return null}function Fp(t,n,e,i){let r=t[e];const o=n.data;if(function Zge(t){return t instanceof o1}(r)){const s=r;s.resolving&&function rge(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Ot(-200,`Circular dependency in DI detected for ${t}${e}`)}(function eo(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ri(t)}(o[e]));const a=ux(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Pc(s.injectImpl):null;YL(t,i,ki.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function Kge(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=jL(n);(e.preOrderHooks||(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Pc(l),ux(a),s.resolving=!1,ZL()}}return r}function hR(t,n,e){return!!(e[n+(t>>sR)]&1<{const n=t.prototype.constructor,e=n[Sh]||ET(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Sh]||ET(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ET(t){return tT(t)?()=>{const n=ET(wi(t));return n&&n()}:Ap(t)}function pR(t){const n=t[Rn],e=n.type;return 2===e?n.declTNode:1===e?t[Qa]:null}function Ah(t){return function ove(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function AT(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(vg)?l[vg]:Object.defineProperty(l,vg,{value:[]})[vg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class zn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Np(t,n){t.forEach(e=>Array.isArray(e)?Np(e,n):n(e))}function gR(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function fx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function c1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function fve(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function IT(t,n){const e=_g(t,n);if(e>=0)return t[1|e]}function _g(t,n){return function vR(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Bl=Bl||{})[Bl.Important=1]="Important",Bl[Bl.DashCase=2]="DashCase",Bl))();const LT=new Map;let jve=0;const $T="__ngContext__";function el(t,n){oc(n)?(t[$T]=n[n1],function Lve(t){LT.set(t[n1],t)}(n)):t[$T]=n}let BT;function VT(t,n){return BT(t,n)}function m1(t){const n=t[fs];return _u(n)?n[fs]:n}function HT(t){return LR(t[e1])}function zT(t){return LR(t[bu])}function LR(t){for(;null!==t&&!_u(t);)t=t[bu];return t}function wg(t,n,e,i,r){if(null!=i){let o,s=!1;_u(i)?o=i:oc(i)&&(s=!0,i=i[Dh]);const a=Ta(i);0===t&&null!==e?null==r?zR(n,e,a):Op(n,e,a,r||null,!0):1===t&&null!==e?Op(n,e,a,r||null,!0):2===t?function JT(t,n,e){const i=vx(t,n);i&&function i0e(t,n,e,i){t.removeChild(n,e,i)}(t,i,n,e)}(n,a,s):3===t&&n.destroyNode(a),null!=o&&function s0e(t,n,e,i,r){const o=e[ex];o!==Ta(e)&&wg(n,t,i,o,r);for(let a=yl;a0&&(t[e-1][bu]=i[bu]);const o=fx(t,yl+n);!function Yve(t,n){g1(t,n,n[ir],2,null,null),n[Dh]=null,n[Qa]=null}(i[Rn],i);const s=o[Ed];null!==s&&s.detachView(o[Rn]),i[fs]=null,i[bu]=null,i[Ji]&=-65}return i}function BR(t,n){if(!(128&n[Ji])){const e=n[ir];e.destroyNode&&g1(t,n,e,3,null,null),function Qve(t){let n=t[e1];if(!n)return qT(t[Rn],t);for(;n;){let e=null;if(oc(n))e=n[e1];else{const i=n[yl];i&&(e=i)}if(!e){for(;n&&!n[bu]&&n!==t;)oc(n)&&qT(n[Rn],n),n=n[fs];null===n&&(n=t),oc(n)&&qT(n[Rn],n),e=n&&n[bu]}n=e}}(n)}}function qT(t,n){if(!(128&n[Ji])){n[Ji]&=-65,n[Ji]|=128,function n0e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===yu.None||o===yu.Emulated)return null}return sc(i,e)}}(t,n.parent,e)}function Op(t,n,e,i,r){t.insertBefore(n,e,i,r)}function zR(t,n,e){t.appendChild(n,e)}function UR(t,n,e,i,r){null!==i?Op(t,n,e,i,r):zR(t,n,e)}function vx(t,n){return t.parentNode(n)}function GR(t,n,e){return qR(t,n,e)}let XT,_x,ZT,xx,qR=function WR(t,n,e){return 40&t.type?sc(t,e):null};function yx(t,n,e,i){const r=VR(t,i,n),o=n[ir],a=GR(i.parent||n[Qa],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return _x}()?.createHTML(t)||t}function eE(){if(void 0===xx&&(xx=null,$o.trustedTypes))try{xx=$o.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xx}function e5(t){return eE()?.createHTML(t)||t}function n5(t){return eE()?.createScriptURL(t)||t}class jp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${U_})`}}class f0e extends jp{getTypeName(){return"HTML"}}class p0e extends jp{getTypeName(){return"Style"}}class m0e extends jp{getTypeName(){return"Script"}}class g0e extends jp{getTypeName(){return"URL"}}class v0e extends jp{getTypeName(){return"ResourceURL"}}function cc(t){return t instanceof jp?t.changingThisBreaksApplicationSecurity:t}function Id(t,n){const e=function y0e(t){return t instanceof jp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${U_})`)}return e===n}class k0e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Cg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S0e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Cg(n),e}}const T0e=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;function wx(t){return(t=String(t)).match(T0e)?t:"unsafe:"+t}function Mh(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function v1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const r5=Mh("area,br,col,hr,img,wbr"),o5=Mh("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),s5=Mh("rp,rt"),tE=v1(r5,v1(o5,Mh("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),v1(s5,Mh("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),v1(s5,o5)),nE=Mh("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),a5=v1(nE,Mh("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Mh("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),E0e=Mh("script,style,template");class A0e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!tE.hasOwnProperty(e))return this.sanitizedSomething=!0,!E0e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();tE.hasOwnProperty(e)&&!r5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(l5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const M0e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,I0e=/([^\#-~ |!])/g;function l5(t){return t.replace(/&/g,"&").replace(M0e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(I0e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Cx;function c5(t,n){let e=null;try{Cx=Cx||function i5(t){const n=new S0e(t);return function D0e(){try{return!!(new window.DOMParser).parseFromString(Cg(""),"text/html")}catch{return!1}}()?new k0e(n):n}(t);let i=n?String(n):"";e=Cx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Cx.getInertBodyElement(i)}while(i!==o);return Cg((new A0e).sanitizeChildren(iE(e)||e))}finally{if(e){const i=iE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function iE(t){return"content"in t&&function F0e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ko=(()=>((ko=ko||{})[ko.NONE=0]="NONE",ko[ko.HTML=1]="HTML",ko[ko.STYLE=2]="STYLE",ko[ko.SCRIPT=3]="SCRIPT",ko[ko.URL=4]="URL",ko[ko.RESOURCE_URL=5]="RESOURCE_URL",ko))();function kx(t){const n=b1();return n?e5(n.sanitize(ko.HTML,t)||""):Id(t,"HTML")?e5(cc(t)):c5(function ZR(){return void 0!==ZT?ZT:typeof document<"u"?document:void 0}(),Ri(t))}function y1(t){const n=b1();return n?n.sanitize(ko.URL,t)||"":Id(t,"URL")?cc(t):wx(Ri(t))}function u5(t){const n=b1();if(n)return n5(n.sanitize(ko.RESOURCE_URL,t)||"");if(Id(t,"ResourceURL"))return n5(cc(t));throw new Ot(904,!1)}function b1(){const t=Gt();return t&&t[cT]}const Sx=new zn("ENVIRONMENT_INITIALIZER"),Dx=new zn("INJECTOR",-1),h5=new zn("INJECTOR_DEF_TYPES");class f5{get(n,e=J0){if(e===J0){const i=new Error(`NullInjectorError: No provider for ${Cn(n)}!`);throw i.name="NullInjectorError",i}return e}}function $0e(...t){return{\u0275providers:p5(0,t),\u0275fromNgModule:!0}}function p5(t,...n){const e=[],i=new Set;let r;return Np(n,o=>{const s=o;rE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&m5(r,e),e}function m5(t,n){for(let e=0;e{n.push(o)})}}function rE(t,n,e,i){if(!(t=wi(t)))return!1;let r=null,o=xL(t);const s=!o&&no(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)rE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Np(o.imports,u=>{rE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&m5(c,n)}if(!a){const c=Ap(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Yr},{provide:h5,useValue:r,multi:!0},{provide:Sx,useValue:()=>ct(r),multi:!0})}const l=o.providers;null==l||a||oE(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function oE(t,n){for(let e of t)nT(e)&&(e=e.\u0275providers),Array.isArray(e)?oE(e,n):n(e)}const B0e=Xe({provide:String,useValue:Xe});function sE(t){return null!==t&&"object"==typeof t&&B0e in t}function Pp(t){return"function"==typeof t}const aE=new zn("Set Injector scope."),Tx={},H0e={};let lE;function Ex(){return void 0===lE&&(lE=new f5),lE}class Fd{}class y5 extends Fd{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,uE(n,s=>this.processProvider(s)),this.records.set(Dx,kg(void 0,this)),r.has("environment")&&this.records.set(Fd,kg(void 0,this));const o=this.records.get(aE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(h5.multi,Yr,ki.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=sg(this),i=Pc(void 0);try{return n()}finally{sg(e),Pc(i)}}get(n,e=J0,i=ki.Default){this.assertNotDestroyed(),i=J_(i);const r=sg(this),o=Pc(void 0);try{if(!(i&ki.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function q0e(t){return"function"==typeof t||"object"==typeof t&&t instanceof zn}(n)&&q_(n);a=l&&this.injectableDefInScope(l)?kg(cE(n),Tx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&ki.Self?Ex():this.parent).get(n,e=i&ki.Optional&&e===J0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Y_]=s[Y_]||[]).unshift(Cn(n)),r)throw s;return function bge(t,n,e,i){const r=t[Y_];throw n[kL]&&r.unshift(n[kL]),t.message=function _ge(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==gge?t.slice(2):t;let r=Cn(n);if(Array.isArray(n))r=n.map(Cn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):Cn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(mge,"\n ")}`}("\n"+t.message,r,e,i),t[pge]=r,t[Y_]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Pc(o),sg(r)}}resolveInjectorInitializers(){const n=sg(this),e=Pc(void 0);try{const i=this.get(Sx.multi,Yr,ki.Self);for(const r of i)r()}finally{sg(n),Pc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(Cn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ot(205,!1)}processProvider(n){let e=Pp(n=wi(n))?n:wi(n&&n.provide);const i=function U0e(t){return sE(t)?kg(void 0,t.useValue):kg(b5(t),Tx)}(n);if(Pp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=kg(void 0,Tx,!0),r.factory=()=>sT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Tx&&(e.value=H0e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function W0e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=wi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function cE(t){const n=q_(t),e=null!==n?n.factory:Ap(t);if(null!==e)return e;if(t instanceof zn)throw new Ot(204,!1);if(t instanceof Function)return function z0e(t){const n=t.length;if(n>0)throw c1(n,"?"),new Ot(204,!1);const e=function uge(t){const n=t&&(t[X_]||t[wL]);return n?(function dge(t){if(t.hasOwnProperty("name"))return t.name;(""+t).match(/^function\s*([^\s(]+)/)}(t),n):null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Ot(204,!1)}function b5(t,n,e){let i;if(Pp(t)){const r=wi(t);return Ap(r)||cE(r)}if(sE(t))i=()=>wi(t.useValue);else if(function v5(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...sT(t.deps||[]));else if(function g5(t){return!(!t||!t.useExisting)}(t))i=()=>ct(wi(t.useExisting));else{const r=wi(t&&(t.useClass||t.provide));if(!function G0e(t){return!!t.deps}(t))return Ap(r)||cE(r);i=()=>new r(...sT(t.deps))}return i}function kg(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function uE(t,n){for(const e of t)Array.isArray(e)?uE(e,n):e&&nT(e)?uE(e.\u0275providers,n):n(e)}class X0e{}class _5{}class J0e{resolveComponentFactory(n){throw function Y0e(t){const n=Error(`No component factory found for ${Cn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let $c=(()=>{class t{}return t.NULL=new J0e,t})();function K0e(){return Sg(Ea(),Gt())}function Sg(t,n){return new ti(sc(t,n))}let ti=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K0e,t})();function Q0e(t){return t instanceof ti?t.nativeElement:t}class Lp{}let Ss=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Z0e(){const t=Gt(),e=ac(Ea().index,t);return(oc(e)?e:t)[ir]}(),t})(),e1e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class _1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const t1e=new _1("15.2.2"),dE={},hE="ngOriginalError";function fE(t){return t[hE]}class Dg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&fE(n);for(;e&&fE(e);)e=fE(e);return e||null}}function w5(t){return t.ownerDocument.defaultView}function Ih(t){return t instanceof Function?t():t}function k5(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const S5="ng-template";function d1e(t,n,e){let i=0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==k5(f,c,0)||2&i&&c!==h){if(wu(i))return!1;s=!0}}}}else{if(!s&&!wu(i)&&!wu(l))return!1;if(s&&wu(l))continue;s=!1,i=l|1&i}}return wu(i)||s}function wu(t){return 0==(1&t)}function p1e(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!wu(s)&&(n+=E5(o,r),r=""),i=s,o=o||!wu(i);e++}return""!==r&&(n+=E5(o,r)),n}const Bi={};function w(t){A5(Pr(),Gt(),_l()+t,!1)}function A5(t,n,e,i){if(!i)if(3==(3&n[Ji])){const o=t.preOrderCheckHooks;null!==o&&sx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&ax(n,o,0,e)}Mp(e)}function N5(t,n=null,e=null,i){const r=O5(t,n,e,i);return r.resolveInjectorInitializers(),r}function O5(t,n=null,e=null,i,r=new Set){const o=[e||Yr,$0e(t)];return i=i||("object"==typeof t?void 0:Cn(t)),new y5(o,n||Ex(),i||null,r)}let Rs=(()=>{class t{static create(e,i){if(Array.isArray(e))return N5({name:""},i,e,"");{const r=e.name??"";return N5({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=J0,t.NULL=new f5,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>ct(Dx)}),t.__NG_ELEMENT_ID__=-1,t})();function le(t,n=ki.Default){const e=Gt();return null===e?ct(t,n):uR(Ea(),e,wi(t),n)}function H5(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iBo&&A5(t,n,Bo,!1),Lc(s?2:0,r),e(i,r)}finally{Mp(o),Lc(s?3:1,r)}}function _E(t,n,e){if(dT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,x1(t,e,r.hostVars,Bi),r)}function Nd(t,n,e,i,r,o){const s=sc(t,n);!function DE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Ri(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}(n[ir],s,o,t.value,e,i,r)}function oye(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&TE(e)}}function TE(t){for(let i=HT(t);null!==i;i=zT(i))for(let r=yl;r0&&TE(o)}const e=t[Rn].components;if(null!==e)for(let i=0;i0&&TE(r)}}function uye(t,n){const e=ac(n,t),i=e[Rn];(function dye(t,n){for(let e=n.length;e-1&&(WT(n,i),fx(e,i))}this._attachedToViewContainer=!1}BR(this._lView[Rn],this._lView)}onDestroy(n){G5(this._lView[Rn],this._lView,null,n)}markForCheck(){EE(this._cdRefInjectingView||this._lView)}detach(){this._lView[Ji]&=-65}reattach(){this._lView[Ji]|=64}detectChanges(){Nx(this._lView[Rn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ot(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kve(t,n){g1(t,n,n[ir],2,null,null)}(this._lView[Rn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Ot(902,!1);this._appRef=n}}class hye extends w1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;Nx(n[Rn],n,n[ks],!1)}checkNoChanges(){}get context(){return null}}class n8 extends $c{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=no(n);return new C1(e,this.ngModule)}}function i8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pye{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=J_(i);const r=this.injector.get(n,dE,i);return r!==dE||e===dE?r:this.parentInjector.get(n,e,i)}}class C1 extends _5{get inputs(){return i8(this.componentDef.inputs)}get outputs(){return i8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _1e(t){return t.map(b1e).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Fd?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pye(n,o):n,a=s.get(Lp,null);if(null===a)throw new Ot(407,!1);const l=s.get(e1e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function U1e(t,n,e){return t.selectRootElement(n,e===yu.ShadowDom)}(c,i,this.componentDef.encapsulation):GT(c,u,function fye(t){const n=t.toLowerCase();return"svg"===n?RL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=CE(0,null,null,1,0,null,null,null,null,null),p=Mx(null,f,null,h,null,null,a,c,l,s,null);let m,g;bT(p);try{const v=this.componentDef;let y,_=null;v.findHostDirectiveDefs?(y=[],_=new Map,v.findHostDirectiveDefs(v,y,_),y.push(v)):y=[v];const C=function gye(t,n){const e=t[Rn],i=Bo;return t[i]=n,Ag(e,i,2,"#host",null)}(p,d),S=function vye(t,n,e,i,r,o,s,a){const l=r[Rn];!function yye(t,n,e,i){for(const r of t)n.mergedAttrs=s1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Ox(n,n.mergedAttrs,!0),null!==e&&QR(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mx(r,U5(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&SE(l,t,i.length-1),Fx(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=BL(f,Bo),d&&function _ye(t,n,e,i){if(i)CT(t,e,["ng-version",t1e.full]);else{const{attrs:r,classes:o}=function x1e(t){const n=[],e=[];let i=1,r=2;for(;i0&&KR(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function xye(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=s1(r.hostAttrs,e=s1(e,r.hostAttrs))}}(i)}function IE(t){return t===kh?{}:t===Yr?[]:t}function kye(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function Sye(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Dye(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function Px(t){return!!FE(t)&&(Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t)}function FE(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Od(t,n,e){return t[n]=e}function tl(t,n,e){return!Object.is(t[n],e)&&(t[n]=e,!0)}function Rp(t,n,e,i){const r=tl(t,n,e);return tl(t,n+1,i)||r}function ht(t,n,e,i){const r=Gt();return tl(r,fg(),n)&&(Pr(),Nd(es(),r,t,n,e,i)),ht}function Ig(t,n,e,i){return tl(t,fg(),e)?n+Ri(e)+i:Bi}function Fg(t,n,e,i,r,o){const a=Rp(t,function Th(){return $i.lFrame.bindingIndex}(),e,r);return Eh(2),a?n+Ri(e)+i+Ri(r)+o:Bi}function J(t,n,e,i,r,o,s,a){const l=Gt(),c=Pr(),u=t+Bo,d=c.firstCreatePass?function Pye(t,n,e,i,r,o,s,a,l){const c=n.consts,u=Ag(n,t,4,s||null,yf(c,a));kE(n,e,u,yf(c,l)),ox(n,u);const d=u.tView=CE(2,u,i,r,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,c);return null!==n.queries&&(n.queries.template(n,u),d.queries=n.queries.embeddedTView(u)),u}(u,c,l,n,e,i,r,o,s):c.data[u];Ad(d,!1);const h=l[ir].createComment("");yx(c,l,h,d),el(h,l),Fx(l,l[u]=K5(h,l,h,d)),nx(d)&&xE(c,l,d),null!=s&&wE(l,d,a)}function uo(t){return hg(function Vge(){return $i.lFrame.contextLView}(),Bo+t)}function k(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!1),k}function NE(t,n,e,i,r){const s=r?"class":"style";ME(t,e,n.inputs[s],s,i)}function b(t,n,e,i){const r=Gt(),o=Pr(),s=Bo+t,a=r[ir],l=o.firstCreatePass?function Rye(t,n,e,i,r,o){const s=n.consts,l=Ag(n,t,2,i,yf(s,r));return kE(n,e,l,yf(s,o)),null!==l.attrs&&Ox(l,l.attrs,!1),null!==l.mergedAttrs&&Ox(l,l.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,l),l}(s,o,r,n,e,i):o.data[s],c=r[s]=GT(a,n,function Jge(){return $i.lFrame.currentNamespace}()),u=nx(l);return Ad(l,!0),QR(a,c,l),32!=(32&l.flags)&&yx(o,r,c,l),0===function Pge(){return $i.lFrame.elementDepthCount}()&&el(c,r),function Lge(){$i.lFrame.elementDepthCount++}(),u&&(xE(o,r,l),_E(o,l,r)),null!==i&&wE(r,l),b}function x(){let t=Ea();pT()?mT():(t=t.parent,Ad(t,!1));const n=t;!function Rge(){$i.lFrame.elementDepthCount--}();const e=Pr();return e.firstCreatePass&&(ox(e,t),dT(t)&&e.queries.elementEnd(t)),null!=n.classesWithoutHost&&function eve(t){return 0!=(8&t.flags)}(n)&&NE(e,n,Gt(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function tve(t){return 0!=(16&t.flags)}(n)&&NE(e,n,Gt(),n.stylesWithoutHost,!1),x}function ge(t,n,e,i){return b(t,n,e,i),x(),ge}function ta(t,n,e){const i=Gt(),r=Pr(),o=t+Bo,s=r.firstCreatePass?function $ye(t,n,e,i,r){const o=n.consts,s=yf(o,i),a=Ag(n,t,8,"ng-container",s);return null!==s&&Ox(a,s,!0),kE(n,e,a,yf(o,r)),null!==n.queries&&n.queries.elementStart(n,a),a}(o,r,i,n,e):r.data[o];Ad(s,!0);const a=i[o]=i[ir].createComment("");return yx(r,i,a,s),el(a,i),nx(s)&&(xE(r,i,s),_E(r,s,i)),null!=e&&wE(i,s),ta}function na(){let t=Ea();const n=Pr();return pT()?mT():(t=t.parent,Ad(t,!1)),n.firstCreatePass&&(ox(n,t),dT(t)&&n.queries.elementEnd(t)),na}function vt(){return Gt()}function S1(t){return!!t&&"function"==typeof t.then}const OE=function v8(t){return!!t&&"function"==typeof t.subscribe};function ye(t,n,e,i){const r=Gt(),o=Pr(),s=Ea();return function b8(t,n,e,i,r,o,s){const a=nx(i),c=t.firstCreatePass&&Z5(t),u=n[ks],d=Q5(n);let h=!0;if(3&i.type||s){const m=sc(i,n),g=s?s(m):m,v=d.length,y=s?C=>s(Ta(C[i.index])):i.index;let _=null;if(!s&&a&&(_=function Bye(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==_)(_.__ngLastListenerFn__||_).__ngNextListenerFn__=o,_.__ngLastListenerFn__=o,h=!1;else{o=x8(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=x8(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?ac(t.index,n):n);let l=_8(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=_8(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function j(t=1){return function Wge(t){return($i.lFrame.contextLView=function qge(t,n){for(;t>0;)n=n[cg],t--;return n}(t,$i.lFrame.contextLView))[ks]}(t)}function Vye(t,n){let e=null;const i=function m1e(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function jE(t){return 2|t}function Bp(t){return(131068&t)>>2}function PE(t,n){return-131069&t|n<<2}function LE(t){return 1|t}function M8(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?bf(o):Bp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];qye(t[a],n)&&(l=!0,t[a+1]=i?LE(u):jE(u)),a=i?bf(u):Bp(u)}l&&(t[e+1]=i?jE(o):LE(o))}function qye(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&_g(t,n)>=0}const ia={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function I8(t){return t.substring(ia.key,ia.keyEnd)}function F8(t,n){const e=ia.textEnd;return e===n?-1:(n=ia.keyEnd=function Kye(t,n,e){for(;n32;)n++;return n}(t,ia.key=n,e),$g(t,n,e))}function $g(t,n,e){for(;n=0;e=F8(n,e))lc(t,I8(n),!0)}function Du(t,n,e,i){const r=Gt(),o=Pr(),s=Eh(2);o.firstUpdatePass&&R8(o,t,s,i),n!==Bi&&tl(r,s,n)&&B8(o,o.data[_l()],r,r[ir],t,r[s+1]=function abe(t,n){return null==t||("string"==typeof n?t+=n:"object"==typeof t&&(t=Cn(cc(t)))),t}(n,e),i,s)}function Tu(t,n,e,i){const r=Pr(),o=Eh(2);r.firstUpdatePass&&R8(r,null,o,i);const s=Gt();if(e!==Bi&&tl(s,o,e)){const a=r.data[_l()];if(H8(a,i)&&!L8(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=jr(l,e||"")),NE(r,a,s,e,i)}else!function sbe(t,n,e,i,r,o,s,a){r===Bi&&(r=Yr);let l=0,c=0,u=0=t.expandoStartIndex}function R8(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[_l()],s=L8(t,e);H8(o,i)&&null===n&&!s&&(n=!1),n=function tbe(t,n,e,i){const r=function vT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=D1(e=RE(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=RE(r,t,n,e,i),null===o){let l=function nbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Bp(i))return t[bf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=RE(null,t,n,l[1],i),l=D1(l,n.attrs,i),function ibe(t,n,e,i){t[bf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function rbe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=bf(t[a+1]);t[i+1]=$x(h,a),0!==h&&(t[h+1]=PE(t[h+1],i)),t[a+1]=function zye(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$x(a,0),0!==a&&(t[a+1]=PE(t[a+1],i)),a=i;else t[i+1]=$x(l,0),0===a?a=i:t[l+1]=PE(t[l+1],i),l=i;c&&(t[i+1]=jE(t[i+1])),M8(t,u,i,!0),M8(t,u,i,!1),function Wye(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&_g(o,n)>=0&&(e[i+1]=LE(e[i+1]))}(n,u,t,i,o),s=$x(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function RE(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?Yr:void 0);let f=d?IT(h,i):u===i?h:void 0;if(c&&!Bx(f)&&(f=IT(l,i)),Bx(f)&&(a=f,s))return a;const p=t[r+1];r=s?bf(p):Bp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=IT(l,i))}return a}function Bx(t){return void 0!==t}function H8(t,n){return 0!=(t.flags&(n?8:16))}function I(t,n=""){const e=Gt(),i=Pr(),r=t+Bo,o=i.firstCreatePass?Ag(i,r,1,n,null):i.data[r],s=e[r]=function UT(t,n){return t.createText(n)}(e[ir],n);yx(i,e,s,o),Ad(o,!1)}function Dt(t){return xn("",t,""),Dt}function xn(t,n,e){const i=Gt(),r=Ig(i,t,n,e);return r!==Bi&&Fh(i,_l(),r),xn}function Ld(t,n,e,i,r){const o=Gt(),s=Fg(o,t,n,e,i,r);return s!==Bi&&Fh(o,_l(),s),Ld}function dc(t,n,e){const i=Gt();return tl(i,fg(),n)&&uc(Pr(),es(),i,t,n,i[ir],e,!0),dc}const Vg="en-US";let u6=Vg;function VE(t,n,e,i,r){if(t=wi(t),Array.isArray(t))for(let o=0;o>20;if(Pp(t)||!t.multi){const f=new o1(l,r,le),p=zE(a,n,r?u:u+h,d);-1===p?(TT(dx(c,s),o,a),HE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=zE(a,n,u+h,d),p=zE(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){TT(dx(c,s),o,a);const v=function x_e(t,n,e,i,r){const o=new o1(t,e,le);return o.multi=[],o.index=n,o.componentProviders=0,O6(o,r,i&&!e),o}(r?__e:b_e,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),HE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else HE(o,t,f>-1?f:p,O6(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function HE(t,n,e,i){const r=Pp(n),o=function V0e(t){return!!t.useClass}(n);if(r||o){const l=(o?wi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function O6(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function zE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function y_e(t,n,e){const i=Pr();if(i.firstCreatePass){const r=xu(t);VE(e,i.data,i.blueprint,r,!0),VE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class zg{}class j6{}class P6 extends zg{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new n8(this);const i=rc(n);this._bootstrapComponents=Ih(i.bootstrap),this._r3Injector=O5(n,e,[{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],Cn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class GE extends j6{constructor(n){super(),this.moduleType=n}create(n){return new P6(this.moduleType,n)}}class C_e extends zg{constructor(n,e,i){super(),this.componentFactoryResolver=new n8(this),this.instance=null;const r=new y5([...n,{provide:zg,useValue:this},{provide:$c,useValue:this.componentFactoryResolver}],e||Ex(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gx(t,n,e=null){return new C_e(t,n,e).injector}let k_e=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=p5(0,e.type),r=i.length>0?Gx([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(ct(Fd))}),t})();function L6(t){t.getStandaloneInjector=n=>n.get(k_e).getOrCreateStandaloneInjector(t)}function wl(t,n,e){const i=bl()+t,r=Gt();return r[i]===Bi?Od(r,i,e?n.call(e):n()):function k1(t,n){return t[n]}(r,i)}function lr(t,n,e,i){return G6(Gt(),bl(),t,n,e,i)}function Sr(t,n,e,i,r){return function W6(t,n,e,i,r,o,s){const a=n+e;return Rp(t,a,r,o)?Od(t,a+2,s?i.call(s,r,o):i(r,o)):N1(t,a+2)}(Gt(),bl(),t,n,e,i,r)}function Ug(t,n,e,i,r,o){return function q6(t,n,e,i,r,o,s,a){const l=n+e;return function Lx(t,n,e,i,r){const o=Rp(t,n,e,i);return tl(t,n+2,r)||o}(t,l,r,o,s)?Od(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):N1(t,l+3)}(Gt(),bl(),t,n,e,i,r,o)}function N1(t,n){const e=t[n];return e===Bi?void 0:e}function G6(t,n,e,i,r,o){const s=n+e;return tl(t,s,r)?Od(t,s+1,o?i.call(o,r):i(r)):N1(t,s+1)}function XE(t,n,e){const i=t+Bo,r=Gt(),o=hg(r,i);return function O1(t,n){return t[Rn].data[n].pure}(r,i)?G6(r,bl(),n,o.transform,e,o):o.transform(e)}function YE(t){return n=>{setTimeout(t,void 0,n)}}const Ke=class z_e extends tr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=YE(o),r&&(r=YE(r)),s&&(s=YE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ue&&n.add(a),a}};function U_e(){return this._results[Symbol.iterator]()}class JE{get changes(){return this._changes||(this._changes=new Ke)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=JE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=U_e)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Rc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function dve(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=q_e,t})();const G_e=Si,W_e=class extends G_e{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[t1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),bE(i,r,n),new w1(r)}};function q_e(){return Wx(Ea(),Gt())}function Wx(t,n){return 4&t.type?new W_e(n,t,Sg(t,n)):null}let nl=(()=>{class t{}return t.__NG_ELEMENT_ID__=X_e,t})();function X_e(){return Q6(Ea(),Gt())}const Y_e=nl,J6=class extends Y_e{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Sg(this._hostTNode,this._hostLView)}get injector(){return new mg(this._hostTNode,this._hostLView)}get parentInjector(){const n=DT(this._hostTNode,this._hostLView);if(rR(n)){const e=cx(n,this._hostLView),i=lx(n);return new mg(e[Rn].data[i+8],e)}return new mg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=K6(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-yl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function l1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new C1(no(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Fd,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Rn];if(function jge(t){return _u(t[fs])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[fs],h=new J6(d,d[Qa],d[fs]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Zve(t,n,e,i){const r=yl+i,o=e.length;i>0&&(e[r-1][bu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=yl;d{class t{constructor(e){this.appInits=e,this.resolve=Xx,this.reject=Xx,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(ct(Yx,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const P1=new zn("AppId",{providedIn:"root",factory:function x$(){return`${lA()}${lA()}${lA()}`}});function lA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const w$=new zn("Platform Initializer"),L1=new zn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),C$=new zn("AnimationModuleType");let xxe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hc=new zn("LocaleId",{providedIn:"root",factory:()=>ar(hc,ki.Optional|ki.SkipSelf)||function wxe(){return typeof $localize<"u"&&$localize.locale||Vg}()});class kxe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let k$=(()=>{class t{compileModuleSync(e){return new GE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Ih(rc(e).declarations).reduce((s,a)=>{const l=no(a);return l&&s.push(new C1(l)),s},[]);return new kxe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Txe=(()=>Promise.resolve(0))();function cA(t){typeof Zone>"u"?Txe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Wi{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ke(!1),this.onMicrotaskEmpty=new Ke(!1),this.onStable=new Ke(!1),this.onError=new Ke(!1),typeof Zone>"u")throw new Ot(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Exe(){let t=$o.requestAnimationFrame,n=$o.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function Ixe(t){const n=()=>{!function Mxe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call($o,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,dA(t),t.isCheckStableRunning=!0,uA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),dA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return T$(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),E$(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return T$(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),E$(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,dA(t),uA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Wi.isInAngularZone())throw new Ot(909,!1)}static assertNotInAngularZone(){if(Wi.isInAngularZone())throw new Ot(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Axe,Xx,Xx);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Axe={};function uA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function dA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function T$(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function E$(t){t._nesting--,uA(t)}class Fxe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ke,this.onMicrotaskEmpty=new Ke,this.onStable=new Ke,this.onError=new Ke}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const A$=new zn(""),Kx=new zn("");let pA,hA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,pA||(function Nxe(t){pA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Wi.assertNotInAngularZone(),cA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())cA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(fA),ct(Kx))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),fA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return pA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const Oh=!1;let _f=null;const M$=new zn("AllowMultipleToken"),mA=new zn("PlatformDestroyListeners"),I$=new zn("appBootstrapListener");class F${constructor(n,e){this.name=n,this.token=e}}function O$(t,n,e=[]){const i=`Platform: ${n}`,r=new zn(i);return(o=[])=>{let s=gA();if(!s||s.injector.get(M$,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Pxe(t){if(_f&&!_f.get(M$,!1))throw new Ot(400,!1);_f=t;const n=t.get(P$);(function N$(t){const n=t.get(w$,null);n&&n.forEach(e=>e())})(t)}(function j$(t=[],n){return Rs.create({name:n,providers:[{provide:aE,useValue:"platform"},{provide:mA,useValue:new Set([()=>_f=null])},...t]})}(a,i))}return function Rxe(t){const n=gA();if(!n)throw new Ot(401,!1);return n}()}}function gA(){return _f?.get(P$)??null}let P$=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function R$(t,n){let e;return e="noop"===t?new Fxe:("zone.js"===t?void 0:t)||new Wi(n),e}(i?.ngZone,function L$(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Wi,useValue:r}];return r.run(()=>{const s=Rs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(Dg,null);if(!l)throw new Ot(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qx(this._modules,a),c.unsubscribe()})}),function $$(t,n,e){try{const i=e();return S1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Jx);return c.runInitializers(),c.donePromise.then(()=>(function d6(t){jc(t,"Expected localeId to be defined"),"string"==typeof t&&(u6=t.toLowerCase().replace(/_/g,"-"))}(a.injector.get(hc,Vg)||Vg),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=B$({},i);return function Oxe(t,n,e){const i=new GE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Au);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Ot(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ot(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(mA,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function B$(t,n){return Array.isArray(n)?n.reduce(B$,t):{...t,...n}}let Au=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new rn(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new rn(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Wi.assertNotInAngularZone(),cA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Wi.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Tt(o,s.pipe(We()))}bootstrap(e,i){const r=e instanceof _5;if(!this._injector.get(Jx).done){!r&&function ag(t){const n=no(t)||Ka(t)||vl(t);return null!==n&&n.standalone}(e);throw new Ot(405,Oh)}let s;s=r?e:this._injector.get($c).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function jxe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(zg),c=s.create(Rs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(A$,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qx(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Ot(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qx(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(I$,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qx(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Ot(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(ct(Wi),ct(Fd),ct(Dg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qx(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let qo=(()=>{class t{}return t.__NG_ELEMENT_ID__=Bxe,t})();function Bxe(t){return function Vxe(t,n,e){if(i1(t)&&!e){const i=ac(t.index,n);return new w1(i,i)}return 47&t.type?new w1(n[Za],n):null}(Ea(),Gt(),16==(16&t))}class G${constructor(){}supports(n){return Px(n)}create(n){return new qxe(n)}}const Wxe=(t,n)=>n;class qxe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||Wxe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new Xxe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new W$),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new W$),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class Xxe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Yxe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class W${constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new Yxe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function q$(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Kxe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Kxe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Y$(){return new tw([new G$])}let tw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||Y$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:Y$}),t})();function J$(){return new R1([new X$])}let R1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||J$()),deps:[[t,new d1,new u1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Ot(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:J$}),t})();const ewe=O$(null,"core",[]);let twe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(ct(Au))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();function qg(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}let xA=null;function jh(){return xA}class rwe{}const Ir=new zn("DocumentToken");let wA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function owe(){return ct(K$)}()},providedIn:"platform"}),t})();const swe=new zn("Location Initialized");let K$=(()=>{class t extends wA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return jh().getBaseHref(this._doc)}onPopState(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=jh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Q$()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Q$()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(){return function awe(){return new K$(ct(Ir))}()},providedIn:"platform"}),t})();function Q$(){return!!window.history.pushState}function CA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function Z$(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ph(t){return t&&"?"!==t[0]?"?"+t:t}let zp=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tB)},providedIn:"root"}),t})();const eB=new zn("appBaseHref");let tB=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ar(Ir).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return CA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ph(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ph(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),lwe=(()=>{class t extends zp{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=CA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ph(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(wA),ct(eB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),kA=(()=>{class t{constructor(e){this._subject=new Ke,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function dwe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(Z$(nB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ph(i))}normalize(e){return t.stripTrailingSlash(function uwe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,nB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ph(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ph,t.joinWithSlash=CA,t.stripTrailingSlash=Z$,t.\u0275fac=function(e){return new(e||t)(ct(zp))},t.\u0275prov=Et({token:t,factory:function(){return function cwe(){return new kA(ct(zp))}()},providedIn:"root"}),t})();function nB(t){return t.replace(/\/index.html$/,"")}function pB(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const jA=/\s+/,mB=[];let Rh=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=mB,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(jA):mB}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(jA):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(jA).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(le(tw),le(R1),le(ti),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class Gwe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let jn=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new Gwe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),yB(a,r)}});for(let r=0,o=i.length;r{yB(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(tw))},t.\u0275dir=Zt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function yB(t,n){t.context.$implicit=n.item}let gn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new qwe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){bB("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){bB("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class qwe{constructor(){this.$implicit=null,this.ngIf=null}}function bB(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Cn(n)}'.`)}class PA{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),_B=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new PA(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(le(nl),le(Si),le(dw,9))},t.\u0275dir=Zt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),wB=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Bl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(R1),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),kl=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(le(nl))},t.\u0275dir=Zt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Hn]}),t})(),Vs=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const SB="browser";let _Ce=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new xCe(ct(Ir),window)}),t})();class xCe{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function wCe(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=TB(this.window.history)||TB(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function TB(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class EB{}class YCe extends rwe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class VA extends YCe{static makeCurrent(){!function iwe(t){xA||(xA=t)}(new VA)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function JCe(){return H1=H1||document.querySelector("base"),H1?H1.getAttribute("href"):null}();return null==e?null:function KCe(t){pw=pw||document.createElement("a"),pw.setAttribute("href",t);const n=pw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){H1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return pB(document.cookie,n)}}let pw,H1=null;const NB=new zn("TRANSITION_ID"),ZCe=[{provide:Yx,useFactory:function QCe(t,n,e){return()=>{e.get(Jx).donePromise.then(()=>{const i=jh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const mw=new zn("EventManagerPlugins");let gw=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),z1=(()=>{class t extends jB{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const HA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},zA=/%COMP%/g,RB=new zn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $B(t,n){return n.flat(100).map(e=>e.replace(zA,t))}function BB(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new UA(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof zB?r.applyToHost(e):r instanceof GA&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case yu.Emulated:o=new zB(s,a,i,this.appId,l);break;case yu.ShadowDom:return new l2e(s,a,e,i);default:o=new GA(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(ct(gw),ct(z1),ct(P1),ct(RB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class UA{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(HA[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(HB(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(HB(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=HA[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=HA[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Bl.DashCase|Bl.Important)?n.style.setProperty(e,i,r&Bl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Bl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,BB(i)):this.eventManager.addEventListener(n,e,BB(i))}}function HB(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class l2e extends UA{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$B(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class GA extends UA{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$B(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class zB extends GA{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function o2e(t){return"_ngcontent-%COMP%".replace(zA,t)}(s),this.hostAttr=function s2e(t){return"_nghost-%COMP%".replace(zA,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let c2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const UB=["alt","control","meta","shift"],u2e={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},d2e={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let h2e=(()=>{class t extends OB{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>jh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),UB.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=u2e[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),UB.forEach(s=>{s!==r&&(0,d2e[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const WB=[{provide:L1,useValue:SB},{provide:w$,useValue:function f2e(){VA.makeCurrent()},multi:!0},{provide:Ir,useFactory:function m2e(){return function h0e(t){ZT=t}(document),document},deps:[]}],g2e=O$(ewe,"browser",WB),qB=new zn(""),XB=[{provide:Kx,useClass:class e2e{addToWindow(n){$o.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},$o.getAllAngularTestabilities=()=>n.getAllTestabilities(),$o.getAllAngularRootElements=()=>n.getAllRootElements(),$o.frameworkStabilizers||($o.frameworkStabilizers=[]),$o.frameworkStabilizers.push(i=>{const r=$o.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?jh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:A$,useClass:hA,deps:[Wi,fA,Kx]},{provide:hA,useClass:hA,deps:[Wi,fA,Kx]}],YB=[{provide:aE,useValue:"root"},{provide:Dg,useFactory:function p2e(){return new Dg},deps:[]},{provide:mw,useClass:c2e,multi:!0,deps:[Ir,Wi,L1]},{provide:mw,useClass:h2e,multi:!0,deps:[Ir]},{provide:vw,useClass:vw,deps:[gw,z1,P1,RB]},{provide:Lp,useExisting:vw},{provide:jB,useExisting:z1},{provide:z1,useClass:z1,deps:[Ir]},{provide:gw,useClass:gw,deps:[mw,Wi]},{provide:EB,useClass:t2e,deps:[]},[]];let qA=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:P1,useValue:e.appId},{provide:NB,useExisting:P1},ZCe]}}}return t.\u0275fac=function(e){return new(e||t)(ct(qB,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[...YB,...XB],imports:[Vs,twe]}),t})(),JB=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function y2e(){return new JB(ct(Ir))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let ZB=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):ct(e7),i},providedIn:"root"}),t})(),e7=(()=>{class t extends ZB{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case ko.NONE:return i;case ko.HTML:return Id(i,"HTML")?cc(i):c5(this._doc,String(i)).toString();case ko.STYLE:return Id(i,"Style")?cc(i):i;case ko.SCRIPT:if(Id(i,"Script"))return cc(i);throw new Error("unsafe value used in a script context");case ko.URL:return Id(i,"URL")?cc(i):wx(String(i));case ko.RESOURCE_URL:if(Id(i,"ResourceURL"))return cc(i);throw new Error(`unsafe value used in a resource URL context (see ${U_})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${U_})`)}}bypassSecurityTrustHtml(e){return function b0e(t){return new f0e(t)}(e)}bypassSecurityTrustStyle(e){return function _0e(t){return new p0e(t)}(e)}bypassSecurityTrustScript(e){return function x0e(t){return new m0e(t)}(e)}bypassSecurityTrustUrl(e){return function w0e(t){return new g0e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function C0e(t){return new v0e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function C2e(t){return new e7(t.get(Ir))}(ct(Rs)),i},providedIn:"root"}),t})();function U1(t){return(U1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function K(t,n,e){return(n=function S2e(t){var n=function k2e(t,n){if("object"!==U1(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!==U1(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===U1(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}class t7{}class D2e{}const $h="*";function il(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ma(t,n=null){return{type:4,styles:n,timings:t}}function n7(t,n=null){return{type:2,steps:t,options:n}}function Dr(t){return{type:6,styles:t,offset:null}}function Ia(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i7(t){Promise.resolve().then(t)}class G1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const YA="!";function o7(t){return new Ot(3e3,!1)}function ake(){return typeof window<"u"&&typeof window.document<"u"}function JA(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function wf(t){switch(t.length){case 0:return new G1;case 1:return t[0];default:return new r7(t)}}function s7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case YA:v=r.get(m);break;case $h:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function Y2e(t){return new Ot(3502,!1)}();return a}function KA(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&QA(e,"start",t)));break;case"done":t.onDone(()=>i(e&&QA(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&QA(e,"destroy",t)))}}function QA(t,n,e){const o=ZA(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function ZA(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let eM=(t,n)=>!1,l7=(t,n,e)=>[],c7=null;function tM(t){const n=t.parentNode||t.host;return n===c7?null:n}(JA()||typeof Element<"u")&&(ake()?(c7=(()=>document.documentElement)(),eM=(t,n)=>{for(;n;){if(n===t)return!0;n=tM(n)}return!1}):eM=(t,n)=>t.contains(n),l7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let Up=null,u7=!1;const d7=eM,h7=l7;let f7=(()=>{class t{validateStyleProperty(e){return function cke(t){Up||(Up=function uke(){return typeof document<"u"?document.body:null}()||{},u7=!!Up.style&&"WebkitAppearance"in Up.style);let n=!0;return Up.style&&!function lke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in Up.style,!n&&u7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Up.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d7(e,i)}getParentElement(e){return tM(e)}query(e,i,r){return h7(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new G1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),nM=(()=>{class t{}return t.NOOP=new f7,t})();const dke=1e3,iM="ng-enter",yw="ng-leave",bw="ng-trigger",_w=".ng-trigger",m7="ng-animating",rM=".ng-animating";function Bh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:oM(parseFloat(n[1]),n[2])}function oM(t,n){return"s"===n?t*dke:t}function xw(t,n,e){return t.hasOwnProperty("duration")?t:function fke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o7()),{duration:0,delay:0,easing:""};r=oM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=oM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function T2e(){return new Ot(3100,!1)}()),a=!0),o<0&&(n.push(function E2e(){return new Ot(3101,!1)}()),a=!0),a&&n.splice(l,0,o7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function W1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function g7(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Cf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y7(t,n,e){return e?n+":"+e+";":""}function b7(t){let n="";for(let e=0;e{const o=aM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),JA()&&b7(t))}function Gp(t,n){t.style&&(n.forEach((e,i)=>{const r=aM(i);t.style[r]=""}),JA()&&b7(t))}function q1(t){return Array.isArray(t)?1==t.length?t[0]:n7(t):t}const sM=new RegExp("{{\\s*(.+?)\\s*}}","g");function _7(t){let n=[];if("string"==typeof t){let e;for(;e=sM.exec(t);)n.push(e[1]);sM.lastIndex=0}return n}function X1(t,n,e){const i=t.toString(),r=i.replace(sM,(o,s)=>{let a=n[s];return null==a&&(e.push(function M2e(t){return new Ot(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function ww(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gke=/-+([a-z0-9])/g;function aM(t){return t.replace(gke,(...n)=>n[1].toUpperCase())}function vke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function I2e(t){return new Ot(3004,!1)}()}}function x7(t,n){return window.getComputedStyle(t)[n]}const Sw="*";function Cke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function kke(t,n,e){if(":"==t[0]){const l=function Ske(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function U2e(t){return new Ot(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(w7(r,s));"<"==o[0]&&!(r==Sw&&s==Sw)&&n.push(w7(s,r))}(i,e,n)):e.push(t),e}const Dw=new Set(["true","1"]),Tw=new Set(["false","0"]);function w7(t,n){const e=Dw.has(t)||Tw.has(t),i=Dw.has(n)||Tw.has(n);return(r,o)=>{let s=t==Sw||t==r,a=n==Sw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Dw.has(t):Tw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Dw.has(n):Tw.has(n)),s&&a}}const Dke=new RegExp("s*:selfs*,?","g");function lM(t,n,e,i){return new Tke(t).build(n,e,i)}class Tke{constructor(n){this._driver=n}build(n,e,i){const r=new Mke(e);return this._resetContextStyleTimingState(r),pc(this,q1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function N2e(){return new Ot(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function O2e(){return new Ot(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{_7(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(ww(o.values()),e.errors.push(function j2e(t,n){return new Ot(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pc(this,q1(n.animation),e);return{type:1,matchers:Cke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Wp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pc(this,i,e)),options:Wp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Wp(n.options)}}visitAnimate(n,e){const i=function Fke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return cM(xw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=cM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=xw(e,n);return cM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Dr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Dr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$h?i.push(a):e.errors.push(new Ot(3002,!1)):i.push(g7(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function L2e(t,n,e,i,r){return new Ot(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function mke(t,n,e){const i=n.params||{},r=_7(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function A2e(t){return new Ot(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function R2e(){return new Ot(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let _=null!=y.offset?y.offset:function Ike(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=_&&(o++,C=y.offset=_),l=l||C<0||C>1,a=a||C0&&o{const _=h>0?y==f?1:h*y:s[y],C=_*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=_,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pc(this,q1(n.animation),e),options:Wp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:Wp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:Wp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Eke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Dke,"")),t=t.replace(/@\*/g,_w).replace(/@\w+/g,e=>_w+"-"+e.slice(1)).replace(/:animating/g,rM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fc(e.collectedStyles,e.currentQuerySelector,new Map);const a=pc(this,q1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:Wp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function H2e(){return new Ot(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:xw(n.timings,e.errors,!0);return{type:12,animation:pc(this,q1(n.animation),e),timings:i,options:null}}}class Mke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Wp(t){return t?(t=W1(t)).params&&(t.params=function Ake(t){return t?W1(t):null}(t.params)):t={},t}function cM(t,n,e){return{duration:t,delay:n,easing:e}}function uM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ew{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jke=new RegExp(":enter","g"),Lke=new RegExp(":leave","g");function dM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Rke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Rke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ew;const d=new hM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[uM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bh(X1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bh(i.duration):null,a=null!=i.delay?Bh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Aw);const s=Bh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return xw(e.params?X1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Aw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Aw={};class hM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Aw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bh(i.duration)),null!=i.delay&&(r.delay=Bh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=X1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new hM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Aw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new $ke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jke,"."+this._enterClassName)).replace(Lke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function z2e(t){return new Ot(3014,!1)}()),a}}class Mw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$h),this._currentKeyframe.set(e,$h);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function Bke(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$h)}else Cf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=X1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$h),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Cf(a,new Map,this._backFill);c.forEach((u,d)=>{u===YA?n.add(d):u===$h&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?ww(n.values()):[],s=e.size?ww(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return uM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class $ke extends Mw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Cf(n[0]);l.set("offset",0),o.push(l);const c=Cf(n[0]);c.set("offset",S7(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Cf(n[d]);const f=h.get("offset");h.set("offset",S7((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return uM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function S7(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class fM{}const Vke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class Hke extends fM{normalizePropertyName(n,e){return aM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(Vke.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function F2e(t,n){return new Ot(3005,!1)}())}return s+o}}function D7(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const pM={};class T7{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function zke(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||pM,p=this.buildStyles(i,a&&a.params||pM,d),m=l&&l.params||pM,g=this.buildStyles(r,m,d),v=new Set,y=new Map,_=new Map,C="void"===r,S={params:Uke(m,h),delay:this.ast.options?.delay},M=u?[]:dM(n,e,this.ast.animation,o,s,p,g,S,c,d);let $=0;if(M.forEach(R=>{$=Math.max(R.duration+R.delay,$)}),d.length)return D7(e,this._triggerName,i,r,C,p,g,[],[],y,_,$,d);M.forEach(R=>{const z=R.element,U=fc(y,z,new Set);R.preStyleProps.forEach(re=>U.add(re));const q=fc(_,z,new Set);R.postStyleProps.forEach(re=>q.add(re)),z!==e&&v.add(z)});const G=ww(v.values());return D7(e,this._triggerName,i,r,C,p,g,M,G,y,_,$)}}function Uke(t,n){const e=W1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class Gke{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=W1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=X1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class qke{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new Gke(r.style,r.options&&r.options.params||{},i))}),E7(this.states,"true","1"),E7(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new T7(n,r,this.states))}),this.fallbackTransition=function Xke(t,n,e){return new T7(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function E7(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const Yke=new Ew;class Jke{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=lM(this._driver,e,i,r);if(i.length)throw function J2e(t){return new Ot(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=dM(this._driver,e,o,iM,yw,new Map,new Map,i,Yke,r),s.forEach(u=>{const d=fc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function K2e(){return new Ot(3300,!1)}()),s=[]),r.length)throw function Q2e(t){return new Ot(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$h))})});const c=wf(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function Z2e(t){return new Ot(3301,!1)}();return e}listen(n,e,i,r){const o=ZA(e,"","","");return KA(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const A7="ng-animate-queued",mM="ng-animate-disabled",tSe=[],M7={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},nSe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zc="__ng_removed";class gM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function sSe(t){return t??null}(i?n.value:n),i){const o=W1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Y1="void",vM=new gM(Y1);class iSe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Uc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function eke(t,n){return new Ot(3302,!1)}();if(null==i||0==i.length)throw function tke(t){return new Ot(3303,!1)}();if(!function aSe(t){return"start"==t||"done"==t}(i))throw function nke(t,n){return new Ot(3400,!1)}();const o=fc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fc(this._engine.statesByElement,n,new Map);return a.has(e)||(Uc(n,bw),Uc(n,bw+"-"+e),a.set(e,vM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function ike(t){return new Ot(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new yM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Uc(n,bw),Uc(n,bw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new gM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=vM),c.value!==Y1&&l.value===c.value){if(!function uSe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{Gp(n,g),Rd(n,v)})}return}const h=fc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Uc(n,A7),s.onStart(()=>{Xg(n,A7)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,_w,!0);i.forEach(r=>{if(r[zc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,Y1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&wf(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||vM,u=new gM(Y1),d=new yM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[zc];(!o||o===M7)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Uc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=ZA(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,KA(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class rSe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new iSe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Iw(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Iw(e))return;const o=e[zc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Uc(n,mM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Xg(n,mM))}removeNode(n,e,i,r){if(Iw(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[zc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Iw(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,_w,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,rM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return wf(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[zc];if(e&&e.setForRemoval){if(n[zc]=M7,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(mM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?wf(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function rke(t){return new Ot(3402,!1)}()}_flushAnimations(n,e){const i=new Ew,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Z=>{u.add(Z);const H=this.driver.query(Z,".ng-animate-queued",!0);for(let he=0;he{const he=iM+m++;p.set(H,he),Z.forEach(E=>Uc(E,he))});const g=[],v=new Set,y=new Set;for(let Z=0;Zv.add(E)):y.add(H))}const _=new Map,C=N7(h,Array.from(v));C.forEach((Z,H)=>{const he=yw+m++;_.set(H,he),Z.forEach(E=>Uc(E,he))}),n.push(()=>{f.forEach((Z,H)=>{const he=p.get(H);Z.forEach(E=>Xg(E,he))}),C.forEach((Z,H)=>{const he=_.get(H);Z.forEach(E=>Xg(E,he))}),g.forEach(Z=>{this.processLeaveNode(Z)})});const S=[],M=[];for(let Z=this._namespaceList.length-1;Z>=0;Z--)this._namespaceList[Z].drainQueuedTransitions(e).forEach(he=>{const E=he.player,F=he.element;if(S.push(E),this.collectedEnterElements.length){const xe=F[zc];if(xe&&xe.setForMove){if(xe.previousTriggersValues&&xe.previousTriggersValues.has(he.triggerName)){const tt=xe.previousTriggersValues.get(he.triggerName),ze=this.statesByElement.get(he.element);if(ze&&ze.has(he.triggerName)){const ot=ze.get(he.triggerName);ot.value=tt,ze.set(he.triggerName,ot)}}return void E.destroy()}}const N=!d||!this.driver.containsElement(d,F),Y=_.get(F),V=p.get(F),oe=this._buildInstruction(he,i,V,Y,N);if(oe.errors&&oe.errors.length)return void M.push(oe);if(N)return E.onStart(()=>Gp(F,oe.fromStyles)),E.onDestroy(()=>Rd(F,oe.toStyles)),void r.push(E);if(he.isFallbackTransition)return E.onStart(()=>Gp(F,oe.fromStyles)),E.onDestroy(()=>Rd(F,oe.toStyles)),void r.push(E);const fe=[];oe.timelines.forEach(xe=>{xe.stretchStartingKeyframe=!0,this.disabledNodes.has(xe.element)||fe.push(xe)}),oe.timelines=fe,i.append(F,oe.timelines),s.push({instruction:oe,player:E,element:F}),oe.queriedElements.forEach(xe=>fc(a,xe,[]).push(E)),oe.preStyleProps.forEach((xe,tt)=>{if(xe.size){let ze=l.get(tt);ze||l.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))}}),oe.postStyleProps.forEach((xe,tt)=>{let ze=c.get(tt);ze||c.set(tt,ze=new Set),xe.forEach((ot,B)=>ze.add(B))})});if(M.length){const Z=[];M.forEach(H=>{Z.push(function oke(t,n){return new Ot(3505,!1)}())}),S.forEach(H=>H.destroy()),this.reportError(Z)}const $=new Map,G=new Map;s.forEach(Z=>{const H=Z.element;i.has(H)&&(G.set(H,H),this._beforeAnimationBuild(Z.player.namespaceId,Z.instruction,$))}),r.forEach(Z=>{const H=Z.element;this._getPreviousPlayers(H,!1,Z.namespaceId,Z.triggerName,null).forEach(E=>{fc($,H,[]).push(E),E.destroy()})});const R=g.filter(Z=>j7(Z,l,c)),z=new Map;F7(z,this.driver,y,c,$h).forEach(Z=>{j7(Z,l,c)&&R.push(Z)});const q=new Map;f.forEach((Z,H)=>{F7(q,this.driver,new Set(Z),l,YA)}),R.forEach(Z=>{const H=z.get(Z),he=q.get(Z);z.set(Z,new Map([...Array.from(H?.entries()??[]),...Array.from(he?.entries()??[])]))});const re=[],L=[],X={};s.forEach(Z=>{const{element:H,player:he,instruction:E}=Z;if(i.has(H)){if(u.has(H))return he.onDestroy(()=>Rd(H,E.toStyles)),he.disabled=!0,he.overrideTotalTime(E.totalTime),void r.push(he);let F=X;if(G.size>1){let Y=H;const V=[];for(;Y=Y.parentNode;){const oe=G.get(Y);if(oe){F=oe;break}V.push(Y)}V.forEach(oe=>G.set(oe,F))}const N=this._buildAnimation(he.namespaceId,E,$,o,q,z);if(he.setRealPlayer(N),F===X)re.push(he);else{const Y=this.playersByElement.get(F);Y&&Y.length&&(he.parentPlayer=wf(Y)),r.push(he)}}else Gp(H,E.fromStyles),he.onDestroy(()=>Rd(H,E.toStyles)),L.push(he),u.has(H)&&r.push(he)}),L.forEach(Z=>{const H=o.get(Z.element);if(H&&H.length){const he=wf(H);Z.setRealPlayer(he)}}),r.forEach(Z=>{Z.parentPlayer?Z.syncPlayerEvents(Z.parentPlayer):Z.destroy()});for(let Z=0;Z!N.destroyed);F.length?lSe(this,H,F):this.processLeaveNode(H)}return g.length=0,re.forEach(Z=>{this.players.push(Z),Z.onDone(()=>{Z.destroy();const H=this.players.indexOf(Z);this.players.splice(H,1)}),Z.play()}),re}elementContainsData(n,e){let i=!1;const r=e[zc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==Y1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Gp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[zc];if(g&&g.removedBeforeQueried)return new G1(p.duration,p.delay);const v=m!==l,y=function cSe(t){const n=[];return O7(t,n),n}((i.get(m)||tSe).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),_=o.get(m),C=s.get(m),S=s7(0,this._normalizer,0,p.keyframes,_,C),M=this._buildPlayer(p,S,y);if(p.subTimeline&&r&&d.add(m),v){const $=new yM(n,a,m);$.setRealPlayer(M),c.push($)}return M});c.forEach(p=>{fc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function oSe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Uc(p,m7));const f=wf(h);return f.onDestroy(()=>{u.forEach(p=>Xg(p,m7)),Rd(l,e.toStyles)}),d.forEach(p=>{fc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new G1(n.duration,n.delay)}}class yM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new G1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>KA(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Iw(t){return t&&1===t.nodeType}function I7(t,n){const e=t.style.display;return t.style.display=n??"none",e}function F7(t,n,e,i,r){const o=[];e.forEach(l=>o.push(I7(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[zc]=nSe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>I7(l,o[a++])),s}function N7(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Uc(t,n){t.classList?.add(n)}function Xg(t,n){t.classList?.remove(n)}function lSe(t,n,e){wf(e).onDone(()=>t.processLeaveNode(n))}function O7(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Fw{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new rSe(n,e,i),this._timelineEngine=new Jke(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=lM(this._driver,o,l,c);if(l.length)throw function X2e(t,n){return new Ot(3404,!1)}();a=function Wke(t,n,e){return new qke(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let hSe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Gp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gp(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bM(t){let n=null;return t.forEach((e,i)=>{(function fSe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class P7{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:x7(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class pSe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d7(n,e)}getParentElement(n){return tM(n)}query(n,e,i){return h7(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof P7);(function yke(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function pke(t){return t.length?t[0]instanceof Map?t:t.map(n=>g7(n)):[]}(e).map(f=>Cf(f));d=function bke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,x7(t,a)))}}return n}(n,d,c);const h=function dSe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=bM(n[0]),n.length>1&&(i=bM(n[n.length-1]))):n instanceof Map&&(e=bM(n)),e||i?new hSe(t,e,i):null}(n,d);return new P7(n,d,l,h)}}let mSe=(()=>{class t extends t7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:yu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n7(e):e;return L7(this._renderer,null,i,"register",[r]),new gSe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Ir))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class gSe extends D2e{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new vSe(this._id,n,e||{},this._renderer)}}class vSe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L7(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L7(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const R7="@.disabled";let ySe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $7("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new bSe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(ct(Lp),ct(Fw),ct(Wi))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class $7{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==R7?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class bSe extends $7{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==R7?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Se(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function xSe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wSe=(()=>{class t extends Fw{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(nM),ct(fM),ct(Au))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const B7=[{provide:t7,useClass:mSe},{provide:fM,useFactory:function CSe(){return new Hke}},{provide:Fw,useClass:wSe},{provide:Lp,useFactory:function kSe(t,n,e){return new ySe(t,n,e)},deps:[vw,Fw,Wi]}],_M=[{provide:nM,useFactory:()=>new pSe},{provide:C$,useValue:"BrowserAnimations"},...B7],xM=[{provide:nM,useClass:f7},{provide:C$,useValue:"NoopAnimations"},...B7];let SSe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?xM:_M}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:_M,imports:[qA]}),t})(),DSe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:xM,imports:[qA]}),t})();function $n(...t){let n=t[t.length-1];return Sa(n)?(t.pop(),Oc(t,n)):st(t)}class Hs extends tr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Xr;return this._value}next(n){super.next(this._value=n)}}const Ow=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class wM extends O{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TSe extends O{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function CM(t,n,e,i,r=new TSe(t,e,i)){if(!r.closed)return n instanceof rn?n.subscribe(r):nc(n)(r)}const V7={};function jw(...t){let n,e;return Sa(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&et(t[0])&&(t=t[0]),st(t,e).lift(new ESe(n))}class ESe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new ASe(n,this.resultSelector))}}class ASe extends wM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V7),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lw(t){return t?function ISe(t){return new rn(n=>t.schedule(()=>n.complete()))}(t):Vh}function H7(t){return new rn(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?co(e):Lw()).subscribe(n)})}function qp(t,n){return new rn(n?e=>n.schedule(FSe,0,{error:t,subscriber:e}):e=>e.error(t))}function FSe({error:t,subscriber:n}){n.error(t)}function zl(t,n){return"function"==typeof n?e=>e.pipe(zl((i,r)=>co(t(i,r)).pipe(yn((o,s)=>n(i,o,r,s))))):e=>e.lift(new NSe(t))}class NSe{constructor(n){this.project=n}call(n,e){return e.subscribe(new OSe(n,this.project))}}class OSe extends W{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new ml(this),r=this.destination;r.add(i),this.innerSubscription=Ne(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const z7=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Sl(t){return n=>0===t?Lw():n.lift(new jSe(t))}class jSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new PSe(n,this.total))}}class PSe extends O{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function ns(t,n){return function(i){return i.lift(new LSe(t,n))}}class LSe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new RSe(n,this.predicate,this.thisArg))}}class RSe extends O{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function Rw(t=null){return n=>n.lift(new $Se(t))}class $Se{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new BSe(n,this.defaultValue))}}class BSe extends O{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function U7(t=zSe){return n=>n.lift(new VSe(t))}class VSe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new HSe(n,this.errorFactory))}}class HSe extends O{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function zSe(){return new Ow}function kf(t,n){const e=arguments.length>=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,Sl(1),e?Rw(n):U7(()=>new Ow))}function Sf(t,n){return nt(t,n,1)}function Hh(){}function is(t,n,e){return function(r){return r.lift(new USe(t,n,e))}}class USe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new GSe(n,this.nextOrObserver,this.error,this.complete))}}class GSe extends O{constructor(n,e,i,r){super(n),this._tapNext=Hh,this._tapError=Hh,this._tapComplete=Hh,this._tapError=i||Hh,this._tapComplete=r||Hh,rt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hh,this._tapError=e.error||Hh,this._tapComplete=e.complete||Hh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ul(t){return function(e){const i=new WSe(t),r=e.lift(i);return i.caught=r}}class WSe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new qSe(n,this.selector,this.caught))}}class qSe extends W{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new ml(this);this.add(i);const r=Ne(e,i);r!==i&&this.add(r)}}}function G7(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new XSe(t,n,e))}}class XSe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YSe(n,this.accumulator,this.seed,this.hasSeed))}}class YSe extends O{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function kM(t){return function(e){return 0===t?Lw():e.lift(new JSe(t))}}class JSe{constructor(n){if(this.total=n,this.total<0)throw new z7}call(n,e){return e.subscribe(new KSe(n,this.total))}}class KSe extends O{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?ns((r,o)=>t(r,o,i)):jt,kM(1),e?Rw(n):U7(()=>new Ow))}class ZSe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new eDe(n,this.predicate,this.inclusive))}}class eDe extends O{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class nDe{constructor(n){this.value=n}call(n,e){return e.subscribe(new iDe(n,this.value))}}class iDe extends O{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function SM(t){return n=>n.lift(new rDe(t))}class rDe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new oDe(n,this.callback))}}class oDe extends O{constructor(n,e){super(n),this.add(new ue(e))}}const zi="primary",K1=Symbol("RouteTitle");class sDe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Yg(t){return new sDe(t)}function aDe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function X7(t){return Array.prototype.concat.apply([],t)}function Y7(t){return t.length>0?t[t.length-1]:null}function Fa(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Df(t){return OE(t)?t:S1(t)?co(Promise.resolve(t)):$n(t)}const $w=!1,cDe={exact:function Q7(t,n,e){if(!Xp(t.segments,n.segments)||!Bw(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q7(t.children[i],n.children[i],e))return!1;return!0},subset:Z7},J7={exact:function uDe(t,n){return $d(t,n)},subset:function dDe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q7(t[e],n[e]))},ignored:()=>!0};function K7(t,n,e){return cDe[e.paths](t.root,n.root,e.matrixParams)&&J7[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z7(t,n,e){return e9(t,n,n.segments,e)}function e9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!Xp(r,e)||n.hasChildren()||!Bw(r,e,i))}if(t.segments.length===e.length){if(!Xp(t.segments,e)||!Bw(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z7(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(Xp(t.segments,r)&&Bw(t.segments,r,i)&&t.children[zi])&&e9(t.children[zi],n,o,i)}}function Bw(t,n,e){return n.every((i,r)=>J7[e](t[r].parameters,i.parameters))}class Tf{constructor(n=new fr([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return pDe.serialize(this)}}class fr{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Fa(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Vw(this)}}class Q1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Yg(this.parameters)),this._parameterMap}toString(){return i9(this)}}function Xp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let Z1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new DM},providedIn:"root"}),t})();class DM{parse(n){const e=new CDe(n);return new Tf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${ey(n.root,!0)}`,i=function vDe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Hw(e)}=${Hw(r)}`).join("&"):`${Hw(e)}=${Hw(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function mDe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const pDe=new DM;function Vw(t){return t.segments.map(n=>i9(n)).join("/")}function ey(t,n){if(!t.hasChildren())return Vw(t);if(n){const e=t.children[zi]?ey(t.children[zi],!1):"",i=[];return Fa(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${ey(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function fDe(t,n){let e=[];return Fa(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Fa(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[ey(t.children[zi],!1)]:[`${r}:${ey(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${Vw(t)}/${e[0]}`:`${Vw(t)}/(${e.join("//")})`}}function t9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Hw(t){return t9(t).replace(/%3B/gi,";")}function TM(t){return t9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zw(t){return decodeURIComponent(t)}function n9(t){return zw(t.replace(/\+/g,"%20"))}function i9(t){return`${TM(t.path)}${function gDe(t){return Object.keys(t).map(n=>`;${TM(n)}=${TM(t[n])}`).join("")}(t.parameters)}`}const yDe=/^[^\/()?;=#]+/;function Uw(t){const n=t.match(yDe);return n?n[0]:""}const bDe=/^[^=?&#]+/,xDe=/^[^&#]+/;class CDe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new fr([],{}):new fr([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new fr(n,e)),i}parseSegment(){const n=Uw(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Ot(4009,$w);return this.capture(n),new Q1(zw(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Uw(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Uw(this.remaining);r&&(i=r,this.capture(i))}n[zw(e)]=zw(i)}parseQueryParam(n){const e=function _De(t){const n=t.match(bDe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wDe(t){const n=t.match(xDe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=n9(e),o=n9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Uw(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Ot(4010,$w);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new fr([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Ot(4011,$w)}}function EM(t){return t.segments.length>0?new fr([],{[zi]:t}):t}function Gw(t){const n={};for(const i of Object.keys(t.children)){const o=Gw(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function kDe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new fr(t.segments.concat(n.segments),n.children)}return t}(new fr(t.segments,n))}function Yp(t){return t instanceof Tf}const AM=!1;function SDe(t,n,e,i,r){if(0===e.length)return Jg(n.root,n.root,n.root,i,r);const o=function l9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new a9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Fa(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new a9(e,n,i)}(e);return o.toRoot()?Jg(n.root,n.root,new fr([],{}),i,r):function s(l){const c=function TDe(t,n,e,i){if(t.isAbsolute)return new Kg(n.root,!0,0);if(-1===i)return new Kg(e,e===n.root,0);return function c9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Ot(4005,AM&&"Invalid number of '../'");r=i.segments.length}return new Kg(i,!1,r-o)}(e,i+(ty(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Qg(c.segmentGroup,c.index,o.commands):MM(c.segmentGroup,c.index,o.commands);return Jg(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function ty(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function ny(t){return"object"==typeof t&&null!=t&&t.outlets}function Jg(t,n,e,i,r){let s,o={};i&&Fa(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:s9(t,n,e);const a=EM(Gw(s));return new Tf(a,o,r)}function s9(t,n,e){const i={};return Fa(t.children,(r,o)=>{i[o]=r===n?e:s9(r,n,e)}),new fr(t.segments,i)}class a9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&ty(i[0]))throw new Ot(4003,AM&&"Root segment cannot have matrix parameters");const r=i.find(ny);if(r&&r!==Y7(i))throw new Ot(4004,AM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Kg{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function MM(t,n,e){if(t||(t=new fr([],{})),0===t.segments.length&&t.hasChildren())return Qg(t,n,e);const i=function ADe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(ny(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!d9(l,c,s))return o;i+=2}else{if(!d9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=MM(t.children[s],n,o))}),Fa(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new fr(t.segments,r))}}function IM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=IM(new fr([],{}),0,e))}),n}function u9(t){const n={};return Fa(t,(e,i)=>n[i]=`${e}`),n}function d9(t,n,e){return t==e.path&&$d(n,e.parameters)}const iy="imperative";class Bd{constructor(n,e){this.id=n,this.url=e}}class Ww extends Bd{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class zh extends Bd{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ry extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class qw extends Bd{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Xw extends Bd{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class IDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class FDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class NDe extends Bd{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class ODe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jDe extends Bd{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PDe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class LDe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class RDe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $De{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BDe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class VDe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class h9{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UDe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SDe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return UDe.\u0275fac(n)},providedIn:"root"}),t})();class f9{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=FM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=FM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=NM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return NM(n,this._root).map(e=>e.value)}}function FM(t,n){if(t===n.value)return n;for(const e of n.children){const i=FM(t,e);if(i)return i}return null}function NM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=NM(t,e);if(i.length)return i.unshift(n),i}return[]}class Uh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Zg(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class p9 extends f9{constructor(n,e){super(n),this.snapshot=e,OM(this,n)}toString(){return this.snapshot.toString()}}function m9(t,n){const e=function qDe(t,n){const s=new Yw([],{},{},"",{},zi,n,null,t.root,-1,{});return new v9("",new Uh(s,[]))}(t,n),i=new Hs([new Q1("",{})]),r=new Hs({}),o=new Hs({}),s=new Hs({}),a=new Hs(""),l=new Rr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new p9(new Uh(l,[]),e)}class Rr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(yn(c=>c[K1]))??$n(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(yn(n=>Yg(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(yn(n=>Yg(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function g9(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function XDe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Yw{get title(){return this.data?.[K1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Yg(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Yg(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class v9 extends f9{constructor(n,e){super(e),this.url=n,OM(this,e)}toString(){return y9(this._root)}}function OM(t,n){n.value._routerState=t,n.children.forEach(e=>OM(t,e))}function y9(t){const n=t.children.length>0?` { ${t.children.map(y9).join(", ")} } `:"";return`${t.value}${n}`}function jM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$d(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),$d(n.params,e.params)||t.params.next(e.params),function lDe(t,n){if(t.length!==n.length)return!1;for(let e=0;e$d(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||PM(t.parent,n.parent))}function oy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JDe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return oy(t,i,r);return oy(t,i)})}(t,n,e);return new Uh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>oy(t,a)),s}}const i=function KDe(t){return new Rr(new Hs(t.url),new Hs(t.params),new Hs(t.queryParams),new Hs(t.fragment),new Hs(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>oy(t,o));return new Uh(i,r)}}const LM="ngNavigationCancelingError";function b9(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=Yp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=_9(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function _9(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[LM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function x9(t){return w9(t)&&Yp(t.url)}function w9(t){return t&&t[LM]}class QDe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new sy,this.attachRef=null}}let sy=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new QDe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Jw=!1;let Jp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new Ke,this.deactivateEvents=new Ke,this.attachEvents=new Ke,this.detachEvents=new Ke,this.parentContexts=ar(sy),this.location=ar(nl),this.changeDetector=ar(qo),this.environmentInjector=ar(Fd)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Ot(4012,Jw);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Ot(4012,Jw);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Ot(4012,Jw);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Ot(4013,Jw);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new ZDe(e,a,r.injector);if(i&&function eTe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Hn]}),t})();class ZDe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Rr?this.route:n===sy?this.childContexts:this.parent.get(n,e)}}let RM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[L6],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp],encapsulation:2}),t})();function C9(t,n){return t.providers&&!t._injector&&(t._injector=Gx(t.providers,n,`Route: ${t.path}`)),t._injector??n}function BM(t){const n=t.children&&t.children.map(BM),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=RM),e}function Gc(t){return t.outlet||zi}function k9(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function ay(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class oTe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),jM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Fa(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Zg(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Zg(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new VDe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new $De(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(jM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),jM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=ay(r.snapshot),l=a?.get($c)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class S9{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Kw{constructor(n,e){this.component=n,this.route=e}}function sTe(t,n,e){const i=t._root;return ly(i,n?n._root:null,e,[i.value])}function ev(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function cge(t){return null!==q_(t)}(t)?n.get(t):t:i}function ly(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Zg(n);return t.children.forEach(s=>{(function lTe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function cTe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Xp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Xp(t.url,n.url)||!$d(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!PM(t,n)||!$d(t.queryParams,n.queryParams);default:return!PM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new S9(i)):(o.data=s.data,o._resolvedData=s._resolvedData),ly(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Kw(a.outlet.component,s))}else s&&cy(n,a,r),r.canActivateChecks.push(new S9(i)),ly(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Fa(o,(s,a)=>cy(s,e.getContext(a),r)),r}function cy(t,n,e){const i=Zg(t),r=t.value;Fa(i,(o,s)=>{cy(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Kw(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function uy(t){return"function"==typeof t}function VM(t){return t instanceof Ow||"EmptyError"===t?.name}const Qw=Symbol("INITIAL_VALUE");function tv(){return zl(t=>jw(t.map(n=>n.pipe(Sl(1),function J1(...t){const n=t[t.length-1];return Sa(n)?(t.pop(),e=>Pw(t,e,n)):e=>Pw(t,e)}(Qw)))).pipe(yn(n=>{for(const e of n)if(!0!==e){if(e===Qw)return Qw;if(!1===e||e instanceof Tf)return e}return!0}),ns(n=>n!==Qw),Sl(1)))}function D9(t){return function Wt(...t){return wn(t)}(is(n=>{if(Yp(n))throw b9(0,n)}),yn(n=>!0===n))}const HM={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function T9(t,n,e,i,r){const o=zM(t,n,e);return o.matched?function DTe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$n(r.map(s=>{const a=ev(s,t);return Df(function mTe(t){return t&&uy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9()):$n(!0)}(i=C9(n,i),n,e).pipe(yn(s=>!0===s?o:{...HM})):$n(o)}function zM(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...HM}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||aDe)(e,t,n);if(!r)return{...HM};const o={};Fa(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Zw(t,n,e,i){if(e.length>0&&function ATe(t,n,e){return e.some(i=>eC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new fr(n,function ETe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new fr([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new fr(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function MTe(t,n,e){return e.some(i=>eC(t,n,i))}(t,e,i)){const o=new fr(t.segments,function TTe(t,n,e,i,r){const o={};for(const s of i)if(eC(t,e,s)&&!r[Gc(s)]){const a=new fr([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new fr(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function eC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function E9(t,n,e,i){return!!(Gc(t)===i||i!==zi&&eC(n,e,t))&&("**"===t.path||zM(n,t,e).matched)}function A9(t,n,e){return 0===n.length&&!t.children[e]}const tC=!1;class nC{constructor(n){this.segmentGroup=n||null}}class M9{constructor(n){this.urlTree=n}}function dy(t){return qp(new nC(t))}function I9(t){return qp(new M9(t))}function ITe(t){return qp(new Ot(4e3,tC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class OTe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=Zw(this.urlTree.root,[],[],this.config).segmentGroup,e=new fr(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(yn(o=>this.createUrlTree(Gw(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ul(o=>{if(o instanceof M9)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof nC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(yn(r=>this.createUrlTree(Gw(r),n.queryParams,n.fragment))).pipe(Ul(r=>{throw r instanceof nC?this.noMatchError(r):r}))}noMatchError(n){return new Ot(4002,tC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=EM(n);return new Tf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(yn(o=>new fr([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return co(r).pipe(Sf(o=>{const s=i.children[o],a=k9(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(yn(l=>({segment:l,outlet:o})))}),G7((o,s)=>(o[s.outlet]=s.segment,o),{}),W7())}expandSegment(n,e,i,r,o,s){return co(i).pipe(Sf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ul(c=>{if(c instanceof nC)return $n(null);throw c}))),kf(a=>!!a),Ul((a,l)=>{if(VM(a))return A9(e,r,o)?$n(new fr([],{})):dy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return E9(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):dy(e):dy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?I9(o):this.lineralizeSegments(i,o).pipe(nt(s=>{const a=new fr(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zM(e,r,o);if(!a)return dy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?I9(d):this.lineralizeSegments(r,d).pipe(nt(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=C9(i,n),i.loadChildren?(i._loadedRoutes?$n({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(yn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new fr(r,{})))):$n(new fr(r,{}))):T9(e,i,r,n).pipe(zl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(nt(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=Zw(e,a,l,h),m=new fr(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(yn(_=>new fr(a,_)));if(0===h.length&&0===p.length)return $n(new fr(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(yn(y=>new fr(a.concat(y.segments),y.children)))})):dy(e)))}getChildConfig(n,e,i){return e.children?$n({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$n({routes:e._loadedRoutes,injector:e._loadedInjector}):function STe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$n(!0):$n(r.map(s=>{const a=ev(s,t);return Df(function dTe(t){return t&&uy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(tv(),D9())}(n,e,i).pipe(nt(r=>r?this.configLoader.loadChildren(n,e).pipe(is(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function FTe(t){return qp(_9(tC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$n({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $n(i);if(r.numberOfChildren>1||!r.children[zi])return ITe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Tf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Fa(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Fa(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new fr(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Ot(4001,tC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PTe{}class $Te{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=Zw(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(yn(e=>{if(null===e)return null;const i=new Yw([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Uh(i,e),o=new v9(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=g9(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return co(Object.keys(i.children)).pipe(Sf(r=>{const o=i.children[r],s=k9(e,r);return this.processSegmentGroup(n,s,o,r)}),G7((r,o)=>r&&o?(r.push(...o),r):null),function QSe(t,n=!1){return e=>e.lift(new ZSe(t,n))}(r=>null!==r),Rw(null),W7(),yn(r=>{if(null===r)return null;const o=N9(r);return function BTe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return co(e).pipe(Sf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),kf(s=>!!s),Ul(s=>{if(VM(s))return A9(i,r,o)?$n([]):$n(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!E9(e,i,r,o))return $n(null);let s;if("**"===e.path){const a=r.length>0?Y7(r).parameters:{},l=j9(i)+r.length;s=$n({snapshot:new Yw(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),l,L9(e)),consumedSegments:[],remainingSegments:[]})}else s=T9(i,e,r,n).pipe(yn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=j9(i)+l.length;return{snapshot:new Yw(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,P9(e),Gc(e),e.component??e._loadedComponent??null,e,O9(i),d,L9(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(zl(a=>{if(null===a)return $n(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function VTe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=Zw(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(yn(g=>null===g?null:[new Uh(l,g)]));if(0===h.length&&0===p.length)return $n([new Uh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(yn(g=>null===g?null:[new Uh(l,g)]))}))}}function HTe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function N9(t){const n=[],e=new Set;for(const i of t){if(!HTe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=N9(i.children);n.push(new Uh(i.value,r))}return n.filter(i=>!e.has(i))}function O9(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function j9(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function P9(t){return t.data||{}}function L9(t){return t.resolve||{}}function R9(t){return"string"==typeof t.title||null===t.title}function UM(t){return zl(n=>{const e=t(n);return e?co(e).pipe(yn(()=>n)):$n(n)})}const nv=new zn("ROUTES");let GM=(()=>{class t{constructor(e,i){this.injector=e,this.compiler=i,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $n(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Df(e.loadComponent()).pipe(yn(B9),is(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),SM(()=>{this.componentLoaders.delete(e)})),r=new pe(i,()=>new tr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $n({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(yn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=X7(l.get(nv,[],ki.Self|ki.Optional)));return{routes:c.map(BM),injector:l}}),SM(()=>{this.childrenLoaders.delete(i)})),s=new pe(o,()=>new tr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Df(e()).pipe(yn(B9),nt(r=>r instanceof j6||Array.isArray(r)?$n(r):co(this.compiler.compileModuleAsync(r))))}}return t.\u0275fac=function(e){return new(e||t)(ct(Rs),ct(k$))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function B9(t){return function KTe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let rC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new tr,this.configLoader=ar(GM),this.environmentInjector=ar(Fd),this.urlSerializer=ar(Z1),this.rootContexts=ar(sy),this.navigationId=0,this.afterPreactivation=()=>$n(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new LDe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PDe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Hs({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:iy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ns(i=>0!==i.id),yn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),zl(i=>{let r=!1,o=!1;return $n(i).pipe(is(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),zl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return V9(s.source)&&(e.browserUrlTree=s.extractedUrl),$n(s).pipe(zl(u=>{const d=this.transitions?.getValue();return this.events.next(new Ww(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vh:Promise.resolve(u)}),function jTe(t,n,e,i){return zl(r=>function NTe(t,n,e,i,r){return new OTe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(yn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),is(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UTe(t,n,e,i,r){return nt(o=>function RTe(t,n,e,i,r,o,s="emptyOnly"){return new $Te(t,n,e,i,r,s,o).recognize().pipe(zl(a=>null===a?function LTe(t){return new rn(n=>n.error(t))}(new PTe):$n(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(yn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),is(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new IDe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new Ww(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=m9(d,this.rootComponentType).snapshot;return $n(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new qw(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vh}}),is(s=>{const a=new FDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),yn(s=>i={...s,guards:sTe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function vTe(t,n){return nt(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$n({...e,guardsResult:!0}):function yTe(t,n,e,i){return co(t).pipe(nt(r=>function kTe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$n(o.map(a=>{const l=ay(n)??r,c=ev(a,l);return Df(function pTe(t){return t&&uy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(kf())})).pipe(tv()):$n(!0)}(r.component,r.route,e,n,i)),kf(r=>!0!==r,!0))}(s,i,r,t).pipe(nt(a=>a&&function uTe(t){return"boolean"==typeof t}(a)?function bTe(t,n,e,i){return co(n).pipe(Sf(r=>Pw(function xTe(t,n){return null!==t&&n&&n(new RDe(t)),$n(!0)}(r.route.parent,i),function _Te(t,n){return null!==t&&n&&n(new BDe(t)),$n(!0)}(r.route,i),function CTe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function aTe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H7(()=>$n(s.guards.map(l=>{const c=ay(s.node)??e,u=ev(l,c);return Df(function fTe(t){return t&&uy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(kf())})).pipe(tv())));return $n(o).pipe(tv())}(t,r.path,e),function wTe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $n(!0);const r=i.map(o=>H7(()=>{const s=ay(n)??e,a=ev(o,s);return Df(function hTe(t){return t&&uy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(kf())}));return $n(r).pipe(tv())}(t,r.route,e))),kf(r=>!0!==r,!0))}(i,o,t,n):$n(a)),yn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),is(s=>{if(i.guardsResult=s.guardsResult,Yp(s.guardsResult))throw b9(0,s.guardsResult);const a=new NDe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),ns(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),UM(s=>{if(s.guards.canActivateChecks.length)return $n(s).pipe(is(a=>{const l=new ODe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),zl(a=>{let l=!1;return $n(a).pipe(function GTe(t,n){return nt(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $n(e);let o=0;return co(r).pipe(Sf(s=>function WTe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!R9(r)&&(o[K1]=r.title),function qTe(t,n,e,i){const r=function XTe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $n({});const o={};return co(r).pipe(nt(s=>function YTe(t,n,e,i){const r=ay(n)??i,o=ev(t,r);return Df(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(kf(),is(a=>{o[s]=a}))),kM(1),function tDe(t){return n=>n.lift(new nDe(t))}(o),Ul(s=>VM(s)?Vh:qp(s)))}(o,t,n,i).pipe(yn(s=>(t._resolvedData=s,t.data=g9(t,e).resolve,r&&R9(r)&&(t.data[K1]=r.title),null)))}(s.route,i,t,n)),is(()=>o++),kM(1),nt(s=>o===r.length?$n(e):Vh))})}(e.paramsInheritanceStrategy,this.environmentInjector),is({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),is(a=>{const l=new jDe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),UM(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(is(u=>{l.component=u}),yn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return jw(a(s.targetSnapshot.root)).pipe(Rw(),Sl(1))}),UM(()=>this.afterPreactivation()),yn(s=>{const a=function YDe(t,n,e){const i=oy(t,n._root,e?e._root:void 0);return new p9(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),is(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>yn(i=>(new oTe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),is({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new zh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),SM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ul(s=>{if(o=!0,w9(s)){x9(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ry(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),x9(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||V9(i.source)};e.scheduleNavigation(l,iy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Xw(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vh}))}))}cancelNavigationTransition(e,i,r){const o=new ry(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function V9(t){return t!==iy}let H9=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[K1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(QTe)},providedIn:"root"}),t})(),QTe=(()=>{class t extends H9{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(ct(JB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZTe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(tEe)},providedIn:"root"}),t})();class eEe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let tEe=(()=>{class t extends eEe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oC=new zn("",{providedIn:"root",factory:()=>({})});let iEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return ar(rEe)},providedIn:"root"}),t})(),rEe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function oEe(t){throw t}function sEe(t,n,e){return n.parse("/")}const aEe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},lEe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let cr=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=ar(xxe),this.isNgZoneEnabled=!1,this.options=ar(oC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||oEe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||sEe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=ar(iEe),this.routeReuseStrategy=ar(ZTe),this.urlCreationStrategy=ar(WDe),this.titleStrategy=ar(H9),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=X7(ar(nv,{optional:!0})??[]),this.navigationTransitions=ar(rC),this.urlSerializer=ar(Z1),this.location=ar(kA),this.isNgZoneEnabled=ar(Wi)instanceof Wi&&Wi.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Tf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=m9(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=e.targetPageId},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),iy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(BM),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=Yp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,iy,null,i)}navigate(e,i={skipLocationChange:!1}){return function cEe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:o.replaceUrl||o.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e),o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",o):this.location.go(r,"",o)}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const r=this.currentPageId-e.targetPageId;"popstate"!==e.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===r?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===r&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(r)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Fu=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new tr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof zh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=qg(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=qg(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=qg(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function d5(t,n,e){return function L0e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?u5:y1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(Rr),Ah("tabindex"),le(Ss),le(ti),le(zp))},t.\u0275dir=Zt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ht("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Hn]}),t})(),hy=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Ke,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof zh&&this.update()})}ngAfterContentInit(){$n(this.links.changes,$n(null)).pipe(A()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=co(e).pipe(A()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function uEe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(le(cr),le(ti),le(Ss),le(qo),le(Fu,8))},t.\u0275dir=Zt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,Fu,5),2&e){let o;cn(o=un())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Hn]}),t})();class z9{}let dEe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(ns(e=>e instanceof zh),Sf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gx(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent?r.push(this.preloadConfig(s,o)):(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return co(r).pipe(A())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$n(null);const o=r.pipe(nt(s=>null===s?$n(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?co([o,this.loader.loadComponent(i)]).pipe(A()):o})}}return t.\u0275fac=function(e){return new(e||t)(ct(cr),ct(k$),ct(Fd),ct(z9),ct(GM))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const qM=new zn("");let U9=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Ww?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof zh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof h9&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new h9(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function V5(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var mc=(()=>((mc=mc||{})[mc.COMPLETE=0]="COMPLETE",mc[mc.FAILED=1]="FAILED",mc[mc.REDIRECTING=2]="REDIRECTING",mc))();const iv=!1;function Ef(t,n){return{\u0275kind:t,\u0275providers:n}}const XM=new zn("",{providedIn:"root",factory:()=>!1});function W9(){const t=ar(Rs);return n=>{const e=t.get(Au);if(n!==e.components[0])return;const i=t.get(cr),r=t.get(q9);1===t.get(YM)&&i.initialNavigation(),t.get(X9,null,ki.Optional)?.setUpPreloading(),t.get(qM,null,ki.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.unsubscribe())}}const q9=new zn(iv?"bootstrap done indicator":"",{factory:()=>new tr}),YM=new zn(iv?"initial navigation":"",{providedIn:"root",factory:()=>1});function gEe(){let t=[];return t=iv?[{provide:Sx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function HDe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Ef(1,t)}const X9=new zn(iv?"router preloader":"");function vEe(t){return Ef(0,[{provide:X9,useExisting:dEe},{provide:z9,useExisting:t}])}const fy=!1,Y9=new zn(fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),yEe=[kA,{provide:Z1,useClass:DM},cr,sy,{provide:Rr,useFactory:function G9(t){return t.routerState.root},deps:[cr]},GM,fy?{provide:XM,useValue:!0}:[]];function bEe(){return new F$("Router",cr)}let J9=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[yEe,fy&&i?.enableTracing?gEe().\u0275providers:[],{provide:nv,multi:!0,useValue:e},{provide:Y9,useFactory:CEe,deps:[[cr,new u1,new d1]]},{provide:oC,useValue:i||{}},i?.useHash?{provide:zp,useClass:lwe}:{provide:zp,useClass:tB},{provide:qM,useFactory:()=>{const t=ar(_Ce),n=ar(Wi),e=ar(oC),i=ar(rC),r=ar(Z1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new U9(r,i,t,n,e)}},i?.preloadingStrategy?vEe(i.preloadingStrategy).\u0275providers:[],{provide:F$,multi:!0,useFactory:bEe},i?.initialNavigation?kEe(i):[],[{provide:K9,useFactory:W9},{provide:I$,multi:!0,useExisting:K9}]]}}static forChild(e){return{ngModule:t,providers:[{provide:nv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(ct(Y9,8))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[RM]}),t})();function CEe(t){if(fy&&t)throw new Ot(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function kEe(t){return["disabled"===t.initialNavigation?Ef(3,[{provide:Yx,multi:!0,useFactory:()=>{const n=ar(cr);return()=>{n.setUpLocationChangeListener()}}},{provide:YM,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Ef(2,[{provide:YM,useValue:0},{provide:Yx,multi:!0,deps:[Rs],useFactory:n=>{const e=n.get(swe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(cr),o=n.get(q9);(function hEe(t,n){t.events.pipe(ns(e=>e instanceof zh||e instanceof ry||e instanceof Xw||e instanceof qw),yn(e=>e instanceof zh||e instanceof qw?mc.COMPLETE:e instanceof ry&&(0===e.code||1===e.code)?mc.REDIRECTING:mc.FAILED),ns(e=>e!==mc.REDIRECTING),Sl(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(rC).afterPreactivation=()=>(i(!0),o.closed?$n(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const K9=new zn(fy?"Router Initializer":"");function sC(t,n){return new rn(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let Q9=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti))},t.\u0275dir=Zt({type:t}),t})(),Kp=(()=>{class t extends Q9{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,features:[vi]}),t})();const ha=new zn("NgValueAccessor"),TEe={provide:ha,useExisting:Gi(()=>aC),multi:!0};let aC=(()=>{class t extends Kp{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Lr([TEe]),vi]}),t})();const EEe={provide:ha,useExisting:Gi(()=>Na),multi:!0},MEe=new zn("CompositionEventMode");let Na=(()=>{class t extends Q9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function AEe(){const t=jh()?jh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Ss),le(ti),le(MEe,8))},t.\u0275dir=Zt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Lr([EEe]),vi]}),t})();const IEe=!1;function Af(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function Z9(t){return null!=t&&"number"==typeof t.length}const Oa=new zn("NgValidators"),Mf=new zn("NgAsyncValidators"),FEe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Do{static min(n){return eV(n)}static max(n){return function tV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nV(n)}static requiredTrue(n){return function iV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rV(t){return Af(t.value)||FEe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oV(t){return n=>Af(n.value)||!Z9(n.value)?null:n.value.lengthZ9(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aV(t){if(!t)return lC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(Af(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fV(n)}static composeAsync(n){return pV(n)}}function eV(t){return n=>{if(Af(n.value)||Af(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dV(t,n){return n.map(e=>e(t))}function hV(t){return t.map(n=>function NEe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return uV(dV(e,n))}}function JM(t){return null!=t?fV(hV(t)):null}function pV(t){if(!t)return null;const n=t.filter(lV);return 0==n.length?null:function(e){return function DEe(...t){if(1===t.length){const n=t[0];if(et(n))return sC(n,null);if(Ve(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return sC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return sC(t=1===t.length&&et(t[0])?t[0]:t,null).pipe(yn(e=>n(...e)))}return sC(t,null)}(dV(e,n).map(cV)).pipe(yn(uV))}}function KM(t){return null!=t?pV(hV(t)):null}function mV(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function gV(t){return t._rawValidators}function vV(t){return t._rawAsyncValidators}function QM(t){return t?Array.isArray(t)?t:[t]:[]}function cC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yV(t,n){const e=QM(n);return QM(t).forEach(r=>{cC(e,r)||e.push(r)}),e}function bV(t,n){return QM(n).filter(e=>!cC(t,e))}class _V{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=JM(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=KM(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class Dl extends _V{get formDirective(){return null}get path(){return null}}class If extends _V{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class xV{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let rl=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(If,2))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[vi]}),t})(),ol=(()=>{class t extends xV{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(le(Dl,10))},t.\u0275dir=Zt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Mn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[vi]}),t})();function wV(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const t3=!1,py="VALID",dC="INVALID",rv="PENDING",my="DISABLED";function n3(t){return(hC(t)?t.validators:t)||null}function i3(t,n){return(hC(n)?n.asyncValidators:t)||null}function hC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CV(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Ot(1e3,t3?function LEe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Ot(1001,t3?function REe(t,n){return`Cannot find form control ${wV(t,n)}`}(n,e):"")}function kV(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Ot(1002,t3?function $Ee(t,n){return`Must supply a value for form control ${wV(t,n)}`}(n,r):"")})}class fC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===py}get invalid(){return this.status===dC}get pending(){return this.status==rv}get disabled(){return this.status===my}get enabled(){return this.status!==my}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yV(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yV(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(bV(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(bV(n,this._rawAsyncValidators))}hasValidator(n){return cC(this._rawValidators,n)}hasAsyncValidator(n){return cC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=rv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=my,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===py||this.status===rv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?my:py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=rv,this._hasOwnPendingAsyncValidator=!0;const e=cV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Ke,this.statusChanges=new Ke}_calculateStatus(){return this._allControlsDisabled()?my:this.errors?dC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(rv)?rv:this._anyControlsHaveStatus(dC)?dC:py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){hC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function BEe(t){return Array.isArray(t)?JM(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function VEe(t){return Array.isArray(t)?KM(t):t||null}(this._rawAsyncValidators)}}class gy extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){kV(this,!0,n),Object.keys(n).forEach(i=>{CV(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class SV extends gy{}const Qp=new zn("CallSetDisabledState",{providedIn:"root",factory:()=>vy}),vy="always";function yy(t,n,e=vy){r3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function zEe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&DV(t,n)})}(t,n),function GEe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function UEe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&DV(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function HEe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),vC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function gC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function r3(t,n){const e=gV(t);null!==n.validator?t.setValidators(mV(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vV(t);null!==n.asyncValidator?t.setAsyncValidators(mV(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();gC(n._rawValidators,r),gC(n._rawAsyncValidators,r)}function vC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=gV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vV(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return gC(n._rawValidators,i),gC(n._rawAsyncValidators,i),e}function DV(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function AV(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MV(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const _y=class extends fC{constructor(n=null,e,i){super(n3(e),i3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MV(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){AV(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){AV(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MV(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let sl=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const eAe={provide:ha,useExisting:Gi(()=>c3),multi:!0};let c3=(()=>{class t extends Kp{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Lr([eAe]),vi]}),t})(),jV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();const u3=new zn("NgModelWithFormControlWarning"),oAe={provide:Dl,useExisting:Gi(()=>fa)};let fa=(()=>{class t extends Dl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ke,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(vC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return yy(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function YEe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function EV(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof _y)(r)&&(yy(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function TV(t,n){r3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function WEe(t,n){return vC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){r3(this.form,this),this._oldForm&&vC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(le(Oa,10),le(Mf,10),le(Qp,8))},t.\u0275dir=Zt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Lr([oAe]),vi,Hn]}),t})();const lAe={provide:If,useExisting:Gi(()=>ja)};let ja=(()=>{class t extends If{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Ke,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function a3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Na?e=o:function XEe(t){return Object.getPrototypeOf(t.constructor)===Kp}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function s3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function pC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(le(Dl,13),le(Oa,10),le(Mf,10),le(ha,10),le(u3,8))},t.\u0275dir=Zt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Lr([lAe]),vi,Hn]}),t})();const cAe={provide:ha,useExisting:Gi(()=>ov),multi:!0};function BV(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let ov=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=BV(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function uAe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Lr([cAe]),vi]}),t})(),xy=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(BV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(ov,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const dAe={provide:ha,useExisting:Gi(()=>f3),multi:!0};function VV(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let f3=(()=>{class t extends Kp{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(VV(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(f3,9))},t.\u0275dir=Zt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let Zp=(()=>{class t{constructor(){this._validator=lC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,features:[Hn]}),t})();const pAe={provide:Oa,useExisting:Gi(()=>p3),multi:!0};let p3=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function zV(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ht("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Lr([pAe]),vi]}),t})();const mAe={provide:Oa,useExisting:Gi(()=>Ff),multi:!0};let Ff=(()=>{class t extends Zp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=qg,this.createValidator=e=>nV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275dir=Zt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ht("required",i._enabled?"":null)},inputs:{required:"required"},features:[Lr([mAe]),vi]}),t})(),JV=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[jV]}),t})();class KV extends fC{constructor(n,e,i){super(n3(e),i3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){kV(this,!1,n),n.forEach((i,r)=>{CV(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function QV(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let xAe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return QV(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new gy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new SV(r,i)}control(e,i,r){let o={};return this.useNonNullable?(QV(i)?o=i:(o.validators=i,o.asyncValidators=r),new _y(e,{...o,nonNullable:!0})):new _y(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KV(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof _y||e instanceof fC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tl=(()=>{class t extends xAe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),ZV=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})(),wAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:u3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Qp,useValue:e.callSetDisabledState??vy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[JV]}),t})();const m3=new zn("ngx-segment-analytics.config"),CAe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let g3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),yC=(()=>{class t{constructor(e,i,r){if(this._w=e,this._doc=i,this._config=Object.assign(Object.assign({},CAe),r),this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}get plugins(){return this._w.analytics.plugins}}return t.\u0275fac=function(e){return new(e||t)(ct(g3),ct(Ir),ct(m3))},t.\u0275prov=Et({factory:function(){return new t(ct(g3),ct(Ir),ct(m3))},token:t,providedIn:"root"}),t})();function kAe(t){return function DB(t){return t===SB}(t)?window:{}}let SAe=(()=>{class t{constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(e){return{ngModule:t,providers:[{provide:m3,useValue:e},yC]}}}return t.\u0275fac=function(e){return new(e||t)(ct(t,12))},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:g3,useFactory:kAe,deps:[L1]}],imports:[Vs]}),t})();class bC{}class v3{}class Nu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(n).forEach(e=>{let i=n[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Nu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Nu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Nu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class DAe{encodeKey(n){return eH(n)}encodeValue(n){return eH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const EAe=/%(\d[a-f0-9])/gi,AAe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eH(t){return encodeURIComponent(t).replace(EAe,(n,e)=>AAe[e]??n)}function _C(t){return`${t}`}class In{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new DAe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function TAe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(_C):[_C(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new In({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(_C(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(_C(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class MAe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nH(t){return typeof Blob<"u"&&t instanceof Blob}function iH(t){return typeof FormData<"u"&&t instanceof FormData}class Cy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function IAe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Nu),this.context||(this.context=new MAe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Cy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var zs=(()=>((zs=zs||{})[zs.Sent=0]="Sent",zs[zs.UploadProgress=1]="UploadProgress",zs[zs.ResponseHeader=2]="ResponseHeader",zs[zs.DownloadProgress=3]="DownloadProgress",zs[zs.Response=4]="Response",zs[zs.User=5]="User",zs))();class y3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Nu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class b3 extends y3{constructor(n={}){super(n),this.type=zs.ResponseHeader}clone(n={}){return new b3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class xC extends y3{constructor(n={}){super(n),this.type=zs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new xC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rH extends y3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function _3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let wC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Cy)o=e;else{let l,c;l=r.headers instanceof Nu?r.headers:new Nu(r.headers),r.params&&(c=r.params instanceof In?r.params:new In({fromObject:r.params})),o=new Cy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$n(o).pipe(Sf(l=>this.handler.handle(l)));if(e instanceof Cy||"events"===r.observe)return s;const a=s.pipe(ns(l=>l instanceof xC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(yn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(yn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(yn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new In).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,_3(r,i))}post(e,i,r={}){return this.request("POST",e,_3(r,i))}put(e,i,r={}){return this.request("PUT",e,_3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(ct(bC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function oH(t,n){return n(t)}function NAe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const x3=new zn("HTTP_INTERCEPTORS"),ky=new zn("HTTP_INTERCEPTOR_FNS");function jAe(){let t=null;return(n,e)=>(null===t&&(t=(ar(x3,{optional:!0})??[]).reduceRight(NAe,oH)),t(n,e))}let sH=(()=>{class t extends bC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(ky)));this.chain=i.reduceRight((r,o)=>function OAe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(ct(v3),ct(Fd))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const $Ae=/^\)\]\}',?\n/;let lH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new rn(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Nu(r.getAllResponseHeaders()),m=function BAe(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new b3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const _=v;v=v.replace($Ae,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=_,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new xC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new rH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new rH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:zs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:zs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:zs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(ct(EB))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const w3=new zn("XSRF_ENABLED"),cH=new zn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uH=new zn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dH{}let zAe=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=pB(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir),ct(L1),ct(cH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function UAe(t,n){const e=t.url.toLowerCase();if(!ar(w3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=ar(dH).getToken(),r=ar(uH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Ts=(()=>((Ts=Ts||{})[Ts.Interceptors=0]="Interceptors",Ts[Ts.LegacyInterceptors=1]="LegacyInterceptors",Ts[Ts.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Ts[Ts.NoXsrfProtection=3]="NoXsrfProtection",Ts[Ts.JsonpSupport=4]="JsonpSupport",Ts[Ts.RequestsMadeViaParent=5]="RequestsMadeViaParent",Ts))();function sv(t,n){return{\u0275kind:t,\u0275providers:n}}function GAe(...t){const n=[wC,lH,sH,{provide:bC,useExisting:sH},{provide:v3,useExisting:lH},{provide:ky,useValue:UAe,multi:!0},{provide:w3,useValue:!0},{provide:dH,useClass:zAe}];for(const e of t)n.push(...e.\u0275providers);return function R0e(t){return{\u0275providers:t}}(n)}const hH=new zn("LEGACY_INTERCEPTOR_FN");let qAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[GAe(sv(Ts.LegacyInterceptors,[{provide:hH,useFactory:jAe},{provide:ky,useExisting:hH,multi:!0}]))]}),t})();var oi=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(oi||(oi={})),oi))(),Sy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY"}(Sy||(Sy={})),Sy))();class C3{constructor(){K(this,"host",void 0),K(this,"timeoutMs",void 0)}}let xi=(()=>{class t{constructor(e,i){K(this,"httpClient",void 0),K(this,"config",void 0),this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new In({encoder:new Xn});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new In({encoder:new Xn});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new In({encoder:new Xn});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new In({encoder:new Xn});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new In({encoder:new Xn});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new In({encoder:new Xn});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new In({encoder:new Xn});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new In({encoder:new Xn});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new In({encoder:new Xn});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new In({encoder:new Xn});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new In({encoder:new Xn});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new In({encoder:new Xn});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new In({encoder:new Xn});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new In({encoder:new Xn});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new In({encoder:new Xn});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Nu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Nu).set("Authorization","Basic "+btoa(e+":"+i))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(wC),ct(C3,8))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class Xn{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fH=new zn("window"),JAe=[{provide:fH,useFactory:()=>window}],k3="currentSession";let Xo=(()=>{class t{constructor(e,i,r,o){K(this,"window",void 0),K(this,"segment",void 0),K(this,"http",void 0),K(this,"consoleService",void 0),K(this,"currentSessionSubject",void 0),K(this,"currentSession",void 0),this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(k3));s&&this.segmentIdentify(s),this.currentSessionSubject=new Hs(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return oi.USER_ROLE_ADMIN;case 2:return oi.USER_ROLE_DEVELOPER;case 3:return oi.USER_ROLE_MAINTAINER;case 4:return oi.USER_ROLE_READONLY;default:return oi.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(is(r=>{localStorage.setItem(k3,JSON.stringify(r)),this.currentSessionSubject.next(r),this.segmentIdentify(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(is(()=>{localStorage.removeItem(k3),this.currentSessionSubject.next(null)})):Vh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(fH),ct(yC),ct(wC),ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function KAe(t,n){if(1&t&&(b(0,"div",17),I(1),x()),2&t){const e=j();w(1),xn(" ",e.error," ")}}const QAe=function(t){return{"was-validated":t}},pH=function(t){return{"is-invalid":t}};let ZAe=(()=>{class t{constructor(e,i,r,o,s){K(this,"segment",void 0),K(this,"formBuilder",void 0),K(this,"route",void 0),K(this,"router",void 0),K(this,"authenticationService",void 0),K(this,"error",""),K(this,"loginForm",void 0),K(this,"submitted",void 0),K(this,"returnUrl",void 0),this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Do.compose([Do.required])],password:["",Do.compose([Do.required,Do.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(yC),le(Tl),le(Rr),le(cr),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"h1",2),ge(3,"img",3),x(),J(4,KAe,2,1,"div",4),b(5,"div",5)(6,"div",6)(7,"h3",7),I(8,"Login"),x(),b(9,"form",8),ye("ngSubmit",function(){return i.onSubmit()}),b(10,"div",9)(11,"div",10)(12,"label",11),I(13,"Username"),x(),ge(14,"input",12),b(15,"div",13),I(16,"Please enter a username."),x()()(),b(17,"div",9)(18,"div",10)(19,"label",14),I(20,"Password"),x(),ge(21,"input",15),b(22,"div",13),I(23,"Password must be at least 8 characters."),x()()(),b(24,"button",16),I(25,"Login"),x()()()()()()),2&e&&(w(4),k("ngIf",i.error),w(5),k("formGroup",i.loginForm)("ngClass",lr(8,QAe,i.submitted)),w(5),k("ngClass",lr(10,pH,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(6),k("ngClass",lr(12,pH,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(2),k("disabled",!i.loginForm.valid||i.submitted))},dependencies:[Rh,gn,sl,Na,rl,ol,Ff,fa,ja],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]})),t})(),eMe=(()=>{class t{constructor(e,i){K(this,"authService",void 0),K(this,"router",void 0),this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),tMe=(()=>{class t{constructor(e,i){K(this,"router",void 0),K(this,"authenticationService",void 0),this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(cr),ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();class nMe extends ue{constructor(n,e){super()}schedule(n,e=0){return this}}class S3 extends nMe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let mH=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Hd extends mH{constructor(n,e=mH.now){super(n,()=>Hd.delegate&&Hd.delegate!==this?Hd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Hd.delegate&&Hd.delegate!==this?Hd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const Dy=new Hd(S3);class rMe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new sMe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class oMe{constructor(){this.buffer=[]}}class sMe extends O{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(gH,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vH,e,{subscriber:this,context:s})),this.add(o.schedule(aMe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(gH,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new oMe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function gH(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function aMe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vH,e,{subscriber:i,context:o})),this.schedule(t,n))}function vH(t){const{subscriber:n,context:e}=t;n.closeContext(e)}class lMe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new cMe(n,this.compare,this.keySelector))}}class cMe extends O{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Es(t,n,e,i){return rt(e)&&(i=e,e=void 0),i?Es(t,n,e).pipe(yn(r=>et(r)?i(...r):i(r))):new rn(r=>{yH(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yH(t,n,e,i,r){let o;if(function hMe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function dMe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function uMe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function av(t=0,n,e){let i=-1;return bH(n)?i=Number(n)<1?1:Number(n):Sa(n)&&(e=n),Sa(e)||(e=Dy),new rn(r=>{const o=bH(t)?t:+t-e.now();return e.schedule(fMe,o,{index:0,period:i,subscriber:r})})}function fMe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function _H(...t){if(1===t.length){if(!et(t[0]))return t[0];t=t[0]}return st(t,void 0).lift(new pMe)}class pMe{call(n,e){return e.subscribe(new mMe(n))}}class mMe extends wM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Me extends W{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Ro](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Ne(this.observable,new ml(this))}}function yo(t){return n=>n.lift(new wMe(t))}class wMe{constructor(n){this.notifier=n}call(n,e){const i=new CMe(n),r=Ne(this.notifier,new ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class CMe extends W{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function D3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new kMe(t,e))}}class kMe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SMe(n,this.observables,this.project))}}class SMe extends wM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ou{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $n(this.value);case"E":return qp(this.error);case"C":return Lw()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ou("N",n):Ou.undefinedValueNotification}static createError(n){return new Ou("E",void 0,n)}static createComplete(){return Ou.completeNotification}}function T3(t,n=Dy){const i=function DMe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TMe(i,n))}Ou.completeNotification=new Ou("C"),Ou.undefinedValueNotification=new Ou("N",void 0);class TMe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new E3(n,this.delay,this.scheduler))}}class E3 extends O{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(E3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new EMe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ou.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ou.createComplete()),this.unsubscribe()}}class EMe{constructor(n,e){this.time=n,this.notification=e}}function $Me(t,n){if(1&t){const e=vt();b(0,"button",1),ye("click",function(){return $e(e),Be(j().close())}),b(1,"span",2),I(2,"\xd7"),x()()}}const lv=["*"],b3e=["dialog"];function Nf(t){return null!=t}typeof Element<"u"&&!Element.prototype.closest&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let n=this;if(!document.documentElement.contains(n))return null;do{if(n.matches(t))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null});const CH={animation:!0,transitionTimerDelayMs:5};let pa=(()=>{class t{constructor(){this.animation=CH.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})();const TIe=()=>{},{transitionTimerDelayMs:EIe}=CH,EC=new Map,ma=(t,n,e)=>{let i=e.context||{};const r=EC.get(t);if(r)switch(e.runningTransition){case"continue":return Vh;case"stop":r.transition$.complete(),i=Object.assign(r.context,i),EC.delete(t)}!function TC(t){return(t||document.body).offsetHeight}(t);const o=n(t,i)||TIe;if(!e.animation||"none"===window.getComputedStyle(t).transitionProperty)return o(),$n(void 0);const s=new tr,a=s.pipe(function xMe(...t){return n=>Pw(n,$n(...t))}(!0));EC.set(t,{transition$:s,context:i});const l=function DIe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(t),c=Es(t,"transitionend").pipe(yo(a),ns(({target:d})=>d===t));return _H(av(l+EIe).pipe(yo(a)),c).pipe(yo(a)).subscribe(()=>{EC.delete(t),o(),s.next(),s.complete()}),s.asObservable()};let AH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),IIe=(()=>{class t{constructor(e){this.dismissible=!0,this.type="warning",this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const FIe=({classList:t})=>{t.remove("show")};let To=(()=>{class t{constructor(e,i,r){this._renderer=i,this._element=r,this.closed=new Ke,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ma(this._element.nativeElement,FIe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(le(IIe),le(Ss),le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Mn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{dismissible:"dismissible",type:"type",animation:"animation"},outputs:{closed:"closed"},exportAs:["ngbAlert"],features:[Hn],ngContentSelectors:lv,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"close",3,"click"],["aria-hidden","true"]]},template:function(e,i){1&e&&(Cu(),ku(0),J(1,$Me,3,0,"button",0)),2&e&&(w(1),k("ngIf",i.dismissible))},dependencies:[gn],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),MH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),AC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(e,i){2&e&&Mn("btn",!0)("active",i.active)("disabled",i.disabled)("focus",i.focused)}}),t})(),OIe=0,F3=(()=>{class t{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+OIe++,this.onChange=e=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}onRadioChange(e){this.writeValue(e.value),this.onChange(e.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(e){this._radios.add(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._disabled=e,this._updateRadiosDisabled()}unregister(e){this._radios.delete(e)}writeValue(e){this._value=e,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(e=>e.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(e=>e.updateDisabled())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[Lr([{provide:ha,useExisting:Gi(()=>t),multi:!0}])]}),t})(),IH=(()=>{class t{constructor(e,i,r,o,s){this._group=e,this._label=i,this._renderer=r,this._element=o,this._cd=s,this._value=null,this._group.register(this),this.updateDisabled()}set value(e){this._value=e;const i=e?e.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",i),this._group.onRadioValueUpdate()}set disabled(e){this._disabled=!1!==e,this.updateDisabled()}set focused(e){this._label&&(this._label.focused=e),e||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(e){this.value!==e&&this._cd.markForCheck(),this._checked=this.value===e,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}}return t.\u0275fac=function(e){return new(e||t)(le(F3),le(AC),le(Ss),le(ti),le(qo))},t.\u0275dir=Zt({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("focus",function(){return i.focused=!0})("blur",function(){return i.focused=!1}),2&e&&dc("checked",i.checked)("disabled",i.disabled)("name",i.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),FH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),LH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();var ur=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ur||(ur={})),ur))();const NC=(t,n)=>!!n&&n.some(e=>e.contains(t)),VH=(t,n)=>!n||null!=function kIe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),sFe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),aFe=t=>sFe?()=>setTimeout(()=>t(),100):t;function Ey(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(aFe(()=>{const c=Es(n,"keydown").pipe(yo(r),ns(h=>h.which===ur.Escape),is(h=>h.preventDefault())),u=Es(n,"mousedown").pipe(yn(h=>{const f=h.target;return 2!==h.button&&!NC(f,s)&&("inside"===e?NC(f,o)&&VH(f,a):"outside"===e?!NC(f,o):VH(f,a)||!NC(f,o))}),yo(r)),d=Es(n,"mouseup").pipe(D3(u),ns(([h,f])=>f),T3(0),yo(r));_H([c.pipe(yn(h=>0)),d.pipe(yn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const HH=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function zH(t){const n=Array.from(t.querySelectorAll(HH)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}const cFe=/\s+/,GH=new class lFe{getAllStyles(n){return window.getComputedStyle(n)}getStyle(n,e){return this.getAllStyles(n)[e]}isStaticPositioned(n){return"static"===(this.getStyle(n,"position")||"static")}offsetParent(n){let e=n.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(n,e=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(n,"position"))i=n.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{const o=this.offsetParent(n);i=this.offset(n,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,e&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(n,e=!0){const i=n.getBoundingClientRect(),r_top=window.pageYOffset-document.documentElement.clientTop,r_left=window.pageXOffset-document.documentElement.clientLeft;let o={height:i.height||n.offsetHeight,width:i.width||n.offsetWidth,top:i.top+r_top,bottom:i.bottom+r_top,left:i.left+r_left,right:i.right+r_left};return e&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(n,e,i,r){const[o="top",s="center"]=i.split("-"),a=r?this.offset(n,!1):this.position(n,!1),l=this.getAllStyles(e),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),h=parseFloat(l.marginRight);let f=0,p=0;switch(o){case"top":f=a.top-(e.offsetHeight+c+u);break;case"bottom":f=a.top+a.height;break;case"left":p=a.left-(e.offsetWidth+d+h);break;case"right":p=a.left+a.width}switch(s){case"top":f=a.top;break;case"bottom":f=a.top+a.height-e.offsetHeight;break;case"left":p=a.left;break;case"right":p=a.left+a.width-e.offsetWidth;break;case"center":"top"===o||"bottom"===o?p=a.left+a.width/2-e.offsetWidth/2:f=a.top+a.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(p)}px, ${Math.round(f)}px)`;const m=e.getBoundingClientRect(),g=document.documentElement,v=window.innerHeight||g.clientHeight,y=window.innerWidth||g.clientWidth;return m.left>=0&&m.top>=0&&m.right<=y&&m.bottom<=v}};function Ay(t,n,e,i,r){let o=Array.isArray(e)?e:e.split(cFe);const s=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=n.classList,l=f=>{const[p,m]=f.split("-"),g=[];return r&&(g.push(`${r}-${p}`),m&&g.push(`${r}-${p}-${m}`),g.forEach(v=>{a.add(v)})),g};r&&s.forEach(f=>{a.remove(`${r}-${f}`)});let c=o.findIndex(f=>"auto"===f);c>=0&&s.forEach(function(f){null==o.find(p=>-1!==p.search("^"+f))&&o.splice(c++,1,f)});const u=n.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of o){let f=l(d);if(GH.positionElements(t,n,d,i)){h=!0;break}r&&f.forEach(p=>{a.remove(p)})}return h||(d=o[0],l(d),GH.positionElements(t,n,d,i)),d}new Date(1882,10,12),new Date(2174,10,25);let ZH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,ZV]}),t})(),xFe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({factory:function(){return new t},token:t,providedIn:"root"}),t})(),ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=Zt({type:t,selectors:[["",8,"navbar"]]}),t})(),jf=(()=>{class t{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,i){2&e&&Mn("disabled",i.disabled)},inputs:{disabled:"disabled"}}),t})(),Pf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,jf,4),2&e){let o;cn(o=un())&&(i.menuItems=o)}},hostVars:5,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&(ht("x-placement",i.placement),Mn("dropdown-menu",!0)("show",i.dropdown.isOpen()))}}),t})(),LC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ht("aria-expanded",i.dropdown.isOpen())}}),t})(),rm=(()=>{class t extends LC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>Pu)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ht("aria-expanded",i.dropdown.isOpen())},features:[Lr([{provide:LC,useExisting:Gi(()=>t)}]),vi]}),t})(),Pu=(()=>{class t{constructor(e,i,r,o,s,a,l){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._closed$=new tr,this._bodyContainer=null,this._open=!1,this.openChange=new Ke,this.placement=i.placement,this.container=i.container,this.autoClose=i.autoClose,this.display=l?"static":"dynamic",this._zoneSubscription=o.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Sl(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){Ey(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ur.Space&&i!==ur.Enter){if(i!==ur.Tab){if(a||s){if(this.open(),r.length){switch(i){case ur.ArrowDown:o=Math.min(o+1,r.length-1);break;case ur.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ur.Home:o=0;break;case ur.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(HH);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Es(e.target,"focusout").pipe(Sl(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Es(s,"click").pipe(Sl(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Ay(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const r=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,r),e.removeStyle(r,"position"),e.removeStyle(r,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1050"),i.appendChild(o,r),i.appendChild(this._document.body,o)}}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown"),i.placement="static"===this.display?null:e;const s=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,s);const a=this._bodyContainer;a&&(r.removeClass(a,"dropup"),r.removeClass(a,"dropdown"),r.addClass(a,s))}}}return t.\u0275fac=function(e){return new(e||t)(le(qo),le(xFe),le(Ir),le(Wi),le(ti),le(Ss),le(ez,8))},t.\u0275dir=Zt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Pf,5),ni(r,LC,5)),2&e){let o;cn(o=un())&&(i._menu=o.first),cn(o=un())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("show",i.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Hn]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})(),nz=(()=>{class t{constructor(e){this.backdrop=!0,this.keyboard=!0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();class om{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class V3{constructor(n,e,i,r,o,s,a){this._type=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._componentFactoryResolver=s,this._applicationRef=a,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes));const{nativeElement:r}=this._windowRef.location,s=this._ngZone.onStable.asObservable().pipe(Sl(1)).pipe(nt(()=>this._ngZone.run(()=>ma(r,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"}))));return{windowRef:this._windowRef,transition$:s}}close(n=!1){return this._windowRef?ma(this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(is(()=>{var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),null!==(e=this._contentRef)&&void 0!==e&&e.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$n(void 0)}_getContentRef(n,e){if(n){if(n instanceof Si){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new om([i.rootNodes],i)}return new om([[this._renderer.createText(`${n}`)]])}return new om([])}}const wFe=()=>{};let iz=(()=>{class t{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):wFe}_adjustBody(e){const i=this._document.body,r=i.style.paddingRight,o=parseFloat(window.getComputedStyle(i)["padding-right"]);return i.style["padding-right"]=`${o+e}px`,()=>i.style["padding-right"]=r}_isPresent(e){const i=this._document.body.getBoundingClientRect();return window.innerWidth-(i.left+i.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const i=this._document.body;i.appendChild(e);const r=e.getBoundingClientRect().width-e.clientWidth;return i.removeChild(e),r}}return t.\u0275fac=function(e){return new(e||t)(ct(Ir))},t.\u0275prov=Et({factory:function(){return new t(ct(Ir))},token:t,providedIn:"root"}),t})(),CFe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Sl(1)).subscribe(()=>{ma(this._el.nativeElement,({classList:e})=>e.add("show"),{animation:this.animation,runningTransition:"continue"})})}hide(){return ma(this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:6,hostBindings:function(e,i){2&e&&(Su("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Mn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class rz{close(n){}dismiss(n){}}class kFe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new tr,this._dismissed=new tr,this._hidden=new tr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(yo(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(yo(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(i=>{!1!==i&&this._dismiss(n)},()=>{}):!1!==e&&this._dismiss(n)}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$n(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),kC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var Fy=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(Fy||(Fy={})),Fy))();let SFe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new tr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Ke,this.shown=new tr,this.hidden=new tr}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){this._show()}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=kC(ma(e,()=>e.classList.remove("show"),i),ma(this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"continue"};kC(ma(e,()=>e.classList.add("show"),i),ma(this._dialogEl.nativeElement,()=>{},i)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Es(e,"keydown").pipe(yo(this._closed$),ns(r=>r.which===ur.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Fy.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Es(this._dialogEl.nativeElement,"mousedown").pipe(yo(this._closed$),is(()=>i=!1),zl(()=>Es(e,"mouseup").pipe(yo(this._closed$),Sl(1))),ns(({target:r})=>e===r)).subscribe(()=>{i=!0}),Es(e,"click").pipe(yo(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(Fy.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=zH(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ma(this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(le(Ir),le(ti),le(Wi))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&io(b3e,7),2&e){let r;cn(r=un())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ht("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Su("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Mn("fade",i.animation))},inputs:{backdrop:"backdrop",keyboard:"keyboard",animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:lv,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0,1)(2,"div",2),ku(3),x()()),2&e&&Su("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+(i.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;overflow:hidden}"],encapsulation:2}),t})(),oz=(()=>{class t{constructor(e,i,r,o,s,a){this._applicationRef=e,this._injector=i,this._document=r,this._scrollBar=o,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new tr,this._ariaHiddenValues=new Map,this._backdropAttributes=["animation","backdropClass"],this._modalRefs=[],this._windowAttributes=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Ke,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const l=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Es(n,"focusin").pipe(yo(e),yn(o=>o.target));Es(n,"keydown").pipe(yo(e),ns(o=>o.which===ur.Tab),D3(r)).subscribe(([o,s])=>{const[a,l]=zH(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Es(n,"click").pipe(yo(e),D3(r),yn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,l.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(l.location.nativeElement)}})}open(e,i,r,o){const s=o.container instanceof HTMLElement?o.container:Nf(o.container)?this._document.querySelector(o.container):this._document.body,a=this._rendererFactory.createRenderer(null,null),l=this._scrollBar.compensate(),c=()=>{this._modalRefs.length||(a.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!s)throw new Error(`The specified modal container "${o.container||"body"}" was not found in the DOM.`);const u=new rz,d=this._getContentRef(e,o.injector||i,r,u,o);let h=!1!==o.backdrop?this._attachBackdrop(e,s):void 0,f=this._attachWindowComponent(e,s,d),p=new kFe(f,d,h,o.beforeDismiss);return this._registerModalRef(p),this._registerWindowCmpt(f),p.result.then(l,l),p.result.then(c,c),u.close=m=>{p.close(m)},u.dismiss=m=>{p.dismiss(m)},this._applyWindowOptions(f.instance,o),1===this._modalRefs.length&&a.addClass(this._document.body,"modal-open"),h&&h.instance&&this._applyBackdropOptions(h.instance,o),p}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,i){let o=e.resolveComponentFactory(CFe).create(this._injector);return this._applicationRef.attachView(o.hostView),i.appendChild(o.location.nativeElement),o}_attachWindowComponent(e,i,r){let s=e.resolveComponentFactory(SFe).create(this._injector,r.nodes);return this._applicationRef.attachView(s.hostView),i.appendChild(s.location.nativeElement),s}_applyWindowOptions(e,i){this._windowAttributes.forEach(r=>{Nf(i[r])&&(e[r]=i[r])})}_applyBackdropOptions(e,i){this._backdropAttributes.forEach(r=>{Nf(i[r])&&(e[r]=i[r])})}_getContentRef(e,i,r,o,s){return r?r instanceof Si?this._createFromTemplateRef(r,o):function DC(t){return"string"==typeof t}(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new om([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new om([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new om([[i]])}_createFromComponent(e,i,r,o,s){const a=e.resolveComponentFactory(r),l=Rs.create({providers:[{provide:rz,useValue:o}],parent:i}),c=a.create(l),u=c.location.nativeElement;return s.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new om([[u]],c.hostView,c)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct(Rs),ct(Ir),ct(iz),ct(Lp),ct(Wi))},t.\u0275prov=Et({factory:function(){return new t(ct(Au),ct(Dx),ct(Ir),ct(iz),ct(Lp),ct(Wi))},token:t,providedIn:"root"}),t})(),H3=(()=>{class t{constructor(e,i,r,o){this._moduleCFR=e,this._injector=i,this._modalStack=r,this._config=o}open(e,i={}){const r=Object.assign({},this._config,i);return this._modalStack.open(this._moduleCFR,this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(ct($c),ct(Rs),ct(oz),ct(nz))},t.\u0275prov=Et({factory:function(){return new t(ct($c),ct(Dx),ct(oz),ct(nz))},token:t,providedIn:"root"}),t})(),sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[H3]}),t})(),DFe=(()=>{class t{constructor(e){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})();const az=t=>Nf(t)&&""!==t;let TFe=0,lz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),sm=(()=>{class t{constructor(e,i){this.elementRef=i,this.disabled=!1,this.shown=new Ke,this.hidden=new Ke,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Nf(this.domId)||(this.domId="ngb-nav-"+TFe++)}get active(){return this._nav.activeId===this.id}get id(){return az(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Nf(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(le(Gi(()=>am)),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&ni(r,lz,4),2&e){let o;cn(o=un())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Mn("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]}),t})(),am=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Ke,this.shown=new Ke,this.hidden=new Ke,this.destroy$=new tr,this.navItemChange$=new tr,this.navChange=new Ke,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ur.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ur.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ur.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ur.Home:s=0;break;case ur.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Nf(this.activeId)){const e=this.items.first?this.items.first.id:null;az(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(yo(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(DFe),le(qo),le(Ir))},t.\u0275dir=Zt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(ni(r,sm,4),ni(r,fv,5)),2&e){let o;cn(o=un())&&(i.items=o),cn(o=un())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ht("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Mn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[Hn]}),t})(),fv=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Ah("role"),le(sm),le(am),le(ti))},t.\u0275dir=Zt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()}),2&e&&(dc("id",i.navItem.domId),ht("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Mn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))}}),t})(),cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();class FFe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const NFe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},vz=t=>t>0?T3(t):n=>n;let bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),_z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Sz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})(),QFe=(()=>{class t{constructor(e){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0,this.animation=e.animation}}return t.\u0275fac=function(e){return new(e||t)(ct(pa))},t.\u0275prov=Et({factory:function(){return new t(ct(pa))},token:t,providedIn:"root"}),t})(),ZFe=0,eNe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,i){2&e&&(dc("id",i.id),Su("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Mn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:lv,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(Cu(),ge(0,"div",0),b(1,"div",1),ku(2),x())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{bottom:.4rem;top:auto}"],encapsulation:2,changeDetection:0}),t})(),tNe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u,d){this._elementRef=e,this._renderer=i,this._ngZone=l,this._document=c,this._changeDetector=u,this.shown=new Ke,this.hidden=new Ke,this._ngbTooltipWindowId="ngb-tooltip-"+ZFe++,this._windowRef=null,this.animation=a.animation,this.autoClose=a.autoClose,this.placement=a.placement,this.triggers=a.triggers,this.container=a.container,this.disableTooltip=a.disableTooltip,this.tooltipClass=a.tooltipClass,this.openDelay=a.openDelay,this.closeDelay=a.closeDelay,this._popupService=new V3(eNe,r,s,i,this._ngZone,o,d),this._zoneSubscription=l.onStable.subscribe(()=>{this._windowRef&&Ay(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.instance.animation=this.animation,this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),Ey(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(this.animation).subscribe(()=>{this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function yz(t,n,e,i,r,o,s=0,a=0){const l=function OFe(t,n=NFe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new FFe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function jFe(t,n,e,i){return new rn(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function PFe(t,n,e){return i=>{let r=null;const o=i.pipe(yn(l=>({open:l})),ns(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),We());return Tt(o.pipe(ns(l=>l.open),vz(t)),o.pipe(ns(l=>!l.open),vz(n))).pipe(ns(l=>l===r&&(r=null,l.open!==e())),yn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss),le(Rs),le($c),le(nl),le(QFe),le(Wi),le(Ir),le(qo),le(Au))},t.\u0275dir=Zt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[Hn]}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({}),t})();new zn("live announcer delay",{providedIn:"root",factory:function rNe(){return 100}});let Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();const lNe=[AH,MH,FH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz];let cNe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[lNe,AH,MH,FH,PH,LH,ZH,tz,sz,cz,gz,bz,_z,xz,Sz,Dz,Tz,Mz]}),t})(),Iz=(()=>{class t{constructor(){K(this,"restrictedPages",new Map([["users",oi.USER_ROLE_ADMIN],["config",oi.USER_ROLE_DEVELOPER],["modules",oi.USER_ROLE_DEVELOPER],["apiexplorer",oi.USER_ROLE_DEVELOPER]]))}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function uNe(t,n){if(1&t&&(ta(0,5),b(1,"a",27),ge(2,"img",28),b(3,"span",12),I(4),x()(),na()),2&t){const e=j().$implicit;k("ngbNavItem",e.navItem),w(1),k("routerLink",e.routerLink),w(1),$p("src","/static/svg/",e.icon,".svg",y1),w(2),Dt(e.label)}}function dNe(t,n){1&t&&ge(0,"hr")}function hNe(t,n){if(1&t&&(J(0,uNe,5,4,"ng-container",26),J(1,dNe,1,0,"hr",25)),2&t){const e=n.$implicit;k("ngIf",j().getSessionRole()<=e.minRole),w(1),k("ngIf",e.separator)}}function fNe(t,n){if(1&t&&(b(0,"div",29)(1,"h2",30),ge(2,"img",31),I(3,"An error has occurred!"),x(),b(4,"h6",32),I(5),x(),b(6,"p"),I(7,"Please refresh the page to try again."),x()()),2&t){const e=j();w(5),Dt(e.error)}}function pNe(t,n){1&t&&(b(0,"div",33),ge(1,"img",34),x())}function mNe(t,n){1&t&&ge(0,"router-outlet")}const gNe=function(){return["/"]},vNe=function(){return["/login"]};let yNe=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"segment",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"routerSub",void 0),K(this,"segmentRouterSub",void 0),K(this,"loading",!0),K(this,"error",""),K(this,"routes",[{navItem:"status",routerLink:["/status"],label:"Status",minRole:oi.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:oi.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:oi.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:oi.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:oi.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:oi.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:oi.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:oi.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:oi.USER_ROLE_READONLY,icon:"chat"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:oi.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:oi.USER_ROLE_DEVELOPER,icon:"api-explorer"}]),this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function iMe(t){let n=arguments.length,e=Dy;Sa(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new rMe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof Ww&&(this.loading=!0),l instanceof zh&&(this.loading=!1),l instanceof ry&&(this.loading=!1),l instanceof Xw&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(function CC(t,n){return e=>e.lift(new lMe(t,n))}((a,l)=>!(l instanceof zh)||a.url===l.url)).subscribe(a=>{a&&r.page(a.url)})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(yC),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(o){return i.onSidebarNavChange(o)}),b(4,"div",4),ta(5,5),b(6,"a",6),ge(7,"img",7)(8,"img",8),x(),na(),ge(9,"hr"),J(10,hNe,2,2,"ng-template",9),ge(11,"hr"),b(12,"a",10),ge(13,"img",11),b(14,"span",12),I(15,"Heroic Cloud"),x()(),b(16,"a",13),ge(17,"img",14),b(18,"span",12),I(19,"Documentation"),x()(),b(20,"a",15),ge(21,"img",16),b(22,"span",12),I(23,"Forum"),x()(),b(24,"a",17),ge(25,"img",18),b(26,"span",12),I(27,"Heroic Labs Blog"),x()(),ge(28,"hr"),b(29,"div",19),I(30),x(),ta(31,5),b(32,"a",20),ye("click",function(){return i.logout()}),ge(33,"img",21),b(34,"span",12),I(35,"Logout"),x()(),na(),x()(),b(36,"main",22),J(37,fNe,8,1,"div",23),J(38,pNe,2,0,"div",24),J(39,mNe,1,0,"router-outlet",25),x()()()),2&e&&(w(5),k("ngbNavItem","logo"),w(1),k("routerLink",wl(9,gNe)),w(4),k("ngForOf",i.routes),w(20),xn("Logged in as: ",i.getUsername(),""),w(1),k("ngbNavItem","logout"),w(1),k("routerLink",wl(10,vNe)),w(5),k("ngIf",i.error),w(1),k("ngIf",!i.error&&i.loading),w(1),k("ngIf",!i.error&&!i.loading))},dependencies:[Jp,Fu,hy,jn,gn,am,sm,fv],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})),t})(),bNe=(()=>{class t{constructor(e,i,r){K(this,"authService",void 0),K(this,"router",void 0),K(this,"globals",void 0),this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||Rs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class kNe extends CNe{}class ENe{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new ANe(n,this.dueTime,this.scheduler))}}class ANe extends O{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(MNe,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function MNe(t){t.debouncedNext()}function INe(){}function W3(t){return null==t?INe:function(){return this.querySelector(t)}}function NNe(){return[]}function Lz(t){return null==t?NNe:function(){return this.querySelectorAll(t)}}function Rz(t){return function(){return this.matches(t)}}function $z(t){return new Array(t.length)}function $C(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$C.prototype={constructor:$C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Bz="$";function RNe(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var q3="http://www.w3.org/1999/xhtml";const Vz={svg:"http://www.w3.org/2000/svg",xhtml:q3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function BC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Vz.hasOwnProperty(n)?{space:Vz[n],local:t}:t}function ZNe(t){return function(){this.removeAttribute(t)}}function eOe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tOe(t,n){return function(){this.setAttribute(t,n)}}function nOe(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function iOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function rOe(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Hz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function sOe(t){return function(){this.style.removeProperty(t)}}function aOe(t,n,e){return function(){this.style.setProperty(t,n,e)}}function lOe(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function pv(t,n){return t.style.getPropertyValue(n)||Hz(t).getComputedStyle(t,null).getPropertyValue(n)}function uOe(t){return function(){delete this[t]}}function dOe(t,n){return function(){this[t]=n}}function hOe(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function zz(t){return t.trim().split(/^|\s+/)}function X3(t){return t.classList||new Uz(t)}function Uz(t){this._node=t,this._names=zz(t.getAttribute("class")||"")}function Gz(t,n){for(var e=X3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Xz={},Vr=null;function HOe(t,n,e){return t=Yz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Yz(t,n,e){return function(i){var r=Vr;Vr=i;try{t.call(this,this.__data__,n,e)}finally{Vr=r}}}function UOe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=_&&(_=y+1);!(S=g[_])&&++_=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function GNe(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=WNe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?sOe:"function"==typeof n?lOe:aOe)(t,n,e??"")):pv(this.node(),t)},property:function fOe(t,n){return arguments.length>1?this.each((null==n?uOe:"function"==typeof n?hOe:dOe)(t,n)):this.node()[t]},classed:function vOe(t,n){var e=zz(t+"");if(arguments.length<2){for(var i=X3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?GOe:UOe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=i4e.exec(t))?new vc(n[1],n[2],n[3],1):(n=r4e.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=o4e.exec(t))?zC(n[1],n[2],n[3],n[4]):(n=s4e.exec(t))?zC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=a4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,1):(n=l4e.exec(t))?cU(n[1],n[2]/100,n[3]/100,n[4]):iU.hasOwnProperty(t)?sU(iU[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function sU(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function zC(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function Ly(t,n,e,i){return 1===arguments.length?function u4e(t){return t instanceof Oy||(t=lm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function aU(){return"#"+K3(this.r)+K3(this.g)+K3(this.b)}function lU(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function K3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cU(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ud(t,n,e,i)}function uU(t){if(t instanceof Ud)return new Ud(t.h,t.s,t.l,t.opacity);if(t instanceof Oy||(t=lm(t)),!t)return new Ud;if(t instanceof Ud)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Ud(s,a,l,t.opacity)}function Ud(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Q3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function dU(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function Z3(t){return function(){return t}}function fU(t,n){var e=n-t;return e?function hU(t,n){return function(e){return t+e*n}}(t,e):Z3(isNaN(t)?n:t)}J3(Oy,lm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rU,formatHex:rU,formatHsl:function c4e(){return uU(this).formatHsl()},formatRgb:oU,toString:oU}),J3(vc,Ly,nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aU,formatHex:aU,formatRgb:lU,toString:lU})),J3(Ud,function d4e(t,n,e,i){return 1===arguments.length?uU(t):new Ud(t,n,e,i??1)},nU(Oy,{brighter:function(t){return t=null==t?HC:Math.pow(HC,t),new Ud(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ud(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(Q3(t>=240?t-240:t+120,r,i),Q3(t,r,i),Q3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const UC=function t(n){var e=function m4e(t){return 1==(t=+t)?fU:function(n,e){return e-n?function p4e(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):Z3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Ly(r)).r,(o=Ly(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=fU(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function pU(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return dU((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=tI.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--gv}()}finally{gv=0,function T4e(){for(var t,e,n=GC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:GC=e);By=t,nI(i)}(),um=0}}function D4e(){var t=Vy.now(),n=t-WC;n>bU&&(qC-=n,WC=t)}function nI(t){gv||(Ry&&(Ry=clearTimeout(Ry)),t-um>24?(t<1/0&&(Ry=setTimeout(wU,t-Vy.now()-qC)),$y&&($y=clearInterval($y))):($y||(WC=Vy.now(),$y=setInterval(D4e,bU)),gv=1,_U(wU)))}function CU(t,n,e){var i=new YC;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}YC.prototype=xU.prototype={constructor:YC,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?XC():+e)+(null==n?0:+n),!this._next&&By!==this&&(By?By._next=this:GC=this,By=this),this._call=t,this._time=e,nI()},stop:function(){this._call&&(this._call=null,this._time=1/0,nI())}};var E4e=tU("start","end","cancel","interrupt"),A4e=[],kU=0,SU=1,iI=2,JC=3,DU=4,rI=5,KC=6;function QC(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function M4e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==SU)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===JC)return CU(s);f.state===DU?(f.state=KC,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ukU)throw new Error("too late; already scheduled");return e}function Gh(t,n){var e=Ru(t,n);if(e.state>JC)throw new Error("too late; already running");return e}function Ru(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function sI(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>iI&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?oI:Gh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function G4e(t,n){var e=BC(t),i="transform"===e?j4e:IU;return this.attrTween(t,"function"==typeof n?(e.local?U4e:z4e)(e,i,cI(this,"attr."+t,n)):null==n?(e.local?B4e:$4e)(e):(e.local?H4e:V4e)(e,i,n))},attrTween:function J4e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=BC(t);return this.tween(e,(i.local?X4e:Y4e)(i,n))},style:function _je(t,n,e){var i="transform"==(t+="")?O4e:IU;return null==n?this.styleTween(t,function gje(t,n){var e,i,r;return function(){var o=pv(this,t),s=(this.style.removeProperty(t),pv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,FU(t)):"function"==typeof n?this.styleTween(t,function yje(t,n,e){var i,r,o;return function(){var s=pv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=pv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,cI(this,"style."+t,n))).each(function bje(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Gh(this,t),c=l.on,u=null==l.value[o]?a||(a=FU(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function vje(t,n,e){var i,o,r=e+"";return function(){var s=pv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function Cje(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function wje(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function xje(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function Dje(t){return this.tween("text","function"==typeof t?function Sje(t){return function(){var n=t(this);this.textContent=n??""}}(cI(this,"text",t)):function kje(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function Aje(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function Eje(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function Tje(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function dje(){return this.on("end.remove",function uje(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function R4e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Ru(this.node(),e).tween,r=0,o=i.length;r0&&(R=z-F),C<0?he=E-N:C>0&&(q=re-N),y=fI,B.attr("cursor",qh.selection),Ie());break;default:return}hI()},!0).on("keyup.brush",function _t(){switch(Vr.keyCode){case 16:V&&(oe=fe=V=!1,Ie());break;case 18:y===bv&&(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv,Ie());break;case 32:y===fI&&(Vr.altKey?(_&&(X=Z-F*_,R=z+F*_),C&&(he=E-N*C,q=re+N*C),y=bv):(_<0?X=Z:_>0&&(R=z),C<0?he=E:C>0&&(q=re),y=yv),B.attr("cursor",qh[v]),Ie());break;default:return}hI()},!0),function e4e(t){var n=t.document.documentElement,e=va(t).on("dragstart.drag",Y3,!0);"onselectstart"in n?e.on("selectstart.drag",Y3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Vr.view)}OU(),sI(g),c.call(g),ze.start()}function ie(){var At=Fe(g);V&&!oe&&!fe&&(Math.abs(At[0]-tt[0])>Math.abs(At[1]-tt[1])?fe=!0:oe=!0),tt=At,Y=!0,hI(),Ie()}function Ie(){var At;switch(F=tt[0]-xe[0],N=tt[1]-xe[1],y){case fI:case jU:_&&(F=Math.max(G-R,Math.min(L-X,F)),z=R+F,Z=X+F),C&&(N=Math.max(U-q,Math.min(H-he,N)),re=q+N,E=he+N);break;case yv:_<0?(F=Math.max(G-R,Math.min(L-R,F)),z=R+F,Z=X):_>0&&(F=Math.max(G-X,Math.min(L-X,F)),z=R,Z=X+F),C<0?(N=Math.max(U-q,Math.min(H-q,N)),re=q+N,E=he):C>0&&(N=Math.max(U-he,Math.min(H-he,N)),re=q,E=he+N);break;case bv:_&&(z=Math.max(G,Math.min(L,R-F*_)),Z=Math.max(G,Math.min(L,X+F*_))),C&&(re=Math.max(U,Math.min(H,q-N*C)),E=Math.max(U,Math.min(H,he+N*C)))}Zn?1:t>=n?0:NaN}function yI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function Xje(t){return(n,e)=>vI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var bI=Math.sqrt(50),_I=Math.sqrt(10),xI=Math.sqrt(2);function $U(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=bI?10:o>=_I?5:o>=xI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=bI?10:o>=_I?5:o>=xI?2:1)}function wI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=bI?r*=10:o>=_I?r*=5:o>=xI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return CI.setTime(+o),kI.setTime(+s),t(CI),t(kI),Math.floor(e(CI,kI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var SI=$u(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});SI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$u(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Jje=SI;var BU=$u(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});const Kje=BU;var Uy=6e4,Zje=6048e5;function dm(t){return $u(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Uy)/Zje})}var HU=dm(0),zU=(dm(1),dm(2),dm(3),dm(4),dm(5),dm(6),$u(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Uy)/864e5,t=>t.getDate()-1));const sPe=zU;var UU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Uy)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()});const aPe=UU;var GU=$u(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*Uy)},function(t,n){return(n-t)/Uy},function(t){return t.getMinutes()});const lPe=GU;var WU=$u(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()});const cPe=WU;var i2=$u(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});i2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$u(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):i2:null};const uPe=i2;var DI=new Date,TI=new Date;function Xh(t,n,e,i){function r(o){return t(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return t(o=new Date(+o)),o},r.ceil=function(o){return t(o=new Date(o-1)),n(o,1),t(o),o},r.round=function(o){var s=r(o),a=r.ceil(o);return o-s0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return DI.setTime(+o),TI.setTime(+s),t(DI),t(TI),Math.floor(e(DI,TI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var qU=6e4,YU=6048e5;function hm(t){return Xh(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/YU})}var JU=hm(0),r2=hm(1),_v=(hm(2),hm(3),hm(4)),KU=(hm(5),hm(6),Xh(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const QU=KU;function fm(t){return Xh(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qU)/YU})}var ZU=fm(0),o2=fm(1),xv=(fm(2),fm(3),fm(4)),eG=(fm(5),fm(6),Xh(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qU)/864e5},function(t){return t.getDate()-1}));const tG=eG;var EI=Xh(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});EI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const Gy=EI;var AI=Xh(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});AI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xh(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Wy=AI;function MI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function II(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function qy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var wv,gG,nG={"-":"",_:" ",0:"0"},ya=/^\s*\d+/,_Pe=/^%/,xPe=/[\\^$*+?|[\]().{}]/g;function Gr(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function EPe(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function APe(t,n,e){var i=ya.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function MPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function oG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function IPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function sG(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function FPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function NPe(t,n,e){var i=ya.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function OPe(t,n,e){var i=ya.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function jPe(t,n,e){var i=ya.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function PPe(t,n,e){var i=_Pe.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function LPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function RPe(t,n,e){var i=ya.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function aG(t,n){return Gr(t.getDate(),n,2)}function $Pe(t,n){return Gr(t.getHours(),n,2)}function BPe(t,n){return Gr(t.getHours()%12||12,n,2)}function VPe(t,n){return Gr(1+tG.count(Gy(t),t),n,3)}function lG(t,n){return Gr(t.getMilliseconds(),n,3)}function HPe(t,n){return lG(t,n)+"000"}function zPe(t,n){return Gr(t.getMonth()+1,n,2)}function UPe(t,n){return Gr(t.getMinutes(),n,2)}function GPe(t,n){return Gr(t.getSeconds(),n,2)}function WPe(t){var n=t.getDay();return 0===n?7:n}function qPe(t,n){return Gr(ZU.count(Gy(t)-1,t),n,2)}function cG(t){var n=t.getDay();return n>=4||0===n?xv(t):xv.ceil(t)}function XPe(t,n){return t=cG(t),Gr(xv.count(Gy(t),t)+(4===Gy(t).getDay()),n,2)}function YPe(t){return t.getDay()}function JPe(t,n){return Gr(o2.count(Gy(t)-1,t),n,2)}function KPe(t,n){return Gr(t.getFullYear()%100,n,2)}function QPe(t,n){return Gr((t=cG(t)).getFullYear()%100,n,2)}function ZPe(t,n){return Gr(t.getFullYear()%1e4,n,4)}function eLe(t,n){var e=t.getDay();return Gr((t=e>=4||0===e?xv(t):xv.ceil(t)).getFullYear()%1e4,n,4)}function tLe(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Gr(n/60|0,"0",2)+Gr(n%60,"0",2)}function uG(t,n){return Gr(t.getUTCDate(),n,2)}function nLe(t,n){return Gr(t.getUTCHours(),n,2)}function iLe(t,n){return Gr(t.getUTCHours()%12||12,n,2)}function rLe(t,n){return Gr(1+QU.count(Wy(t),t),n,3)}function dG(t,n){return Gr(t.getUTCMilliseconds(),n,3)}function oLe(t,n){return dG(t,n)+"000"}function sLe(t,n){return Gr(t.getUTCMonth()+1,n,2)}function aLe(t,n){return Gr(t.getUTCMinutes(),n,2)}function lLe(t,n){return Gr(t.getUTCSeconds(),n,2)}function cLe(t){var n=t.getUTCDay();return 0===n?7:n}function uLe(t,n){return Gr(JU.count(Wy(t)-1,t),n,2)}function hG(t){var n=t.getUTCDay();return n>=4||0===n?_v(t):_v.ceil(t)}function dLe(t,n){return t=hG(t),Gr(_v.count(Wy(t),t)+(4===Wy(t).getUTCDay()),n,2)}function hLe(t){return t.getUTCDay()}function fLe(t,n){return Gr(r2.count(Wy(t)-1,t),n,2)}function pLe(t,n){return Gr(t.getUTCFullYear()%100,n,2)}function mLe(t,n){return Gr((t=hG(t)).getUTCFullYear()%100,n,2)}function gLe(t,n){return Gr(t.getUTCFullYear()%1e4,n,4)}function vLe(t,n){var e=t.getUTCDay();return Gr((t=e>=4||0===e?_v(t):_v.ceil(t)).getUTCFullYear()%1e4,n,4)}function yLe(){return"+0000"}function fG(){return"%"}function pG(t){return+t}function mG(t){return Math.floor(+t/1e3)}function vG(t){return null===t?NaN:+t}!function wLe(t){wv=function bPe(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Xy(r),u=Yy(r),d=Xy(o),h=Yy(o),f=Xy(s),p=Yy(s),m=Xy(a),g=Yy(a),v=Xy(l),y=Yy(l),_={a:function H(ze){return s[ze.getDay()]},A:function he(ze){return o[ze.getDay()]},b:function E(ze){return l[ze.getMonth()]},B:function F(ze){return a[ze.getMonth()]},c:null,d:aG,e:aG,f:HPe,g:QPe,G:eLe,H:$Pe,I:BPe,j:VPe,L:lG,m:zPe,M:UPe,p:function N(ze){return r[+(ze.getHours()>=12)]},q:function Y(ze){return 1+~~(ze.getMonth()/3)},Q:pG,s:mG,S:GPe,u:WPe,U:qPe,V:XPe,w:YPe,W:JPe,x:null,X:null,y:KPe,Y:ZPe,Z:tLe,"%":fG},C={a:function V(ze){return s[ze.getUTCDay()]},A:function oe(ze){return o[ze.getUTCDay()]},b:function fe(ze){return l[ze.getUTCMonth()]},B:function Fe(ze){return a[ze.getUTCMonth()]},c:null,d:uG,e:uG,f:oLe,g:mLe,G:vLe,H:nLe,I:iLe,j:rLe,L:dG,m:sLe,M:aLe,p:function xe(ze){return r[+(ze.getUTCHours()>=12)]},q:function tt(ze){return 1+~~(ze.getUTCMonth()/3)},Q:pG,s:mG,S:lLe,u:cLe,U:uLe,V:dLe,w:hLe,W:fLe,x:null,X:null,y:pLe,Y:gLe,Z:yLe,"%":fG},S={a:function z(ze,ot,B){var ne=f.exec(ot.slice(B));return ne?(ze.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function U(ze,ot,B){var ne=d.exec(ot.slice(B));return ne?(ze.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function q(ze,ot,B){var ne=v.exec(ot.slice(B));return ne?(ze.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function re(ze,ot,B){var ne=m.exec(ot.slice(B));return ne?(ze.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function L(ze,ot,B){return G(ze,n,ot,B)},d:oG,e:oG,f:jPe,g:rG,G:iG,H:sG,I:sG,j:IPe,L:OPe,m:MPe,M:FPe,p:function R(ze,ot,B){var ne=c.exec(ot.slice(B));return ne?(ze.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:APe,Q:LPe,s:RPe,S:NPe,u:kPe,U:SPe,V:DPe,w:CPe,W:TPe,x:function X(ze,ot,B){return G(ze,e,ot,B)},X:function Z(ze,ot,B){return G(ze,i,ot,B)},y:rG,Y:iG,Z:EPe,"%":PPe};function M(ze,ot){return function(B){var Le,_t,At,ne=[],ie=-1,Ie=0,Ye=ze.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Ie=II(qy(ne.y,0,1))).getUTCDay(),Ie=Ye>4||0===Ye?r2.ceil(Ie):r2(Ie),Ie=QU.offset(Ie,7*(ne.V-1)),ne.y=Ie.getUTCFullYear(),ne.m=Ie.getUTCMonth(),ne.d=Ie.getUTCDate()+(ne.w+6)%7):(Ye=(Ie=MI(qy(ne.y,0,1))).getDay(),Ie=Ye>4||0===Ye?o2.ceil(Ie):o2(Ie),Ie=tG.offset(Ie,7*(ne.V-1)),ne.y=Ie.getFullYear(),ne.m=Ie.getMonth(),ne.d=Ie.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?II(qy(ne.y,0,1)).getUTCDay():MI(qy(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,II(ne)):MI(ne)}}function G(ze,ot,B,ne){for(var Le,_t,ie=0,Ie=ot.length,Ye=B.length;ie=Ye)return-1;if(37===(Le=ot.charCodeAt(ie++))){if(Le=ot.charAt(ie++),!(_t=S[Le in nG?ot.charAt(ie++):Le])||(ne=_t(ze,B,ne))<0)return-1}else if(Le!=B.charCodeAt(ne++))return-1}return ne}return _.x=M(e,_),_.X=M(i,_),_.c=M(n,_),C.x=M(e,C),C.X=M(i,C),C.c=M(n,C),{format:function(ze){var ot=M(ze+="",_);return ot.toString=function(){return ze},ot},parse:function(ze){var ot=$(ze+="",!1);return ot.toString=function(){return ze},ot},utcFormat:function(ze){var ot=M(ze+="",C);return ot.toString=function(){return ze},ot},utcParse:function(ze){var ot=$(ze+="",!0);return ot.toString=function(){return ze},ot}}}(t),gG=wv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const CLe=yI(vI).right,bG=(yI(vG),CLe);function kLe(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function DLe(t){return+t}var _G=[0,1];function Cv(t){return t}function FI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function SLe(t){return function(){return t}}(isNaN(n)?NaN:.5)}function ELe(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?ALe:ELe,l=c=null,d}function d(h){return isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,DLe),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=kLe,u()},d.clamp=function(h){return arguments.length?(s=!!h||Cv,u()):s!==Cv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Cv,Cv)}function Jy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Ky=1e3,Qy=60*Ky,Zy=60*Qy,eb=24*Zy,FLe=7*eb,CG=30*eb,NI=365*eb;function NLe(t){return new Date(t)}function OLe(t){return t instanceof Date?+t:+new Date(+t)}function kG(t,n,e,i,r,o,s,a,l){var c=wG(),u=c.invert,d=c.domain,h=l(".%L"),f=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),_=l("%Y"),C=[[s,1,Ky],[s,5,5*Ky],[s,15,15*Ky],[s,30,30*Ky],[o,1,Qy],[o,5,5*Qy],[o,15,15*Qy],[o,30,30*Qy],[r,1,Zy],[r,3,3*Zy],[r,6,6*Zy],[r,12,12*Zy],[i,1,eb],[i,2,2*eb],[e,1,FLe],[n,1,CG],[n,3,3*CG],[t,1,NI]];function S($){return(s($)<$?h:o($)<$?f:r($)<$?p:i($)<$?m:n($)<$?e($)<$?g:v:t($)<$?y:_)($)}function M($,G,R){if(null==$&&($=10),"number"==typeof $){var q,z=Math.abs(R-G)/$,U=yI(function(re){return re[2]}).right(C,z);return U===C.length?(q=wI(G/NI,R/NI,$),$=t):U?(q=(U=C[z/C[U-1][2]=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s2(t){if(!(n=jLe.exec(t)))throw new Error("invalid format: "+t);var n;return new OI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function OI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function a2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function kv(t){return(t=a2(Math.abs(t)))?t[1]:NaN}function DG(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}s2.prototype=OI.prototype,OI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const TG={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function PLe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return DG(100*t,n)},r:DG,s:function VLe(t,n){var e=a2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(SG=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+a2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function EG(t){return t}var l2,jI,IG,AG=Array.prototype.map,MG=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function qLe(t){var n=t.domain;return t.ticks=function(e){var i=n();return function Yje(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),s=new Array(o=Math.ceil(n-t+1));++r0;){if((c=$U(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function bo(){var t=wG();return t.copy=function(){return xG(t,bo())},Jy.apply(t,arguments),qLe(t)}function FG(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(AG.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?EG:function $Le(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(AG.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=s2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,_=d.precision,C=d.trim,S=d.type;"n"===S?(y=!0,S="g"):TG[S]||(void 0===_&&(_=12),C=!0,S="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var M="$"===m?e:"#"===m&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",$="$"===m?i:/[%p]/.test(S)?s:"",G=TG[S],R=/[defgprs%]/.test(S);function z(U){var L,X,Z,q=M,re=$;if("c"===S)re=G(U)+re,U="";else{var H=(U=+U)<0||1/U<0;if(U=isNaN(U)?l:G(Math.abs(U),_),C&&(U=function BLe(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(U)),H&&0==+U&&"+"!==p&&(H=!1),q=(H?"("===p?p:a:"-"===p||"("===p?"":p)+q,re=("s"===S?MG[8+SG/3]:"")+re+(H&&"("===p?")":""),R)for(L=-1,X=U.length;++L(Z=U.charCodeAt(L))||Z>57){re=(46===Z?r+U.slice(L+1):U.slice(L))+re,U=U.slice(0,L);break}}y&&!g&&(U=n(U,1/0));var he=q.length+U.length+re.length,E=he>1)+q+U+re+E.slice(he);break;default:U=E+q+U+re}return o(U)}return _=void 0===_?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),z.toString=function(){return d+""},z}return{format:c,formatPrefix:function u(d,h){var f=c(((d=s2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(kv(h)/3))),m=Math.pow(10,-p),g=MG[8+p/3];return function(v){return f(m*v)+g}}}}(t),jI=l2.format,IG=l2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const NG=Symbol("implicit");function PI(){var t=new Map,n=[],e=[],i=NG;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==NG)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return PI(n,e).unknown(i)},Jy.apply(r,arguments),r}function La(){var o,s,t=PI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function jG(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],avm)if(Math.abs(u*a-l*c)>vm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((LI-Math.acos((p+d-m)/(2*g*v)))/2),_=y/v,C=y/g;Math.abs(_-1)>vm&&(this._+="L"+(t+_*c)+","+(n+_*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>vm||Math.abs(this._y1-c)>vm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%RI+RI),d>YLe?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>vm&&(this._+="A"+e+","+e+",0,"+ +(d>=LI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const BI=LG;function mo(t){return function(){return t}}function RG(t){return t[0]}function $G(t){return t[1]}function c2(){var t=RG,n=$G,e=mo(!0),i=null,r=gm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=BI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],_[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),_[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):_[d]))}if(v)return a=null,v+""||null}function c(){return c2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:mo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:mo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:mo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:mo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:mo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function BG(){}function VI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function VG(t,n){this._context=t,this._k=(1-n)/6}function HG(t,n){this._context=t,this._k=(1-n)/6}function zG(t){this._curve=t}function fRe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function XG(t,n){var r,s,a,l,c,e=new rb(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=NRe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new rb(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(YG)}function NRe(t){return t.children}function ORe(t){t.data=t.data.data}function YG(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rb(t){this.data=t,this.depth=this.height=0,this.parent=null}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:VI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new VG(i,n)}return e.tension=function(i){return t(+i)},e}(0),HG.prototype={areaStart:BG,areaEnd:BG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:VI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new HG(i,n)}return e.tension=function(i){return t(+i)},e}(0),function UG(t){function n(e){return new zG(t(e))}return n._curve=t,n}(gm),zG.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function gRe(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,_,C,S,M,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),M=g*g*S,(_=Math.max(y/M,M/v))>C){g-=c;break}C=_}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),rb.prototype=XG.prototype={constructor:rb,count:function _Re(){return this.eachAfter(bRe)},each:function xRe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function kRe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function SRe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function DRe(t){for(var n=this,e=function TRe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function ERe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function ARe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function MRe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function IRe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function FRe(){return XG(this).eachBefore(ORe)}};const $Re=["caretElm"];function BRe(t,n){}const VRe=function(t){return{model:t}};function HRe(t,n){if(1&t&&(b(0,"span"),J(1,BRe,0,0,"ng-template",5),x()),2&t){const e=j();w(1),k("ngTemplateOutlet",e.template)("ngTemplateOutletContext",lr(2,VRe,e.context))}}function zRe(t,n){1&t&&ge(0,"span",6),2&t&&k("innerHTML",j().title,kx)}function URe(t,n){if(1&t&&(at(),Ip(),ge(0,"ngx-charts-scale-legend",4)),2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function GRe(t,n){if(1&t){const e=vt();at(),Ip(),b(0,"ngx-charts-legend",5),ye("labelClick",function(r){return $e(e),Be(j().legendLabelClick.emit(r))})("labelActivate",function(r){return $e(e),Be(j().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return $e(e),Be(j().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=j();k("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const QG=["*"],WRe=["ngx-charts-axis-label",""],ZG=["ticksel"],qRe=["ngx-charts-x-axis-ticks",""];function XRe(t,n){if(1&t&&(at(),b(0,"g",3)(1,"title"),I(2),x(),b(3,"text",4),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function YRe(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",6),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),ht("y1",-e.gridLineHeight)}}function JRe(t,n){if(1&t&&(at(),b(0,"g"),J(1,YRe,2,2,"g",5),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.tickTransform(e)),w(1),k("ngIf",i.showGridLines)}}const KRe=["ngx-charts-x-axis",""];function QRe(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksHeight(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function ZRe(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const e5e=["ngx-charts-y-axis-ticks",""];function t5e(t,n){if(1&t&&(at(),b(0,"g",4)(1,"title"),I(2),x(),b(3,"text",5),I(4),x()()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(2),Dt(i.tickFormat(e)),w(1),rr("font-size","12px"),ht("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),xn(" ",i.tickTrim(i.tickFormat(e))," ")}}function n5e(t,n){if(1&t&&(at(),ge(0,"path",6)),2&t){const e=j();ht("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function i5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",j(3).gridLineWidth)}function r5e(t,n){1&t&&(at(),ge(0,"line",9)),2&t&&ht("x2",-j(3).gridLineWidth)}function o5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,i5e,1,1,"line",8),J(2,r5e,1,1,"line",8),x()),2&t){const e=j(2);ht("transform",e.gridLineTransform()),w(1),k("ngIf","left"===e.orient),w(1),k("ngIf","right"===e.orient)}}function s5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,o5e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=j();ht("transform",i.transform(e)),w(1),k("ngIf",i.showGridLines)}}function a5e(t,n){if(1&t&&(at(),b(0,"g")(1,"title"),I(2),x(),b(3,"text",11),I(4),x()()),2&t){const e=j(2).$implicit,i=j();w(2),Dt(i.tickTrim(i.tickFormat(e.value))),w(1),ht("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),xn(" ",e.name," ")}}function l5e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"line",10),J(2,a5e,5,6,"g",7),x()),2&t){const e=j().$implicit,i=j();ht("transform",i.transform(e.value)),w(1),ht("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),k("ngIf",i.showRefLabels)}}function c5e(t,n){if(1&t&&(at(),b(0,"g"),J(1,l5e,3,4,"g",7),x()),2&t){const e=j();w(1),k("ngIf",e.showRefLines)}}const u5e=["ngx-charts-y-axis",""];function d5e(t,n){if(1&t){const e=vt();at(),b(0,"g",2),ye("dimensionsChanged",function(r){return $e(e),Be(j().emitTicksWidth(r))}),x()}if(2&t){const e=j();k("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function h5e(t,n){if(1&t&&(at(),ge(0,"g",3)),2&t){const e=j();k("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const f5e=["ngx-charts-circle-series",""];function p5e(t,n){if(1&t&&(at(),ge(0,"rect",4)),2&t){const e=j(2);k("@animationState","active"),ht("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const m5e=function(t){return{name:t}};function g5e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"defs"),ge(2,"g",1),x(),J(3,p5e,1,6,"rect",2),b(4,"g",3),ye("select",function(){$e(e);const r=j();return Be(r.onClick(r.circle.data))})("activate",function(){return $e(e),Be(j().activateCircle())})("deactivate",function(){return $e(e),Be(j().deactivateCircle())}),x()()}if(2&t){const e=j();w(2),k("name",e.gradientId)("stops",e.circle.gradientStops),w(1),k("ngIf",e.barVisible&&"standard"===e.type),w(1),Mn("active",e.isActive(lr(18,m5e,e.circle.seriesName))),k("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const v5e=["ngx-charts-circle",""],x5e=["ngx-charts-svg-linear-gradient",""];function w5e(t,n){if(1&t&&(at(),ge(0,"stop")),2&t){const e=n.$implicit;rr("stop-color",e.color)("stop-opacity",e.opacity),ht("offset",e.offset+"%")}}const S5e=["ngx-charts-area",""];function D5e(t,n){if(1&t&&(at(),b(0,"defs"),ge(1,"g",2),x()),2&t){const e=j();w(1),k("name",e.gradientId)("stops",e.gradientStops)}}const E5e=["tooltipAnchor"],A5e=["ngx-charts-tooltip-area",""];function M5e(t,n){if(1&t&&(b(0,"div",6),ge(1,"span",7),I(2),x()),2&t){const e=n.$implicit,i=j(2);w(1),rr("background-color",e.color),w(1),xn(" ",i.getToolTipText(e)," ")}}function I5e(t,n){if(1&t&&(at(),Ip(),b(0,"div",4),J(1,M5e,3,3,"div",5),x()),2&t){const e=n.model;w(1),k("ngForOf",e)}}const F5e=["ngx-charts-timeline",""];function N5e(t,n){if(1&t&&(b(0,"header",4)(1,"span",5),I(2),x()()),2&t){const e=j();w(2),Dt(e.title)}}function O5e(t,n){if(1&t){const e=vt();b(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return $e(e),Be(j().labelClick.emit(r))})("activate",function(r){return $e(e),Be(j().activate(r))})("deactivate",function(r){return $e(e),Be(j().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j();w(1),k("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Us=["tooltipTemplate"],p2=["seriesTooltipTemplate"],Eo=function(t,n){return[t,n]},n6e=["ngx-charts-line",""];function i6e(t,n){if(1&t){const e=vt();at(),b(0,"g",7),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateXAxisHeight(r))}),x()}if(2&t){const e=j();k("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function r6e(t,n){if(1&t){const e=vt();at(),b(0,"g",8),ye("dimensionsChanged",function(r){return $e(e),Be(j().updateYAxisWidth(r))}),x()}if(2&t){const e=j();k("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function o6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",9),x()),2&t){const e=n.$implicit,i=j();k("@animationState","active"),w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function s6e(t,n){if(1&t){const e=vt();at(),b(0,"g")(1,"g",13),ye("select",function(r){return $e(e),Be(j(2).onClick(r))})("activate",function(r){return $e(e),Be(j(2).onActivate(r))})("deactivate",function(r){return $e(e),Be(j(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function a6e(t,n){if(1&t){const e=vt();at(),b(0,"g",10),ye("mouseleave",function(){return $e(e),Be(j().hideCircles())}),b(1,"g",11),ye("hover",function(r){return $e(e),Be(j().updateHoveredVertical(r))}),x(),J(2,s6e,2,9,"g",12),x()}if(2&t){const e=j();w(1),k("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),k("ngForOf",e.results)}}function l6e(t,n){if(1&t&&(at(),b(0,"g"),ge(1,"g",15),x()),2&t){const e=n.$implicit,i=j(2);w(1),k("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function c6e(t,n){if(1&t){const e=vt();at(),b(0,"g",14),ye("onDomainChange",function(r){return $e(e),Be(j().updateDomain(r))}),J(1,l6e,2,8,"g",4),x()}if(2&t){const e=j();k("results",e.results)("view",Sr(10,Eo,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ht("transform",e.timelineTransform),w(1),k("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const u6e=["ngx-charts-line-series",""];function d6e(t,n){if(1&t&&(at(),ge(0,"g",4)),2&t){const e=j();k("name",e.gradientId)("stops",e.gradientStops)}}function h6e(t,n){if(1&t&&(at(),ge(0,"g",5)),2&t){const e=j();Mn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),k("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let iW=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function a$e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new kNe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Fz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(ct(Au),ct($c),ct(Rs))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function l$e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function c$e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:l$e(o.value,t,n)}),this[r]}}}}var Gs=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Gs||(Gs={})),Gs))();const Lf=7;function rW(t,n,e){return"top"===e?t.top-Lf:"bottom"===e?t.top+t.height-n.height+Lf:"center"===e?t.top+t.height/2-n.height/2:void 0}function oW(t,n,e){return"left"===e?t.left-Lf:"right"===e?t.left+t.width-n.width+Lf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=rW(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Lf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Lf),"center"===r&&(o=e.height/2-i.height/2);const s=rW(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=oW(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Lf),"right"===r&&(o=e.width-n.width/2-i.width/2-Lf),"center"===r&&(o=e.width/2-i.width/2);const s=oW(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===Gs.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===Gs.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Gs.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===Gs.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===Gs.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===Gs.right)return Gs.left;if(n===Gs.left)return Gs.right;if(n===Gs.top)return Gs.bottom;if(n===Gs.bottom)return Gs.top}return n}}let u$e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&io($Re,5),2&e){let r;cn(r=un())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,w5),2&e&&Su(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(b(0,"div"),ge(1,"span",0,1),b(3,"div",2),J(4,HRe,2,4,"span",3),J(5,zRe,1,1,"span",4),x()()),2&e&&(w(1),function J8(t,n,e){Tu(lc,Pd,Ig(Gt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),k("hidden",!i.showCaret),w(3),k("ngIf",!i.title),w(1),k("ngIf",i.title))},dependencies:[gn,kl],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function SNe(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);r>3&&o&&Object.defineProperty(n,e,o)}([c$e(100)],t.prototype,"onWindowResize",null),t})();class d$e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let UI=(()=>{class t extends d$e{constructor(e){super(e),this.type=u$e}}return t.\u0275fac=function(e){return new(e||t)(ct(iW))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),os=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Ke,this.legendLabelActivate=new Ke,this.legendLabelDeactivate=new Ke}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Lr([UI]),Hn],ngContentSelectors:QG,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(Cu(),b(0,"div",0),at(),b(1,"svg",1),ku(2),x(),J(3,URe,1,5,"ngx-charts-scale-legend",2),J(4,GRe,1,7,"ngx-charts-legend",3),x()),2&e&&(rr("width",i.view[0],"px"),k("@animationState","active")("@.disabled",!i.animations),w(1),ht("width",i.chartWidth)("height",i.view[1]),w(2),k("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),k("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[gn,vW,bW]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma("500ms 100ms",Dr({opacity:1}))])])]},changeDetection:0}),t})(),h$e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Ke,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi))},t.\u0275dir=Zt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),ss=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Ke}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new h$e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new ENe(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(Wi),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Hn],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"div")},encapsulation:2}),t})(),GI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Hn],attrs:WRe,decls:2,vars:6,template:function(e,i){1&e&&(at(),b(0,"text"),I(1),x()),2&e&&(ht("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),xn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Rf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function sW(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Ke,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:qRe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,XRe,5,7,"g",1),x(),J(3,JRe,2,2,"g",2)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngForOf",i.ticks))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),Wl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Ke,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&io(aW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:KRe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,QRe,1,12,"g",0),J(2,ZRe,1,5,"g",1),x()),2&e&&(ht("class",i.xAxisClassName)("transform",i.transform),w(1),k("ngIf",i.xScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,aW],encapsulation:2,changeDetection:0}),t})();let lW=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Ke,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Yh(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=sW(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Rf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&io(ZG,5),2&e){let r;cn(r=un())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:e5e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(at(),b(0,"g",null,0),J(2,t5e,5,9,"g",1),x(),J(3,n5e,1,2,"path",2),J(4,s5e,2,2,"g",3),J(5,c5e,2,1,"g",3)),2&e&&(w(2),k("ngForOf",i.ticks),w(1),k("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),k("ngForOf",i.ticks),w(1),k("ngForOf",i.referenceLines))},dependencies:[jn,gn],encapsulation:2,changeDetection:0}),t})(),El=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Ke,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&io(lW,5),2&e){let r;cn(r=un())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Hn],attrs:u5e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(at(),b(0,"g"),J(1,d5e,1,14,"g",0),J(2,h5e,1,5,"g",1),x()),2&e&&(ht("class",i.yAxisClassName)("transform",i.transform),w(1),k("ngIf",i.yScale),w(1),k("ngIf",i.showLabel))},dependencies:[gn,GI,lW],encapsulation:2,changeDetection:0}),t})(),cW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs]}),t})();var m2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(m2||(m2={})),m2))(),g2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(g2||(g2={})),g2))(),$f=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}($f||($f={})),$f))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Gs.top,this.tooltipAlignment=g2.center,this.tooltipType=m2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$f.all,this.tooltipImmediateExit=!1,this.show=new Ke,this.hide=new Ke}get listensForFocus(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.focus}get listensForHover(){return this.tooltipShowEvent===$f.all||this.tooltipShowEvent===$f.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(le(UI),le(nl),le(Ss))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),uW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[iW,UI],imports:[Vs]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function oa(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const dW={};function Al(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,dW[t]?Al():(dW[t]=!0,t)}let YI,ob=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${oa(r)} \u2022 ${oa(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:f5e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&J(0,g5e,5,20,"g",0),2&e&&k("ngIf",i.circle)},dependencies:function(){return[gn,Bu,v2,bm]},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({opacity:0}),Ma(250,Dr({opacity:1}))])])]},changeDetection:0}),t})(),v2=(()=>{class t{constructor(){this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Hn],attrs:v5e,decls:1,vars:8,template:function(e,i){1&e&&(at(),ge(0,"circle")),2&e&&ht("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),bm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Hn],attrs:x5e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(at(),b(0,"linearGradient",0),J(1,w5e,1,5,"stop",1),x()),2&e&&(k("id",i.name),ht("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),k("ngForOf",i.stops))},dependencies:[jn],encapsulation:2,changeDetection:0}),t})(),XI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Ke,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+Al().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=va(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Hn],attrs:S5e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(J(0,D5e,2,2,"defs",0),at(),ge(1,"path",1)),2&e&&(k("ngIf",i.gradient),w(1),rr("opacity",i.opacity),ht("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[gn,bm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?YI=window:typeof global<"u"&&(YI=global);const gW=YI.MouseEvent;function JI(t,n=!1,e=!0){if("function"==typeof gW)return new gW(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let sb=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Ke}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=JI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=JI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&io(E5e,5),2&e){let r;cn(r=un())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:A5e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(at(),b(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),J(2,I5e,2,1,"ng-template",null,1,Ur),ge(4,"rect",2,3),x()),2&e){const r=uo(3);w(1),ht("x",0)("width",i.dims.width)("height",i.dims.height),w(3),rr("opacity",i.anchorOpacity)("pointer-events","none"),k("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ht("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[jn,Bu],encapsulation:2,data:{animation:[il("animationState",[Ia("inactive => active",[Dr({opacity:0}),Ma(250,Dr({opacity:.7}))]),Ia("active => inactive",[Dr({opacity:.7}),Ma(250,Dr({opacity:0}))])])]},changeDetection:0}),t})(),ab=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Ke,this.onDomainChange=new Ke,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+Al().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=pm().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=bo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=mm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function qje(){return gI(e2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Vr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),va(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),va(this.element).select(".brush").call(this.brush),va(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(le(ti),le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Hn],attrs:F5e,ngContentSelectors:QG,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(Cu(),at(),b(0,"g",0)(1,"filter"),ge(2,"feColorMatrix",1),x(),b(3,"g",2),ku(4),x(),ge(5,"rect",3)(6,"g",4),x()),2&e&&(ht("transform",i.transform),w(1),ht("id",i.filterId),w(4),ht("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),vW=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Ke,this.labelActivate=new Ke,this.labelDeactivate=new Ke,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(le(qo))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Hn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(b(0,"div"),J(1,N5e,3,1,"header",0),b(2,"div",1)(3,"ul",2),J(4,O5e,2,4,"li",3),x()()()),2&e&&(rr("width",i.width,"px"),w(1),k("ngIf",(null==i.title?null:i.title.length)>0),w(2),rr("max-height",i.height-45,"px"),Mn("horizontal-legend",i.horizontal),w(1),k("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[jn,gn,yW]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),yW=(()=>{class t{constructor(){this.isActive=!1,this.select=new Ke,this.activate=new Ke,this.deactivate=new Ke,this.toggle=new Ke}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(b(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),b(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),b(2,"span",2),I(3),x()()),2&e&&(Mn("active",i.isActive),k("title",i.formattedLabel),w(1),rr("background-color",i.color),w(2),xn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),bW=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(le(ZB))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Hn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"span"),I(3),x()(),ge(4,"div",2),b(5,"div",1)(6,"span"),I(7),x()()()),2&e&&(rr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Mn("horizontal-legend",i.horizontal),w(3),Dt(i.valueRange[1].toLocaleString()),w(1),rr("background",i.gradient),w(3),Dt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vs,cW,uW,Vs,cW,uW]}),t})();let xW=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class vs{constructor(n,e,i,r){"string"==typeof n&&(n=xW.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=xW.find(o=>o.name===n)),"quantile"===e)r=jG().range(n.domain).domain(i);else if("ordinal"===e)r=PI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=FG(0,1,1/o.length);r=bo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=bo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=bo().domain(this.domain).range([0,1]),r=La().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let f$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),CW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),m$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),y$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),DW=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Ke,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=va(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(le(ti))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Hn],attrs:n6e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(at(),ge(0,"path",0)),2&e&&(k("@animationState","active"),ht("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[il("animationState",[Ia(":enter",[Dr({strokeDasharray:2e3,strokeDashoffset:2e3}),Ma(1e3,Dr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),b$e=(()=>{class t extends ss{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=gm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Ke,this.deactivate=new Ke,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function gs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+Al().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function b2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Bf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=pm().range([0,i]).domain(e):"linear"===this.scaleType?(r=bo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=mm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=bo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new vs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=ji(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(ni(r,Us,5),ni(r,p2,5)),2&e){let o;cn(o=un())&&(i.tooltipTemplate=o.first),cn(o=un())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[vi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(b(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),at(),b(1,"defs")(2,"clipPath"),ge(3,"rect"),x()(),b(4,"g",1),J(5,i6e,1,10,"g",2),J(6,r6e,1,12,"g",3),b(7,"g"),J(8,o6e,2,11,"g",4),J(9,a6e,3,9,"g",5),x()(),J(10,c6e,2,13,"g",6),x()),2&e&&(k("view",Sr(17,Eo,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ht("id",i.clipPathId),w(1),ht("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ht("transform",i.transform),w(1),k("ngIf",i.xAxis),w(1),k("ngIf",i.yAxis),w(1),ht("clip-path",i.clipPath),w(1),k("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),k("ngIf",!i.tooltipDisabled),w(1),k("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[jn,gn,Wl,El,sb,os,ob,ab,_$e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[il("animationState",[Ia(":leave",[Dr({opacity:1}),Ma(500,Dr({opacity:0}))])])]},changeDetection:0}),t})(),_$e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return c2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return Sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return Sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function KI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function ZI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function QI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+Al().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Hn],attrs:u6e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(at(),b(0,"g")(1,"defs"),J(2,d6e,1,2,"g",0),x(),ge(3,"g",1)(4,"g",2),J(5,h6e,1,9,"g",3),x()),2&e&&(w(2),k("ngIf",i.hasGradient),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),Mn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),k("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),k("ngIf",i.hasRange))},dependencies:[gn,XI,bm,DW],encapsulation:2,changeDetection:0}),t})(),TW=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})();Math;let iF=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),S$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iF,TW]}),t})(),A$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),F$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu]}),t})(),j$e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,iF,CW]}),t})(),L$e=(()=>{class t{constructor(){!function P$e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({imports:[Vu,f$e,CW,m$e,y$e,TW,S$e,A$e,iF,F$e,j$e]}),t})();function R$e(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function $$e(t,n){1&t&&ge(0,"img",31)}function B$e(t,n){1&t&&ge(0,"img",32)}function V$e(t,n){1&t&&ge(0,"img",33)}function H$e(t,n){1&t&&ge(0,"img",34)}function z$e(t,n){if(1&t&&(b(0,"tr",24)(1,"td"),ta(2,25),J(3,$$e,1,0,"img",26),J(4,B$e,1,0,"img",27),J(5,V$e,1,0,"img",28),J(6,H$e,1,0,"img",29),na(),b(7,"span"),I(8),x()(),b(9,"td"),I(10),b(11,"span",30),I(12),x()(),b(13,"td"),I(14),b(15,"span",30),I(16),x()(),b(17,"td"),I(18),b(19,"span",30),I(20),x()(),b(21,"td"),I(22),b(23,"span",30),I(24),x()()()),2&t){const e=n.$implicit,i=j(2);w(2),k("ngSwitch",e.health),w(1),k("ngSwitchCase",0),w(1),k("ngSwitchCase",1),w(1),k("ngSwitchCase",2),w(1),k("ngSwitchCase",3),w(2),Dt(e.name),w(2),xn("",e.session_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),xn("",e.presence_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),xn("",e.match_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),xn("",e.goroutine_count," "),w(1),k("hidden",!i.showDelta),w(1),xn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function U$e(t,n){if(1&t&&(b(0,"tbody"),J(1,z$e,25,18,"tr",22),b(2,"tr",3),ge(3,"td",23),b(4,"th",3),I(5),x(),b(6,"th",3),I(7),x(),b(8,"th",3),I(9),x(),b(10,"th",3),I(11),x()()()),2&t){const e=j();w(1),k("ngForOf",e.statusData.nodes),w(4),Dt(e.getTotalSessionCount()),w(2),Dt(e.getMaxPresenceCount()),w(2),Dt(e.getTotalMatchCount()),w(2),Dt(e.getTotalGorountineCount())}}function G$e(t,n){if(1&t&&(b(0,"option",35),I(1),x()),2&t){const e=n.$implicit,i=j();Nh("value",e),w(1),Dt(i.ranges[e])}}const w2=function(t){return{"background-color":t}};function W$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function q$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,W$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function X$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",37),J(2,q$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function Y$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function J$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Y$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function K$e(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",43),J(2,J$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function Q$e(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function Z$e(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,Q$e,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function eBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",44),J(2,Z$e,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function tBe(t,n){if(1&t&&(b(0,"span"),ge(1,"br")(2,"span",41),b(3,"span",42),I(4),x()()),2&t){const e=n.$implicit;w(2),k("ngStyle",lr(3,w2,e.color)),w(2),Ld("",e.series,": ",e.value,"")}}function nBe(t,n){if(1&t&&(b(0,"div",39),I(1),J(2,tBe,5,5,"span",40),x()),2&t){const e=n.model;w(1),xn(" ",e[0].name.toLocaleString()," "),w(1),k("ngForOf",e)}}function iBe(t,n){if(1&t&&(b(0,"div",36)(1,"ngx-charts-line-chart",45),J(2,nBe,3,2,"ng-template",null,38,Ur),x()()),2&t){const e=j();w(1),k("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let rBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"showDelta",!1),K(this,"statusData",void 0),K(this,"rateGraphData",[]),K(this,"latencyGraphData",[]),K(this,"inputGraphData",[]),K(this,"outputGraphData",[]),K(this,"rangeForm",void 0),K(this,"ranges",{1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"}),K(this,"rangesKeys",Object.keys(this.ranges).map(o=>+o)),K(this,"colorScheme",{domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]}),K(this,"samples",60),K(this,"refreshTimer",void 0),K(this,"$refreshTimer",void 0),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=av(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Status"),x(),J(2,R$e,4,2,"ngb-alert",1),b(3,"table",2),ye("mouseover",function(){return i.showDelta=!0})("mouseout",function(){return i.showDelta=!1}),b(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Node name"),x(),b(8,"th",4),I(9,"Sessions"),x(),b(10,"th",4),I(11,"Presences"),x(),b(12,"th",4),I(13,"Authoritative Matches"),x(),b(14,"th",4),I(15,"Goroutines"),x()()(),J(16,U$e,12,5,"tbody",5),x(),b(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),I(21,"View:"),x(),b(22,"div",9)(23,"select",10),ye("change",function(o){return i.setRange(o)}),J(24,G$e,2,2,"option",11),function qE(t,n){const e=Pr();let i;const r=t+Bo;e.firstCreatePass?(i=function R_e(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Ap(i.type)),s=Pc(le);try{const a=ux(!1),l=o();return ux(a),function Lye(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,Gt(),r,l),l}finally{Pc(s)}}(25,"sortNumbers"),x()()()()(),b(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),I(30,"Processing Latency"),x(),b(31,"small"),I(32," (ms)"),x()()(),b(33,"div",13)(34,"div",14)(35,"h5",15),I(36,"Rate"),x(),b(37,"small"),I(38," (rpc/s)"),x()()()(),b(39,"div",12)(40,"div",16),J(41,X$e,4,12,"div",17),x(),b(42,"div",16),J(43,K$e,4,12,"div",17),x()(),b(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),I(48,"Input"),x(),b(49,"small"),I(50," (kb/s)"),x()()(),b(51,"div",13)(52,"div",14)(53,"h5",15),I(54,"Output"),x(),b(55,"small"),I(56," (kb/s)"),x()()()(),b(57,"div",12)(58,"div",16),J(59,eBe,4,12,"div",17),x(),b(60,"div",16),J(61,iBe,4,12,"div",17),x()()),2&e&&(w(2),k("ngIf",i.error),w(14),k("ngIf",i.statusData),w(1),k("formGroup",i.rangeForm),w(7),k("ngForOf",XE(25,8,i.rangesKeys)),w(17),k("ngIf",i.latencyGraphData.length>0),w(2),k("ngIf",i.rateGraphData.length>0),w(16),k("ngIf",i.inputGraphData.length>0),w(2),k("ngIf",i.outputGraphData.length>0))},dependencies:function(){return[jn,gn,wB,dw,_B,To,Pu,tNe,b$e,sl,xy,wy,ov,rl,ol,fa,ja,sBe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})),t})(),oBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),sBe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275pipe",gl({name:"sortNumbers",type:t,pure:!1})),t})();var aBe=De(870),rF=De(327);const lBe=["fileSelector"];function cBe(t,n){if(1&t&&(b(0,"div",8),I(1),x()),2&t){const e=j(2);w(1),Dt(e.dropZoneLabel)}}function uBe(t,n){if(1&t){const e=vt();b(0,"div")(1,"input",9),ye("click",function(r){return $e(e),Be(j(2).openFileSelector(r))}),x()()}if(2&t){const e=j(2);w(1),Nh("value",e.browseBtnLabel),k("className",e.browseBtnClassName)}}function dBe(t,n){if(1&t&&(J(0,cBe,2,1,"div",6),J(1,uBe,2,2,"div",7)),2&t){const e=j();k("ngIf",e.dropZoneLabel),w(1),k("ngIf",e.showBrowseBtn)}}function hBe(t,n){}const fBe=function(t){return{openFileSelector:t}};class C2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let OW=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(le(Si))},t.\u0275dir=Zt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),jW=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Ke,this.onFileOver=new Ke,this.onFileLeave=new Ke,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new C2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=av(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new C2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new C2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(le(Wi),le(Ss))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&ni(r,OW,5,Si),2&e){let o;cn(o=un())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&io(lBe,7),2&e){let r;cn(r=un())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(b(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),b(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),J(4,dBe,2,2,"ng-template",null,4,Ur),J(6,hBe,0,0,"ng-template",5),x()()),2&e){const r=uo(5);Mn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),k("className",i.dropZoneClassName),w(1),k("className",i.contentClassName),w(1),k("accept",i.accept)("multiple",i.multiple),ht("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),k("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",lr(13,fBe,i.openFileSelector))}},dependencies:[gn,kl],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),pBe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t,bootstrap:function(){return[jW]}}),t.\u0275inj=Ci({imports:[Vs]}),t})();function mBe(t,n){1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3,"Failed to retrieve configuration."),x()()),2&t&&k("dismissible",!1)}function gBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(2).$implicit;k("id",e.name),w(1),Dt(e.value)}}function vBe(t,n){1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t&&k("id",j(2).$implicit.name)}function yBe(t,n){if(1&t&&(b(0,"div",35)(1,"b"),I(2),x(),b(3,"label",27)(4,"a",28),ge(5,"img",10),x()()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.flatConfig[e+1].name),w(1),k("for",i.flatConfig[e+1].name),w(1),$p("href","https://heroiclabs.com/docs/install-configuration/#",i.flatConfig[e+1].name,"",y1)}}function bBe(t,n){if(1&t&&(b(0,"span",33),I(1),x()),2&t){const e=j(3).index,i=j();k("id",i.flatConfig[e+1].name),w(1),Dt(i.flatConfig[e+1].value)}}function _Be(t,n){if(1&t&&(b(0,"span",34),I(1,"(empty)"),x()),2&t){const e=j(3).index;k("id",j().flatConfig[e+1].name)}}function xBe(t,n){if(1&t&&(b(0,"div",36),J(1,bBe,2,2,"span",29),J(2,_Be,2,1,"span",30),x()),2&t){const e=j(2).index,i=j();w(1),k("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),k("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function wBe(t,n){if(1&t&&(b(0,"div",26)(1,"div",7)(2,"b"),I(3),x(),b(4,"label",27)(5,"a",28),ge(6,"img",10),x()()(),b(7,"div",7),J(8,gBe,2,2,"span",29),J(9,vBe,2,1,"span",30),x(),J(10,yBe,6,3,"div",31),J(11,xBe,3,2,"div",32),x()),2&t){const e=j(),i=e.index,r=e.$implicit,o=j();Mn("border-top-0",i>0),w(3),Dt(r.name),w(1),k("for",r.name),w(1),$p("href","https://heroiclabs.com/docs/install-configuration/#",r.value.name,"",y1),w(3),k("ngIf",!o.isEmpty(r.value)),w(1),k("ngIf",o.isEmpty(r.value)),w(1),k("ngIf",i{class t{constructor(e,i,r,o,s,a){K(this,"config",void 0),K(this,"route",void 0),K(this,"httpClient",void 0),K(this,"modalService",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"configError",""),K(this,"uploadError",""),K(this,"deleteError",""),K(this,"jsonConfig",void 0),K(this,"flatConfig",void 0),K(this,"nakamaVersion",void 0),K(this,"file",void 0),K(this,"uploading",!1),K(this,"uploadSuccess",!1),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"confirmDeleteForm",void 0),K(this,"apiConfig",void 0),this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,aBe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});rF.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(T3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(C3),le(Rr),le(wC),le(H3),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:43,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/install-configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],["autocomplete","off",3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,i){if(1&e){const r=vt();J(0,mBe,4,1,"ngb-alert",0),b(1,"h2",1),I(2,"Server Configuration"),x(),b(3,"div",2)(4,"h5")(5,"b"),I(6,"Server version:"),x(),I(7),x(),b(8,"button",3),ye("click",function(){return i.exportYaml()}),I(9,"Export Configuration"),x()(),b(10,"div",4),J(11,CBe,2,1,"ng-container",5),b(12,"div",6)(13,"div",7)(14,"b"),I(15,"runtime.env"),x(),b(16,"label",8)(17,"a",9),ge(18,"img",10),x()()(),b(19,"div",11),J(20,SBe,2,1,"div",12),J(21,DBe,3,0,"div",12),x()()(),b(22,"h5",13),I(23,"Import storage data"),x(),b(24,"p"),I(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),J(26,TBe,6,2,"ngb-alert",0),J(27,EBe,4,1,"ngb-alert",14),b(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return i.dropped(s)}),J(29,ABe,2,0,"ng-template",16),x(),b(30,"h5",13),I(31,"Delete all data"),x(),J(32,MBe,6,2,"ngb-alert",0),J(33,IBe,4,1,"ngb-alert",14),b(34,"div",17)(35,"div"),ge(36,"img",18),b(37,"small",19),I(38,"Warning - this operation is not reversible!"),x()(),J(39,NBe,19,5,"ng-template",null,20,Ur),b(41,"button",21),ye("click",function(){$e(r);const s=uo(40);return Be(i.openDeleteDataModal(s))}),I(42,"Delete all"),x()()}2&e&&(k("ngIf",i.configError),w(7),xn(" ",i.nakamaVersion,""),w(4),k("ngForOf",i.flatConfig),w(9),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&i.jsonConfig.runtime.env.length>0),w(1),k("ngIf",i.jsonConfig.runtime&&i.jsonConfig.runtime.env&&0===i.jsonConfig.runtime.env.length),w(5),k("ngIf",i.uploadError),w(1),k("ngIf",i.uploadSuccess),w(1),k("disabled",i.uploading),w(4),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(8),k("disabled",i.deleting))},dependencies:[jW,OW,Rh,jn,gn,To,sl,Na,rl,ol,fa,ja],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})),t})(),jBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function PBe(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function LBe(t,n){1&t&&(b(0,"tr")(1,"td",51),I(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),k("colSpan",4))}function RBe(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td")(6,"span",36),I(7,"Administrator"),x(),b(8,"span",36),I(9,"Developer"),x(),b(10,"span",36),I(11,"Maintainer"),x(),b(12,"span",36),I(13,"View Only"),x()(),b(14,"td")(15,"button",52),ye("click",function(){const o=$e(e).$implicit;return Be(j().deleteUser(o.username))}),I(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.username),w(2),Dt(e.email),w(2),k("hidden",e.role!==i.adminRole),w(2),k("hidden",e.role!==i.developerRole),w(2),k("hidden",e.role!==i.maintainerRole),w(2),k("hidden",e.role!==i.readonlyRole)}}function $Be(t,n){if(1&t&&(b(0,"ngb-alert",48),ge(1,"img",49),b(2,"h6",50),I(3,"An error occurred:"),x(),b(4,"p",53),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.userCreateError)}}const oF=function(t){return{"is-invalid":t}};let BBe=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"userCreateError",""),K(this,"users",[]),K(this,"createUserForm",void 0),K(this,"adminRole",oi.USER_ROLE_ADMIN),K(this,"developerRole",oi.USER_ROLE_DEVELOPER),K(this,"maintainerRole",oi.USER_ROLE_MAINTAINER),K(this,"readonlyRole",oi.USER_ROLE_READONLY),this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Do.required],email:["",[Do.required,Do.email]],password:["",Do.compose([Do.required,Do.minLength(8)])],role:[+this.readonlyRole,Do.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=oi.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=oi.USER_ROLE_ADMIN;break;case 2:e=oi.USER_ROLE_DEVELOPER;break;case 3:e=oi.USER_ROLE_MAINTAINER;break;case 4:e=oi.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(nt(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Management"),x(),J(2,PBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),I(7,"Username"),x(),b(8,"th"),I(9,"Email"),x(),b(10,"th",5),I(11,"Role"),x(),b(12,"th",6),I(13,"Action"),x()()(),b(14,"tbody"),J(15,LBe,3,1,"tr",7),J(16,RBe,17,6,"tr",8),x()(),b(17,"h5",9),I(18,"Add new user"),x(),b(19,"ngb-alert",10)(20,"h6",11),I(21,"User roles"),x(),b(22,"div",12)(23,"div",13)(24,"div",14),ge(25,"img",15),b(26,"h6",16),I(27,"Administrator"),x()(),b(28,"small"),I(29," Owners have complete control over the server, its users and resources. "),x()(),b(30,"div",13)(31,"div",14),ge(32,"img",17),b(33,"h6",16),I(34,"Developer"),x()(),b(35,"small"),I(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),b(37,"div",13)(38,"div",14),ge(39,"img",18),b(40,"h6",16),I(41,"Maintainer"),x()(),b(42,"small"),I(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),b(44,"div",13)(45,"div",14),ge(46,"img",19),b(47,"h6",16),I(48,"View Only"),x()(),b(49,"small"),I(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),J(51,$Be,6,2,"ngb-alert",1),b(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return i.addUser()}),b(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),I(58,"Email"),x()(),b(59,"div",26),ge(60,"input",27),b(61,"div",28),I(62,"Email is required"),x()()()(),b(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),I(67,"Username"),x()(),b(68,"div",26),ge(69,"input",30),b(70,"div",28),I(71,"Username is required"),x()()()(),b(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),I(76,"Password"),x()(),b(77,"div",26),ge(78,"input",32),b(79,"div",28),I(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),b(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),I(85,"Role"),x()(),b(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),I(90,"Administrator"),x(),b(91,"span",36),I(92,"Developer"),x(),b(93,"span",36),I(94,"Maintainer"),x(),b(95,"span",36),I(96,"View Only"),x()(),b(97,"div",37),ge(98,"button",38),b(99,"div",39)(100,"button",40),ye("click",function(){return i.f.role.setValue(+i.adminRole)}),I(101,"Administrator"),x(),b(102,"button",40),ye("click",function(){return i.f.role.setValue(+i.developerRole)}),I(103,"Developer"),x(),b(104,"button",40),ye("click",function(){return i.f.role.setValue(+i.maintainerRole)}),I(105,"Maintainer"),x(),b(106,"button",40),ye("click",function(){return i.f.role.setValue(+i.readonlyRole)}),I(107,"View Only"),x()()()(),b(108,"div",28),I(109,"Role is required"),x()()()(),b(110,"div",41)(111,"div",42),ge(112,"div",24),b(113,"div",26)(114,"div",43),ge(115,"input",44),b(116,"label",45),I(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),b(118,"div",46)(119,"button",47),I(120,"Save"),x()()()()),2&e&&(w(2),k("ngIf",i.error),w(13),k("ngIf",0===i.users.length),w(1),k("ngForOf",i.users),w(3),k("type","secondary"),w(32),k("ngIf",i.userCreateError),w(2),k("formGroup",i.createUserForm),w(7),k("ngClass",lr(18,oF,i.f.email.dirty&&i.f.email.errors)),w(1),k("hidden",i.f.email.disabled||i.f.email.valid||i.f.email.pristine),w(8),k("ngClass",lr(20,oF,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(8),k("ngClass",lr(22,oF,i.f.password.dirty&&i.f.password.errors)),w(1),k("hidden",i.f.password.disabled||i.f.password.valid||i.f.password.pristine),w(10),k("hidden",i.f.role.value!==+i.adminRole),w(2),k("hidden",i.f.role.value!==+i.developerRole),w(2),k("hidden",i.f.role.value!==+i.maintainerRole),w(2),k("hidden",i.f.role.value!==+i.readonlyRole),w(13),k("hidden",i.f.role.disabled||i.f.role.valid||i.f.role.pristine),w(11),k("disabled",i.createUserForm.invalid))},dependencies:[Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Na,aC,rl,ol,Ff,fa,ja],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})),t})(),VBe=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function HBe(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Failed to retrieve runtime information: ",e.error,"")}}function zBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function UBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Go modules were found."),x(),ge(3,"td"),x())}function GBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function WBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No Lua modules were found."),x(),ge(3,"td"),x())}function qBe(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td",13),I(4),x()()),2&t){const e=n.$implicit;w(2),Dt(e.path),w(2),Dt(e.mod_time)}}function XBe(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No JavaScript modules were found."),x(),ge(3,"td"),x())}const sF=function(){return["/apiexplorer"]},aF=function(t){return{endpoint:t}};function YBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function JBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Go RPC functions were found."),x()())}function KBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function QBe(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No Lua RPC functions were found."),x()())}function ZBe(t,n){if(1&t&&(b(0,"tr")(1,"td")(2,"code"),I(3),x()(),b(4,"td",15)(5,"a",16),I(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),Dt(e),w(2),k("routerLink",wl(3,sF))("queryParams",lr(4,aF,e))}}function e7e(t,n){1&t&&(b(0,"tr")(1,"td",17),I(2,"No JavaScript RPC functions were found."),x()())}let t7e=(()=>{class t{constructor(e,i){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"runtimeInfo",void 0),this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Runtime Modules"),x(),J(2,HBe,4,2,"ngb-alert",1),b(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),I(7,"Go Modules"),x(),b(8,"th",4),I(9,"Last Modified"),x()()(),b(10,"tbody"),J(11,zBe,5,2,"tr",5),J(12,UBe,4,0,"tr",6),x(),b(13,"thead",3)(14,"tr")(15,"th",7),I(16,"Lua Modules"),x()()(),b(17,"tbody"),J(18,GBe,5,2,"tr",5),J(19,WBe,4,0,"tr",6),x(),b(20,"thead",3)(21,"tr")(22,"th",7),I(23,"JavaScript Modules"),x()()(),b(24,"tbody"),J(25,qBe,5,2,"tr",5),J(26,XBe,4,0,"tr",6),x()(),b(27,"h4",8),I(28,"Registered RPC Functions"),x(),b(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),I(33,"Go RPC Functions"),x()()(),b(34,"tbody"),J(35,YBe,7,6,"tr",5),J(36,JBe,3,0,"tr",6),x(),b(37,"thead",3)(38,"tr")(39,"th",7),I(40,"Lua RPC Functions"),x()()(),b(41,"tbody"),J(42,KBe,7,6,"tr",5),J(43,QBe,3,0,"tr",6),x(),b(44,"thead",3)(45,"tr")(46,"th",7),I(47,"JavaScript RPC Functions"),x()()(),b(48,"tbody"),J(49,ZBe,7,6,"tr",5),J(50,e7e,3,0,"tr",6),x()()),2&e&&(w(2),k("ngIf",i.error),w(9),k("ngForOf",i.runtimeInfo.go_modules),w(1),k("ngIf",0===i.runtimeInfo.go_modules.length),w(6),k("ngForOf",i.runtimeInfo.lua_modules),w(1),k("ngIf",0===i.runtimeInfo.lua_modules.length),w(6),k("ngForOf",i.runtimeInfo.js_modules),w(1),k("ngIf",0===i.runtimeInfo.js_modules.length),w(9),k("ngForOf",i.runtimeInfo.go_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.go_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.lua_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.lua_rpc_functions.length),w(6),k("ngForOf",i.runtimeInfo.js_rpc_functions),w(1),k("ngIf",0===i.runtimeInfo.js_rpc_functions.length))},dependencies:[Fu,jn,gn,To],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})),t})(),n7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function i7e(t,n){1&t&&(b(0,"span"),I(1,"Filter by collection"),x())}function r7e(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.f.collection.value)}}function o7e(t,n){if(1&t){const e=vt();b(0,"button",34),ye("click",function(){const o=$e(e).$implicit;return Be(j().f.collection.setValue(o))}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function s7e(t,n){if(1&t&&(b(0,"ngb-alert",35),ge(1,"img",36),b(2,"h6",37),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying storage objects: ",e.error,"")}}function a7e(t,n){1&t&&(b(0,"th",38),I(1,"Remove"),x())}function l7e(t,n){1&t&&(b(0,"tr")(1,"td",39),I(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function c7e(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteObject(r,s,a))}),I(2,"Delete"),x()()}}function u7e(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(2),x(),b(3,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(4),x(),b(5,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(6),x(),b(7,"td",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewObject(o))}),I(8),x(),J(9,c7e,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.collection),w(2),Dt(e.key),w(2),Dt(e.user_id),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let d7e=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"collections",[]),K(this,"objects",[]),K(this,"objectCount",0),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Objects"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),J(12,i7e,2,0,"span",10),J(13,r7e,2,1,"span",10),x(),b(14,"div",11)(15,"button",12),ye("click",function(){return i.f.collection.reset()}),I(16,"\u2718 Deselect collection"),x(),ge(17,"div",13),J(18,o7e,2,1,"button",14),x()()(),ge(19,"input",15)(20,"input",16),b(21,"div",17)(22,"span",18),ye("click",function(){return i.f.user_id.setValue(i.systemUserId)}),ge(23,"img",19),x()(),b(24,"div",17)(25,"button",20),ye("click",function(){return i.search(0)}),I(26,"Search"),x()()()()(),b(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return i.search(0)}),ge(30,"img",24),x(),b(31,"button",23),ye("click",function(){return i.search(1)}),ge(32,"img",25),x()()()()(),J(33,s7e,4,2,"ngb-alert",26),b(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),I(39,"Collection Name"),x(),b(40,"th"),I(41,"Key Name"),x(),b(42,"th",30),I(43,"User ID"),x(),b(44,"th",31),I(45,"Last Update"),x(),J(46,a7e,2,0,"th",32),x()(),b(47,"tbody"),J(48,l7e,3,0,"tr",10),J(49,u7e,10,5,"tr",33),x()()()),2&e&&(w(3),xn("",i.objectCount," objects found."),w(4),k("formGroup",i.searchForm),w(4),k("disabled",0===i.collections.length),w(1),k("ngIf",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngIf",i.f.collection.value&&""!==i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(2),k("hidden",!i.f.collection.value||""===i.f.collection.value),w(1),k("ngForOf",i.collections),w(7),k("disabled",i.disableSearch()),w(4),k("disabled",0===i.objects.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.objects.length),w(1),k("ngForOf",i.objects))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),h7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})(),f7e=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();var lF,PW,LW,RW,$W,BW,VW,HW,zW,UW,GW,WW,qW,XW,YW,JW,KW,QW,ZW,eq,tq,nq,iq,rq,oq,sq,aq,lq,cq,uq,dq,hq,fq,pq,mq,gq,vq,yq,bq,_q,xq,wq,Cq,kq,Sq,Dq,Tq,Eq,Aq,Mq,Iq,Fq,Nq,Oq,jq,Pq,Lq,Rq,$q,Bq,Vq,Hq,zq,Uq,Gq,Wq,qq,Xq,Yq,Jq,Kq,Qq,Zq,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,bX,_X,xX,wX,CX,kX,SX,DX,TX,EX,AX,MX,IX,FX,NX,OX,jX,PX,LX,RX,$X,BX,VX,HX,zX,UX,GX,WX,qX,XX,YX,JX,KX,QX,ZX,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,bY,_Y,xY,wY,CY,kY,SY,DY,TY,EY,AY,MY,IY,FY,NY,OY,jY,PY,LY,RY,$Y,BY,VY,HY,zY,UY,GY,WY,qY,XY,YY,JY,KY,QY,ZY,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,bJ,_J,xJ,wJ,CJ,kJ,SJ,DJ,TJ,EJ,AJ,MJ,IJ,FJ,NJ,OJ,jJ,PJ,LJ,RJ,$J,BJ,VJ,HJ,zJ,UJ,GJ,WJ,qJ,XJ,YJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,bK,_K,xK,wK,CK,kK,SK,DK,TK,EK,AK,MK,IK,FK,NK,OK,jK,PK,LK,RK,$K,BK,VK,HK,zK,UK,GK,WK,qK,p7e=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],m7e=["mainAxis","crossAxis","limiter"];function lb(t){var n="function"==typeof Map?new Map:void 0;return lb=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return cF(e,arguments,qi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),cb(r,e)},lb(t)}function cF(t,n,e){return(cF=ZK()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&cb(a,o.prototype),a}).apply(null,arguments)}function Ae(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function XK(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=k2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}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 o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function vn(){vn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(q,re,L){q[re]=L.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(q,re,L){return Object.defineProperty(q,re,{value:L,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{l({},"")}catch{l=function(re,L,X){return re[L]=X}}function c(q,re,L,X){var H=Object.create((re&&re.prototype instanceof h?re:h).prototype),he=new R(X||[]);return i(H,"_invoke",{value:S(q,L,he)}),H}function u(q,re,L){try{return{type:"normal",arg:q.call(re,L)}}catch(X){return{type:"throw",arg:X}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(z([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function _(q){["next","throw","return"].forEach(function(re){l(q,re,function(L){return this._invoke(re,L)})})}function C(q,re){function L(Z,H,he,E){var F=u(q[Z],q,H);if("throw"!==F.type){var N=F.arg,Y=N.value;return Y&&"object"==bn(Y)&&e.call(Y,"__await")?re.resolve(Y.__await).then(function(V){L("next",V,he,E)},function(V){L("throw",V,he,E)}):re.resolve(Y).then(function(V){N.value=V,he(N)},function(V){return L("throw",V,he,E)})}E(F.arg)}var X;i(this,"_invoke",{value:function(Z,H){function he(){return new re(function(E,F){L(Z,H,E,F)})}return X=X?X.then(he,he):he()}})}function S(q,re,L){var X="suspendedStart";return function(Z,H){if("executing"===X)throw new Error("Generator is already running");if("completed"===X){if("throw"===Z)throw H;return{value:void 0,done:!0}}for(L.method=Z,L.arg=H;;){var he=L.delegate;if(he){var E=M(he,L);if(E){if(E===d)continue;return E}}if("next"===L.method)L.sent=L._sent=L.arg;else if("throw"===L.method){if("suspendedStart"===X)throw X="completed",L.arg;L.dispatchException(L.arg)}else"return"===L.method&&L.abrupt("return",L.arg);X="executing";var F=u(q,re,L);if("normal"===F.type){if(X=L.done?"completed":"suspendedYield",F.arg===d)continue;return{value:F.arg,done:L.done}}"throw"===F.type&&(X="completed",L.method="throw",L.arg=F.arg)}}}function M(q,re){var L=re.method,X=q.iterator[L];if(void 0===X)return re.delegate=null,"throw"===L&&q.iterator.return&&(re.method="return",re.arg=void 0,M(q,re),"throw"===re.method)||"return"!==L&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+L+"' method")),d;var Z=u(X,q.iterator,re.arg);if("throw"===Z.type)return re.method="throw",re.arg=Z.arg,re.delegate=null,d;var H=Z.arg;return H?H.done?(re[q.resultName]=H.value,re.next=q.nextLoc,"return"!==re.method&&(re.method="next",re.arg=void 0),re.delegate=null,d):H:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,d)}function $(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function G(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function R(q){this.tryEntries=[{tryLoc:"root"}],q.forEach($,this),this.reset(!0)}function z(q){if(q){var re=q[o];if(re)return re.call(q);if("function"==typeof q.next)return q;if(!isNaN(q.length)){var L=-1,X=function Z(){for(;++L=0;--X){var Z=this.tryEntries[X],H=Z.completion;if("root"===Z.tryLoc)return L("end");if(Z.tryLoc<=this.prev){var he=e.call(Z,"catchLoc"),E=e.call(Z,"finallyLoc");if(he&&E){if(this.prev=0;--L){var X=this.tryEntries[L];if(X.tryLoc<=this.prev&&e.call(X,"finallyLoc")&&this.prev=0;--re){var L=this.tryEntries[re];if(L.finallyLoc===q)return this.complete(L.completion,L.afterLoc),G(L),d}},catch:function(q){for(var re=this.tryEntries.length-1;re>=0;--re){var L=this.tryEntries[re];if(L.tryLoc===q){var X=L.completion;if("throw"===X.type){var Z=X.arg;G(L)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(q,re,L){return this.delegate={iterator:z(q),resultName:re,nextLoc:L},"next"===this.method&&(this.arg=void 0),d}},t}function YK(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Zi(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){YK(o,i,r,s,a,"next",l)}function a(l){YK(o,i,r,s,a,"throw",l)}s(void 0)})}}function Un(t,n){return KK(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||k2(t,n)||JK()}function JK(){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 KK(t){if(Array.isArray(t))return t}function QK(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ze(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qi(t){return(qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ke(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function eQ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function qd(t,n){return new t(n)}var db,D2=new Map,fF=0;function fQ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function x7e(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=hF(t),m=D2.get(p)||function w7e(t,n){var e={stylesheet:b7e(n),rules:{}};return D2.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),fF+=1,f}function hb(t){db=t}function Tv(){if(!db)throw new Error("Function called outside component initialization");return db}function Wc(t){Tv().$$.on_mount.push(t)}function Hu(t){Tv().$$.on_destroy.push(t)}function pQ(){var t=Tv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=hQ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function mQ(t,n){return Tv().$$.context.set(t,n),n}function xa(t){return Tv().$$.context.get(t)}function T2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Ev=[],Vi=[],E2=[],pF=[],gQ=Promise.resolve(),mF=!1;function vQ(){mF||(mF=!0,gQ.then(yQ))}function Xl(){return vQ(),gQ}function _m(t){E2.push(t)}function zu(t){pF.push(t)}var A2,gF=new Set,Av=0;function yQ(){if(0===Av){var t=db;do{try{for(;Avl.start&&(a=d(l,_),l=null,vF(t,a.b,"start"),G&&(u(),c=fQ(t,s,a.b,a.duration,0,S,o.css))),a&&(z>=a.end?($(s=a.b,1-s),vF(t,a.b,"end"),l||(a.b?u():--a.group.r||ho(a.group.c)),a=null):z>=a.start&&(s=a.a+a.d*S((z-a.start)/a.duration),$(s,1-s))),!(!a&&!l)},0===ub.size&&dF(lQ),new Promise(function(z){ub.add({c:p,f:z})}))}return{run:function(f){ba(o)?(A2||(A2=Promise.resolve()).then(function(){A2=null}),A2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var yF=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function D7e(t,n){t.d(1),n.delete(t.key)}function bF(t,n){ce(t,1,1,function(){n.delete(t.key)})}function F2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var _=d(r,o,p),C=e(_),S=s.get(C);S?i&&S.p(_,n):(S=c(C,_)).c(),v.set(C,g[p]=S),C in m&&y.set(C,Math.abs(p-m[C]))}var M=new Set,$=new Set;function G(L){Q(L,1),L.m(a,u),s.set(L.key,L),u=L.first,f--}for(;h&&f;){var R=g[f-1],z=t[h-1],U=R.key,q=z.key;R===z?(u=R.first,h--,f--):v.has(q)?!s.has(U)||M.has(U)?G(R):$.has(q)?h--:y.get(U)>y.get(q)?($.add(U),G(R)):(M.add(q),h--):(l(z,s),h--)}for(;h--;){var re=t[h];v.has(re.key)||l(re,s)}for(;f;)G(g[f-1]);return g}function xm(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function N2(t){return"object"===bn(t)&&null!==t?t:{}}function Uu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function mt(t){t&&t.c()}function ft(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||_m(function(){var a,l=t.$$.on_mount.map(rQ).filter(ba);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,si(l)):ho(l),t.$$.on_mount=[]}),s.forEach(_m)}function pt(t,n){var e=t.$$;null!==e.fragment&&(ho(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=db;hb(t);var c=t.$$={fragment:null,ctx:[],props:o,update:Lt,not_equal:r,bound:oQ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:oQ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function T7e(t,n){-1===t.$$.dirty[0]&&(Ev.push(t),vQ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function M7e(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function I7e(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?iQ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var N7e=yF.window;function O7e(t){pi(t,"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 _Q(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=t[1].closeButton&&xQ(t),C=t[2];return C&&(s=qd(C,{})),{c:function(){n=be("div"),e=be("div"),i=be("div"),_&&_.c(),r=it(),o=be("div"),s&&mt(s.$$.fragment),P(o,"class",a=Ao(t[1].classContent)+" svelte-n7cvum"),P(o,"style",t[9]),Mt(o,"content",!t[0]),P(i,"class",l=Ao(t[1].classWindow)+" svelte-n7cvum"),P(i,"role","dialog"),P(i,"aria-modal","true"),P(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),P(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),P(i,"style",t[8]),Mt(i,"window",!t[0]),P(e,"class",h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"),P(e,"style",t[7]),Mt(e,"wrap",!t[0]),P(n,"id",f=t[1].id),P(n,"class",p=Ao(t[1].classBg)+" svelte-n7cvum"),P(n,"style",t[6]),Mt(n,"bg",!t[0])},m:function(S,M){Pe(S,n,M),de(n,e),de(e,i),_&&_.m(i,null),de(i,r),de(i,o),s&&ft(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[Nt(i,"introstart",function(){ba(t[13])&&t[13].apply(this,arguments)}),Nt(i,"outrostart",function(){ba(t[14])&&t[14].apply(this,arguments)}),Nt(i,"introend",function(){ba(t[15])&&t[15].apply(this,arguments)}),Nt(i,"outroend",function(){ba(t[16])&&t[16].apply(this,arguments)}),Nt(n,"mousedown",t[20]),Nt(n,"mouseup",t[21])],v=!0)},p:function(S,M){if((t=S)[1].closeButton?_?(_.p(t,M),2&M[0]&&Q(_,1)):((_=xQ(t)).c(),Q(_,1),_.m(i,r)):_&&($t(),ce(_,1,1,function(){_=null}),Bt()),C!==(C=t[2])){if(s){$t();var $=s;ce($.$$.fragment,1,0,function(){pt($,1)}),Bt()}C?(mt((s=qd(C,{})).$$.fragment),Q(s.$$.fragment,1),ft(s,o,null)):s=null}(!g||2&M[0]&&a!==(a=Ao(t[1].classContent)+" svelte-n7cvum"))&&P(o,"class",a),(!g||512&M[0])&&P(o,"style",t[9]),(!g||3&M[0])&&Mt(o,"content",!t[0]),(!g||2&M[0]&&l!==(l=Ao(t[1].classWindow)+" svelte-n7cvum"))&&P(i,"class",l),(!g||2&M[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&P(i,"aria-label",c),(!g||2&M[0]&&u!==(u=t[1].ariaLabelledBy||null))&&P(i,"aria-labelledby",u),(!g||256&M[0])&&P(i,"style",t[8]),(!g||3&M[0])&&Mt(i,"window",!t[0]),(!g||2&M[0]&&h!==(h=Ao(t[1].classWindowWrap)+" svelte-n7cvum"))&&P(e,"class",h),(!g||128&M[0])&&P(e,"style",t[7]),(!g||3&M[0])&&Mt(e,"wrap",!t[0]),(!g||2&M[0]&&f!==(f=t[1].id))&&P(n,"id",f),(!g||2&M[0]&&p!==(p=Ao(t[1].classBg)+" svelte-n7cvum"))&&P(n,"class",p),(!g||64&M[0])&&P(n,"style",t[6]),(!g||3&M[0])&&Mt(n,"bg",!t[0])},i:function(S){g||(Q(_),s&&Q(s.$$.fragment,S),_m(function(){d||(d=I2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),_m(function(){m||(m=I2(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(S){ce(_),s&&ce(s.$$.fragment,S),d||(d=I2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=I2(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(S){S&&je(n),_&&_.d(),s&&pt(s),t[50](null),S&&d&&d.end(),t[51](null),t[52](null),S&&m&&m.end(),v=!1,ho(y)}}}function xQ(t){var n,e,i,r,o,s=[P7e,j7e],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function j7e(t){var n,e,i,r;return{c:function(){P(n=be("button"),"class",e=Ao(t[1].classCloseButton)+" svelte-n7cvum"),P(n,"aria-label","Close modal"),P(n,"style",t[10]),P(n,"type","button"),Mt(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=Nt(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Ao(o[1].classCloseButton)+" svelte-n7cvum")&&P(n,"class",e),1024&s[0]&&P(n,"style",o[10]),3&s[0]&&Mt(n,"close",!o[0])},i:Lt,o:Lt,d:function(o){o&&je(n),i=!1,r()}}}function P7e(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=qd(r,o(t))),{c:function(){n&&mt(n.$$.fragment),e=_r()},m:function(s,a){n&&ft(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){$t();var l=n;ce(l.$$.fragment,1,0,function(){pt(l,1)}),Bt()}r?(mt((n=qd(r,o(s))).$$.fragment),Q(n.$$.fragment,1),ft(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&Q(n.$$.fragment,s),i=!0)},o:function(s){n&&ce(n.$$.fragment,s),i=!1},d:function(s){s&&je(e),n&&pt(n,s)}}}function L7e(t){var n,e,i,r,o=t[2]&&_Q(t),s=t[49].default,a=Ms(s,t,t[48],null);return{c:function(){o&&o.c(),n=it(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=Nt(N7e,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&Q(o,1)):((o=_Q(l)).c(),Q(o,1),o.m(n.parentNode,n)):o&&($t(),ce(o,1,1,function(){o=null}),Bt()),a&&a.p&&(!e||131072&c[1])&&Fs(a,s,l,l[48],e?Is(s,l[48],c,null):Ns(l[48]),null)},i:function(l){e||(Q(o),Q(a,l),e=!0)},o:function(l){ce(o),ce(a,l),e=!1},d:function(l){o&&o.d(l),l&&je(n),a&&a.d(l),i=!1,r()}}}function wQ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ze(Ze({},e),{},{props:Ze(Ze({},n),e.props)}))}}function R7e(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,_=void 0===y?{}:y,C=n.$$scope,S=pQ(),$=n.isTabbable,G=void 0===$?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:$,R=n.show,z=void 0===R?null:R,U=n.id,q=void 0===U?null:U,re=n.key,L=void 0===re?"simple-modal":re,X=n.ariaLabel,Z=void 0===X?null:X,H=n.ariaLabelledBy,he=void 0===H?null:H,E=n.closeButton,F=void 0===E||E,N=n.closeOnEsc,Y=void 0===N||N,V=n.closeOnOuterClick,oe=void 0===V||V,fe=n.styleBg,Fe=void 0===fe?{}:fe,xe=n.styleWindowWrap,tt=void 0===xe?{}:xe,ze=n.styleWindow,ot=void 0===ze?{}:ze,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Ie=void 0===ie?{}:ie,Ye=n.classBg,Le=void 0===Ye?null:Ye,_t=n.classWindowWrap,At=void 0===_t?null:_t,_n=n.classWindow,ci=void 0===_n?null:_n,on=n.classContent,Fi=void 0===on?null:on,pn=n.classCloseButton,Nr=void 0===pn?null:pn,$r=n.unstyled,wr=void 0!==$r&&$r,Or=n.setContext,Ai=void 0===Or?mQ:Or,Wr=n.transitionBg,jo=void 0===Wr?F7e:Wr,Nn=n.transitionBgProps,xt=void 0===Nn?{duration:250}:Nn,ui=n.transitionWindow,Ni=void 0===ui?jo:ui,Cr=n.transitionWindowProps,xo=void 0===Cr?xt:Cr,Qo=n.disableFocusTrap,gt=void 0!==Qo&&Qo,On={id:q,ariaLabel:Z,ariaLabelledBy:he,closeButton:F,closeOnEsc:Y,closeOnOuterClick:oe,styleBg:Fe,styleWindowWrap:tt,styleWindow:ot,styleContent:ne,styleCloseButton:Ie,classBg:Le,classWindowWrap:At,classWindow:ci,classContent:Fi,classCloseButton:Nr,transitionBg:jo,transitionBgProps:xt,transitionWindow:Ni,transitionWindowProps:xo,disableFocusTrap:gt,isTabbable:G,unstyled:wr},ai=Ze({},On),bi=null,Er=function(Ue){return Ue?Object.keys(Ue).reduce(function(Dn,ii){return"".concat(Dn,"; ").concat((hi=ii,hi.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ii]);var hi},""):""},qr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},ao=function(){e(6,a=Er(Object.assign({},{width:window.innerWidth,height:window.innerHeight},ai.styleBg))),e(7,l=Er(ai.styleWindowWrap)),e(8,c=Er(ai.styleWindow)),e(9,u=Er(ai.styleContent)),e(10,d=Er(ai.styleCloseButton)),e(11,h=ai.transitionBg),e(12,f=ai.transitionWindow)},Js=function(){},vr=Js,Ks=Js,qa=Js,Xa=Js,Ic=function(Ue){var ii=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hi=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,bi=wQ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,ai=Ze(Ze({},On),ii)),ao(),He(),e(13,vr=function(di){hi.onOpen&&hi.onOpen(di),S("open"),S("opening")}),e(14,Ks=function(di){hi.onClose&&hi.onClose(di),S("close"),S("closing")}),e(15,qa=function(di){hi.onOpened&&hi.onOpened(di),S("opened")}),e(16,Xa=function(di){hi.onClosed&&hi.onClosed(di),S("closed")})},we=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};bi&&(e(14,Ks=Ue.onClose||Ks),e(16,Xa=Ue.onClosed||Xa),e(2,bi=null),qe())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},qe=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};Ai(L,{open:Ic,close:we});var ut=!1;return Hu(function(){ut&&we()}),Wc(function(){e(47,ut=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,G=Ue.isTabbable),"show"in Ue&&e(23,z=Ue.show),"id"in Ue&&e(24,q=Ue.id),"key"in Ue&&e(25,L=Ue.key),"ariaLabel"in Ue&&e(26,Z=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,he=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,F=Ue.closeButton),"closeOnEsc"in Ue&&e(29,Y=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,oe=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Fe=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,tt=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,ot=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Ie=Ue.styleCloseButton),"classBg"in Ue&&e(36,Le=Ue.classBg),"classWindowWrap"in Ue&&e(37,At=Ue.classWindowWrap),"classWindow"in Ue&&e(38,ci=Ue.classWindow),"classContent"in Ue&&e(39,Fi=Ue.classContent),"classCloseButton"in Ue&&e(40,Nr=Ue.classCloseButton),"unstyled"in Ue&&e(0,wr=Ue.unstyled),"setContext"in Ue&&e(41,Ai=Ue.setContext),"transitionBg"in Ue&&e(42,jo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Ni=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,xo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,gt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&ut&&(qr(z)?Ic(z):we())},[wr,ai,bi,i,r,o,a,l,c,u,d,h,f,vr,Ks,qa,Xa,qr,we,function(Ue){if(ai.closeOnEsc&&bi&&"Escape"===Ue.key&&(Ue.preventDefault(),we()),bi&&"Tab"===Ue.key&&!ai.disableFocusTrap){var Dn=o.querySelectorAll("*"),ii=Array.from(Dn).filter(ai.isTabbable).sort(function(di,kr){return di.tabIndex-kr.tabIndex}),hi=ii.indexOf(document.activeElement);-1===hi&&Ue.shiftKey&&(hi=0),hi+=ii.length+(Ue.shiftKey?-1:1),ii[hi%=ii.length].focus(),Ue.preventDefault()}},function(Ue){!ai.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){ai.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),we())},G,z,q,L,Z,he,F,Y,oe,Fe,tt,ot,ne,Ie,Le,At,ci,Fi,Nr,Ai,jo,xt,Ni,xo,gt,ut,C,_,function(Ue){Vi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Vi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Jo,ro,Gu,Xd,Wu,qc,CQ=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,R7e,L7e,ys,{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},O7e,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Jo||(Jo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(ro||(ro={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Xd||(Xd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(qc||(qc={}));var wm=[{start:0,end:100}],Cm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},$7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),B7e=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),kQ=Ze(Ze({},Cm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),_F="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",xF="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",V7e="NO",wF="SELF",CF="NEXT_INSIDE",H7e=(ql(lF={},qc.asc,"ascending"),ql(lF,qc.desc,"descending"),lF),z7e=0;function fb(){return++z7e}function Uf(t){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function oo(t){return Array.isArray(t)}function Mo(t){return null!==t&&"object"===Uf(t)&&t.constructor===Object}function SQ(t){return!(!t||"object"!==Uf(t))&&"add"===t.op}function DQ(t){return!(!t||"object"!==Uf(t))&&"remove"===t.op}function kF(t){return!(!t||"object"!==Uf(t))&&"replace"===t.op}function SF(t){return!(!t||"object"!==Uf(t))&&"copy"===t.op}function Mv(t){return!(!t||"object"!==Uf(t))&&"move"===t.op}function DF(t){return(DF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function U7e(t,n){return t===n}function TQ(t){return t.slice(0,t.length-1)}function EQ(t){return"object"===DF(t)&&null!==t}function pb(t){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function AQ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function G7e(t,n,e){return r=function(o,s){if("object"!==pb(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==pb(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===pb(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function TF(t){if(oo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Mo(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Mo(t)||oo(t))return EF(t,r,o);if(i){var s=W7e.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var W7e=/^\d+$/;function MQ(t,n,e){if(0===n.length)return e(t);if(!EQ(t))throw new Error("Path doesn't exist");var i=n[0];return EF(t,i,MQ(t[i],n.slice(1),e))}function AF(t,n){if(0===n.length)return t;if(!EQ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=TF(t);return oo(i)&&i.splice(parseInt(e),1),Mo(i)&&delete i[e],i}return t}var r=n[0];return EF(t,r,AF(t[r],n.slice(1)))}function MF(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return MQ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=TF(o);return s.splice(parseInt(r),0,e),s})}function Xc(t,n){return void 0!==t&&(0===n.length||null!==t&&Xc(t[n[0]],n.slice(1)))}function Xu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function ln(t){return t.map(IQ).join("")}function IQ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function IF(t,n){return t+IQ(n)}function Iv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:U7e;if(p.length=0?G=function(){var z="",U=!0;"-"==t[s]&&(z+=h()),z+="0"==t[s]?h():m(),"."==t[s]&&(z+=h()+m(),U=!1),"e"!=t[s]&&"E"!=t[s]||(z+=h(),"+"!=t[s]&&"-"!=t[s]||(z+=h()),z+=m(),U=!1);var q=+z;return a&&U&&(q>Number.MAX_SAFE_INTEGER||q="a"&&G<="f"?$+=G.charCodeAt()-n9e+10:G>="0"&&G<="9"?$+=+G:C()}return String.fromCharCode($)}function m(){for(var M="";t[s]>="0"&&t[s]<="9";)M+=h();if(M.length)return M;S(),_()}function g(M,$){v(M,$,y())}function v(M,$,G){i[M]=i[M]||{},i[M][$]=G}function y(){return{line:r,column:o,pos:s}}function _(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),_()}function S(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},O2.stringify=function(t,n,e){if(j2(t)){var i,r,o=0,s="object"==bn(e)?e.space:e;switch(bn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var r9e=/"|\\/g,o9e=/[\b]/g,s9e=/\f/g,a9e=/\n/g,l9e=/\r/g,c9e=/\t/g;function P2(t){return'"'+(t=t.replace(r9e,"\\$&").replace(s9e,"\\f").replace(o9e,"\\b").replace(a9e,"\\n").replace(l9e,"\\r").replace(c9e,"\\t"))+'"'}var u9e=/~/g,d9e=/\//g;function OF(t){return t.replace(u9e,"~0").replace(d9e,"~1")}function jF(t){return(jF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function PF(t){var n="function"==typeof Map?new Map:void 0;return PF=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return LF(e,arguments,vb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),gb(r,e)},PF(t)}function LF(t,n,e){return(LF=RQ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&gb(a,o.prototype),a}).apply(null,arguments)}function RQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gb(t,n){return(gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function vb(t){return(vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var Gf=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&gb(l,c)}(a,PF(Error));var n,e,i,s=(n=a,e=RQ(),function(){var l,c=vb(n);if(e){var u=vb(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function h9e(t,n){if(n&&("object"===jF(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function L2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function R2(t){return t>=48&&t<=57}function f9e(t){return t>=32&&t<=1114111}var p9e=/^[,:[\]{}()\n]$/;function $Q(t){return m9e.test(t)||t&&B2(t.charCodeAt(0))}var m9e=/^[[{\w-]$/;function g9e(t){return 10===t||13===t||9===t||8===t||12===t}function $2(t){return 32===t||10===t||9===t||13===t}function v9e(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function B2(t){return BQ(t)||RF(t)}function BQ(t){return 34===t||8220===t||8221===t}function RF(t){return 39===t||8216===t||8217===t||96===t||180===t}function yb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function km(t,n){var e=t.length;if(!$2(t.charCodeAt(e-1)))return t+n;for(;$2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function y9e(t,n,e){return t.substring(0,n)+t.substring(n+e)}var b9e={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_9e={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yd(t){var n=0,e="";r()||function(){throw new Gf("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),$Q(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=km(e,",")),function(){for(var _=!0,C=!0;C;)_?_=!1:l(44)||(e=km(e,",")),C=r();C||(e=yb(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=yb(e,",")),n>=t.length)return e;function r(){o();var _=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&S<=57)for(n++;R2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);R2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);R2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),_}function o(){var _=n,C=s();do{(C=a())&&(C=s())}while(C);return n>_}function s(){for(var _,C="";(_=$2(t.charCodeAt(n)))||v9e(t.charCodeAt(n));)C+=_?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;$2(t.charCodeAt(n-1))&&n>0;)n--;var S=t.slice(C,n);return e+=JSON.stringify(S),!0}}function f(_){if(!R2(t.charCodeAt(n))){var C=t.slice(_,n);throw new Gf("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(_){throw new Gf("Invalid character "+JSON.stringify(_),n)}function m(){throw new Gf("Object key expected",n)}function g(){throw new Gf("Object value expected",n)}function v(){throw new Gf("Colon expected",n)}function y(_){for(var C=_+2;/\w/.test(t[C]);)C++;var S=t.slice(_,C);throw new Gf('Invalid unicode character "'.concat(S,'"'),n)}!function(){throw new Gf("Unexpected character "+JSON.stringify(t[n]),n)}()}function x9e(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ws(t){return parseInt(t,10)}function $F(t){return w9e.test(t)}var w9e=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Io(t){return"object"===bn(t)&&null!==t&&t.constructor===Object}function Ho(t){return"object"===bn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function BF(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return BF(Number(t));try{var n=t&&t.valueOf();if(n!==t)return BF(n)}catch{return!1}return!1}function VQ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function VF(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return bn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Io(t))return"object";var e=n.stringify(t);return e&&$F(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var C9e=/^https?:\/\/\S+$/;function V2(t){return"string"==typeof t&&C9e.test(t)}function Fv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&($F(e)?n.parse(e):t)}var k9e=/^-?[0-9]+$/,zQ="object"==(typeof global>"u"?"undefined":bn(global))&&global&&global.Object===Object&&global,S9e="object"==(typeof self>"u"?"undefined":bn(self))&&self&&self.Object===Object&&self,Ca=zQ||S9e||Function("return this")(),ll=Ca.Symbol,UQ=Object.prototype,D9e=UQ.hasOwnProperty,T9e=UQ.toString,bb=ll?ll.toStringTag:void 0,E9e=Object.prototype.toString,GQ=ll?ll.toStringTag:void 0;function Ml(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":GQ&&GQ in Object(t)?function(n){var e=D9e.call(n,bb),i=n[bb];try{n[bb]=void 0;var r=!0}catch{}var o=T9e.call(n);return r&&(e?n[bb]=i:delete n[bb]),o}(t):E9e.call(t)}function ls(t){return null!=t&&"object"==bn(t)}function Yl(t){return"symbol"==bn(t)||ls(t)&&"[object Symbol]"==Ml(t)}function WQ(t){return"number"==typeof t?t:Yl(t)?NaN:+t}function Ko(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var lZ=aZ(nZ),K9e=/\{\n\/\* \[wrapped with (.+)\] \*/,Q9e=/,? & /,Z9e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function q2(t){return function(){return t}}var eVe=function(){try{var t=Dm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),X2=eVe,tVe=X2?function(t,n){return X2(t,"toString",{configurable:!0,enumerable:!1,value:q2(n),writable:!0})}:cl,UF=aZ(tVe);function Jc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var nVe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function uZ(t,n,e){var o,i=n+"";return UF(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(Z9e,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Jc(nVe,function(s){var a="_."+s[0];o&s[1]&&!J2(r,a)&&r.push(a)}),r.sort()}((o=i.match(K9e))?o[1].split(Q9e):[],e)))}function dZ(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return zF(t)&&lZ(h,d),h.placeholder=i,uZ(h,t,n)}function Pv(t){return t.placeholder}var iVe=/^(?:0|[1-9]\d*)$/;function Zh(t,n){var e=bn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&iVe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Il(t){return null!=t&&Cb(t.length)&&!Kd(t)}function Fl(t,n,e){if(!zo(e))return!1;var i=bn(n);return!!("number"==i?Il(e)&&Zh(n,e.length):"string"==i&&n in e)&&Kc(e[n],t)}function Lv(t){return dr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Fl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,yZ=vZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,bZ=yZ&&yZ.exports===vZ?Ca.Buffer:void 0,nf=(bZ?bZ.isBuffer:void 0)||Q2,Uo={};function Cc(t){return function(n){return t(n)}}Uo["[object Float32Array]"]=Uo["[object Float64Array]"]=Uo["[object Int8Array]"]=Uo["[object Int16Array]"]=Uo["[object Int32Array]"]=Uo["[object Uint8Array]"]=Uo["[object Uint8ClampedArray]"]=Uo["[object Uint16Array]"]=Uo["[object Uint32Array]"]=!0,Uo["[object Arguments]"]=Uo["[object Array]"]=Uo["[object ArrayBuffer]"]=Uo["[object Boolean]"]=Uo["[object DataView]"]=Uo["[object Date]"]=Uo["[object Error]"]=Uo["[object Function]"]=Uo["[object Map]"]=Uo["[object Number]"]=Uo["[object Object]"]=Uo["[object RegExp]"]=Uo["[object Set]"]=Uo["[object String]"]=Uo["[object WeakMap]"]=!1;var _Z="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,Sb=_Z&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,qF=Sb&&Sb.exports===_Z&&zQ.process,Qc=function(){try{return Sb&&Sb.require&&Sb.require("util").types||qF&&qF.binding&&qF.binding("util")}catch{}}(),xZ=Qc&&Qc.isTypedArray,Tm=xZ?Cc(xZ):function(t){return ls(t)&&Cb(t.length)&&!!Uo[Ml(t)]},hVe=Object.prototype.hasOwnProperty;function wZ(t,n){var e=Pi(t),i=!e&&qf(t),r=!e&&!i&&nf(t),o=!e&&!i&&!r&&Tm(t),s=e||i||r||o,a=s?WF(t.length,String):[],l=a.length;for(var c in t)!n&&!hVe.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zh(c,l))||a.push(c);return a}function CZ(t,n){return function(e){return t(n(e))}}var fVe=CZ(Object.keys,Object),pVe=Object.prototype.hasOwnProperty;function XF(t){if(!kb(t))return fVe(t);var n=[];for(var e in Object(t))pVe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function qs(t){return Il(t)?wZ(t):XF(t)}var mVe=Object.prototype.hasOwnProperty,gVe=Lv(function(t,n){if(kb(n)||Il(n))Qd(n,qs(n),t);else for(var e in n)mVe.call(n,e)&&wb(t,e,n[e])}),kZ=gVe,vVe=Object.prototype.hasOwnProperty;function Nl(t){return Il(t)?wZ(t,!0):function yVe(t){if(!zo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=kb(t),e=[];for(var i in t)("constructor"!=i||!n&&vVe.call(t,i))&&e.push(i);return e}(t)}var bVe=Lv(function(t,n){Qd(n,Nl(n),t)}),Z2=bVe,_Ve=Lv(function(t,n,e,i){Qd(n,Nl(n),t,i)}),Rv=_Ve,xVe=Lv(function(t,n,e,i){Qd(n,qs(n),t,i)}),SZ=xVe,wVe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CVe=/^\w*$/;function YF(t,n){if(Pi(t))return!1;var e=bn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Yl(t))||CVe.test(t)||!wVe.test(t)||null!=n&&t in Object(n)}var Db=Dm(Object,"create"),kVe=Object.prototype.hasOwnProperty,SVe=Object.prototype.hasOwnProperty;function Em(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},rf.prototype.set=function(t,n){var e=this.__data__,i=ek(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var Tb=Dm(Ca,"Map");function tk(t,n){var i,r,e=t.__data__;return("string"==(r=bn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function sf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?$a(a,n-1,e,i,r):Yf(r,a):i||(r[r.length]=a)}return r}function KF(t){return null!=t&&t.length?$a(t,1):[]}function af(t){return UF(pZ(t,void 0,KF),t+"")}var EZ=af(JF),ik=CZ(Object.getPrototypeOf,Object),AZ=Function.prototype.toString,NVe=Object.prototype.hasOwnProperty,OVe=AZ.call(Object);function Bv(t){if(!ls(t)||"[object Object]"!=Ml(t))return!1;var n=ik(t);if(null===n)return!0;var e=NVe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&AZ.call(e)==OVe}function rk(t){if(!ls(t))return!1;var n=Ml(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Bv(t)}var jVe=dr(function(t,n){try{return wc(t,void 0,n)}catch(e){return rk(e)?e:new Error(e)}}),QF=jVe;function ZF(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Ui(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var eN=dr(function(t,n,e){var i=1;if(e.length){var r=Wf(e,Pv(eN));i|=32}return ef(t,i,n,e,r)});eN.placeholder={};var tN=eN,PVe=af(function(t,n){return Jc(n,function(e){e=Zd(e),tf(t,e,tN(t[e],t))}),t}),MZ=PVe,nN=dr(function(t,n,e){var i=3;if(e.length){var r=Wf(e,Pv(nN));i|=32}return ef(n,i,t,e,r)});nN.placeholder={};var IZ=nN;function Zc(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:Zc(t,n,e)}var LVe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Vv(t){return LVe.test(t)}var iN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rN="\\ud83c[\\udffb-\\udfff]",FZ="[^\\ud800-\\udfff]",NZ="(?:\\ud83c[\\udde6-\\uddff]){2}",OZ="[\\ud800-\\udbff][\\udc00-\\udfff]",jZ="(?:"+iN+"|"+rN+")?",$Ve="[\\ufe0e\\ufe0f]?"+jZ+"(?:\\u200d(?:"+[FZ,NZ,OZ].join("|")+")[\\ufe0e\\ufe0f]?"+jZ+")*",BVe="(?:"+[FZ+iN+"?",iN,NZ,OZ,"[\\ud800-\\udfff]"].join("|")+")",VVe=RegExp(rN+"(?="+rN+")|"+BVe+$Ve,"g");function Ku(t){return Vv(t)?function(n){return n.match(VVe)||[]}(t):function(n){return n.split("")}(t)}function PZ(t){return function(n){var e=Vv(n=Jr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?Jf(e,1).join(""):n.slice(1);return i[t]()+r}}var ok=PZ("toUpperCase");function oN(t){return ok(Jr(t).toLowerCase())}function sN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function JZ(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Mm(xc(t),n,e)}function Qu(t){var n=this.__data__=new rf(t);this.size=n.size}function KZ(t,n){return t&&Qd(n,qs(n),t)}Qu.prototype.clear=function(){this.__data__=new rf,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof rf){var i=e.__data__;if(!Tb||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new sf(i)}return e.set(t,n),this.size=e.size,this};var QZ="object"==(typeof exports>"u"?"undefined":bn(exports))&&exports&&!exports.nodeType&&exports,ZZ=QZ&&"object"==(typeof module>"u"?"undefined":bn(module))&&module&&!module.nodeType&&module,eee=ZZ&&ZZ.exports===QZ?Ca.Buffer:void 0,tee=eee?eee.allocUnsafe:void 0;function nee(t,n){if(n)return t.slice();var e=t.length,i=tee?tee(e):new t.constructor(e);return t.copy(i),i}function Kf(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Fm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&_-c>=o}function g(){var C,S,_=Mb();if(m(_))return v(_);a=setTimeout(g,(S=n-((C=_)-l),d?CHe(S,o-(C-c)):S))}function v(_){return a=void 0,h&&i?f(_):(i=r=void 0,s)}function y(){var _=Mb(),C=m(_);if(i=arguments,r=this,l=_,C){if(void 0===a)return function p(_){return c=_,a=setTimeout(g,n),u?f(_):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,zo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?wHe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Mb())},y}function Nee(t,n){return null==t||t!=t?n:t}var Oee=Object.prototype,kHe=Oee.hasOwnProperty,SHe=dr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Fl(n[0],n[1],r)&&(i=1);++e=200&&(o=Eb,s=!1,n=new Fm(n));e:for(;++r=0&&t.slice(e,r)==n}function Qee(t){return function(n){var i,r,o,e=eh(n);return"[object Map]"==e?CN(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Ko(r,function(o){return[o,i[o]]})}(n,t(n))}}var vk=Qee(qs),yk=Qee(Nl),NHe=aN({"&":"&","<":"<",">":">",'"':""","'":"'"}),Zee=/[&<>"']/g,OHe=RegExp(Zee.source);function PN(t){return(t=Jr(t))&&OHe.test(t)?t.replace(Zee,NHe):t}var ete=/[\\^$.*+?()[\]{}|]/g,jHe=RegExp(ete.source);function tte(t){return(t=Jr(t))&&jHe.test(t)?t.replace(ete,"\\$&"):t}function nte(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Ui(l))<0&&(l+=c),l=a>l?0:LN(l);a-1?r[o?n[s]:s]:void 0}}var LHe=Math.max;function RN(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=LHe(i+r,0)),Y2(t,Li(n),r)}var lte=ate(RN);function cte(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function ute(t,n){return cte(t,Li(n),th)}var RHe=Math.max,$He=Math.min;function $N(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Ui(e),r=e<0?RHe(i+r,0):$He(r,i-1)),Y2(t,Li(n),r,!0)}var dte=ate($N);function hte(t,n){return cte(t,Li(n),jN)}function sa(t){return t&&t.length?t[0]:void 0}function fte(t,n){var e=-1,i=Il(t)?Array(t.length):[];return Qf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Wv(t,n){return(Pi(t)?Ko:fte)(t,Li(n))}function pte(t,n){return $a(Wv(t,n),1)}function mte(t,n){return $a(Wv(t,n),1/0)}function gte(t,n,e){return e=void 0===e?1:Ui(e),$a(Wv(t,n),e)}function vte(t){return null!=t&&t.length?$a(t,1/0):[]}function yte(t,n){return null!=t&&t.length?$a(t,n=void 0===n?1:Ui(n)):[]}function bte(t){return ef(t,512)}var _te=uN("floor");function xte(t){return af(function(n){var e=n.length,i=e,r=Yc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==W2(o))var s=new Yc([],!0)}for(i=s?i:e;++in}function _k(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Ite=_k(BN),Fte=_k(function(t,n){return t>=n}),HHe=Object.prototype.hasOwnProperty;function zHe(t,n){return null!=t&&HHe.call(t,n)}function Nte(t,n){return null!=t&&Cee(t,n,zHe)}var UHe=Math.max,GHe=Math.min;function Ote(t,n,e){return n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),(i=t=xc(t))>=GHe(r=n,o=e)&&i-1:!!r&&jv(t,n,e)>-1}var qHe=Math.max;function Pte(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Ui(e);return r<0&&(r=qHe(i+r,0)),jv(t,n,r)}function Xi(t){return null!=t&&t.length?Zc(t,0,-1):[]}var XHe=Math.min;function HN(t,n,e){for(var i=e?ON:J2,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Ko(u,Cc(n))),l=XHe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Fm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function cne(t){return void 0===t}function une(t){return ls(t)&&"[object WeakMap]"==eh(t)}function dne(t){return ls(t)&&"[object WeakSet]"==Ml(t)}function hne(t){return Li("function"==typeof t?t:eu(t,1))}var oze=Array.prototype.join;function fne(t,n){return null==t?"":oze.call(t,n)}var sze=zv(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),pne=sze,aze=dk(function(t,n,e){tf(t,e,n)}),mne=aze,lze=Math.max,cze=Math.min;function gne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Ui(e))<0?lze(i+r,0):cze(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):Y2(t,cZ,r,!0)}var uze=zv(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),vne=uze,yne=PZ("toLowerCase");function WN(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function One(t,n){var e=t.length;if(e)return Zh(n+=n<0?e:0,e)?t[n]:void 0}function jne(t,n){return t&&t.length?One(t,Ui(n)):void 0}function Pne(t){return t=Ui(t),dr(function(n){return One(n,t)})}function ZN(t,n){return null==(t=Ute(t,n=Xf(n,t)))||delete t[Zd(Ln(n))]}function pze(t){return Bv(t)?void 0:t}var mze=af(function(t,n){var e={};if(null==t)return e;var i=!1;n=Ko(n,function(o){return o=Xf(o,t),i||(i=o.length>1),o}),Qd(t,pN(t),e),i&&(e=eu(e,7,pze));for(var r=n.length;r--;)ZN(e,n[r]);return e}),Lne=mze;function jb(t,n,e,i){if(!zo(t))return t;for(var r=-1,o=(n=Xf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(fte(t,function(o,s,a){return{criteria:Ko(n,function(c){return c(o)}),index:++i,value:o}}))}function zne(t,n,e,i){return null==t?[]:(Pi(n)||(n=null==n?[]:[n]),Pi(e=i?void 0:e)||(e=null==e?[]:[e]),Hne(t,n,e))}function tO(t){return af(function(n){return n=Ko(n,Cc(Li)),dr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var Une=tO(Ko),vze=Math.min,yze=dr(function(t,n){var e=(n=1==n.length&&Pi(n[0])?Ko(n[0],Cc(Li)):Ko($a(n,1),Cc(Li))).length;return dr(function(i){for(var r=-1,o=vze(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=bze(n/2))&&(t+=t)}while(n);return e}var _ze=TN("length"),iO="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rO="\\ud83c[\\udffb-\\udfff]",Xne="[^\\ud800-\\udfff]",Yne="(?:\\ud83c[\\udde6-\\uddff]){2}",Jne="[\\ud800-\\udbff][\\udc00-\\udfff]",Kne="(?:"+iO+"|"+rO+")?",wze="[\\ufe0e\\ufe0f]?"+Kne+"(?:\\u200d(?:"+[Xne,Yne,Jne].join("|")+")[\\ufe0e\\ufe0f]?"+Kne+")*",Cze="(?:"+[Xne+iO+"?",iO,Yne,Jne,"[\\ud800-\\udfff]"].join("|")+")",Qne=RegExp(rO+"(?="+rO+")|"+Cze+wze,"g");function Jv(t){return Vv(t)?function(n){for(var e=Qne.lastIndex=0;Qne.test(n);)++e;return e}(t):_ze(t)}var kze=Math.ceil;function Ck(t,n){var e=(n=void 0===n?" ":_c(n)).length;if(e<2)return e?nO(n,t):n;var i=nO(n,kze(t/Jv(n)));return Vv(n)?Jf(Ku(i),0,t).join(""):i.slice(0,t)}var Sze=Math.ceil,Dze=Math.floor;function Zne(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return Ck(Dze(r),e)+t+Ck(Sze(r),e)}function eie(t,n,e){t=Jr(t);var i=(n=Ui(n))?Jv(t):0;return n&&i-1;)a!==t&&sie.call(a,l,1),sie.call(t,l,1);return t}function dO(t,n){return t&&t.length&&n&&n.length?uO(t,n):t}var aie=dr(dO);function lie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,Li(e)):t}function cie(t,n,e){return t&&t.length&&n&&n.length?uO(t,n,void 0,e):t}var Fze=Array.prototype.splice;function uie(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;Zh(r)?Fze.call(t,r,1):ZN(t,r)}}return t}var Nze=af(function(t,n){var e=null==t?0:t.length,i=JF(t,n);return uie(t,Ko(n,function(r){return Zh(r,e)?+r:r}).sort(Vne)),i}),die=Nze,Oze=Math.floor,jze=Math.random;function hO(t,n){return t+Oze(jze()*(n-t+1))}var Pze=parseFloat,Lze=Math.min,Rze=Math.random;function hie(t,n,e){if(e&&"boolean"!=typeof e&&Fl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Jd(t),void 0===n?(n=t,t=0):n=Jd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=Rze();return Lze(t+r*(n-t+Pze("1e-"+((r+"").length-1))),n)}return hO(t,n)}var $ze=Math.ceil,Bze=Math.max;function fie(t){return function(n,e,i){return i&&"number"!=typeof i&&Fl(n,e,i)&&(e=i=void 0),n=Jd(n),void 0===e?(e=n,n=0):e=Jd(e),function(r,o,s,a){for(var l=-1,c=Bze($ze((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Fl(t,n[0],n[1])?n=[]:e>2&&Fl(n[0],n[1],n[2])&&(n=[n[0]]),Hne(t,$a(n,1),[])}),pO=Kze,Qze=Math.floor,Zze=Math.min;function mO(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Yl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Yl(s)&&(e?s<=n:s>>0)?(t=Jr(t))&&("string"==typeof n||null!=n&&!xk(n))&&!(n=_c(n))&&Vv(t)?Jf(Ku(t),0,e):t.split(n,e):[]}var eUe=Math.max;function Wie(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:eUe(Ui(n),0),dr(function(e){var i=e[n],r=Jf(e,0,n);return i&&Yf(r,i),wc(t,this,r)})}var tUe=zv(function(t,n,e){return t+(e?" ":"")+ok(n)}),qie=tUe;function Xie(t,n,e){return t=Jr(t),e=null==e?0:Mm(Ui(e),0,t.length),n=_c(n),t.slice(e,e+n.length)==n}function Yie(){return{}}function Jie(){return""}function Kie(){return!0}var Qie=H2(function(t,n){return t-n},0);function Zie(t){return t&&t.length?XN(t,cl):0}function ere(t,n){return t&&t.length?XN(t,Li(n)):0}function tre(t){var n=null==t?0:t.length;return n?Zc(t,1,n):[]}function nre(t,n,e){return t&&t.length?Zc(t,0,(n=e||void 0===n?1:Ui(n))<0?0:n):[]}function ire(t,n,e){var i=null==t?0:t.length;return i?Zc(t,(n=i-(n=e||void 0===n?1:Ui(n)))<0?0:n,i):[]}function rre(t,n){return t&&t.length?mk(t,Li(n),!1,!0):[]}function ore(t,n){return t&&t.length?mk(t,Li(n)):[]}function sre(t,n){return n(t),t}var are=Object.prototype,nUe=are.hasOwnProperty;function lre(t,n,e,i){return void 0===t||Kc(t,are[e])&&!nUe.call(i,e)?n:t}var iUe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function rUe(t){return"\\"+iUe[t]}var cre=/<%=([\s\S]+?)%>/g,Tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:cre,variable:"",imports:{_:{escape:PN}}},oUe=/\b__p \+= '';/g,sUe=/\b(__p \+=) '' \+/g,aUe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lUe=/[()=,{}\[\]\/\s]/,cUe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ek=/($^)/,uUe=/['\n\r\u2028\u2029\\]/g,ure=Object.prototype.hasOwnProperty;function dre(t,n,e){var i=Tk.imports._.templateSettings||Tk;e&&Fl(t,n,e)&&(n=void 0),t=Jr(t),n=Rv({},n,i,lre);var r,o,s=Rv({},n.imports,i.imports,lre),a=qs(s),l=VN(s,a),c=0,u=n.interpolate||Ek,d="__p += '",h=RegExp((n.escape||Ek).source+"|"+u.source+"|"+(u===cre?cUe:Ek).source+"|"+(n.evaluate||Ek).source+"|$","g"),f=ure.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,_,C,S){return y||(y=_),d+=t.slice(c,S).replace(uUe,rUe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=S+g.length,g}),d+="';\n";var p=ure.call(n,"variable")&&n.variable;if(p){if(lUe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(oUe,""):d).replace(sUe,"$1").replace(aUe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=QF(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,rk(m))throw m;return m}function gO(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return zo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Gv(t,n,{leading:i,maxWait:n,trailing:r})}function Kv(t,n){return n(t)}var dUe=Math.min;function vO(t,n){if((t=Ui(t))<1||t>9007199254740991)return[];var e=4294967295,i=dUe(t,4294967295);t-=4294967295;for(var r=WF(i,n=nh(n));++e-1;);return e}function bre(t,n){for(var e=-1,i=t.length;++e-1;);return e}function _re(t,n,e){if((t=Jr(t))&&(e||void 0===n))return KQ(t);if(!t||!(n=_c(n)))return t;var i=Ku(t),r=Ku(n);return Jf(i,bre(i,r),yre(i,r)+1).join("")}function xre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.slice(0,JQ(t)+1);if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,0,yre(i,Ku(n))+1).join("")}var hUe=/^\s+/;function wre(t,n,e){if((t=Jr(t))&&(e||void 0===n))return t.replace(hUe,"");if(!t||!(n=_c(n)))return t;var i=Ku(t);return Jf(i,bre(i,Ku(n))).join("")}var fUe=/\w*$/;function Cre(t,n){var e=30,i="...";if(zo(n)){var r="separator"in n?n.separator:r;e="length"in n?Ui(n.length):e,i="omission"in n?_c(n.omission):i}var o=(t=Jr(t)).length;if(Vv(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-Jv(i);if(a<1)return i;var l=s?Jf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),xk(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Jr(fUe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(_c(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function kre(t){return GF(t,1)}var pUe=aN({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Sre=/&(?:amp|lt|gt|quot|#39);/g,mUe=RegExp(Sre.source);function Dre(t){return(t=Jr(t))&&mUe.test(t)?t.replace(Sre,pUe):t}var gUe=Uv&&1/lk(new Uv([,-0]))[1]==1/0?function(t){return new Uv(t)}:go,vUe=gUe;function Zf(t,n,e){var i=-1,r=J2,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=ON;else if(o>=200){var c=n?null:vUe(t);if(c)return lk(c);s=!1,r=Eb,l=new Fm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Tr&&Zh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Kv,args:[r],thisArg:void 0}),new Yc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Vre=CUe;function Hre(){return dN(this)}function zre(){var t=this.__wrapped__;if(t instanceof Tr){var n=t;return this.__actions__.length&&(n=new Tr(this)),(n=n.reverse()).__actions__.push({func:Kv,args:[kk],thisArg:void 0}),new Yc(n,this.__chain__)}return this.thru(kk)}function _O(t,n,e){var i=t.length;if(i<2)return i?Zf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,bO(t,e)}),Kre=SUe,Gn={chunk:YZ,compact:mee,concat:gee,difference:Vee,differenceBy:Hee,differenceWith:zee,drop:Gee,dropRight:Wee,dropRightWhile:qee,dropWhile:Xee,fill:rte,findIndex:RN,findLastIndex:$N,first:sa,flatten:KF,flattenDeep:vte,flattenDepth:yte,fromPairs:Ete,head:sa,indexOf:Pte,initial:Xi,intersection:Lte,intersectionBy:Rte,intersectionWith:$te,join:fne,last:Ln,lastIndexOf:gne,nth:jne,pull:aie,pullAll:dO,pullAllBy:lie,pullAllWith:cie,pullAt:die,remove:_ie,reverse:kk,slice:Nie,sortedIndex:Pie,sortedIndexBy:Lie,sortedIndexOf:Rie,sortedLastIndex:$ie,sortedLastIndexBy:Bie,sortedLastIndexOf:Vie,sortedUniq:zie,sortedUniqBy:Uie,tail:tre,take:nre,takeRight:ire,takeRightWhile:rre,takeWhile:ore,union:Tre,unionBy:Ere,unionWith:Are,uniq:Mre,uniqBy:Ire,uniqWith:Fre,unzip:Ak,unzipWith:bO,without:$re,xor:Ure,xorBy:Gre,xorWith:Wre,zip:qre,zipObject:Yre,zipObjectDeep:Jre,zipWith:Kre},vo={countBy:Iee,each:gk,eachRight:Fb,every:ite,filter:ste,find:lte,findLast:dte,flatMap:pte,flatMapDeep:mte,flatMapDepth:gte,forEach:gk,forEachRight:Fb,groupBy:qv,includes:jte,invokeMap:Wte,keyBy:mne,map:Wv,orderBy:zne,partition:lO,reduce:vie,reduceRight:yie,reject:bie,sample:Tie,sampleSize:Eie,shuffle:Iie,size:Fie,some:jie,sortBy:pO},DUe={now:Mb},_s={after:QQ,ary:GF,before:ZF,bind:tN,bindKey:IZ,curry:hk,curryRight:fk,debounce:Gv,defer:$ee,delay:Bee,flip:bte,memoize:$v,negate:Yv,once:Bne,overArgs:Gne,partial:sO,partialRight:iie,rearg:mie,rest:Cie,spread:Wie,throttle:gO,unary:kre,wrap:Bre},mi={castArray:qZ,clone:hee,cloneDeep:fee,cloneDeepWith:_N,cloneWith:pee,conformsTo:Eee,eq:Kc,gt:Ite,gte:Fte,isArguments:qf,isArray:Pi,isArrayBuffer:Xte,isArrayLike:Il,isArrayLikeObject:bs,isBoolean:Yte,isBuffer:nf,isDate:Kte,isElement:Qte,isEmpty:Hi,isEqual:or,isEqualWith:Zte,isError:rk,isFinite:ene,isFunction:Kd,isInteger:UN,isLength:Cb,isMap:yN,isMatch:tne,isMatchWith:nne,isNaN:ine,isNative:rne,isNil:one,isNull:sne,isNumber:GN,isObject:zo,isObjectLike:ls,isPlainObject:Bv,isRegExp:xk,isSafeInteger:lne,isSet:bN,isString:Nb,isSymbol:Yl,isTypedArray:Tm,isUndefined:cne,isWeakMap:une,isWeakSet:dne,lt:bne,lte:_ne,toArray:KN,toFinite:Jd,toInteger:Ui,toLength:LN,toNumber:xc,toPlainObject:FN,toSafeInteger:mre,toString:Jr},Ol={add:YQ,ceil:XZ,divide:Uee,floor:_te,max:kne,maxBy:Sne,mean:Tne,meanBy:Ene,min:Fne,minBy:Xv,multiply:Nne,round:Sie,subtract:Qie,sum:Zie,sumBy:ere},TUe=JZ,EUe=Ote,AUe=hie,Ii={assign:kZ,assignIn:Z2,assignInWith:Rv,assignWith:SZ,at:EZ,create:Fee,defaults:jee,defaultsDeep:Lee,entries:vk,entriesIn:yk,extend:Z2,extendWith:Rv,findKey:ute,findLastKey:hte,forIn:kte,forInRight:Ste,forOwn:Dte,forOwnRight:Tte,functions:Ate,functionsIn:Mte,get:nk,has:Nte,hasIn:uk,invert:Vte,invertBy:zte,invoke:Gte,keys:qs,keysIn:Nl,mapKeys:xne,mapValues:qN,merge:Ane,mergeWith:NN,omit:Lne,omitBy:$ne,pick:rie,pickBy:eO,result:kie,set:Aie,setWith:Mie,toPairs:vk,toPairsIn:yk,transform:vre,unset:Nre,update:jre,updateWith:Pre,values:Nm,valuesIn:Rre},ih={at:Vre,chain:dN,commit:xN,lodash:me,next:QN,plant:cO,reverse:zre,tap:sre,thru:Kv,toIterator:yO,toJSON:Om,value:Om,valueOf:Om,wrapperChain:Hre},Kr={camelCase:WZ,capitalize:oN,deburr:lN,endsWith:Kee,escape:PN,escapeRegExp:tte,kebabCase:pne,lowerCase:vne,lowerFirst:yne,pad:Zne,padEnd:eie,padStart:tie,parseInt:nie,repeat:xie,replace:wie,snakeCase:Oie,split:Gie,startCase:qie,startsWith:Xie,template:dre,templateSettings:Tk,toLower:fre,toUpper:gre,trim:_re,trimEnd:xre,trimStart:wre,truncate:Cre,unescape:Dre,upperCase:Lre,upperFirst:ok,words:cN},so={attempt:QF,bindAll:MZ,cond:See,conforms:Tee,constant:q2,defaultTo:Nee,flow:wte,flowRight:Cte,identity:cl,iteratee:hne,matches:wne,matchesProperty:Cne,method:Mne,methodOf:Ine,mixin:YN,noop:go,nthArg:Pne,over:Une,overEvery:Wne,overSome:qne,property:EN,propertyOf:oie,range:fO,rangeRight:pie,stubArray:sk,stubFalse:Q2,stubObject:Yie,stubString:Jie,stubTrue:Kie,times:vO,toPath:pre,uniqueId:ep},MUe=Math.max,IUe=Math.min,FUe=Math.min,NUe=Array.prototype,Qre=Object.prototype.hasOwnProperty,Zre=ll?ll.iterator:void 0,OUe=Math.max,eoe=Math.min,wO=function(t){return function(n,e,i){if(null==i){var r=zo(e),o=r&&qs(e),s=o&&o.length&&bk(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(YN);me.after=_s.after,me.ary=_s.ary,me.assign=Ii.assign,me.assignIn=Ii.assignIn,me.assignInWith=Ii.assignInWith,me.assignWith=Ii.assignWith,me.at=Ii.at,me.before=_s.before,me.bind=_s.bind,me.bindAll=so.bindAll,me.bindKey=_s.bindKey,me.castArray=mi.castArray,me.chain=ih.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=so.cond,me.conforms=so.conforms,me.constant=so.constant,me.countBy=vo.countBy,me.create=Ii.create,me.curry=_s.curry,me.curryRight=_s.curryRight,me.debounce=_s.debounce,me.defaults=Ii.defaults,me.defaultsDeep=Ii.defaultsDeep,me.defer=_s.defer,me.delay=_s.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=vo.filter,me.flatMap=vo.flatMap,me.flatMapDeep=vo.flatMapDeep,me.flatMapDepth=vo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=_s.flip,me.flow=so.flow,me.flowRight=so.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Ii.functions,me.functionsIn=Ii.functionsIn,me.groupBy=vo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Ii.invert,me.invertBy=Ii.invertBy,me.invokeMap=vo.invokeMap,me.iteratee=so.iteratee,me.keyBy=vo.keyBy,me.keys=qs,me.keysIn=Ii.keysIn,me.map=vo.map,me.mapKeys=Ii.mapKeys,me.mapValues=Ii.mapValues,me.matches=so.matches,me.matchesProperty=so.matchesProperty,me.memoize=_s.memoize,me.merge=Ii.merge,me.mergeWith=Ii.mergeWith,me.method=so.method,me.methodOf=so.methodOf,me.mixin=wO,me.negate=Yv,me.nthArg=so.nthArg,me.omit=Ii.omit,me.omitBy=Ii.omitBy,me.once=_s.once,me.orderBy=vo.orderBy,me.over=so.over,me.overArgs=_s.overArgs,me.overEvery=so.overEvery,me.overSome=so.overSome,me.partial=_s.partial,me.partialRight=_s.partialRight,me.partition=vo.partition,me.pick=Ii.pick,me.pickBy=Ii.pickBy,me.property=so.property,me.propertyOf=so.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=so.range,me.rangeRight=so.rangeRight,me.rearg=_s.rearg,me.reject=vo.reject,me.remove=Gn.remove,me.rest=_s.rest,me.reverse=Gn.reverse,me.sampleSize=vo.sampleSize,me.set=Ii.set,me.setWith=Ii.setWith,me.shuffle=vo.shuffle,me.slice=Gn.slice,me.sortBy=vo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Kr.split,me.spread=_s.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=ih.tap,me.throttle=_s.throttle,me.thru=Kv,me.toArray=mi.toArray,me.toPairs=Ii.toPairs,me.toPairsIn=Ii.toPairsIn,me.toPath=so.toPath,me.toPlainObject=mi.toPlainObject,me.transform=Ii.transform,me.unary=_s.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Ii.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Ii.update,me.updateWith=Ii.updateWith,me.values=Ii.values,me.valuesIn=Ii.valuesIn,me.without=Gn.without,me.words=Kr.words,me.wrap=_s.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Ii.toPairs,me.entriesIn=Ii.toPairsIn,me.extend=Ii.assignIn,me.extendWith=Ii.assignInWith,wO(me,me),me.add=Ol.add,me.attempt=so.attempt,me.camelCase=Kr.camelCase,me.capitalize=Kr.capitalize,me.ceil=Ol.ceil,me.clamp=TUe,me.clone=mi.clone,me.cloneDeep=mi.cloneDeep,me.cloneDeepWith=mi.cloneDeepWith,me.cloneWith=mi.cloneWith,me.conformsTo=mi.conformsTo,me.deburr=Kr.deburr,me.defaultTo=so.defaultTo,me.divide=Ol.divide,me.endsWith=Kr.endsWith,me.eq=mi.eq,me.escape=Kr.escape,me.escapeRegExp=Kr.escapeRegExp,me.every=vo.every,me.find=vo.find,me.findIndex=Gn.findIndex,me.findKey=Ii.findKey,me.findLast=vo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Ii.findLastKey,me.floor=Ol.floor,me.forEach=vo.forEach,me.forEachRight=vo.forEachRight,me.forIn=Ii.forIn,me.forInRight=Ii.forInRight,me.forOwn=Ii.forOwn,me.forOwnRight=Ii.forOwnRight,me.get=Ii.get,me.gt=mi.gt,me.gte=mi.gte,me.has=Ii.has,me.hasIn=Ii.hasIn,me.head=Gn.head,me.identity=cl,me.includes=vo.includes,me.indexOf=Gn.indexOf,me.inRange=EUe,me.invoke=Ii.invoke,me.isArguments=mi.isArguments,me.isArray=Pi,me.isArrayBuffer=mi.isArrayBuffer,me.isArrayLike=mi.isArrayLike,me.isArrayLikeObject=mi.isArrayLikeObject,me.isBoolean=mi.isBoolean,me.isBuffer=mi.isBuffer,me.isDate=mi.isDate,me.isElement=mi.isElement,me.isEmpty=mi.isEmpty,me.isEqual=mi.isEqual,me.isEqualWith=mi.isEqualWith,me.isError=mi.isError,me.isFinite=mi.isFinite,me.isFunction=mi.isFunction,me.isInteger=mi.isInteger,me.isLength=mi.isLength,me.isMap=mi.isMap,me.isMatch=mi.isMatch,me.isMatchWith=mi.isMatchWith,me.isNaN=mi.isNaN,me.isNative=mi.isNative,me.isNil=mi.isNil,me.isNull=mi.isNull,me.isNumber=mi.isNumber,me.isObject=zo,me.isObjectLike=mi.isObjectLike,me.isPlainObject=mi.isPlainObject,me.isRegExp=mi.isRegExp,me.isSafeInteger=mi.isSafeInteger,me.isSet=mi.isSet,me.isString=mi.isString,me.isSymbol=mi.isSymbol,me.isTypedArray=mi.isTypedArray,me.isUndefined=mi.isUndefined,me.isWeakMap=mi.isWeakMap,me.isWeakSet=mi.isWeakSet,me.join=Gn.join,me.kebabCase=Kr.kebabCase,me.last=Ln,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Kr.lowerCase,me.lowerFirst=Kr.lowerFirst,me.lt=mi.lt,me.lte=mi.lte,me.max=Ol.max,me.maxBy=Ol.maxBy,me.mean=Ol.mean,me.meanBy=Ol.meanBy,me.min=Ol.min,me.minBy=Ol.minBy,me.stubArray=so.stubArray,me.stubFalse=so.stubFalse,me.stubObject=so.stubObject,me.stubString=so.stubString,me.stubTrue=so.stubTrue,me.multiply=Ol.multiply,me.nth=Gn.nth,me.noop=so.noop,me.now=DUe.now,me.pad=Kr.pad,me.padEnd=Kr.padEnd,me.padStart=Kr.padStart,me.parseInt=Kr.parseInt,me.random=AUe,me.reduce=vo.reduce,me.reduceRight=vo.reduceRight,me.repeat=Kr.repeat,me.replace=Kr.replace,me.result=Ii.result,me.round=Ol.round,me.sample=vo.sample,me.size=vo.size,me.snakeCase=Kr.snakeCase,me.some=vo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Kr.startCase,me.startsWith=Kr.startsWith,me.subtract=Ol.subtract,me.sum=Ol.sum,me.sumBy=Ol.sumBy,me.template=Kr.template,me.times=so.times,me.toFinite=mi.toFinite,me.toInteger=Ui,me.toLength=mi.toLength,me.toLower=Kr.toLower,me.toNumber=mi.toNumber,me.toSafeInteger=mi.toSafeInteger,me.toString=mi.toString,me.toUpper=Kr.toUpper,me.trim=Kr.trim,me.trimEnd=Kr.trimEnd,me.trimStart=Kr.trimStart,me.truncate=Kr.truncate,me.unescape=Kr.unescape,me.uniqueId=so.uniqueId,me.upperCase=Kr.upperCase,me.upperFirst=Kr.upperFirst,me.each=vo.forEach,me.eachRight=vo.forEachRight,me.first=Gn.head,wO(me,(xO={},th(me,function(t,n){Qre.call(me.prototype,n)||(xO[n]=t)}),xO),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Kr.templateSettings).imports._=me,Jc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Jc(["drop","take"],function(t,n){Tr.prototype[t]=function(e){e=void 0===e?1:OUe(Ui(e),0);var i=this.__filtered__&&!n?new Tr(this):this.clone();return i.__filtered__?i.__takeCount__=eoe(e,i.__takeCount__):i.__views__.push({size:eoe(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Tr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Jc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Tr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Li(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Jc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Tr.prototype[t]=function(){return this[e](1).value()[0]}}),Jc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Tr.prototype[t]=function(){return this.__filtered__?new Tr(this):this[e](1)}}),Tr.prototype.compact=function(){return this.filter(cl)},Tr.prototype.find=function(t){return this.filter(t).head()},Tr.prototype.findLast=function(t){return this.reverse().find(t)},Tr.prototype.invokeMap=dr(function(t,n){return"function"==typeof t?new Tr(this):this.map(function(e){return Ob(e,t,n)})}),Tr.prototype.reject=function(t){return this.filter(Yv(Li(t)))},Tr.prototype.slice=function(t,n){t=Ui(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Tr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Ui(n))<0?e.dropRight(-n):e.take(n-t)),e)},Tr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tr.prototype.toArray=function(){return this.take(4294967295)},th(Tr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Tr,c=a[0],u=l||Pi(s),d=function(v){var y=r.apply(me,Yf([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Tr(this);var g=t.apply(s,a);return g.__actions__.push({func:Kv,args:[d],thisArg:void 0}),new Yc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Jc(["pop","push","shift","sort","splice","unshift"],function(t){var n=NUe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Pi(o)?o:[],r)}return this[e](function(s){return n.apply(Pi(s)?s:[],r)})}}),th(Tr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";Qre.call(Ov,i)||(Ov[i]=[]),Ov[i].push({name:n,func:e})}}),Ov[K2(void 0,2).name]=[{name:"wrapper",func:void 0}],Tr.prototype.clone=function(){var t=new Tr(this.__wrapped__);return t.__actions__=Jl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Jl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Jl(this.__views__),t},Tr.prototype.reverse=function(){if(this.__filtered__){var t=new Tr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Tr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Pi(t),i=n<0,r=e?t.length:0,o=function(S,M,$){for(var G=-1,R=$.length;++G1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Io(l)||n&&c.length>0)&&(e[ln(c)]=!0),Io(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function noe(t){return Ze({},t)}function ioe(t){return Object.values(t)}function roe(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(si(o))),r}function kO(t,n){try{return n.parse(t)}catch{return n.parse(Yd(t))}}function ooe(t,n){try{return kO(t,n)}catch{return}}function Ik(t,n){t=t.replace(aoe,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function soe(t){t=t.replace(aoe,"");try{return Yd(t)}catch{}try{var n=Yd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var aoe=/,\s*$/;function Fk(t,n){var e=uoe.exec(n);if(e){var i=Ws(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Qv(t)?t:{text:e.stringify(t.json,null,n)}}function loe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return DO(t)?t:{json:n.parse(t.text)}}function Nk(t,n,e){return Zv(t,n,e).text}function coe(t,n){return function RUe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Qv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Io(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var uoe=/(position|char) (\d+)/,$Ue=/line (\d+)/,BUe=/column (\d+)/;function hoe(t){return VUe.test(t)&&t.length>2}var VUe=/^[[{]\S/;function TO(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?HUe:zUe:e?UUe:GUe}var HUe={escapeValue:function(t){return foe(goe(String(t)))},unescapeValue:function(t){return voe(poe(t))}},zUe={escapeValue:function(t){return goe(String(t))},unescapeValue:function(t){return voe(t)}},UUe={escapeValue:function(t){return foe(String(t))},unescapeValue:function(t){return poe(t)}},GUe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function foe(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function poe(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return moe[e]||e}catch{return n}})}var moe={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},WUe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function goe(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return moe[n]||n})}function voe(t){return t.replace(/\\["bfnrt\\]/g,function(n){return WUe[n]||n})}function jm(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function yoe(t,n){return Pb(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function Pm(t,n,e){return Pb(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function Pb(t,n){return!!EO(t,n)}function EO(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function boe(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function Ok(t,n,e){var i=e0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,boe(r))}}function e0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function jk(t){var e=e0(t)?.document.activeElement;return!!e&&Pb(e,function(i){return i===t})}function _oe(t,n){return EO(t,function(e){return e.nodeName===n})}function AO(t){return Pm(t,"data-type","selectable-key")?ro.key:Pm(t,"data-type","selectable-value")?ro.value:Pm(t,"data-type","insert-selection-area-inside")?ro.inside:Pm(t,"data-type","insert-selection-area-after")?ro.after:ro.multi}function t0(t){return encodeURIComponent(ln(t))}function xoe(t){var e=EO(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Xu(decodeURIComponent(e)):null}function tp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in XUe||e.push(i),e.join(n)}var XUe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},MO=yF.window;function YUe(t){pi(t,"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 woe(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,G="left"===v||_+u>window.innerWidth&&_>u;return{left:G?y.right-g:_+g,top:$?C-p:y.bottom+p,positionAbove:$,positionLeft:G}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,z=n.top,U=n.width,q=void 0===U?0:U,re=n.height,L=void 0===re?0:re;return{left:R,top:z,positionAbove:z+L>window.innerHeight&&z>L,positionLeft:R+q>window.innerWidth&&R>q}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function QUe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!Pb(l.target,function(c){return c===i})&&s(o.id)}return Wc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===tp(l)&&s(o.id)},function(l){a(l)},s,function(l){Vi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Vi[l?"unshift":"push"](function(){e(1,i=l)})}]}var ZUe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QUe,JUe,ys,{popup:0,closeAbsolutePopup:6},YUe),r}return Se(e)}();function koe(t,n,e){var i=t.slice();return i[6]=n[e],i}function Soe(t){var n,e;return n=new ZUe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eGe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(iGe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var iGe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function Lb(t){return{value:t,label:Hi(t)?"(whole item)":tu(Kl(t))}}function rh(t){return t.map(function(n){return FO.test(n)?"?.[".concat(n,"]"):IO.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var IO=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,FO=/^\d+$/;function Rb(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function oh(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var rGe={id:"javascript",name:"JavaScript",description:"\n

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

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(rh(e.path)),a=function NO(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function HQ(t){return k9e.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(rh(i.path),"\n")+" const valueB = b".concat(rh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(rh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(rh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\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')()(t);return void 0!==e?e:null}},oGe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 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.5H93c-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.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 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.5H210.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.7zM176 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-80V416H256v16c0 44.2-35.8 80-80 80z"]},$b={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},Bb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},sGe={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 aGe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var OGe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,NGe,FGe,Ei,{path:4,value:0,readOnly:1,onPatch:5,focus:6},IGe),r}return Se(e)}();function Poe(t){for(var n=pO(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=Rk(n,u);jO(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(Io(l)&&i(o)){r[ln(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Ze(Ze({},n),{},{expandedMap:r})}function Loe(t,n){var e=n0(t.expandedMap,n),i=n0(t.enforceStringMap,n),r=n0(t.visibleSectionsMap,n);return Ze(Ze({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Roe(t,n,e){if(e){var i=Ze({},t.enforceStringMap);return i[n]=e,Ze(Ze({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ze({},t.enforceStringMap);return delete r[n],Ze(Ze({},t),{},{enforceStringMap:r})}return t}function $oe(t,n,e){var i=Yu(t,e),r=e.reduce(function(o,s){return SQ(s)?Boe(i,o,s):DQ(s)?Voe(i,o,s):kF(s)?(u=(c=s).path,d=BO(a=i,(l=o).expandedMap),h=BO(a,l.enforceStringMap),f=BO(a,l.visibleSectionsMap),Mo(c.value)||oo(c.value)||delete d[u],oo(c.value)||delete f[u],(Mo(c.value)||oo(c.value))&&delete h[u],Ze(Ze({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):SF(s)||Mv(s)?function(a,l,c){if(Mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=$O(LO(l.expandedMap,c.from),u),h=$O(LO(l.enforceStringMap,c.from),u),f=$O(LO(l.visibleSectionsMap,c.from),u),p=l;Mv(c)&&(p=Voe(a,p,{op:"remove",path:c.from}));var m=RO((p=Boe(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=RO(p.enforceStringMap,h),v=RO(p.visibleSectionsMap,f);return Ze(Ze({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Boe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r);if(oo(Sn(t,r))){var s=Ws(Ln(i)),a=r0(n.expandedMap,r,s,1),l=r0(n.enforceStringMap,r,s,1),c=r0(n.visibleSectionsMap,r,s,1);return c=Hoe(c,o,function(u){return zoe(u,s,1)}),Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Voe(t,n,e){var i=Ju(t,e.path),r=Xi(i),o=ln(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=n0(a,i),l=n0(l,i),c=n0(c,i),oo(s)){var u=Ws(Ln(i));a=r0(a,r,u,-1),l=r0(l,r,u,-1),c=Hoe(c=r0(c,r,u,-1),o,function(d){return zoe(d,u,-1)})}return Ze(Ze({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function n0(t,n){var e={},i=ln(n);return Object.keys(t).forEach(function(r){Iv(r,i)||(e[r]=t[r])}),e}function LO(t,n){var e={};return Object.keys(t).forEach(function(i){Iv(i,n)&&(e[i]=t[i])}),e}function RO(t,n){return Ze(Ze({},t),n)}function $O(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function r0(t,n,e,i){for(var r=n.length,o=ln(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:ln(u),value:t[c]}))}}if(0===s.length)return t;var h=Ze({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function BO(t,n){var e={};return Object.keys(n).filter(function(i){return Xc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function Hoe(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!or(i,r)){var o=Ze({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function zoe(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function lf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof Fv(o,i)}function Vb(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function VO(t,n){var e=[];return function i(r,o){e.push(o);var s=ln(o);if(r&&!0===n.expandedMap[s]){if(oo(r)){var a=Rk(n,s);jO(r,a,function(l){i(r[l],o.concat(String(l)))})}Mo(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function Uoe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=ln(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),oo(o)){var l=Rk(n,a);jO(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Mo(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function HO(t,n,e){var i=VO(t,n),r=i.map(ln).indexOf(ln(e));return-1!==r&&r0;){if(!0===t.pointersMap[ln(i)])return!0;i.pop()}return xs(t)?e===ro.key&&or(t.focusPath,n):!(!Yi(t)||!(e===ro.value&&or(t.focusPath,n)||l0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===ro.key||e===ro.value||e===ro.multi)))}function qoe(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Fr(r)?r.focusPath:sa(r.paths),s=function LGe(t,n,e){var i=VO(t,n),r=i.map(ln),o=ln(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Xs(r)?Os(t,r.anchorPath,r.anchorPath):Os(t,r.anchorPath,l);if(xs(r)){var u=Sn(t,Xi(s));return Array.isArray(u)||Hi(s)?mr(s,!1):iu(s,!1)}return Yi(r)?mr(s,!1):Zu(r)||Xs(r)?Os(t,o,o):Os(t,a,l)}function Xoe(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=Uoe(t,n,e),o=r.findIndex(function(s){return or(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,Xi(r)))?mr(r,!1):iu(r,!1)}function a0(t,n){if(1===n.length){var e=sa(n);if("replace"===e.op||"move"===e.op)return mr(Ju(t,e.path),!1)}if(!Hi(n)&&n.every(function(s){return"move"===s.op})){var i=sa(n),r=n.slice(1);if((SF(i)||Mv(i))&&i.from!==i.path&&r.every(function(s){return(SF(s)||Mv(s))&&s.from===s.path}))return iu(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Hi(o))return{type:ro.multi,paths:o,anchorPath:sa(o),focusPath:Ln(o),pointersMap:Yoe(o)}}function Yoe(t){var n={};return t.forEach(function(e){n[ln(e)]=!0}),n}function Bk(t){return ql({},ln(t),!0)}function zb(t){return void 0!==t&&(xs(t)||Yi(t)||Fr(t)&&1===t.paths.length)}function Joe(t,n){return zb(n)&&Ho(Sn(t,n.focusPath))?n.focusPath:Xi(n.focusPath)}function l0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function WGe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ze(Ze({},r),{},{active:o===n})});return Ze(Ze({},t),{},{items:i,itemsMap:qv(i,function(r){return ln(r.path)}),activeItem:e,activeIndex:n})}function ase(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Mo(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else lse(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function lse(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function WO(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function cse(t,n,e){var i=t;return Fb(e,function(r){i=WO(i,n,r.start,r.end)}),i}function qGe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=Xi(s),u=Sn(t,c),d=Ln(s),h=Gb(c,Object.keys(u),d,WO(d,e,a,l));return{newSelection:a0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(ln(s)));var p="string"==typeof f?f:String(f),m=ln(s),g=lf(f,n.enforceStringMap,m,r),v=WO(p,e,a,l),y=[{op:"replace",path:ln(s),value:g?v:Fv(v,r)}];return{newSelection:a0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function XGe(t,n,e,i,r){for(var o=ase(e,t,1/0),s=[],a=0;an.floating[o]&&(s=Xk(s)),{main:s,cross:Xk(s)}}var OWe={start:"end",end:"start"};function e4(t){return t.replace(/start|end/g,function(n){return OWe[n]})}var jWe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,he,E,F,N,Y,V,oe;return vn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,_=void 0===(y=u.fallbackAxisSideDirection)?"none":y,S=void 0===(C=u.flipAlignment)||C,M=XK(u,p7e),$=Bm(r),G=Bm(a)===a,fe.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=fe.sent,z=m||(G||!S?[Xk(a)]:(void 0,xe=Xk(Fe=a),[e4(Fe),xe,e4(xe)])),m||"none"===_||z.push.apply(z,si(function(Fe,xe,tt,ze){var ot=Wk(Fe),B=function(ne,ie,Ie){var Ye=["left","right"],Le=["right","left"];switch(ne){case"top":case"bottom":return Ie?ie?Le:Ye:ie?Ye:Le;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(Bm(Fe),"start"===tt,ze);return ot&&(B=B.map(function(ne){return ne+"-"+ot}),xe&&(B=B.concat(B.map(e4)))),B}(a,S,_,R))),U=[a].concat(si(z)),fe.next=29,Sse(n,M);case 29:if(q=fe.sent,re=[],L=(null==(i=o.flip)?void 0:i.overflows)||[],h&&re.push(q[$]),p&&(X=NWe(r,s,R),re.push(q[X.main],q[X.cross])),L=[].concat(si(L),[{placement:r,overflows:re}]),re.every(function(Fe){return Fe<=0})){fe.next=48;break}if(F=((null==(he=o.flip)?void 0:he.index)||0)+1,!(N=U[F])){fe.next=37;break}return fe.abrupt("return",{data:{index:F,overflows:L},reset:{placement:N}});case 37:if(Y=null==(E=L.filter(function(Fe){return Fe.overflows[0]<=0}).sort(function(Fe,xe){return Fe.overflows[1]-xe.overflows[1]})[0])?void 0:E.placement,Y){fe.next=46;break}fe.t0=v,fe.next="bestFit"===fe.t0?42:"initialPlacement"===fe.t0?45:46;break;case 42:return oe=null==(V=L.map(function(Fe){return[Fe.placement,Fe.overflows.filter(function(xe){return xe>0}).reduce(function(xe,tt){return xe+tt},0)]}).sort(function(Fe,xe){return Fe[1]-xe[1]})[0])?void 0:V[0],oe&&(Y=oe),fe.abrupt("break",46);case 45:Y=a;case 46:if(r===Y){fe.next=48;break}return fe.abrupt("return",{reset:{placement:Y}});case 48:return fe.abrupt("return",{});case 49:case"end":return fe.stop()}var Fe,xe},e)}))()}}},PWe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o;return vn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Zi(vn().mark(function l(c,u){var d,h,f,p,m,g,v,y,_,C,S,M,$,G;return vn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=Bm(d),g=Wk(d),v="x"===qk(d),y=["left","top"].includes(m)?-1:1,_=p&&v?-1:1,C="function"==typeof u?u(c):u,S="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ze({mainAxis:0,crossAxis:0,alignmentAxis:null},C),M=S.mainAxis,$=S.crossAxis,G=S.alignmentAxis,R.abrupt("return",(g&&"number"==typeof G&&($="end"===g?-1*G:G),v?{x:$*_,y:M*y}:{x:M*y,y:$*_}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function LWe(t){return"x"===t?"y":"x"}var RWe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Zi(vn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,$;return vn().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=XK(a,m7e),m={x:r,y:o},G.next=14,Sse(n,p);case 14:return g=G.sent,v=qk(Bm(s)),y=LWe(v),_=m[v],C=m[y],c&&(_=Dse(_+g["y"===v?"top":"left"],_,_-g["y"===v?"bottom":"right"])),d&&(C=Dse(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),$=f.fn(Ze(Ze({},n),{},(ql(i={},v,_),ql(i,y,C),i))),G.abrupt("return",Ze(Ze({},$),{},{data:{x:$.x-r,y:$.y-o}}));case 22:case"end":return G.stop()}},e)}))()}}};function kc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function lh(t){return kc(t).getComputedStyle(t)}var t4,Tse=Math.min,qb=Math.max,Yk=Math.round;function Ese(t){var n=lh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Yk(e)!==r||Yk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function ap(t){return Mse(t)?(t.nodeName||"").toLowerCase():""}function Ase(){if(t4)return t4;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t4=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ch(t){return t instanceof kc(t).HTMLElement}function td(t){return t instanceof kc(t).Element}function Mse(t){return t instanceof kc(t).Node}function Ise(t){return typeof ShadowRoot<"u"&&(t instanceof kc(t).ShadowRoot||t instanceof ShadowRoot)}function Jk(t){var n=lh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function $We(t){return["table","td","th"].includes(ap(t))}function n4(t){var n=/firefox/i.test(Ase()),e=lh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function i4(){return/^((?!chrome|android).)*safari/i.test(Ase())}function r4(t){return["html","body","#document"].includes(ap(t))}function Fse(t){return td(t)?t:t.contextElement}var Nse={x:1,y:1};function m0(t){var n=Fse(t);if(!ch(n))return Nse;var e=n.getBoundingClientRect(),i=Ese(n),r=i.width,o=i.height,s=i.fallback,a=(s?Yk(e.width):e.width)/r,l=(s?Yk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function Vm(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=Fse(t),l=Nse;n&&(i?td(i)&&(l=m0(i)):l=m0(t));var c=a?kc(a):window,u=i4()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=kc(a),g=i&&td(i)?kc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=m0(v),_=v.getBoundingClientRect(),C=getComputedStyle(v);_.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,_.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=_.x,h+=_.y,v=kc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function lp(t){return((Mse(t)?t.ownerDocument:t.document)||window.document).documentElement}function Kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ose(t){return Vm(lp(t)).left+Kk(t).scrollLeft}function Xb(t){if("html"===ap(t))return t;var n=t.assignedSlot||t.parentNode||Ise(t)&&t.host||lp(t);return Ise(n)?n.host:n}function jse(t){var n=Xb(t);return r4(n)?n.ownerDocument.body:ch(n)&&Jk(n)?n:jse(n)}function Yb(t,n){var e;void 0===n&&(n=[]);var i=jse(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=kc(i);return r?n.concat(o,o.visualViewport||[],Jk(i)?i:[]):n.concat(i,Yb(i))}function Pse(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=kc(l),d=lp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=i4();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=lp(t),c=lp(l),u=Kk(l),h=qb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=qb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Ose(l),m=-u.scrollTop,"rtl"===lh(d).direction&&(p+=qb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=Vm(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ch(l)?m0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ze({},n);if(i4()){var o,s,a=kc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return QO(i)}function Lse(t,n){return ch(t)&&"fixed"!==lh(t).position?n?n(t):t.offsetParent:null}function Rse(t,n){for(var e=kc(t),i=Lse(t,n);i&&$We(i)&&"static"===lh(i).position;)i=Lse(i,n);return i&&("html"===ap(i)||"body"===ap(i)&&"static"===lh(i).position&&!n4(i))?e:i||function(r){for(var o=Xb(r);ch(o)&&!r4(o);){if(n4(o))return o;o=Xb(o)}return null}(t)||e}function BWe(t,n,e){var i=ch(n),r=lp(n),o=Vm(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==ap(n)||Jk(r))&&(s=Kk(n)),ch(n)){var l=Vm(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Ose(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var VWe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=Yb(c).filter(function(y){return td(y)&&"body"!==ap(y)}),f=null,p="fixed"===lh(c).position,m=p?Xb(c):c;td(m)&&!r4(m);){var g=lh(m),v=n4(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=Xb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(si(o),[i]),l=s.reduce(function(c,u){var d=Pse(n,u,r);return c.top=qb(d.top,c.top),c.right=Tse(d.right,c.right),c.bottom=Tse(d.bottom,c.bottom),c.left=qb(d.left,c.left),c},Pse(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ch(e),o=lp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==ap(e)||Jk(o))&&(s=Kk(e)),ch(e))){var c=Vm(e);a=m0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return ch(t)?Ese(t):t.getBoundingClientRect()},getOffsetParent:Rse,getDocumentElement:lp,getScale:m0,getElementRects:function(t){var n=this;return Zi(vn().mark(function e(){var i,r,o,s,a;return vn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Rse,a=n.getDimensions,l.t0=BWe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ze,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===lh(t).direction}};function UWe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==bn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function GWe(t){return o4.apply(this,arguments)}function o4(){return o4=Zi(vn().mark(function t(n){var e,i,r,o,s;return vn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==bn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),o4.apply(this,arguments)}function WWe(t){pi(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function qWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","0 0 20 20"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var XWe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,qWe,ys,{},WWe),r}return Se(e)}();function YWe(t){pi(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function JWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("path"),"fill","currentColor"),P(e,"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"),P(n,"width","100%"),P(n,"height","100%"),P(n,"viewBox","-2 -2 50 50"),P(n,"focusable","false"),P(n,"aria-hidden","true"),P(n,"role","presentation"),P(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var Qk=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,JWe,ys,{},YWe),r}return Se(e)}();function KWe(t){pi(t,"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 QWe(t){var n,e;return{c:function(){n=Wd("svg"),P(e=Wd("circle"),"class","circle_path svelte-1p3nqvd"),P(e,"cx","50"),P(e,"cy","50"),P(e,"r","20"),P(e,"fill","none"),P(e,"stroke","currentColor"),P(e,"stroke-width","5"),P(e,"stroke-miterlimit","10"),P(n,"class","loading svelte-1p3nqvd"),P(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),de(n,e)},p:Lt,i:Lt,o:Lt,d:function(i){i&&je(n)}}}var ZWe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,null,QWe,ys,{},KWe),r}return Se(e)}();function eqe(t){pi(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{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-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var tqe=function(t){return{value:8&t[0]}},$se=function(t){return{value:t[3]}},nqe=function(t){return{listOpen:64&t[0]}},Bse=function(t){return{listOpen:t[6]}},iqe=function(t){return{}},Vse=function(t){return{}},rqe=function(t){return{}},Hse=function(t){return{}},oqe=function(t){return{selection:8&t[0]}},zse=function(t){return{selection:t[3]}};function Use(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var sqe=function(t){return{}},Gse=function(t){return{}},aqe=function(t){return{selection:8&t[0]}},Wse=function(t){return{selection:t[127],index:t[129]}},lqe=function(t){return{}},qse=function(t){return{}},cqe=function(t){return{}},Xse=function(t){return{}};function Yse(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var uqe=function(t){return{item:16777216&t[0]}},Jse=function(t){return{item:t[127],index:t[129]}},dqe=function(t){return{filteredItems:16777216&t[0]}},Kse=function(t){return{filteredItems:t[24]}};function Qse(t){var n,e,i,r,o,s,a=[pqe,fqe,hqe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=be("div"),i&&i.c(),P(n,"class","svelte-select-list svelte-tyxmms"),Mt(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[_a(t[49].call(null,n)),Nt(n,"scroll",t[41]),Nt(n,"pointerdown",Jh(t[50])),Nt(n,"pointerup",Kh(Jh(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&($t(),ce(l[h],1,1,function(){l[h]=null}),Bt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),Q(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Mt(n,"prefloat",u[28])},i:function(u){r||(Q(i),r=!0)},o:function(u){ce(i),r=!1},d:function(u){u&&je(n),~e&&l[e].d(),t[91](null),o=!1,ho(s)}}}function hqe(t){var n,e,i=t[83].empty,r=Ms(i,t,t[82],Xse),o=r||{c:function(){(e=be("div")).textContent="No options",P(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:Lt,d:function(s){s&&je(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Fs(r,i,s,s[82],n?Is(i,s[82],a,cqe):Ns(s[82]),Xse)},i:function(s){n||(Q(o,s),n=!0)},o:function(s){ce(o,s),n=!1},d:function(s){o&&o.d(s)}}}function fqe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Qe,Jn)}:Dn,hi=n.debounceWait,di=void 0===hi?300:hi,kr=n.hideEmptyState,Qr=void 0!==kr&&kr,gi=n.inputAttributes,yr=void 0===gi?{}:gi,Ee=n.listAutoWidth,St=void 0===Ee||Ee,Ht=n.showChevron,sn=void 0!==Ht&&Ht,hn=n.listOffset,ri=void 0===hn?5:hn,Oi=n.hoverItemIndex,Bn=void 0===Oi?0:Oi,ei=n.floatingConfig,Yn=void 0===ei?{}:ei,br=n.class,Ar=void 0===br?"":br;function Po(Qe){var Jn=[],er={};Qe.forEach(function(wd){var Br=$r(wd);Jn.includes(Br)||(Jn.push(Br),er[Br]=[],Br&&er[Br].push(Object.assign(Js(Br,wd),{id:Br,groupHeader:!0,selectable:Wr}))),er[Br].push(Object.assign({groupItem:!!Br},wd))});var Qs=[];return Or(Jn).forEach(function(wd){er[wd]&&Qs.push.apply(Qs,si(er[wd]))}),Qs}function ca(){var Qe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,Bn=Qe<0?0:Qe),!Jn&&$r&&c[Bn]&&!c[Bn].selectable&&wo(1)}function md(){var Qe=!0;if(B){var Jn=[],er=[];B.forEach(function(Qs){Jn.includes(Qs[Nn])?Qe=!1:(Jn.push(Qs[Nn]),er.push(Qs))}),Qe||e(3,B=er)}return Qe}function hu(Qe){var Jn=Qe?Qe[Nn]:B[Nn];return _n.find(function(er){return er[Nn]===Jn})}function ua(Qe){return Rl.apply(this,arguments)}function Rl(){return(Rl=Zi(vn().mark(function Qe(Jn){var er;return vn().wrap(function(Qs){for(;;)switch(Qs.prev=Qs.next){case 0:er=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==er})),$("clear",er);case 3:case"end":return Qs.stop()}},Qe)}))).apply(this,arguments)}function gd(Qe){var Jn;ze&&N===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Qe&&$("focus",Qe),N.focus(),e(2,ze=!0))}function Ps(Qe){return vd.apply(this,arguments)}function vd(){return(vd=Zi(vn().mark(function Qe(Jn){return vn().wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!fi&&!z_){er.next=2;break}return er.abrupt("return");case 2:(Ue||ze)&&($("blur",Jn),yd(),e(2,ze=!1),e(26,f=void 0),N.blur());case 3:case"end":return er.stop()}},Qe)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Zi(vn().mark(function Qe(){return vn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Qe)})),Tv().$$.before_update.push(y),Wc(function(){Ue&&e(2,ze=!0),ze&&N&&N.focus()});var an,eT=n.ariaValues,Ce=void 0===eT?function(Qe){return"Option ".concat(Qe,", selected.")}:eT,lt=n.ariaListOpen,It=void 0===lt?function(Qe,Jn){return"You are currently focused on option ".concat(Qe,". There are ").concat(Jn," results available.")}:lt,Jt=n.ariaFocused,nn=void 0===Jt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Jt,Vn=null;function li(){clearTimeout(an),an=setTimeout(function(){fi=!1},100)}Hu(function(){var Qe;null===(Qe=Vn)||void 0===Qe||Qe.remove()});var fi=!1;function Lo(Qe){Qe&&!1!==Qe.selectable&&function(Jn){if(Jn){e(4,ie="");var er=Object.assign({},Jn);if(er.groupHeader&&!er.selectable)return;e(3,B=V?B?B.concat([er]):[er]:e(3,B=er)),setTimeout(function(){qr&&yd(),e(26,f=void 0),$("change",B),$("select",Jn)})}}(Qe)}function Ls(Qe){fi||e(7,Bn=Qe)}function Zo(Qe){var Qs,Jn=Qe.item,er=Qe.i;if(!1!==Jn?.selectable){if(B&&!V&&B[Nn]===Jn[Nn])return yd();((Qs=Jn).groupHeader&&Qs.selectable||Qs.selectable||!Qs.hasOwnProperty("selectable"))&&(e(7,Bn=er),Lo(Jn)),z_=!1}}function wo(Qe){if(0===c.filter(function(er){return!Object.hasOwn(er,"selectable")||!0===er.selectable}).length)return e(7,Bn=0);e(7,Qe>0&&Bn===c.length-1?Bn=0:Qe<0&&0===Bn?Bn=c.length-1:Bn+=Qe);var Jn=c[Bn];Jn&&!1===Jn.selectable&&(1!==Qe&&-1!==Qe||wo(Qe))}var $l=bd,wh=bd;function bd(Qe){return{update:function(Jn){Jn.scroll&&(li(),Qe.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Mr={strategy:"absolute",placement:"bottom-start",middleware:[PWe(ri),jWe(),RWe()],autoUpdate:!1},tc=Un(function zWe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ze(Ze(Ze({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ze({platform:VWe},d),p=Ze(Ze({},f.platform),{},{_c:h}),EWe(c,u,Ze(Ze({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function HWe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(si(td(t)?Yb(t):t.contextElement?Yb(t.contextElement):[]),si(Yb(n))):[];p.forEach(function(_){f&&_.addEventListener("scroll",e,{passive:!0}),l&&_.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?Vm(t):null;return h&&function _(){var C=Vm(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(_)}(),e(),function(){var _;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(_=g)||_.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Mr),3),fu=tc[0],_d=tc[1],Ch=tc[2],xd=!0,z_=!1;return t.$$set=function(Qe){"justValue"in Qe&&e(53,R=Qe.justValue),"filter"in Qe&&e(54,U=Qe.filter),"getItems"in Qe&&e(55,re=Qe.getItems),"id"in Qe&&e(56,X=Qe.id),"name"in Qe&&e(8,H=Qe.name),"container"in Qe&&e(0,E=Qe.container),"input"in Qe&&e(1,N=Qe.input),"multiple"in Qe&&e(9,V=Qe.multiple),"multiFullItemClearable"in Qe&&e(10,fe=Qe.multiFullItemClearable),"disabled"in Qe&&e(11,xe=Qe.disabled),"focused"in Qe&&e(2,ze=Qe.focused),"value"in Qe&&e(3,B=Qe.value),"filterText"in Qe&&e(4,ie=Qe.filterText),"placeholder"in Qe&&e(57,Ye=Qe.placeholder),"placeholderAlwaysShow"in Qe&&e(58,_t=Qe.placeholderAlwaysShow),"items"in Qe&&e(52,_n=Qe.items),"label"in Qe&&e(12,on=Qe.label),"itemFilter"in Qe&&e(59,pn=Qe.itemFilter),"groupBy"in Qe&&e(60,$r=Qe.groupBy),"groupFilter"in Qe&&e(61,Or=Qe.groupFilter),"groupHeaderSelectable"in Qe&&e(62,Wr=Qe.groupHeaderSelectable),"itemId"in Qe&&e(13,Nn=Qe.itemId),"loadOptions"in Qe&&e(63,ui=Qe.loadOptions),"containerStyles"in Qe&&e(14,Cr=Qe.containerStyles),"hasError"in Qe&&e(15,Qo=Qe.hasError),"filterSelectedItems"in Qe&&e(64,On=Qe.filterSelectedItems),"required"in Qe&&e(16,bi=Qe.required),"closeListOnChange"in Qe&&e(65,qr=Qe.closeListOnChange),"createGroupHeaderItem"in Qe&&e(66,Js=Qe.createGroupHeaderItem),"searchable"in Qe&&e(17,Ks=Qe.searchable),"inputStyles"in Qe&&e(18,Xa=Qe.inputStyles),"clearable"in Qe&&e(68,we=Qe.clearable),"loading"in Qe&&e(5,qe=Qe.loading),"listOpen"in Qe&&e(6,Ue=Qe.listOpen),"debounce"in Qe&&e(69,ii=Qe.debounce),"debounceWait"in Qe&&e(70,di=Qe.debounceWait),"hideEmptyState"in Qe&&e(19,Qr=Qe.hideEmptyState),"inputAttributes"in Qe&&e(71,yr=Qe.inputAttributes),"listAutoWidth"in Qe&&e(72,St=Qe.listAutoWidth),"showChevron"in Qe&&e(20,sn=Qe.showChevron),"listOffset"in Qe&&e(73,ri=Qe.listOffset),"hoverItemIndex"in Qe&&e(7,Bn=Qe.hoverItemIndex),"floatingConfig"in Qe&&e(74,Yn=Qe.floatingConfig),"class"in Qe&&e(21,Ar=Qe.class),"ariaValues"in Qe&&e(75,Ce=Qe.ariaValues),"ariaListOpen"in Qe&&e(76,It=Qe.ariaListOpen),"ariaFocused"in Qe&&e(77,nn=Qe.ariaFocused),"$$scope"in Qe&&e(82,S=Qe.$$scope)},t.$$.update=function(){var Qe,Jn,er,Qs,wd,Br;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var Br,Zs=(_n||[]).find(function(pu){return pu[Nn]===B});e(3,B=Zs||(ql(Br={},Nn,B),ql(Br,"label",B),Br))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(pu){return"string"==typeof pu?{value:pu,label:pu}:pu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!yr&&Ks||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},yr)),X&&e(27,v.id=X,v),Ks||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=si(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&$("input",B):p&&JSON.stringify(B[Nn])===JSON.stringify(p[Nn])||$("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&$("input",B),6&t.$$.dirty[0]&&!ze&&N&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ui||0!==ie.length)&&(ui?ii(Zi(vn().mark(function Br(){var Zs;return vn().wrap(function(pu){for(;;)switch(pu.prev=pu.next){case 0:return e(5,qe=!0),pu.next=3,re({dispatch:$,loadOptions:ui,convertStringItemsToObjects:lae,filterText:ie});case 3:(Zs=pu.sent)?(e(5,qe=Zs.loading),e(6,Ue=Ue?Zs.listOpen:ie.length>0),e(2,ze=Ue&&Zs.focused),e(52,_n=$r?Po(Zs.filteredItems):Zs.filteredItems)):(e(5,qe=!1),e(2,ze=!0),e(6,Ue=!0));case 5:case"end":return pu.stop()}},Br)})),di):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=U({loadOptions:ui,filterText:ie,items:_n,multiple:V,value:B,itemId:Nn,groupBy:$r,label:on,filterSelectedItems:On,itemFilter:pn,convertStringItemsToObjects:lae,filterGroupedItems:Po})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Qe=c.findIndex(function(Br){return Br[Nn]===B[Nn]}),ca(Qe,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,Bn=0),16&t.$$.dirty[0]&&ie&&e(7,Bn=0),128&t.$$.dirty[0]&&$("hoverItem",Bn),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&we&&!xe&&!qe),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=_t&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(er=V&&B.length>0?B.map(function(Br){return Br[on]}).join(", "):B[on],Ce(er)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Br=c[Bn];return Ue&&Br?It(Br[on],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(Br=_n)&&0!==Br.length&&!Br.some(function(Zs){return"object"!==bn(Zs)})&&B&&(V?!B.some(function(Zs){return!Zs||!Zs[Nn]}):B[Nn])&&(Array.isArray(B)?e(3,B=B.map(function(Zs){return hu(Zs)||Zs})):e(3,B=hu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(Br){return Br[Nn]}):null:B&&B[Nn]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||$("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&ca(),16777216&t.$$.dirty[0]&&function(Br){Ue&&$("filter",Br)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Qs=Yn)||void 0===Qs?void 0:Qs.autoUpdate)&&e(81,Mr.autoUpdate=!0,Mr),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Yn&&Ch(Object.assign(Mr,Yn)),8388608&t.$$.dirty[0]&&e(30,u=!!Vn),8388672&t.$$.dirty[0]&&function(Br,Zs){if(!Br||!Zs)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Vn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Vn&&(wd=E.getBoundingClientRect().width,e(23,Vn.style.width=St?wd+"px":"auto",Vn)),128&t.$$.dirty[0]&&e(29,d=Bn),70&t.$$.dirty[0]&&N&&Ue&&!ze&&gd()},[E,N,ze,B,ie,qe,Ue,Bn,H,V,fe,xe,on,Nn,Cr,Qo,bi,Ks,Xa,Qr,sn,Ar,function(){$("clear",B),e(3,B=void 0),yd(),gd()},Vn,c,i,f,v,xd,d,u,l,a,s,o,r,ua,function(Qe){if(ze)switch(Qe.stopPropagation(),Qe.key){case"Escape":Qe.preventDefault(),yd();break;case"Enter":if(Qe.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[Nn]===c[Bn][Nn]){yd();break}Lo(c[Bn])}break;case"ArrowDown":Qe.preventDefault(),Ue?wo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Qe.preventDefault(),Ue?wo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&ze){if(0===c.length||B&&B[Nn]===c[Bn][Nn])return yd();Qe.preventDefault(),Lo(c[Bn]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(ua(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(X){return{value:X,label:X}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],z=null!==(i=M)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?Lb(M.filter.path):null,U=null!==(o=M)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?G.find(function(X){var Z;return X.value===(null===(Z=M.filter)||void 0===Z?void 0:Z.relation)}):null,q=(null===(a=M)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",re=null!==(c=M)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?Lb(M.sort.path):null,L=null!==(d=M)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(X){var Z;return X.value===(null===(Z=M.sort)||void 0===Z?void 0:Z.direction)}):null;return t.$$set=function(X){"json"in X&&e(11,C=X.json),"queryOptions"in X&&e(10,M=X.queryOptions),"onChange"in X&&e(12,$=X.onChange)},t.$$.update=function(){var X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne,ie,Ie,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?CO(C):[]),34816&t.$$.dirty&&e(13,m=f?CO(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(Lb)),8192&t.$$.dirty&&e(6,v=m?m.map(Lb):[]),1088&t.$$.dirty&&e(5,y=null!==(X=M)&&void 0!==X&&null!==(Z=X.projection)&&void 0!==Z&&Z.paths&&v?M.projection.paths.map(function(ie){return v.find(function(Ie){return or(Ie.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(he=(null===(H=z)||void 0===H?void 0:H.value)||null,or(null===(E=M)||void 0===E||null===(F=E.filter)||void 0===F?void 0:F.path,he)||(_("changeFilterPath",he),e(10,M=qu(M,["filter","path"],he,!0)),$(M))),2&t.$$.dirty&&(Y=(null===(N=U)||void 0===N?void 0:N.value)||null,or(null===(V=M)||void 0===V||null===(oe=V.filter)||void 0===oe?void 0:oe.relation,Y)||(_("changeFilterRelation",Y),e(10,M=qu(M,["filter","relation"],Y,!0)),$(M))),4&t.$$.dirty&&(or(null===(Fe=M)||void 0===Fe||null===(xe=Fe.filter)||void 0===xe?void 0:xe.value,fe=q||null)||(_("changeFilterValue",fe),e(10,M=qu(M,["filter","value"],fe,!0)),$(M))),8&t.$$.dirty&&(ie=(null===(tt=re)||void 0===tt?void 0:tt.value)||null,or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.sort)||void 0===Ye?void 0:Ye.path,ie)||(_("changeSortPath",ie),e(10,M=qu(M,["sort","path"],ie,!0)),$(M))),16&t.$$.dirty&&(ot=(null===(ze=L)||void 0===ze?void 0:ze.value)||null,or(null===(B=M)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,ot)||(_("changeSortDirection",ot),e(10,M=qu(M,["sort","direction"],ot,!0)),$(M))),32&t.$$.dirty&&function(ie){var Ie,Ye;or(null===(Ie=M)||void 0===Ie||null===(Ye=Ie.projection)||void 0===Ye?void 0:Ye.paths,ie)||(_("changeProjectionPaths",ie),e(10,M=qu(M,["projection","paths"],ie,!0)),$(M))}(y?y.map(function(ie){return ie.value}):null)},[z,U,q,re,L,y,v,g,G,R,M,C,$,m,p,f,function(X){e(0,z=X)},function(X){e(1,U=X)},function(){e(2,q=this.value)},function(X){e(3,re=X)},function(X){e(4,L=X)},function(X){e(5,y=X),e(10,M),e(6,v),e(13,m),e(15,f),e(11,C)}]}var wqe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,xqe,_qe,Ei,{json:11,queryOptions:10,onChange:12},bqe),r}return Se(e)}();function Cqe(t){pi(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function cae(t,n,e){var i=t.slice();return i[5]=n[e],i}function kqe(t){var n,e;return n=new sr({props:{data:Bb}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Sqe(t){var n,e;return n=new sr({props:{data:$b}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function uae(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[Sqe,kqe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=be("button"),i.c(),r=it(),o=tn(d),s=it(),P(n,"type","button"),P(n,"class","jse-query-language svelte-19cxesy"),P(n,"title",a="Select ".concat(t[5].name," as query language")),Mt(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),de(n,r),de(n,o),de(n,s),l=!0,c||(u=Nt(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):($t(),ce(f[y],1,1,function(){f[y]=null}),Bt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),Q(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&P(n,"title",a),(!l||3&v)&&Mt(n,"selected",t[5].id===t[0])},i:function(g){l||(Q(i),l=!0)},o:function(g){ce(i),l=!1},d:function(g){g&&je(n),f[e].d(),c=!1,u()}}}function Dqe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&dae(t);return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),(e=be("div")).textContent="Transform",i=it(),u&&u.c(),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),de(n,e),de(n,i),u&&u.m(n,null),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Nt(o,"click",t[2]),l=!0)},p:function(d,h){var f=Un(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&Q(u,1)):((u=dae(d)).c(),Q(u,1),u.m(n,r)):u&&($t(),ce(u,1,1,function(){u=null}),Bt())},i:function(d){a||(Q(u),Q(s.$$.fragment,d),a=!0)},o:function(d){ce(u),ce(s.$$.fragment,d),a=!1},d:function(d){d&&je(n),u&&u.d(),pt(s),l=!1,c()}}}function Iqe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xa("simple-modal").close,c=xa("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Eqe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Vi[h?"unshift":"push"](function(){e(1,i=h)})}]}var Fqe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Iqe,Mqe,Ei,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Aqe),r}return Se(e)}(),s4=wa("jsoneditor:AutoScrollHandler"),Nqe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},hae=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Nqe,s=y.a11y||!1,bn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),bn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,bn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Zk=wa("jsoneditor:History");function fae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Zk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Zk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Zk("undo",h),a(),h}},redo:function d(){if(o())return Zk("redo",e[i-=1]),a(),e[i]}}}function g0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var v0=wa("validation");function pae(t,n,e,i){return v0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Oqe(t,n,e,i){if(v0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Xd.info}]};if(0===t.length)return null;try{var r=g0(function(){return e.parse(t)},function(l){return v0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:g0(function(){return i.parse(t)},function(l){return v0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=g0(function(){return n(o)},function(l){return v0("validate: validated json in ".concat(l," ms"))});return Hi(s)?null:{validationErrors:s}}catch(l){var a=g0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yd(c)),!0}catch{return!1}}(t,e)},function(c){return v0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:Fk(t,l.message||l.toString()),isRepairable:a}}}var eS=wa("jsoneditor:FocusTracker");function a4(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(eS("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){eS("blur"),l=!1,a()}))}(0,t.onMount)(function(){eS("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){eS("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function jqe(t){pi(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function mae(t,n,e){var i=t.slice();return i[8]=n[e],i}function gae(t){var n,e;return n=new sr({props:{data:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function vae(t){var n,e;return n=new sr({props:{data:t[8].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function yae(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&vae(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=be("button"),d&&d.c(),e=it(),i=tn(u),r=it(),P(n,"type","button"),P(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),P(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),de(n,e),de(n,i),de(n,r),a=!0,l||(c=[Nt(n,"click",h),Nt(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&Q(d,1)):((d=vae(t)).c(),Q(d,1),d.m(n,e)):d&&($t(),ce(d,1,1,function(){d=null}),Bt()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&P(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(Q(d),a=!0)},o:function(p){ce(d),a=!1},d:function(p){p&&je(n),d&&d.d(),l=!1,ho(c)}}}function Pqe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&gae(t),f=t[3],p=[],m=0;m100&&Cae(t);return{c:function(){n=be("table"),e=be("tbody");for(var u=0;u100?c?c.p(u,d):((c=Cae(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&xae(t);function y(){return t[6](t[7])}return{c:function(){n=be("tr"),e=be("td"),mt(i.$$.fragment),r=it(),o=be("td"),s=tn(m),a=it(),l=be("td"),c=tn(g),u=it(),d=be("td"),v&&v.c(),P(e,"class","jse-validation-error-icon svelte-1oe8e8r"),P(o,"class","svelte-1oe8e8r"),P(l,"class","svelte-1oe8e8r"),P(d,"class","jse-validation-error-action svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(_,C){Pe(_,n,C),de(n,e),ft(i,e,null),de(n,r),de(n,o),de(o,s),de(n,a),de(n,l),de(l,c),de(n,u),de(n,d),v&&v.m(d,null),h=!0,f||(p=Nt(n,"click",y),f=!0)},p:function(_,C){t=_,(!h||1&C)&&m!==(m=tu(Kl(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&Q(v,1)):((v=xae(t)).c(),Q(v,1),v.m(d,null)):v&&($t(),ce(v,1,1,function(){v=null}),Bt())},i:function(_){h||(Q(i.$$.fragment,_),Q(v),h=!0)},o:function(_){ce(i.$$.fragment,_),ce(v),h=!1},d:function(_){_&&je(n),pt(i),v&&v.d(),f=!1,p()}}}function Cae(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=be("tr"),e=be("td"),i=it(),r=be("td"),o=it(),s=be("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=it(),d=be("td"),P(e,"class","svelte-1oe8e8r"),P(r,"class","svelte-1oe8e8r"),P(s,"class","svelte-1oe8e8r"),P(d,"class","svelte-1oe8e8r"),P(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(n,u),de(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&je(n)}}}function Vqe(t){var n,e,i=!Hi(t[0]),r=i&&_ae(t);return{c:function(){r&&r.c(),n=_r()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=Un(s,1)[0];1&a&&(i=!Hi(o[0])),i?r?(r.p(o,a),1&a&&Q(r,1)):((r=_ae(o)).c(),Q(r,1),r.m(n.parentNode,n)):r&&($t(),ce(r,1,1,function(){r=null}),Bt())},i:function(o){e||(Q(r),e=!0)},o:function(o){ce(r),e=!1},d:function(o){r&&r.d(o),o&&je(n)}}}function Hqe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var l4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Hqe,Vqe,Ei,{validationErrors:0,selectError:1},Rqe),r}return Se(e)}(),zqe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Uqe(t){pi(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function Gqe(t){var n,e,i,r,o,s,a,l,c;return s=new sr({props:{data:p0}}),{c:function(){n=be("div"),e=be("div"),i=tn(t[0]),r=it(),o=be("button"),mt(s.$$.fragment),P(e,"class","jse-title svelte-d01h2s"),P(o,"type","button"),P(o,"class","jse-close svelte-d01h2s"),P(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),de(n,e),de(e,i),de(n,r),de(n,o),ft(s,o,null),a=!0,l||(c=Nt(o,"click",t[3]),l=!0)},p:function(u,d){var h=Un(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(Q(s.$$.fragment,u),a=!0)},o:function(u){ce(s.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(s),l=!1,c()}}}function Wqe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xa("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var c4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wqe,Gqe,Ei,{title:0,onClose:1},Uqe),r}return Se(e)}();function qqe(t){pi(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function Xqe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G;return e=new c4({props:{title:"Copying and pasting"}}),{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).textContent="These actions are unavailable via the menu. Please use:",s=it(),a=be("div"),l=be("div"),(c=be("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=it(),h=be("div"),(f=be("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=it(),g=be("div"),(v=be("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),_=it(),C=be("div"),(S=be("button")).textContent="Close",P(c,"class","jse-key svelte-1olothd"),P(l,"class","jse-shortcut"),P(f,"class","jse-key svelte-1olothd"),P(h,"class","jse-shortcut"),P(v,"class","jse-key svelte-1olothd"),P(g,"class","jse-shortcut"),P(a,"class","jse-shortcuts svelte-1olothd"),P(S,"type","button"),P(S,"class","jse-primary svelte-1olothd"),P(C,"class","jse-actions svelte-1olothd"),P(r,"class","jse-modal-contents svelte-1olothd"),P(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(a,l),de(l,c),de(l,u),de(a,d),de(a,h),de(h,f),de(h,p),de(a,m),de(a,g),de(g,v),de(g,y),de(r,_),de(r,C),de(C,S),M=!0,$||(G=Nt(S,"click",t[0]),$=!0)},p:Lt,i:function(R){M||(Q(e.$$.fragment,R),M=!0)},o:function(R){ce(e.$$.fragment,R),M=!1},d:function(R){R&&je(n),pt(e),$=!1,G()}}}function Yqe(t){return[xa("simple-modal").close,zqe?"\u2318":"Ctrl"]}var kae=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Yqe,Xqe,Ei,{},qqe),r}return Se(e)}();function Sae(t){return!!t&&("space"===t.type||!0===t.space)}function tS(t){return!!t&&("separator"===t.type||!0===t.separator)}function Jb(t){return!!t&&"function"==typeof t.onClick}function u4(t){return!!t&&"dropdown-button"===t.type&&Jb(t.main)&&Array.isArray(t.items)}function Dae(t){return Io(t)&&Io(t.parseError)}function Kqe(t){pi(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var Qqe=function(t){return{}},Tae=function(t){return{}};function Eae(t,n,e){var i=t.slice();return i[3]=n[e],i}var Zqe=function(t){return{}},Aae=function(t){return{}};function eXe(t){var n,e=Nae(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Nae(i[3])+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function tXe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Mae(t),u=t[3].text&&Iae(t);return{c:function(){n=be("button"),c&&c.c(),e=it(),u&&u.c(),P(n,"type","button"),P(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),P(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),de(n,e),u&&u.m(n,null),s=!0,a||(l=Nt(n,"click",function(){ba(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&Q(c,1)):((c=Mae(t)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),t[3].text?u?u.p(t,h):((u=Iae(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&P(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&P(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(Q(c),s=!0)},o:function(d){ce(c),s=!1},d:function(d){d&&je(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function nXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function iXe(t){var n;return{c:function(){P(n=be("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Mae(t){var n,e;return n=new sr({props:{data:t[3].icon}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Iae(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&je(n)}}}function Fae(t){var n,e,i,r,o,s,a,l=[iXe,nXe,tXe,eXe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!tS(d[3])),n?0:(null==e&&(e=!!Sae(d[3])),e?1:(null==i&&(i=!!Jb(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=_r()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(d){a||(Q(o),a=!0)},o:function(d){ce(o),a=!1},d:function(d){c[r].d(d),d&&je(s)}}}function rXe(t){for(var n,e,i,r,o=t[2].left,s=Ms(o,t,t[1],Aae),a=t[0],l=[],c=0;c0&&_.height>0}),u),c=u(e);function u(y){var _=y.getBoundingClientRect();return{x:_.left+_.width/2,y:_.top+_.height/2,rect:_,element:y}}function d(y,_){var S=y.x-_.x,M=(y.y-_.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(S*S+M*M)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(Xv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(Xv(g.filter(function(y){return o(y.element)}),h)||Xv(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Vi[a?"unshift":"push"](function(){e(2,i=a)})}]}var Jae=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,GXe,UXe,Ei,{items:0,tip:1},EXe),r}return Se(e)}();function WXe(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qXe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$=n.json,G=n.documentState,R=n.parser,z=n.showTip,U=n.onCloseContextMenu,q=n.onEditKey,re=n.onEditValue,L=n.onToggleEnforceString,X=n.onCut,Z=n.onCopy,H=n.onPaste,he=n.onRemove,E=n.onDuplicate,F=n.onExtract,N=n.onInsertBefore,Y=n.onInsert,V=n.onConvert,oe=n.onInsertAfter,fe=n.onSort,Fe=n.onTransform;function xe(){U(),q()}function tt(){U(),re()}function ze(){U(),L()}function ot(){U(),X(!0)}function B(){U(),X(!1)}function ne(){U(),Z(!0)}function ie(){U(),Z(!1)}function Ie(){U(),H()}function Ye(){U(),he()}function Le(){U(),E()}function _t(){U(),F()}function At(pn){U(),c?V(pn):Y(pn)}function _n(){U(),fe()}function ci(){U(),Fe()}function on(){U(),N()}function Fi(){U(),oe()}return t.$$set=function(pn){"json"in pn&&e(2,$=pn.json),"documentState"in pn&&e(3,G=pn.documentState),"parser"in pn&&e(4,R=pn.parser),"showTip"in pn&&e(0,z=pn.showTip),"onCloseContextMenu"in pn&&e(5,U=pn.onCloseContextMenu),"onEditKey"in pn&&e(6,q=pn.onEditKey),"onEditValue"in pn&&e(7,re=pn.onEditValue),"onToggleEnforceString"in pn&&e(8,L=pn.onToggleEnforceString),"onCut"in pn&&e(9,X=pn.onCut),"onCopy"in pn&&e(10,Z=pn.onCopy),"onPaste"in pn&&e(11,H=pn.onPaste),"onRemove"in pn&&e(12,he=pn.onRemove),"onDuplicate"in pn&&e(13,E=pn.onDuplicate),"onExtract"in pn&&e(14,F=pn.onExtract),"onInsertBefore"in pn&&e(15,N=pn.onInsertBefore),"onInsert"in pn&&e(16,Y=pn.onInsert),"onConvert"in pn&&e(17,V=pn.onConvert),"onInsertAfter"in pn&&e(18,oe=pn.onInsertAfter),"onSort"in pn&&e(19,fe=pn.onSort),"onTransform"in pn&&e(20,Fe=pn.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=G.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==$),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Hi(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn($,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Io(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Fr(i)||xs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Fr(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&zb(i)&&!s&&!Array.isArray(Sn($,Xi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&zb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!Ho(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?Lm(i)&&!Io(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,_=m?Lm(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?Lm(i)&&Ho(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,S=null!=i&&lf(a,G.enforceStringMap,ln(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,M=[{type:"row",items:[{type:"button",onClick:xe,icon:h0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:tt,icon:h0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:h0,text:l,title:"Edit the value (Double-click on the value)",onClick:tt,disabled:!f},{type:"button",icon:S?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:ze,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:ot,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:ot,disabled:!c},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Ie,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:Le,icon:wse,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:_t,icon:wWe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_n,icon:Gk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:ci,icon:Hk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return At("structure")},icon:m?Uk:f0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return At("object")},icon:m?Uk:f0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return At("array")},icon:m?Uk:f0,text:"Array",title:g+" array",disabled:!_},{type:"button",onClick:function(){return At("value")},icon:m?Uk:f0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:on,icon:_We,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Fi,icon:vWe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[z,M,$,G,R,U,q,re,L,X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,s,c,C,g,m,_,y,v,d,u,o,p,S,f,l,h,i,a,r]}var XXe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,qXe,WXe,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function YXe(t){pi(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Kae(t,n,e){var i=t.slice();return i[13]=n[e],i}function Qae(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=be("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=it(),P(n,"type","button"),P(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=Nt(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&je(n),a=!1,l()}}}function JXe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&_.end<=M.start)&&$.push(_),M.start>=(G?_.end:v.end)&&$.push(M),a=$))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var ZXe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,QXe,JXe,Ei,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},YXe),r}return Se(e)}();function eYe(t){pi(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function tYe(t){var n,e,i,r,o;return e=new sr({props:{data:ru}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-context-menu-pointer svelte-1yzl4st"),P(n,"title",xF),Mt(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Nt(n,"click",t[1]),r=!0)},p:function(s,a){var l=Un(a,1)[0];(!i||1&l)&&Mt(n,"jse-selected",s[0])},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nYe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var cp=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,nYe,tYe,Ei,{selected:0,onContextMenu:2},eYe),r}return Se(e)}();function iYe(t){pi(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function rYe(t){var n,e,i,r,o,s,a,l=[aYe,sYe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=be("div"),i.c(),P(n,"data-type","selectable-key"),P(n,"class",r=Ao(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=Nt(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):($t(),ce(c[f],1,1,function(){c[f]=null}),Bt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),Q(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Ao(d[6](d[0]))+" svelte-24a1b2"))&&P(n,"class",r)},i:function(d){o||(Q(i),o=!0)},o:function(d){ce(i),o=!1},d:function(d){d&&je(n),c[e].d(),s=!1,a()}}}function oYe(t){var n,e;return n=new tse({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function sYe(t){var n,e=jm(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=jm(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function aYe(t){var n,e;return n=new pse({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ele(t){var n,e;return n=new cp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function lYe(t){var n,e,i,r,o,s=[oYe,rYe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&ele(t);return{c:function(){e.c(),i=it(),c&&c.c(),r=_r()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=Un(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):($t(),ce(a[f],1,1,function(){a[f]=null}),Bt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),Q(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&($t(),ce(c,1,1,function(){c=null}),Bt()):c?(c.p(u,h),28&h&&Q(c,1)):((c=ele(u)).c(),Q(c,1),c.m(r.parentNode,r))},i:function(u){o||(Q(e),Q(c),o=!0)},o:function(u){ce(e),ce(c),o=!1},d:function(u){a[n].d(u),u&&je(i),c&&c.d(u),u&&je(r)}}}function cYe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&xs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&ip(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(iu(o,!0)))},function(h){return ah("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=Xi(o).concat(p);d.onSelect(f===CF?mr(m,!1):iu(m,!1)),f!==wF&&d.focus()},function(){d.onSelect(iu(o,!1)),d.focus()},o,s,l,u]}var uYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cYe,lYe,Ei,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},iYe),r}return Se(e)}();function tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function nle(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=$k(u.selection),v=f.findIndex(function(z){return or(z.path,g)}),y=0,_=v,C=function(){var z;return null===(z=f[_+1])||void 0===z?void 0:z.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),_+=1;var M=Sn(h,Xi(g)),$=Array.isArray(M),G=null===(d=f[$?_:_+1])||void 0===d?void 0:d.path,R=_-v;return G?{beforePath:G,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,_,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=Xi(d.focusPath),g=Sn(u,m);if(!(p||f&&l0(f,m)&&f.length>m.length))return[];var v=o0(d),y=$k(d),_=Ln(v),C=Ln(y),S=f?f[m.length]:void 0;if(!Mo(g)){if(oo(g)){var M=Ws(_),$=Ws(C),G=void 0!==S?Ws(S):g.length;return vO($-M+1,Gz?[].concat(si(R.slice(z,U+1)),si(R.slice(q,R.length))).map(function(re){return Rm(m,re)}):[].concat(si(R.slice(q,z)),si(R.slice(U+1,R.length))).map(function(re){return Rm(m,re)}):[]}(n,o,s),l=Sn(n,Xi(o0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=o0(m=u.selection),y=$k(m),_=f.findIndex(function($){return or($.path,v)}),C=f.findIndex(function($){return or($.path,y)}),Os(p,null===(d=f[_+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function uh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Iv(e,n)})}function mYe(t){pi(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function gYe(t){var n,e,i,r,o,s;return e=new sr({props:{data:$m}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=[Nt(n,"click",function(){ba(t[0])&&t[0].apply(this,arguments)}),_a(i=qO.call(null,n,Ze({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Un(l,1)[0];t=a,i&&ba(i.update)&&2&c&&i.update.call(null,Ze({text:t[1]},t[2]))},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,ho(s)}}}function vYe(t,n,e){var i,r=xa("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var _0=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vYe,gYe,ys,{validationError:3,onExpand:0},mYe),r}return Se(e)}();function yYe(t){pi(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var bYe=function(t){return{}},ile=function(t){return{}};function rle(t,n,e){var i=t.slice();return i[53]=n[e],i}var _Ye=function(t){return{}},ole=function(t){return{}};function sle(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function ale(t,n,e){var i=t.slice();return i[50]=n[e],i}var xYe=function(t){return{}},lle=function(t){return{}};function wYe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),d=t[34].identifier,h=Ms(d,t,t[35],ile),f=!t[17]&&cle();o=new pYe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:dse(t[6],t[9]),context:t[8]}});var p=u&&ule(t),m=t[15]&&dle(t),g=!t[17]&&hle(t);return{c:function(){n=be("div"),e=be("div"),h&&h.c(),i=it(),f&&f.c(),r=it(),mt(o.$$.fragment),s=it(),p&&p.c(),a=it(),m&&m.c(),l=it(),g&&g.c(),P(e,"class","jse-contents svelte-1wlxti1"),P(n,"class","jse-contents-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(v,y){Pe(v,n,y),de(n,e),h&&h.m(e,null),de(e,i),f&&f.m(e,null),de(e,r),ft(o,e,null),de(e,s),p&&p.m(e,null),de(n,a),m&&m.m(n,null),de(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Fs(h,d,v,v[35],c?Is(d,v[35],y,bYe):Ns(v[35]),ile),v[17]?f&&(f.d(1),f=null):f||((f=cle()).c(),f.m(e,r));var _={};2&y[0]&&(_.path=v[1]),1&y[0]&&(_.value=v[0]),8192&y[0]&&(_.enforceString=v[13]),65664&y[0]&&(_.selection=v[16]?v[7]:void 0),576&y[0]&&(_.searchResultItems=dse(v[6],v[9])),256&y[0]&&(_.context=v[8]),o.$set(_),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Fr(v[7]))&&!v[7].edit&&or(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&Q(p,1)):((p=ule(v)).c(),Q(p,1),p.m(e,null)):p&&($t(),ce(p,1,1,function(){p=null}),Bt()),v[15]?m?(m.p(v,y),32768&y[0]&&Q(m,1)):((m=dle(v)).c(),Q(m,1),m.m(n,l)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=hle(v)).c(),g.m(n,null)),(!c||262144&y[0])&&P(n,"style",v[18])},i:function(v){c||(Q(h,v),Q(o.$$.fragment,v),Q(p),Q(m),c=!0)},o:function(v){ce(h,v),ce(o.$$.fragment,v),ce(p),ce(m),c=!1},d:function(v){v&&je(n),h&&h.d(v),f&&f.d(),pt(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function CYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[DYe,SYe],S=[];function M(E,F){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],ole),R=!t[17]&&fle();function z(E,F){return E[12]?EYe:TYe}var U=z(t),q=U(t),re=_&&ple(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&mle(t);function X(E,F){return E[12]?MYe:E[17]?void 0:AYe}var Z=X(t),H=Z&&Z(t),he=t[12]&&gle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H&&H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(c,"class","jse-meta svelte-1wlxti1"),P(c,"data-type","selectable-value"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,F){Pe(E,n,F),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H&&H.m(n,null),Pe(E,p,F),he&&he.m(E,F),Pe(E,m,F),g=!0,v||(y=Nt(i,"click",t[21]),v=!0)},p:function(E,F){var N=r;(r=M(E))===N?S[r].p(E,F):($t(),ce(S[N],1,1,function(){S[N]=null}),Bt(),(o=S[r])?o.p(E,F):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&F[1])&&Fs(G,$,E,E[35],g?Is($,E[35],F,_Ye):Ns(E[35]),ole),E[17]?R&&(R.d(1),R=null):R||((R=fle()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,F):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&F[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Fr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,F),65922&F[0]&&Q(re,1)):((re=ple(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),36864&F[0]&&Q(L,1)):((L=mle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,F):(H&&H.d(1),(H=Z&&Z(E))&&(H.c(),H.m(n,null))),(!g||262144&F[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,F),4096&F[0]&&Q(he,1)):((he=gle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H&&H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function kYe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Fr(t[7]))&&!t[7].edit&&or(t[7].focusPath,t[1]),C=[NYe,FYe],S=[];function M(E,F){return E[12]?0:1}r=M(t),o=S[r]=C[r](t);var $=t[34].identifier,G=Ms($,t,t[35],lle),R=!t[17]&&_le();function z(E,F){return E[12]?jYe:OYe}var U=z(t),q=U(t),re=_&&xle(t),L=t[15]&&(!t[12]||!t[15].isChildError)&&wle(t);function X(E,F){return E[12]?LYe:PYe}var Z=X(t),H=Z(t),he=t[12]&&Cle(t);return{c:function(){n=be("div"),e=be("div"),i=be("button"),o.c(),s=it(),G&&G.c(),a=it(),R&&R.c(),l=it(),c=be("div"),u=be("div"),q.c(),d=it(),re&&re.c(),h=it(),L&&L.c(),f=it(),H.c(),p=it(),he&&he.c(),m=_r(),P(i,"type","button"),P(i,"class","jse-expand svelte-1wlxti1"),P(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),P(u,"class","jse-meta-inner svelte-1wlxti1"),P(u,"data-type","selectable-value"),P(c,"class","jse-meta svelte-1wlxti1"),P(e,"class","jse-header svelte-1wlxti1"),P(n,"class","jse-header-outer svelte-1wlxti1"),P(n,"style",t[18])},m:function(E,F){Pe(E,n,F),de(n,e),de(e,i),S[r].m(i,null),de(e,s),G&&G.m(e,null),de(e,a),R&&R.m(e,null),de(e,l),de(e,c),de(c,u),q.m(u,null),de(e,d),re&&re.m(e,null),de(n,h),L&&L.m(n,null),de(n,f),H.m(n,null),Pe(E,p,F),he&&he.m(E,F),Pe(E,m,F),g=!0,v||(y=Nt(i,"click",t[21]),v=!0)},p:function(E,F){var N=r;(r=M(E))===N?S[r].p(E,F):($t(),ce(S[N],1,1,function(){S[N]=null}),Bt(),(o=S[r])?o.p(E,F):(o=S[r]=C[r](E)).c(),Q(o,1),o.m(i,null)),G&&G.p&&(!g||16&F[1])&&Fs(G,$,E,E[35],g?Is($,E[35],F,xYe):Ns(E[35]),lle),E[17]?R&&(R.d(1),R=null):R||((R=_le()).c(),R.m(e,l)),U===(U=z(E))&&q?q.p(E,F):(q.d(1),(q=U(E))&&(q.c(),q.m(u,null))),65922&F[0]&&(_=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Fr(E[7]))&&!E[7].edit&&or(E[7].focusPath,E[1])),_?re?(re.p(E,F),65922&F[0]&&Q(re,1)):((re=xle(E)).c(),Q(re,1),re.m(e,null)):re&&($t(),ce(re,1,1,function(){re=null}),Bt()),!E[15]||E[12]&&E[15].isChildError?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),36864&F[0]&&Q(L,1)):((L=wle(E)).c(),Q(L,1),L.m(n,f)),Z===(Z=X(E))&&H?H.p(E,F):(H.d(1),(H=Z(E))&&(H.c(),H.m(n,null))),(!g||262144&F[0])&&P(n,"style",E[18]),E[12]?he?(he.p(E,F),4096&F[0]&&Q(he,1)):((he=Cle(E)).c(),Q(he,1),he.m(m.parentNode,m)):he&&($t(),ce(he,1,1,function(){he=null}),Bt())},i:function(E){g||(Q(o),Q(G,E),Q(re),Q(L),Q(he),g=!0)},o:function(E){ce(o),ce(G,E),ce(re),ce(L),ce(he),g=!1},d:function(E){E&&je(n),S[r].d(),G&&G.d(E),R&&R.d(),q.d(),re&&re.d(),L&&L.d(),H.d(),E&&je(p),he&&he.d(E),E&&je(m),v=!1,y()}}}function cle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function ule(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function dle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hle(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function SYe(t){var n,e;return n=new sr({props:{data:rp}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function DYe(t){var n,e;return n=new sr({props:{data:ru}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fle(t){var n;return{c:function(){(n=be("div")).textContent=":",P(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function TYe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=be("div")).textContent="{",e=it(),i=be("button"),r=tn(d),o=it(),s=tn(h),a=it(),(l=be("div")).textContent="}",P(n,"class","jse-bracket svelte-1wlxti1"),P(i,"type","button"),P(i,"class","jse-tag svelte-1wlxti1"),P(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),de(i,r),de(i,o),de(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=Nt(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&je(n),f&&je(e),f&&je(i),f&&je(a),f&&je(l),c=!1,u()}}}function EYe(t){var n;return{c:function(){(n=be("div")).textContent="{",P(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function ple(t){var n,e,i;return e=new cp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),ft(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(Q(e.$$.fragment,r),i=!0)},o:function(r){ce(e.$$.fragment,r),i=!1},d:function(r){r&&je(n),pt(e)}}}function mle(t){var n,e;return n=new _0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function AYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),P(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[30]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function MYe(t){var n,e,i;return{c:function(){P(n=be("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),P(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=Nt(n,"click",t[29]),e=!0)},p:Lt,d:function(r){r&&je(n),e=!1,i()}}}function gle(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Xs(t[7])),c=l&&vle(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=it(),p&&p.c(),P(n,"class","jse-props svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),de(n,e);for(var v=0;v]',s=it(),v&&v.c(),P(n,"class","jse-items svelte-1wlxti1"),P(o,"data-type","selectable-value"),P(o,"class","jse-footer svelte-1wlxti1"),P(r,"class","jse-footer-outer svelte-1wlxti1"),P(r,"style",t[18])},m:function(y,_){Pe(y,n,_),d&&d.m(n,null),de(n,e);for(var C=0;C=Le.start&&ne<=Le.end});if(!ie)return null;toe(ie.start,Math.min(p.length,ie.end),function(Le){return tt(String(Le))})}else Object.keys(p).forEach(tt);return xe}(S,l||wm);if(G("dragSelectionStart",{selection:S,items:N}),N){var Y=o0(S),V=N.findIndex(function(fe){return or(fe.path,Y)}),oe=f4({json:M.getJson(),documentState:M.getDocumentState(),deltaY:0,items:N}).offset;e(11,U={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:X(),selectionStartIndex:V,selectionItemsCount:Qoe(S).length,items:N,offset:oe,didMoveItems:!1}),aa.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",he)}else G("Cannot drag the current selection (probably spread over multiple sections)")}else $(E)}},function(E){aa.selecting||aa.dragging||(E.stopPropagation(),Pm(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):Pm(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):Pm(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(z))},function(E){E.stopPropagation(),z=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(cf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),M.onSelect(uf(m)))},function(E){M.onSelect(cf(m)),M.onContextMenu(E)},function(E){M.onSelect(uf(m)),M.onContextMenu(E)},$,h,f]}var p4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,BYe,$Ye,Ei,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},yYe,[-1,-1]),r}return Se(e)}(),VYe=p4,HYe={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"]},zYe={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"]},m4={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"]},UYe={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 GYe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function WYe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,_=n.onRedo,C=n.onSort,S=n.onTransform,M=n.onContextMenu,$=n.onCopy,G=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(z){"json"in z&&e(2,u=z.json),"selection"in z&&e(3,d=z.selection),"readOnly"in z&&e(4,h=z.readOnly),"showSearch"in z&&e(1,p=z.showSearch),"historyState"in z&&e(5,m=z.historyState),"onExpandAll"in z&&e(6,g=z.onExpandAll),"onCollapseAll"in z&&e(7,v=z.onCollapseAll),"onUndo"in z&&e(8,y=z.onUndo),"onRedo"in z&&e(9,_=z.onRedo),"onSort"in z&&e(10,C=z.onSort),"onTransform"in z&&e(11,S=z.onTransform),"onContextMenu"in z&&e(12,M=z.onContextMenu),"onCopy"in z&&e(13,$=z.onCopy),"onRenderMenu"in z&&e(14,G=z.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Fr(d)||xs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:HYe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!Ho(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:zYe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!Ho(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:sp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:$,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:S,disabled:h||void 0===u},l,{type:"button",icon:bse,title:xF,className:"jse-contextmenu",onClick:M},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:_,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=G(c)||c)},[o,p,u,d,h,m,g,v,y,_,C,S,M,$,G,s,a,l,c,r,i]}var qYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,WYe,GYe,Ei,{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}),r}return Se(e)}();function XYe(t){pi(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Mle(t){var n;return{c:function(){(n=be("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',P(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&je(n)}}}function YYe(t){var n,e,i,r,o,s,a,l=!t[0]&&Mle();return{c:function(){n=be("div"),e=be("div"),i=it(),r=be("div"),o=tn("Empty document\n "),l&&l.c(),s=it(),a=be("div"),P(e,"class","jse-space jse-before svelte-1q2qkk2"),P(r,"class","jse-contents svelte-1q2qkk2"),P(a,"class","jse-space jse-after svelte-1q2qkk2"),P(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),de(n,e),de(n,i),de(n,r),de(r,o),l&&l.m(r,null),de(n,s),de(n,a)},p:function(c,u){Un(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Mle()).c(),l.m(r,null))},i:Lt,o:Lt,d:function(c){c&&je(n),l&&l.d()}}}function JYe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var KYe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,JYe,YYe,Ei,{readOnly:0},XYe),r}return Se(e)}(),g4={},QYe={get exports(){return g4},set exports(t){g4=t}},Ile=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(oo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function eJe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function tJe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:ln(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Io(t))return function ZYe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*v4(u,d)});for(var s=[],a=0;aQb&&jle();return{c:function(){n=be("div");for(var d=0;dQb?u?u.p(d,f):((u=jle()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:Lt,o:Lt,d:function(d){d&&je(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return fO(0,v.length).map(String);if(Io(v)){var y=Object.keys(v).slice(0);return y.sort(v4),y}return[]},function(g){return Xc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Vi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Vi[g?"unshift":"push"](function(){e(4,o=g)})}]}var yJe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,vJe,gJe,Ei,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},fJe),r}return Se(e)}();function bJe(t){pi(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function Ule(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",L=!t[4]&&Gle(t),X=[xJe,_Je],Z=[];function H(E,F){return E[2]?0:1}a=H(t),l=Z[a]=X[a](t),y=new sr({props:{data:DWe}}),S=new sr({props:{data:bWe}}),G=new sr({props:{data:p0}});var he=t[0]&&!t[4]&&Wle(t);return{c:function(){n=be("div"),e=be("form"),L&&L.c(),i=it(),r=be("div"),o=be("div"),s=be("div"),l.c(),c=it(),u=be("label"),d=be("input"),h=it(),f=be("div"),p=tn(re),m=tn(t[10]),g=it(),v=be("button"),mt(y.$$.fragment),_=it(),C=be("button"),mt(S.$$.fragment),M=it(),$=be("button"),mt(G.$$.fragment),R=it(),he&&he.c(),P(s,"class","jse-search-icon svelte-3lbrbf"),P(d,"class","jse-search-input svelte-3lbrbf"),P(d,"title","Enter text to search"),P(d,"type","text"),P(d,"placeholder","Find"),P(u,"class","jse-search-input-label svelte-3lbrbf"),P(u,"about","jse-search input"),P(f,"class","jse-search-count svelte-3lbrbf"),Mt(f,"jse-visible",""!==t[8]),P(v,"type","button"),P(v,"class","jse-search-next svelte-3lbrbf"),P(v,"title","Go to next search result (Enter)"),P(C,"type","button"),P(C,"class","jse-search-previous svelte-3lbrbf"),P(C,"title","Go to previous search result (Shift+Enter)"),P($,"type","button"),P($,"class","jse-search-clear svelte-3lbrbf"),P($,"title","Close search box (Esc)"),P(o,"class","jse-search-section svelte-3lbrbf"),P(r,"class","jse-search-contents svelte-3lbrbf"),P(e,"class","jse-search-form svelte-3lbrbf"),P(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,F){Pe(E,n,F),de(n,e),L&&L.m(e,null),de(e,i),de(e,r),de(r,o),de(o,s),Z[a].m(s,null),de(o,c),de(o,u),de(u,d),Hf(d,t[8]),de(o,h),de(o,f),de(f,p),de(f,m),de(o,g),de(o,v),ft(y,v,null),de(o,_),de(o,C),ft(S,C,null),de(o,M),de(o,$),ft(G,$,null),de(r,R),he&&he.m(r,null),z=!0,U||(q=[Nt(d,"input",t[21]),_a(CJe.call(null,d)),Nt(v,"click",t[22]),Nt(C,"click",t[23]),Nt($,"click",t[24]),Nt(e,"submit",t[12]),Nt(e,"keydown",t[13])],U=!0)},p:function(E,F){E[4]?L&&($t(),ce(L,1,1,function(){L=null}),Bt()):L?(L.p(E,F),16&F&&Q(L,1)):((L=Gle(E)).c(),Q(L,1),L.m(e,i));var N=a;(a=H(E))===N?Z[a].p(E,F):($t(),ce(Z[N],1,1,function(){Z[N]=null}),Bt(),(l=Z[a])?l.p(E,F):(l=Z[a]=X[a](E)).c(),Q(l,1),l.m(s,null)),256&F&&d.value!==E[8]&&Hf(d,E[8]),(!z||8&F)&&re!==(re=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,re),(!z||1024&F)&&qn(m,E[10]),(!z||256&F)&&Mt(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?he?he.p(E,F):((he=Wle(E)).c(),he.m(r,null)):he&&(he.d(1),he=null)},i:function(E){z||(Q(L),Q(l),Q(y.$$.fragment,E),Q(S.$$.fragment,E),Q(G.$$.fragment,E),z=!0)},o:function(E){ce(L),ce(l),ce(y.$$.fragment,E),ce(S.$$.fragment,E),ce(G.$$.fragment,E),z=!1},d:function(E){E&&je(n),L&&L.d(),Z[a].d(),pt(y),pt(S),pt(G),he&&he.d(),U=!1,ho(q)}}}function Gle(t){var n,e,i,r,o;return e=new sr({props:{data:t[0]?ru:rp}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-replace-toggle svelte-3lbrbf"),P(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=Nt(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?ru:rp),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function _Je(t){var n,e;return n=new sr({props:{data:KO}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function xJe(t){var n,e;return n=new sr({props:{data:gWe,spin:!0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:Lt,i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wle(t){var n,e,i,r,o,s,a,l;return{c:function(){n=be("div"),e=be("input"),i=it(),(r=be("button")).textContent="Replace",o=it(),(s=be("button")).textContent="All",P(e,"class","jse-replace-input svelte-3lbrbf"),P(e,"title","Enter replacement text"),P(e,"type","text"),P(e,"placeholder","Replace"),P(r,"type","button"),P(r,"title","Replace current occurrence (Ctrl+Enter)"),P(r,"class","svelte-3lbrbf"),P(s,"type","button"),P(s,"title","Replace all occurrences"),P(s,"class","svelte-3lbrbf"),P(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),de(n,e),Hf(e,t[9]),de(n,i),de(n,r),de(n,o),de(n,s),a||(l=[Nt(e,"input",t[25]),Nt(r,"click",t[14]),Nt(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&Hf(e,c[9])},d:function(c){c&&je(n),a=!1,ho(l)}}}function wJe(t){var n,e,i=t[1]&&Ule(t);return{c:function(){i&&i.c(),n=_r()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=Un(o,1)[0];r[1]?i?(i.p(r,s),2&s&&Q(i,1)):((i=Ule(r)).c(),Q(i,1),i.m(n.parentNode,n)):i&&($t(),ce(i,1,1,function(){i=null}),Bt())},i:function(r){e||(Q(i),e=!0)},o:function(r){ce(i),e=!1},d:function(r){i&&i.d(r),r&&je(n)}}}function CJe(t){t.select()}function kJe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?go:g,y=n.onPrevious,_=void 0===y?go:y,C=n.onNext,S=void 0===C?go:C,M=n.onReplace,$=void 0===M?go:M,G=n.onReplaceAll,R=void 0===G?go:G,z=n.onClose,U=void 0===z?go:z,q="",re="",L="";function X(){e(0,f=!f&&!m)}function Z(){m||$(q,L)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,_=H.onPrevious),"onNext"in H&&e(6,S=H.onNext),"onReplace"in H&&e(18,$=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,U=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Gv(v,300)),1048832&t.$$.dirty&&r(q),2&t.$$.dirty&&s&&""!==q&&v(q)},[f,s,a,d,m,_,S,U,q,L,i,X,function(H){H.preventDefault(),q!==re?(re=q,r.cancel(),v(q)):S()},function(H){H.stopPropagation();var he=tp(H);"Enter"===he&&(H.preventDefault(),S()),"Shift+Enter"===he&&(H.preventDefault(),_()),"Ctrl+Enter"===he&&(H.preventDefault(),f?Z():S()),"Ctrl+H"===he&&(H.preventDefault(),X()),"Escape"===he&&(H.preventDefault(),U())},Z,function(){m||R(q,L)},c,v,$,R,r,function(){e(8,q=this.value)},function(){return S()},function(){return _()},function(){return U()},function(){e(9,L=this.value)}]}var SJe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,kJe,wJe,Ei,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},bJe),r}return Se(e)}(),qle=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function DJe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',P(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function HJe(t){var n,e,i,r,o,s,a,l,c,u=[UJe,zJe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-qojdc1"),P(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),de(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Nt(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[76](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function zJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new SJe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new VYe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:go}});var m=t[18]&&rce(t),g=t[23]&&oce(t);return f=new l4({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=be("div"),mt(s.$$.fragment),a=it(),l=be("div"),mt(c.$$.fragment),u=it(),m&&m.c(),d=it(),g&&g.c(),h=it(),mt(f.$$.fragment),P(o,"class","jse-search-box-container svelte-qojdc1"),P(l,"class","jse-contents svelte-qojdc1"),P(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),ft(s,o,null),Pe(v,a,y),Pe(v,l,y),ft(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),ft(f,v,y),p=!0},p:function(v,y){var _,C,S,M,$={};524288&y[0]&&($.show=v[19]),131072&y[0]&&($.resultCount=(null===(_=v[17])||void 0===_||null===(C=_.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&($.activeIndex=(null===(S=v[17])||void 0===S?void 0:S.activeIndex)||0),1048576&y[0]&&($.showReplace=v[20]),2097152&y[0]&&($.searching=v[21]),1&y[0]&&($.readOnly=v[0]),s.$set($);var G={};1024&y[0]&&(G.value=v[10]),65536&y[0]&&(G.expandedMap=v[16].expandedMap),65536&y[0]&&(G.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(G.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(G.validationErrorsMap=v[24]),131072&y[0]&&(G.searchResultItemsMap=null===(M=v[17])||void 0===M?void 0:M.itemsMap),65536&y[0]&&(G.selection=v[16].selection),8192&y[0]&&(G.context=v[13]),c.$set(G),v[18]?m?(m.p(v,y),262144&y[0]&&Q(m,1)):((m=rce(v)).c(),Q(m,1),m.m(d.parentNode,d)):m&&($t(),ce(m,1,1,function(){m=null}),Bt()),v[23]?g?(g.p(v,y),8388608&y[0]&&Q(g,1)):((g=oce(v)).c(),Q(g,1),g.m(h.parentNode,h)):g&&($t(),ce(g,1,1,function(){g=null}),Bt());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(m),Q(g),Q(f.$$.fragment,v),p=!0)},o:function(v){ce(s.$$.fragment,v),ce(c.$$.fragment,v),ce(m),ce(g),ce(f.$$.fragment,v),p=!1},d:function(v){v&&je(o),pt(s),v&&je(a),v&&je(l),pt(c),t[77](null),v&&je(u),m&&m.d(v),v&&je(d),g&&g.d(v),v&&je(h),pt(f,v)}}}function UJe(t){var n,e,i,r,o=[WJe,GJe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=_r()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):($t(),ce(s[u],1,1,function(){s[u]=null}),Bt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),Q(e,1),e.m(i.parentNode,i))},i:function(l){r||(Q(e),r=!0)},o:function(l){ce(e),r=!1},d:function(l){s[n].d(l),l&&je(i)}}}function rce(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:zk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function oce(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:Wb,text:"Ok",onClick:t[8]},{icon:op,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:Wb,text:"Ok",onClick:i[8]},{icon:op,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function GJe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[47]}]}}),i=new tce({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function WJe(t){var n,e;return n=new KYe({props:{readOnly:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function qJe(t){var n,e,i,r,o,s,a,l,c=t[1]&&nce(t),u=t[2]&&ice(t),h=[];return o=h[r=t[25]?1:0]=[HJe,VJe][r](t),{c:function(){n=be("div"),c&&c.c(),e=it(),u&&u.c(),i=it(),o.c(),P(n,"class","jse-tree-mode svelte-qojdc1"),Mt(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),de(n,e),u&&u.m(n,null),de(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Nt($Je,"mousedown",t[49]),Nt(n,"keydown",t[41]),Nt(n,"mousedown",t[42]),Nt(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&Q(c,1)):((c=nce(f)).c(),Q(c,1),c.m(n,e)):c&&($t(),ce(c,1,1,function(){c=null}),Bt()),f[2]?u?(u.p(f,p),4&p[0]&&Q(u,1)):((u=ice(f)).c(),Q(u,1),u.m(n,i)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),o.p(f,p),(!s||2&p[0])&&Mt(n,"no-main-menu",!f[1])},i:function(f){s||(Q(c),Q(u),Q(o),s=!0)},o:function(f){ce(c),ce(u),ce(o),s=!1},d:function(f){f&&je(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,ho(l)}}}function XJe(t,n,e){var i,r=wa("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xa("simple-modal").open,h=ep(),f=ep(),p=xa("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=hae(),_=n.readOnly,C=n.externalContent,S=n.mainMenuBar,M=n.navigationBar,$=n.escapeControlCharacters,G=n.escapeUnicodeCharacters,R=n.parser,z=n.parseMemoizeOne,U=n.validator,q=n.validationParser,re=n.pathParser,L=n.indentation,X=n.onError,Z=n.onChange,H=n.onChangeMode,he=n.onRenderValue,E=n.onRenderMenu,F=n.onClassName,N=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal,Fe=!1;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(l)},hasFocus:function(){return Fe&&document.hasFocus()||jk(l)},onFocus:function(){v=!0,N&&N()},onBlur:function(){v=!1,Y&&Y()}});var xe=void 0;function tt(Ce){r("updateSelection",Ce);var lt="function"==typeof Ce?Ce(ie.selection):Ce;or(lt,ie.selection)||e(16,ie=Ze(Ze({},ie),{},{selection:lt}))}var ze,ot,B,ne=!1,ie=Lk(),Ie=!1,Ye=!1,Le=!1,_t="";function At(Ce){return _n.apply(this,arguments)}function _n(){return(_n=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return r("search text updated",lt),e(74,_t=lt),It.next=4,Xl();case 4:return It.next=6,Nr();case 6:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function ci(){return(ci=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?GGe(ze):void 0),lt.next=3,Nr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function on(){return(on=Zi(vn().mark(function Ce(){return vn().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return e(17,ze=ze?WGe(ze):void 0),lt.next=3,Nr();case 3:case"end":return lt.stop()}},Ce)}))).apply(this,arguments)}function Fi(){return(Fi=Zi(vn().mark(function Ce(lt,It){var Jt,nn,an,li;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:if(nn=null===(Jt=ze)||void 0===Jt?void 0:Jt.activeItem,r("handleReplace",{replacementText:It,activeItem:nn}),nn){fi.next=4;break}return fi.abrupt("return");case 4:return an=qGe(c,ie,It,nn,R),li=an.newSelection,Yn(an.operations,function(Lo,Ls){return{state:Ze(Ze({},Ls),{},{selection:li})}}),fi.next=8,Xl();case 8:return fi.next=10,Nr();case 10:case"end":return fi.stop()}},Ce)}))).apply(this,arguments)}function pn(){return(pn=Zi(vn().mark(function Ce(lt,It){var Jt,an;return vn().wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:return r("handleReplaceAll",{text:lt,replacementText:It}),Jt=XGe(c,ie,lt,It,R),an=Jt.newSelection,Yn(Jt.operations,function(li,fi){return{state:Ze(Ze({},fi),{},{selection:an})}}),Vn.next=5,Xl();case 5:return Vn.next=7,Nr();case 7:case"end":return Vn.stop()}},Ce)}))).apply(this,arguments)}function Nr(){return $r.apply(this,arguments)}function $r(){return($r=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(It=null===(lt=ze)||void 0===lt?void 0:lt.activeItem,r("focusActiveSearchResult",ze),!It){nn.next=9;break}return e(16,ie=Ze(Ze({},PO(c,ie,Jt=It.path)),{},{selection:void 0})),nn.next=7,Xl();case 7:return nn.next=9,hn(Jt);case 9:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}var Ai,Wr,wr=fae({onChange:function(Ce){e(22,Or=Ce)}}),Or=wr.getState(),jo=gO(function(Ce,lt){if(""===Ce)return r("clearing search result"),void(void 0!==ze&&e(17,ze=void 0));e(21,Le=!0),setTimeout(function(){r("searching...",Ce);var nn,an,Vn,li,fi,Lo,Ls,It=ase(Ce,lt,1e3);e(17,(nn=It,Vn=null!=(an=ze)&&an.activeItem?use(an.activeItem):void 0,li=nn.findIndex(function(Zo){return or(Vn,use(Zo))}),fi=-1!==li?li:void 0!==an?.activeIndex&&an?.activeIndex0?0:-1,Ls=(Lo=nn.map(function(Zo,wo){return Ze(Ze({},Zo),{},{active:wo===fi})}))[fi],ze={items:Lo,itemsMap:qv(Lo,function(Zo){return ln(Zo.path)}),activeItem:Ls,activeIndex:fi})),e(21,Le=!1)})},300),Nn=!1,xt=[],ui=Zb(pae);function Ni(Ce,lt,It,Jt){g0(function(){var nn;try{nn=ui(Ce,lt,It,Jt)}catch(an){nn=[{path:[],message:"Failed to validate: "+an.message,severity:Xd.warning}]}or(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),xe?{parseError:xe,isRepairable:!1}:(Ni(c,U,R,q),Hi(xt)?null:{validationErrors:xt})}function xo(){return c}function Qo(){return ie}function On(Ce){ne||(ne=!0,e(16,ie=nu(Ce,ie,[],coe({json:Ce},10240)?sh:Hb)))}function ai(Ce){void 0!==ie.selection&&(ie.selection&&Xc(Ce,ie.selection.anchorPath)&&Xc(Ce,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Ze(Ze({},ie),{},{selection:s0(Ce,ie)}))))}function bi(Ce){var lt=Ce.previousJson,It=Ce.previousState,Jt=Ce.previousText,nn=Ce.previousTextIsRepaired;void 0===lt&&void 0===Jt||(void 0!==c?wr.add(void 0!==lt?{undo:{patch:[{op:"replace",path:"",value:lt}],state:ul(It),json:void 0,text:Jt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ul(ie),json:void 0,text:u,textIsRepaired:Nn}}:{undo:{patch:void 0,json:void 0,text:Jt,state:ul(It),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ul(ie),text:u,textIsRepaired:Nn}}):void 0!==lt&&wr.add({undo:{patch:void 0,json:lt,state:ul(It),text:Jt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Nn,state:ul(ie)}}))}function Er(Ce,lt){if(r("patch",Ce,lt),void 0===c)throw new Error("Cannot apply patch: no JSON");var It={json:c,text:u},Jt=c,nn=ie,an=u,Vn=Nn,li=ose(c,Ce),fi=$oe(c,ie,Ce),Lo=a0(c,Ce),Ls=function(wh,bd){return void 0!==bd||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ze(Ze({},wh),{},{selection:bd}):wh}(fi.documentState,Lo,!1);r("patch updatedSelection",Lo);var Zo="function"==typeof lt?lt(fi.json,Ls):void 0;e(10,c=Zo&&void 0!==Zo.json?Zo.json:fi.json);var wo=Zo&&void 0!==Zo.state?Zo.state:Ls;e(16,ie=wo),e(11,u=void 0),e(23,Nn=!1),e(18,B=void 0),ai(c),wr.add({undo:{patch:li,json:void 0,text:an,state:ul(nn),textIsRepaired:Vn},redo:{patch:Ce,json:void 0,state:ul(wo),text:u,textIsRepaired:Nn}});var $l={json:c,previousJson:Jt,undo:li,redo:Ce};return ei(It,$l),$l}function qr(){!_&&ie.selection&&tt(iu(ie.selection.focusPath,!0))}function ao(){if(!_&&ie.selection){var Ce=ie.selection.focusPath,lt=Sn(c,Ce);Ho(lt)?(r("openJSONEditorModal",{path:It=Ce,value:Jt=lt}),Fe=!0,fe({content:{json:Jt},path:It,onPatch:Wr.onPatch,onClose:function(){Fe=!1,Ps()}})):tt(mr(Ce,!0))}var It,Jt}function Js(){if(!_&&Yi(ie.selection)){var Ce=ie.selection.focusPath,lt=ln(Ce),It=Sn(c,Ce),Jt=!lf(It,ie.enforceStringMap,lt,R),nn=Jt?String(It):Fv(String(It),R);r("handleToggleEnforceString",{enforceString:Jt,value:It,updatedValue:nn}),Yn([{op:"replace",path:lt,value:nn}],function(an,Vn){return{state:Roe(Vn,lt,Jt)}})}}function vr(){return Ks.apply(this,arguments)}function Ks(){return Ks=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return lt=!(It.length>0&&void 0!==It[0])||It[0],Jt.next=3,Jle({json:c,documentState:ie,indentation:lt?L:void 0,readOnly:_,parser:R,onPatch:Yn});case 3:case"end":return Jt.stop()}},Ce)})),Ks.apply(this,arguments)}function qa(){return Xa.apply(this,arguments)}function Xa(){return Xa=Zi(vn().mark(function Ce(){var lt,It=arguments;return vn().wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(lt=!(It.length>0&&void 0!==It[0])||It[0],void 0!==c){Jt.next=3;break}return Jt.abrupt("return");case 3:return Jt.next=5,Kle({json:c,documentState:ie,indentation:lt?L:void 0,parser:R});case 5:case"end":return Jt.stop()}},Ce)})),Xa.apply(this,arguments)}function Ic(){d(kae,{},Ze(Ze({},Cm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ps()}})}function we(Ce,lt){d(jae,{text:Ce,onParse:Ik,onRepair:soe,onApply:lt},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ps()}})}function He(){Zle({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:_,onChange:Z,onPatch:Yn})}function qe(){!_&&void 0!==c&&ie.selection&&c0(ie.selection)&&!Hi(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Yn(nse(c,Qoe(ie.selection))))}function ut(){_||!ie.selection||!Fr(ie.selection)&&!Yi(ie.selection)||Hi(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Yn(function(lt,It){if(Yi(It))return[{op:"move",from:ln(It.focusPath),path:""}];if(!Fr(It))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Jt=Sn(lt,Xi(It.focusPath));if(oo(Jt))return[{op:"replace",path:"",value:It.paths.map(function(an){var Vn=Ws(Ln(an));return Jt[Vn]})}];if(Mo(Jt)){var nn={};return It.paths.forEach(function(an){var Vn=String(Ln(an));nn[Vn]=Jt[Vn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(It))}(c,ie.selection),function(lt,It){if(Ho(lt))return{state:np(lt,It,[])}}))}function Ue(Ce){void 0!==c&&rS({insertType:Ce,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br})}function Dn(Ce){xs(ie.selection)&&tt(mr(ie.selection.focusPath,!1)),Ue(Ce)}function ii(Ce){if(!_&&ie.selection)if(Lm(ie.selection))try{var lt=ie.selection.anchorPath,It=Sn(c,lt),Jt=function(an,Vn,li){if("array"===Vn){if(Array.isArray(an))return an;if(Io(an))return ioe(an);if("string"==typeof an)try{var fi=li.parse(an);if(Array.isArray(fi))return fi;if(Io(fi))return ioe(fi)}catch{return[an]}return[an]}if("object"===Vn){if(Array.isArray(an))return noe(an);if(Io(an))return an;if("string"==typeof an)try{var Lo=li.parse(an);if(Io(Lo))return Lo;if(Array.isArray(Lo))return noe(Lo)}catch{return{value:an}}return{value:an}}if("value"===Vn)return Ho(an)?li.stringify(an):an;throw new Error("Cannot convert ".concat(VF(an,li)," to ").concat(Vn))}(It,Ce,R);if(Jt===It)return;var nn=[{op:"replace",path:ln(lt),value:Jt}];r("handleConvert",{selection:ie.selection,path:lt,type:Ce,operations:nn}),Yn(nn,function(an,Vn){return{state:np(an,Vn,ie.selection.focusPath)}})}catch(an){X(an)}else X(new Error("Cannot convert current selection to ".concat(Ce)))}function hi(){var Ce=qoe(c,ie,!1),lt=Xi(ie.selection.focusPath);!Hi(Ce.focusPath)&&or(lt,Xi(Ce.focusPath))?tt(uf(Ce.focusPath)):tt(cf(lt)),r("insert before",{selection:ie.selection,selectionBefore:Ce,parentPath:lt}),Xl().then(Rl)}function di(){var Ce=Fr(ie.selection)?Ln(ie.selection.paths):ie.selection.focusPath;r("insert after",Ce),tt(uf(Ce)),Xl().then(Rl)}function kr(Ce){return Qr.apply(this,arguments)}function Qr(){return(Qr=Zi(vn().mark(function Ce(lt){return vn().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,ece({char:lt,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onReplaceJson:br,onSelect:tt});case 2:case"end":return It.stop()}},Ce)}))).apply(this,arguments)}function gi(){if(!_&&wr.getState().canUndo){var Ce=wr.undo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.undo.patch?Yu(c,Ce.undo.patch):Ce.undo.json),e(16,ie=Ce.undo.state),e(11,u=Ce.undo.text),e(23,Nn=Ce.undo.textIsRepaired),r("undo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.undo.patch,undo:Ce.redo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function yr(){if(!_&&wr.getState().canRedo){var Ce=wr.redo();if(Ce){var lt={json:c,text:u};e(10,c=Ce.redo.patch?Yu(c,Ce.redo.patch):Ce.redo.json),e(16,ie=Ce.redo.state),e(11,u=Ce.redo.text),e(23,Nn=Ce.redo.textIsRepaired),r("redo",{item:Ce,json:c,documentState:ie}),ei(lt,{json:c,previousJson:lt.json,redo:Ce.redo.patch,undo:Ce.undo.patch}),Ps(),ie.selection&&hn(ie.selection.focusPath,!1)}}}function Ee(Ce){var lt;_||void 0===c||(Fe=!0,V({id:h,json:c,rootPath:Ce,onSort:(lt=Zi(vn().mark(function It(Jt){var nn;return vn().wrap(function(an){for(;;)switch(an.prev=an.next){case 0:r("onSort",Ce,nn=Jt.operations),Yn(nn,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,Ce)),{},{selection:mr(Ce,!1)})}});case 3:case"end":return an.stop()}},It)})),function(It){return lt.apply(this,arguments)}),onClose:function(){Fe=!1,Ps()}}))}function St(){ie.selection&&Ee(Joe(c,ie.selection))}function Ht(Ce){var It=Ce.rootPath,Jt=Ce.onTransform,nn=Ce.onClose;void 0!==c&&It&&(Fe=!0,oe({id:Ce.id||f,json:c,rootPath:It,onTransform:Jt?function(an){Jt({operations:an,json:c,transformedJson:Yu(c,an)})}:function(an){r("onTransform",It,an),Yn(an,function(Vn,li){return{state:Ze(Ze({},np(Vn,li,It)),{},{selection:mr(It,!1)})}})},onClose:function(){Fe=!1,Ps(),nn&&nn()}}))}function sn(){ie.selection&&Ht({rootPath:Joe(c,ie.selection)})}function hn(Ce){return ri.apply(this,arguments)}function ri(){return ri=Zi(vn().mark(function Ce(lt){var It,Jt,nn,an,li=arguments;return vn().wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return It=!(li.length>1&&void 0!==li[1])||li[1],e(16,ie=PO(c,ie,Xi(lt))),fi.next=4,Xl();case 4:if(!(Jt=Oi(lt))){fi.next=14;break}if(r("scrollTo",{path:lt,elem:Jt,refContents:s}),nn=s.getBoundingClientRect(),an=Jt.getBoundingClientRect(),It){fi.next=12;break}if(!(an.bottom>nn.top&&an.topIt.bottom-20&&y(lt,{container:s,offset:-(It.height-nn-20),duration:0})}}function ei(Ce,lt){(void 0!==Ce.json||void 0!==Ce?.text)&&(void 0!==u?Z({text:u,json:void 0},Ce,{contentErrors:Cr(),patchResult:lt}):void 0!==c&&Z({text:void 0,json:c},Ce,{contentErrors:Cr(),patchResult:lt}))}function Yn(Ce,lt){if(!_)return r("handlePatch",Ce,lt),Er(Ce,lt)}function br(Ce,lt){var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Nn,li=nu(c,ie,[],sh),fi="function"==typeof lt?lt(Ce,li):void 0;e(10,c=fi&&void 0!==fi.json?fi.json:Ce),e(16,ie=fi&&void 0!==fi.state?fi.state:li),e(11,u=void 0),e(23,Nn=!1),ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Ar(Ce,lt){r("handleChangeText");var It=ie,Jt=c,nn=u,an={json:c,text:u},Vn=Nn;try{e(10,c=z(Ce)),e(16,ie=nu(c,ie,[],sh)),e(11,u=void 0),e(23,Nn=!1)}catch{try{e(10,c=z(Yd(Ce))),e(16,ie=nu(c,ie,[],sh)),e(11,u=Ce),e(23,Nn=!0)}catch{e(10,c=void 0),e(16,ie=Lk({json:c,expand:sh})),e(11,u=Ce),e(23,Nn=!1)}}if("function"==typeof lt){var li=lt(c,ie);e(10,c=li&&li.json?li.json:c),e(16,ie=li&&li.state?li.state:ie)}ai(c),bi({previousJson:Jt,previousState:It,previousText:nn,previousTextIsRepaired:Vn}),ei(an,null)}function Po(Ce,lt){var It=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:Ce,expanded:lt,recursive:It}),e(16,ie=lt?It?nu(c,ie,Ce,Hb):function PGe(t,n){return Ze(Ze({},t),{},{expandedMap:Ze(Ze({},t.expandedMap),{},ql({},ln(n),!0))})}(ie,Ce):Loe(ie,Ce)),ie.selection&&!lt&&function RGe(t,n){return l0(t.focusPath,n)&&(t.focusPath.length>n.length||Xs(t))}(ie.selection,Ce)&&tt(void 0),setTimeout(function(){jk(l)||Ps()})}function ca(Ce){r("openFind",{findAndReplace:Ce}),e(19,Ie=!1),e(20,Ye=!1),Xl().then(function(){e(19,Ie=!0),e(20,Ye=Ce)})}function md(Ce,lt){r("handleExpandSection",Ce,lt);var nn,an,Vn,It=ln(Ce);e(16,(an=It,Vn=lt,ie=Ze(Ze({},nn=ie),{},{visibleSectionsMap:Ze(Ze({},nn.visibleSectionsMap),{},ql({},an,Poe(Rk(nn,an).concat(Vn))))})))}function hu(Ce){r("pasted json as text",Ce),e(18,B=Ce)}function ua(Ce){Fe=!0;var Lo=m(XXe,{json:c,documentState:ie,parser:R,showTip:Ce.showTip,onEditKey:qr,onEditValue:ao,onToggleEnforceString:Js,onCut:vr,onCopy:qa,onPaste:Ic,onRemove:He,onDuplicate:qe,onExtract:ut,onInsertBefore:hi,onInsert:Dn,onConvert:ii,onInsertAfter:di,onSort:St,onTransform:sn,onCloseContextMenu:function(){g(Lo),Ps()}},{left:Ce.left,top:Ce.top,offsetTop:Ce.offsetTop,offsetLeft:Ce.offsetLeft,width:Ce.width,height:Ce.height,anchor:Ce.anchor,closeOnOuterClick:!0,onClose:function(){Fe=!1,Ps()}})}function Rl(Ce){if(!_&&!ip(ie.selection)){if(Ce&&(Ce.stopPropagation(),Ce.preventDefault()),Ce&&"contextmenu"===Ce.type&&Ce.target!==a)ua({left:Ce.clientX,top:Ce.clientY,width:260,height:336,showTip:!1});else{var lt,It=null===(lt=s)||void 0===lt?void 0:lt.querySelector(".jse-context-menu-pointer.jse-selected");if(It)ua({anchor:It,offsetTop:2,width:260,height:336,showTip:!1});else{var Jt,nn=null===(Jt=s)||void 0===Jt?void 0:Jt.getBoundingClientRect();nn&&ua({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Zi(vn().mark(function Ce(){var lt,It,Jt;return vn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),It=(lt=B).path,Jt=lt.contents,tt(mr(It,!1)),nn.next=5,Xl();case 5:Yn([{op:"replace",path:ln(It),value:Jt}],function(an,Vn){return{state:np(an,Vn,It)}});case 7:case"end":return nn.stop()}},Ce)}))).apply(this,arguments)}function Ps(){r("focus"),a&&(a.focus(),a.select())}function vd(Ce){return lt=c,It=ie,nn=Xi(Jt=Ce),an=[Ln(Jt)],(li=(Vn=Sn(lt,nn))?HO(Vn,It,an):void 0)?mr(nn.concat(li),!1):uf(Jt);var lt,It,Jt,nn,an,Vn,li}function yd(Ce){i&&i.onDrag(Ce)}function eT(){i&&i.onDragEnd()}return t.$$set=function(Ce){"readOnly"in Ce&&e(0,_=Ce.readOnly),"externalContent"in Ce&&e(50,C=Ce.externalContent),"mainMenuBar"in Ce&&e(1,S=Ce.mainMenuBar),"navigationBar"in Ce&&e(2,M=Ce.navigationBar),"escapeControlCharacters"in Ce&&e(51,$=Ce.escapeControlCharacters),"escapeUnicodeCharacters"in Ce&&e(52,G=Ce.escapeUnicodeCharacters),"parser"in Ce&&e(3,R=Ce.parser),"parseMemoizeOne"in Ce&&e(53,z=Ce.parseMemoizeOne),"validator"in Ce&&e(54,U=Ce.validator),"validationParser"in Ce&&e(55,q=Ce.validationParser),"pathParser"in Ce&&e(4,re=Ce.pathParser),"indentation"in Ce&&e(5,L=Ce.indentation),"onError"in Ce&&e(6,X=Ce.onError),"onChange"in Ce&&e(56,Z=Ce.onChange),"onChangeMode"in Ce&&e(57,H=Ce.onChangeMode),"onRenderValue"in Ce&&e(58,he=Ce.onRenderValue),"onRenderMenu"in Ce&&e(7,E=Ce.onRenderMenu),"onClassName"in Ce&&e(59,F=Ce.onClassName),"onFocus"in Ce&&e(60,N=Ce.onFocus),"onBlur"in Ce&&e(61,Y=Ce.onBlur),"onSortModal"in Ce&&e(62,V=Ce.onSortModal),"onTransformModal"in Ce&&e(63,oe=Ce.onTransformModal),"onJSONEditorModal"in Ce&&e(64,fe=Ce.onJSONEditorModal)},t.$$.update=function(){var Ce,lt;3145728&t.$$.dirty[1]&&e(73,ot=TO({escapeControlCharacters:$,escapeUnicodeCharacters:G})),524288&t.$$.dirty[1]&&function gt(Ce){void 0!==Ce.json&&function(lt){if(void 0!==lt){var It=!or(c,lt);if(r("update external json",{isChanged:It,currentlyText:void 0===c}),It){var Jt={json:c,text:u},nn=ie,an=c,Vn=u,li=Nn;e(10,c=lt),On(c),e(11,u=void 0),e(23,Nn=!1),ai(c),bi({previousJson:an,previousState:nn,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.json),void 0!==Ce.text&&function(lt){if(void 0!==lt&&void 0===C.json){var It=lt!==u;if(r("update external text",{isChanged:It}),It){var Jt={json:c,text:u},nn=c,an=ie,Vn=u,li=Nn;try{e(10,c=z(lt)),On(c),e(11,u=lt),e(23,Nn=!1),xe=void 0}catch(fi){try{e(10,c=z(Yd(lt))),On(c),e(11,u=lt),e(23,Nn=!0),xe=void 0,ai(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Nn=!1),xe=Fk(u,fi.message||fi.toString())}}ai(c),bi({previousJson:nn,previousState:an,previousText:Vn,previousTextIsRepaired:li}),ei(Jt,null)}}}(Ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&jo(_t,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Ni(c,U,R,q),4096&t.$$.dirty[0]&&e(24,(lt={},(Ce=xt).forEach(function(It){lt[ln(It.path)]=It}),Ce.forEach(function(It){for(var Jt=It.path;Jt.length>0;){var nn=ln(Jt=Xi(Jt));nn in lt||(lt[nn]={isChildError:!0,path:Jt,message:"Contains invalid data",severity:Xd.warning})}}),Ai=lt)),512&t.$$.dirty[0]&&(i=s?function(Ce){var lt,It;function Jt(li){return li<20?200:li<50?400:1200}function nn(){Ce&&(Ce.scrollTop+=.05*(lt||0))}function an(li){It&&li===lt||(Vn(),s4("startAutoScroll",li),lt=li,It=setInterval(nn,50))}function Vn(){It&&(s4("stopAutoScroll"),clearInterval(It),It=void 0,lt=void 0)}return s4("createAutoScrollHandler",Ce),{onDrag:function(li){if(Ce){var fi=li.clientY,Lo=Ce.getBoundingClientRect(),Ls=Lo.top,Zo=Lo.bottom;fiZo?an(Jt(fi-Zo)):Vn()}},onDragEnd:function(){Vn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Wr={readOnly:_,parser:R,normalization:ot,getJson:xo,getDocumentState:Qo,findElement:Oi,findNextInside:vd,focus:Ps,onPatch:Yn,onInsert:Ue,onExpand:Po,onSelect:tt,onFind:ca,onExpandSection:md,onPasteJson:hu,onRenderValue:he,onContextMenu:ua,onClassName:F||function(){},onDrag:yd,onDragEnd:eT}),8192&t.$$.dirty[0]&&r("context changed",Wr)},[_,S,M,R,re,L,X,E,function(){return Nn&&void 0!==c&&br(c),{json:c,text:u}},s,c,u,xt,Wr,a,l,ie,ze,B,Ie,Ye,Le,Or,Nn,Ai,o,At,function(){return ci.apply(this,arguments)},function(){return on.apply(this,arguments)},function(Ce,lt){return Fi.apply(this,arguments)},function(Ce,lt){return pn.apply(this,arguments)},function(){e(19,Ie=!1),e(20,Ye=!1),At(""),Ps()},function(Ce){r("select validation error",Ce),tt(mr(Ce.path,!1)),hn(Ce.path)},qa,function(Ce){Ce.preventDefault(),Qle({clipboardText:Ce.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:_,parser:R,onPatch:Yn,onChangeText:Ar,openRepairModal:we})},gi,yr,function(){Ee([])},function(){Ht({rootPath:[]})},function(){Po([],!0,!0)},function(){Po([],!1,!0)},function(Ce){var lt=tp(Ce),It=Ce.shiftKey;if(r("keydown",{combo:lt,key:Ce.key}),"Ctrl+X"===lt&&(Ce.preventDefault(),vr(!0)),"Ctrl+Shift+X"===lt&&(Ce.preventDefault(),vr(!1)),"Ctrl+C"===lt&&(Ce.preventDefault(),qa(!0)),"Ctrl+Shift+C"===lt&&(Ce.preventDefault(),qa(!1)),"Ctrl+D"===lt&&(Ce.preventDefault(),qe()),"Delete"!==lt&&"Backspace"!==lt||(Ce.preventDefault(),He()),"Insert"===lt&&(Ce.preventDefault(),Ue("structure")),"Ctrl+A"===lt&&(Ce.preventDefault(),tt(mr([],!1))),"Ctrl+Q"===lt&&Rl(Ce),"ArrowUp"===lt||"Shift+ArrowUp"===lt){Ce.preventDefault();var Jt=ie.selection?qoe(c,ie,It,!0)||ie.selection:s0(c,ie);tt(Jt),Bn(Jt.focusPath)}if("ArrowDown"===lt||"Shift+ArrowDown"===lt){Ce.preventDefault();var nn=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Fr(Mr)?Mr.focusPath:Ln(Mr.paths),fu=HO(wo,$l,tc),_d=fu,Ch=fu;if(null===fu||null==_d||null==Ch)return null;if(wh){var xd=HO(wo,Ho(Sn(wo,tc))?Loe($l,tc):$l,tc);return null===xd?null:Zu(Mr)?Os(wo,xd,xd):Xs(Mr)?Os(wo,_d,Ch):Os(wo,Mr.anchorPath,xd)}if(xs(Mr)){var z_=Sn(wo,Xi(fu));return Array.isArray(z_)?mr(Ch,!1):iu(Ch,!1)}return Yi(Mr)?mr(Ch,!1):Xs(Mr)?Os(wo,_d,Ch):Os(wo,fu,fu)}(c,ie,It,!0)||ie.selection:s0(c,ie);tt(nn),Bn(nn.focusPath)}if("ArrowLeft"===lt||"Shift+ArrowLeft"===lt){Ce.preventDefault();var an=ie.selection?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.previous;if(wh)return Fr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath);if(fu&&_d)return zO(_d);var xd=Sn(wo,Xi(Mr.focusPath));return Yi(Mr)&&Array.isArray(xd)?Os(wo,Mr.focusPath,Mr.focusPath):Fr(Mr)&&!Array.isArray(xd)?iu(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(an),Bn(an.focusPath)}if("ArrowRight"===lt||"Shift+ArrowRight"===lt){Ce.preventDefault();var Vn=ie.selection&&void 0!==c?function(wo,$l){var wh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Mr=$l.selection;if(!Mr)return null;var tc=Xoe(wo,$l,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),fu=tc.caret,_d=tc.next;return wh?Fr(Mr)?null:Os(wo,Mr.anchorPath,Mr.focusPath):fu&&_d?zO(_d):Fr(Mr)?mr(Mr.focusPath,!1):null}(c,ie,It,!_)||ie.selection:s0(c,ie);tt(Vn),Bn(Vn.focusPath)}if("Enter"===lt&&ie.selection){if(!_&&Fr(ie.selection)&&1===ie.selection.paths.length){var li=ie.selection.focusPath,fi=Sn(c,Xi(li));Array.isArray(fi)&&tt(mr(li,!1))}!_&&xs(ie.selection)&&(Ce.preventDefault(),tt(Ze(Ze({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(Ce.preventDefault(),Ho(Sn(c,ie.selection.focusPath))?Po(ie.selection.focusPath,!0):_||tt(Ze(Ze({},ie.selection),{},{edit:!0})))}if(1===lt.replace(/^Shift\+/,"").length&&ie.selection)return Ce.preventDefault(),void kr(Ce.key);if("Enter"===lt&&(Zu(ie.selection)||Xs(ie.selection)))return Ce.preventDefault(),void kr("");if("Ctrl+Enter"===lt&&Yi(ie.selection)){var Lo=Sn(c,ie.selection.focusPath);V2(Lo)&&window.open(String(Lo),"_blank")}if("Escape"===lt&&ie.selection&&(Ce.preventDefault(),tt(void 0)),"Ctrl+F"===lt&&(Ce.preventDefault(),ca(!1)),"Ctrl+H"===lt&&(Ce.preventDefault(),ca(!0)),"Ctrl+Z"===lt){Ce.preventDefault();var Ls=document.activeElement;Ls&&Ls.blur&&Ls.focus?(Ls.blur(),setTimeout(function(){gi(),setTimeout(function(){return Ls.select()})})):gi()}if("Ctrl+Shift+Z"===lt){Ce.preventDefault();var Zo=document.activeElement;Zo&&Zo.blur&&Zo.focus?(Zo.blur(),setTimeout(function(){yr(),setTimeout(function(){return Zo.select()})})):yr()}},function(Ce){r("handleMouseDown",Ce),setTimeout(function(){setTimeout(function(){v||yoe(Ce.target,"BUTTON")||(Ps(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Ze(Ze({},ie),{},{selection:Os(c||{},[],[])}))))})})},Rl,function(Ce){_||ua({anchor:_oe(Ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Jo.text)},function(Ce){tt(Ce),Ps(),hn(Ce.focusPath)},function(Ce){!Pb(Ce.target,function(It){return It===l})&&ip(ie.selection)&&(r("click outside the editor, stop edit mode"),tt(function(It){return xs(It)||Yi(It)?Ze(Ze({},It),{},{edit:!1}):It}),v&&a&&(a.focus(),a.blur()),Xl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,$,G,z,U,q,Z,H,he,F,N,Y,V,oe,fe,function(){var Ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hb;r("expand");var lt=Ze(Ze({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=nu(c,lt,[],Ce))},Cr,xo,Er,Ht,hn,Oi,Ps,ot,_t,function(Ce){e(19,Ie=Ce)},function(Ce){Vi[Ce?"unshift":"push"](function(){e(14,a=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(9,s=Ce)})},function(Ce){Vi[Ce?"unshift":"push"](function(){e(15,l=Ce)})}]}var k4=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,XJe,qJe,Ei,{readOnly:0,externalContent: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,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},BJe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function YJe(t){pi(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function sce(t){var n,e,i,r,o,s=[KJe,JJe],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=_r()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):($t(),ce(a[d],1,1,function(){a[d]=null}),Bt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),Q(i,1),i.m(r.parentNode,r))},i:function(c){o||(Q(i),o=!0)},o:function(c){ce(i),o=!1},d:function(c){a[e].d(c),c&&je(r)}}}function JJe(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function KJe(t){var n,e;return n=new wqe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ace(t){var n,e;return n=new k4({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function QJe(t){var n,e;return{c:function(){n=be("div"),e=tn(t[17]),P(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:Lt,o:Lt,d:function(i){i&&je(n)}}}function ZJe(t){var n,e;return n=new k4({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:go,onError:console.error,onChange:go,onChangeMode:go,onFocus:go,onBlur:go,onSortModal:go,onTransformModal:go,onJSONEditorModal:go,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function eKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z,H,he,E,F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne=t[21](t[0]).description+"";n=new Fqe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new sr({props:{data:t[15]?ru:rp}});var ie=t[15]&&sce(t);X=new sr({props:{data:t[16]?ru:rp}});var Ie=t[16]&&ace(t),Ye=[ZJe,QJe],Le=[];function _t(At,_n){return At[17]?1:0}return Y=_t(t),V=Le[Y]=Ye[Y](t),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=be("div"),o=be("div"),(s=be("div")).innerHTML='
    Language
    ',a=it(),l=be("div"),c=it(),(u=be("div")).innerHTML='
    Path
    ',d=it(),h=be("input"),p=it(),m=be("div"),g=be("div"),v=be("button"),mt(y.$$.fragment),_=tn("\n Wizard"),C=it(),ie&&ie.c(),S=it(),(M=be("div")).innerHTML='
    Query
    ',$=it(),G=be("textarea"),R=it(),z=be("div"),U=be("div"),q=be("div"),re=be("div"),L=be("button"),mt(X.$$.fragment),Z=tn("\n Original"),H=it(),Ie&&Ie.c(),he=it(),E=be("div"),(F=be("div")).innerHTML='
    Preview
    ',N=it(),V.c(),oe=it(),fe=be("div"),Fe=be("button"),xe=tn("Transform"),P(s,"class","jse-label svelte-107mggt"),P(l,"class","jse-description svelte-107mggt"),P(u,"class","jse-label svelte-107mggt"),P(h,"class","jse-path svelte-107mggt"),P(h,"type","text"),h.readOnly=!0,P(h,"title","Selected path"),h.value=f=Hi(t[1])?"(whole document)":tu(Kl(t[1])),P(v,"type","button"),P(v,"class","svelte-107mggt"),P(g,"class","jse-label-inner svelte-107mggt"),P(m,"class","jse-label svelte-107mggt"),P(M,"class","jse-label svelte-107mggt"),P(G,"class","jse-query svelte-107mggt"),P(G,"spellcheck","false"),G.value=t[13],P(o,"class","jse-query-contents svelte-107mggt"),P(L,"type","button"),P(L,"class","svelte-107mggt"),P(re,"class","jse-label-inner svelte-107mggt"),P(q,"class","jse-label svelte-107mggt"),P(U,"class","jse-original-data svelte-107mggt"),Mt(U,"jse-hide",!t[16]),P(F,"class","jse-label svelte-107mggt"),P(E,"class","jse-preview-data svelte-107mggt"),P(z,"class","jse-data-contents svelte-107mggt"),Mt(z,"jse-hide-original-data",!t[16]),P(r,"class","jse-main-contents svelte-107mggt"),P(Fe,"type","button"),P(Fe,"class","jse-primary svelte-107mggt"),Fe.disabled=tt=!!t[17],P(fe,"class","jse-actions svelte-107mggt"),P(i,"class","jse-modal-contents svelte-107mggt")},m:function(At,_n){ft(n,At,_n),Pe(At,e,_n),Pe(At,i,_n),de(i,r),de(r,o),de(o,s),de(o,a),de(o,l),l.innerHTML=ne,de(o,c),de(o,u),de(o,d),de(o,h),de(o,p),de(o,m),de(m,g),de(g,v),ft(y,v,null),de(v,_),de(o,C),ie&&ie.m(o,null),de(o,S),de(o,M),de(o,$),de(o,G),de(r,R),de(r,z),de(z,U),de(U,q),de(q,re),de(re,L),ft(X,L,null),de(L,Z),de(U,H),Ie&&Ie.m(U,null),de(z,he),de(z,E),de(E,F),de(E,N),Le[Y].m(E,null),de(i,oe),de(i,fe),de(fe,Fe),de(Fe,xe),ze=!0,ot||(B=[Nt(v,"click",t[25]),Nt(G,"input",t[23]),Nt(L,"click",t[26]),Nt(Fe,"click",t[24]),_a(nKe.call(null,Fe))],ot=!0)},p:function(At,_n){var ci={};512&_n[0]&&(ci.queryLanguages=At[9]),1&_n[0]&&(ci.queryLanguageId=At[0]),n.$set(ci),(!ze||1&_n[0])&&ne!==(ne=At[21](At[0]).description+"")&&(l.innerHTML=ne),(!ze||2&_n[0]&&f!==(f=Hi(At[1])?"(whole document)":tu(Kl(At[1])))&&h.value!==f)&&(h.value=f);var on={};32768&_n[0]&&(on.data=At[15]?ru:rp),y.$set(on),At[15]?ie?(ie.p(At,_n),32768&_n[0]&&Q(ie,1)):((ie=sce(At)).c(),Q(ie,1),ie.m(o,S)):ie&&($t(),ce(ie,1,1,function(){ie=null}),Bt()),(!ze||8192&_n[0])&&(G.value=At[13]);var Fi={};65536&_n[0]&&(Fi.data=At[16]?ru:rp),X.$set(Fi),At[16]?Ie?(Ie.p(At,_n),65536&_n[0]&&Q(Ie,1)):((Ie=ace(At)).c(),Q(Ie,1),Ie.m(U,null)):Ie&&($t(),ce(Ie,1,1,function(){Ie=null}),Bt()),(!ze||65536&_n[0])&&Mt(U,"jse-hide",!At[16]);var pn=Y;(Y=_t(At))===pn?Le[Y].p(At,_n):($t(),ce(Le[pn],1,1,function(){Le[pn]=null}),Bt(),(V=Le[Y])?V.p(At,_n):(V=Le[Y]=Ye[Y](At)).c(),Q(V,1),V.m(E,null)),(!ze||65536&_n[0])&&Mt(z,"jse-hide-original-data",!At[16]),(!ze||131072&_n[0]&&tt!==(tt=!!At[17]))&&(Fe.disabled=tt)},i:function(At){ze||(Q(n.$$.fragment,At),Q(y.$$.fragment,At),Q(ie),Q(X.$$.fragment,At),Q(Ie),Q(V),ze=!0)},o:function(At){ce(n.$$.fragment,At),ce(y.$$.fragment,At),ce(ie),ce(X.$$.fragment,At),ce(Ie),ce(V),ze=!1},d:function(At){pt(n,At),At&&je(e),At&&je(i),pt(y),ie&&ie.d(),pt(X),Ie&&Ie.d(),Le[Y].d(),ot=!1,ho(B)}}}function tKe(t){var n,e,i,r,o;return e=new Doe({props:{$$slots:{default:[eKe]},$$scope:{ctx:t}}}),{c:function(){n=be("div"),mt(e.$$.fragment),P(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),ft(e,n,null),i=!0,r||(o=_a(iS.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(Q(e.$$.fragment,s),i=!0)},o:function(s){ce(e.$$.fragment,s),i=!1},d:function(s){s&&je(n),pt(e),r=!1,o()}}}function nKe(t){t.focus()}function iKe(t,n,e){var i,r,o=wa("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+fb():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,_=n.queryLanguageId,C=n.onChangeQueryLanguage,S=n.onRenderValue,M=n.onClassName,$=n.onTransform,G=xa("simple-modal").close,R="".concat(a,":").concat(ln(u)),z=ed[R]||{},U=!1!==ed.showWizard,q=!1!==ed.showOriginal,re=z.queryOptions||{},L=_===z.queryLanguageId&&z.query?z.query:he(_).createQuery(l,z.queryOptions||{}),X=z.isManual||!1,Z=void 0,H={text:""};function he(F){return y.find(function(N){return N.id===F})||y[0]}var E=Gv(function(F,N){try{o("previewTransform",{query:N});var Y=he(_).executeQuery(F,N,p);e(18,H={json:Y}),e(17,Z=void 0)}catch(V){e(18,H={text:""}),e(17,Z=V.toString())}},300);return t.$$set=function(F){"id"in F&&e(28,a=F.id),"json"in F&&e(29,l=F.json),"rootPath"in F&&e(1,u=F.rootPath),"indentation"in F&&e(2,d=F.indentation),"escapeControlCharacters"in F&&e(3,h=F.escapeControlCharacters),"escapeUnicodeCharacters"in F&&e(4,f=F.escapeUnicodeCharacters),"parser"in F&&e(5,p=F.parser),"parseMemoizeOne"in F&&e(6,m=F.parseMemoizeOne),"validationParser"in F&&e(7,g=F.validationParser),"pathParser"in F&&e(8,v=F.pathParser),"queryLanguages"in F&&e(9,y=F.queryLanguages),"queryLanguageId"in F&&e(0,_=F.queryLanguageId),"onChangeQueryLanguage"in F&&e(30,C=F.onChangeQueryLanguage),"onRenderValue"in F&&e(10,S=F.onRenderValue),"onClassName"in F&&e(11,M=F.onClassName),"onTransform"in F&&e(31,$=F.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,L),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:re,query:L,queryLanguageId:_,isManual:X},ed),o("store state in memory",R,ed[R]))},[_,u,d,h,f,p,m,g,v,y,S,M,re,L,i,U,q,Z,H,r,G,he,function(F){e(12,re=F),e(13,L=he(_).createQuery(l,F)),e(33,X=!1),o("updateQueryByWizard",{queryOptions:re,query:L,isManual:X})},function(F){e(13,L=F.target.value),e(33,X=!0),o("handleChangeQuery",{query:L,isManual:X})},function(){try{o("handleTransform",{query:L});var F=he(_).executeQuery(i,L,p);$([{op:"replace",path:ln(u),value:F}]),G()}catch(N){console.error(N),e(18,H={text:""}),e(17,Z=N.toString())}},function(){e(15,U=!U),e(32,ed.showWizard=U,ed)},function(){e(16,q=!q),e(32,ed.showOriginal=q,ed)},function(F){o("handleChangeQueryLanguage",F),e(0,_=F),C(F);var N=he(_);e(13,L=N.createQuery(l,re)),e(33,X=!1)},a,l,C,$,ed,X]}var rKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,iKe,tKe,Ei,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},YJe,[-1,-1]),r}return Se(e)}(),up={};function oKe(t){pi(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function lce(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new Hm({props:c}),Vi.push(function(){return Uu(o,"value",l)}),{c:function(){n=be("tr"),(e=be("th")).textContent="Property",i=it(),r=be("td"),mt(o.$$.fragment),P(e,"class","svelte-1y818v2"),P(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),de(n,e),de(n,i),de(n,r),ft(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],zu(function(){return s=!1})),o.$set(h)},i:function(u){a||(Q(o.$$.fragment,u),a=!0)},o:function(u){ce(o.$$.fragment,u),a=!1},d:function(u){u&&je(n),pt(o)}}}function cce(t){var n,e;return{c:function(){n=be("div"),e=tn(t[5]),P(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),de(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&je(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,q,re,L,X,Z;e=new c4({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&lce(t);function he(N){t[15](N)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),S=new Hm({props:E}),Vi.push(function(){return Uu(S,"value",he)});var F=t[5]&&cce(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),o=be("table"),(s=be("colgroup")).innerHTML=' \n ',a=it(),l=be("tbody"),c=be("tr"),(u=be("th")).textContent="Path",d=it(),h=be("td"),f=be("input"),m=it(),H&&H.c(),g=it(),v=be("tr"),(y=be("th")).textContent="Direction",_=it(),C=be("td"),mt(S.$$.fragment),$=it(),G=be("div"),F&&F.c(),R=it(),z=be("div"),U=be("button"),q=tn("Sort"),P(u,"class","svelte-1y818v2"),P(f,"class","jse-path svelte-1y818v2"),P(f,"type","text"),f.readOnly=!0,P(f,"title","Selected path"),f.value=p=Hi(t[0])?"(whole document)":tu(Kl(t[0])),P(h,"class","svelte-1y818v2"),P(y,"class","svelte-1y818v2"),P(C,"class","svelte-1y818v2"),P(o,"class","svelte-1y818v2"),P(G,"class","jse-space svelte-1y818v2"),P(U,"type","button"),P(U,"class","jse-primary svelte-1y818v2"),U.disabled=re=!!t[4]&&!t[1],P(z,"class","jse-actions svelte-1y818v2"),P(r,"class","jse-modal-contents svelte-1y818v2"),P(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(N,Y){Pe(N,n,Y),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(o,s),de(o,a),de(o,l),de(l,c),de(c,u),de(c,d),de(c,h),de(h,f),de(l,m),H&&H.m(l,null),de(l,g),de(l,v),de(v,y),de(v,_),de(v,C),ft(S,C,null),de(r,$),de(r,G),F&&F.m(G,null),de(r,R),de(r,z),de(z,U),de(U,q),L=!0,X||(Z=[Nt(U,"click",t[8]),_a(aKe.call(null,U)),_a(iS.call(null,n,t[6]))],X=!0)},p:function(N,Y){var V=Un(Y,1)[0],oe={};16&V&&(oe.title=N[4]?"Sort array items":"Sort object keys"),e.$set(oe),(!L||1&V&&p!==(p=Hi(N[0])?"(whole document)":tu(Kl(N[0])))&&f.value!==p)&&(f.value=p),N[4]&&(N[3].length>1||void 0===N[1])?H?(H.p(N,V),26&V&&Q(H,1)):((H=lce(N)).c(),Q(H,1),H.m(l,g)):H&&($t(),ce(H,1,1,function(){H=null}),Bt());var fe={};!M&&4&V&&(M=!0,fe.value=N[2],zu(function(){return M=!1})),S.$set(fe),N[5]?F?F.p(N,V):((F=cce(N)).c(),F.m(G,null)):F&&(F.d(1),F=null),(!L||18&V&&re!==(re=!!N[4]&&!N[1]))&&(U.disabled=re)},i:function(N){L||(Q(e.$$.fragment,N),Q(H),Q(S.$$.fragment,N),L=!0)},o:function(N){ce(e.$$.fragment,N),ce(H),ce(S.$$.fragment,N),L=!1},d:function(N){N&&je(n),pt(e),H&&H.d(),pt(S),F&&F.d(),X=!1,ho(Z)}}}function aKe(t){t.focus()}function lKe(t,n,e){var i,r,o,s=wa("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xa("simple-modal").close,h="".concat(a,":").concat(ln(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=up[h]&&up[h].selectedProperty||void 0,v=up[h]&&up[h].selectedDirection||p,y=void 0;return t.$$set=function(_){"id"in _&&e(9,a=_.id),"json"in _&&e(10,l=_.json),"rootPath"in _&&e(0,c=_.rootPath),"onSort"in _&&e(11,u=_.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?CO(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(Lb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,up[h]={selectedProperty:g,selectedDirection:v},up),s("store state in memory",h,up[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var _,C;e(5,y=void 0);var S=null===(_=g)||void 0===_?void 0:_.value,M=null===(C=v)||void 0===C?void 0:C.value,$=Fle(l,c,S,M);u({operations:$,rootPath:c,itemPath:S,direction:M}),d()}catch(G){e(5,y=G.toString())}},a,l,u,up,r,function(_){e(1,g=_),e(3,o),e(13,r),e(4,i)},function(_){e(2,v=_)}]}var cKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,lKe,sKe,Ei,{id:9,json:10,rootPath:0,onSort:11},oKe),r}return Se(e)}();function dh(){}function sS(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function uKe(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function dKe(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,_=n.canTransform,C=n.onRenderMenu;return t.$$set=function(S){"readOnly"in S&&e(1,s=S.readOnly),"onFormat"in S&&e(2,a=S.onFormat),"onCompact"in S&&e(3,l=S.onCompact),"onSort"in S&&e(4,c=S.onSort),"onTransform"in S&&e(5,u=S.onTransform),"onToggleSearch"in S&&e(6,d=S.onToggleSearch),"onUndo"in S&&e(7,h=S.onUndo),"onRedo"in S&&e(8,f=S.onRedo),"canUndo"in S&&e(9,p=S.canUndo),"canRedo"in S&&e(10,m=S.canRedo),"canFormat"in S&&e(11,g=S.canFormat),"canCompact"in S&&e(12,v=S.canCompact),"canSort"in S&&e(13,y=S.canSort),"canTransform"in S&&e(14,_=S.canTransform),"onRenderMenu"in S&&e(15,C=S.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:m4,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:UYe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!_},{type:"button",icon:KO,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,r]}var hKe=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,dKe,uKe,Ei,{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}),r}return Se(e)}(),fo=function(){function t(){ke(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),aS.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),aS.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new t_(this),o=new t_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new t_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new dce(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new hce(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):aS.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,fo);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function fKe(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ke(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new pKe(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(uce(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=lS(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return pr(qi(e.prototype),"replace",this).call(this,i,r,o);var s=lS(this.text,lS(o.text,uce(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):aS.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),aS=function(t){wt(e,fo);var n=Ct(e);function e(i,r){var o;ke(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return pr(qi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return pr(qi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Un(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,z){return R+z.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,_=[];function C(R){var z;if(R.lines>p&&R instanceof e){var U,q=Re(R.children);try{for(q.s();!(U=q.n()).done;)C(U.value)}catch(re){q.e(re)}finally{q.f()}}else R.lines>m&&(v>m||!v)?(S(),g.push(R)):R instanceof id&&v&&(z=_[_.length-1])instanceof id&&R.lines+z.lines<=32?(v+=R.lines,y+=R.length+1,_[_.length-1]=new id(z.text.concat(R.text),z.length+1+R.length)):(v+R.lines>f&&S(),v+=R.lines,y+=R.length+1,_.push(R))}function S(){0!=v&&(g.push(1==_.length?_[0]:e.from(_,y)),y=-1,v=_.length=0)}var M,$=Re(i);try{for($.s();!(M=$.n()).done;)C(M.value)}catch(R){$.e(R)}finally{$.f()}return S(),1==g.length?g[0]:new e(g,o)}}]),e}();function lS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ke(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),dce=function(){function t(n,e,i){ke(this,t),this.value="",this.done=!1,this.cursor=new t_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),hce=function(){function t(n){ke(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(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}}]),t}();typeof Symbol<"u"&&(fo.prototype[Symbol.iterator]=function(){return this.iter()},t_.prototype[Symbol.iterator]=dce.prototype[Symbol.iterator]=hce.prototype[Symbol.iterator]=function(){return this});for(var pKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),w0="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(t){return t?parseInt(t,36):1}),cS=1;cSt)return w0[n-1]<=t;return!1}function fce(t){return t>=127462&&t<=127487}function Pl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?gKe:pce)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function pce(t,n,e){if(n==t.length)return n;n&&mce(t.charCodeAt(n))&&gce(t.charCodeAt(n-1))&&n--;var i=Ba(t,n);for(n+=Sc(i);n=0&&fce(Ba(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function gKe(t,n,e){for(;n>0;){var i=pce(t,n-2,e);if(i=56320&&t<57344}function gce(t){return t>=55296&&t<56320}function Ba(t,n){var e=t.charCodeAt(n);if(!gce(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return mce(i)?i-56320+(e-55296<<10)+65536:e}function S4(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Sc(t){return t<65536?1:2}var D4=/\r\n?|\n/,Ll=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ll||(Ll={})),C0=function(){function t(n){ke(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ll.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ll.Simple&&c>=n&&(i==Ll.TrackDel&&rn||i==Ll.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,C0);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return T4(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return E4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){T4(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return C0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new n_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&dp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var _=y?"string"==typeof y?fo.of(y.split(o||D4)):y:fo.empty,C=_.length;if(m==v&&0==C)return;ml&&dl(s,m-l,-1),dl(s,v-m,C),dp(a,s,_),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function dp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function E4(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new n_(t),a=new n_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);dl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):C0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new n_(t),s=new n_(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):C0.create(i);if(0==o.ins)dl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;dl(i,l,u,a),r&&u&&dp(r,i,s.text)}else-1==s.ins?(dl(i,o.off?0:o.len,l,a),r&&dp(r,i,o.textBit(l))):(dl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&dp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else dl(i,0,s.ins,a),r&&dp(r,i,s.text),s.next()}}var n_=function(){function t(n){ke(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?fo.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?fo.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),uS=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return en.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return en.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return en.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),en=function(){function t(n,e){ke(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return uS.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return uS.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function yce(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var A4=0,Qn=function(){function t(n,e,i,r,o){ke(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=A4++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new dS([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new dS(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:M4),!!n.static,n.enables)}}]),t}();function M4(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var dS=function(){function t(n,e,i,r){ke(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=A4++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||I4(m,h)){var v=o(m);if(c?!bce(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var _=hS(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Va)||g.field(C,!1)==m.field(C,!1)})||(c?bce(v=o(m),_,s):s(v=o(m),_)))return m.values[l]=_,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function bce(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,_ce.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(A4++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function i_(t){return function(n){return new xce(n,t)}}var k0={highest:i_(0),high:i_(1),default:i_(2),low:i_(3),lowest:i_(4)},xce=Se(function t(n,e){ke(this,t),this.inner=n,this.prec=e}),hp=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new N4(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),N4=Se(function t(n,e){ke(this,t),this.compartment=n,this.inner=e}),wce=function(){function t(n,e,i,r,o,s){for(ke(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,S,M,$,G,o=[],s=Object.create(null),a=new Map,l=Re((C=n,S=e,M=a,$=[[],[],[],[],[]],G=new Map,function R(z,U){var q=G.get(z);if(null!=q){if(q<=U)return;var re=$[q].indexOf(z);re>-1&&$[q].splice(re,1),z instanceof N4&&M.delete(z.compartment)}if(G.set(z,U),Array.isArray(z)){var L,X=Re(z);try{for(X.s();!(L=X.n()).done;)R(L.value,U)}catch(he){X.e(he)}finally{X.f()}}else if(z instanceof N4){if(M.has(z.compartment))throw new RangeError("Duplicate use of compartment in extensions");var Z=S.get(z.compartment)||z.inner;M.set(z.compartment,Z),R(Z,U)}else if(z instanceof xce)R(z.inner,z.prec);else if(z instanceof Va)$[U].push(z),z.provides&&R(z.provides,U);else if(z instanceof dS)$[U].push(z),z.facet.extensions&&R(z.facet.extensions,2);else{var H=z.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(z,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,U)}}(C,2),$.reduce(function(z,U){return z.concat(U)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Va?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(S){return C.slot(S)})},p=0,m=o;p>1;function F(N){for(var Y=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function hS(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Cce=Qn.define(),kce=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Sce=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Dce=Qn.define(),Tce=Qn.define(),Ece=Qn.define(),Ace=Qn.define({combine:function(t){return!!t.length&&t[0]}}),fp=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new _Ke}}]),t}(),_Ke=function(){function t(){ke(this,t)}return Se(t,[{key:"of",value:function(n){return new fp(this,n)}}]),t}(),xKe=function(){function t(n){ke(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new hr(this,n)}}]),t}(),hr=function(){function t(n,e){ke(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new xKe((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();hr.reconfigure=hr.define(),hr.appendConfig=hr.define();var Ql=function(){function t(n,e,i,r,o,s){ke(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&yce(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{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(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function wKe(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Mce(u,O4(l,h,a.changes.newLength),!0))}return u==a?a:Ql.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Dce));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:wKe(u,h))}}catch(_){d.e(_)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Ql.create(c,f,a.selection&&a.selection.map(p),hr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet(Tce),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Ql?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Ql?y[0]:Ice(c,S0(y),!1)}return a}(s):s)}Ql.time=fp.define(),Ql.userEvent=fp.define(),Ql.addToHistory=fp.define(),Ql.remote=fp.define();var CKe=[];function S0(t){return null==t?CKe:Array.isArray(t)?t:[t]}var j4,cs=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(cs||(cs={})),kKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{j4=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var No=function(){function t(n,e,i,r,o,s){ke(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return r_(this,i),hS(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return fo.of(n.split(this.facet(t.lineSeparator)||D4))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(r_(this,e),hS(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Va&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Ace)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Cce));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function SKe(t){return function(n){if(!/\S/.test(n))return cs.Space;if(function(i){if(j4)return j4.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||kKe.test(o)))return!0}return!1}(n))return cs.Word;for(var e=0;e-1)return cs.Word;return cs.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Pl(i,a,!1);if(s(i.slice(c,a))!=cs.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:en.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=wce.resolve(n.extensions||[],new Map),i=n.doc instanceof fo?n.doc:fo.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||D4)),r=n.selection?n.selection instanceof en?n.selection:en.single(n.selection.anchor,n.selection.head):en.single(0);return yce(r,i.length),e.staticFacet(kce)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function su(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();Um.prototype.startSide=Um.prototype.endSide=0,Um.prototype.point=!1,Um.prototype.mapMode=Ll.TrackDel;var P4=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function L4(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var DKe=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Go=function(){function t(n,e,i,r){ke(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(L4)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Nce(this,null,-1).goto(0),h=0,f=[],p=new Gm;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return R4.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R4.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=Fce(s,a,i),c=new o_(s,l,o),u=new o_(a,l,o);i.iterGaps(function(d,h,f){return Oce(c,d,u,h,f,r)}),i.empty&&0==i.length&&Oce(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=Fce(o,s),l=new o_(o,a,0).goto(i),c=new o_(s,a,0).goto(i);;){if(l.to!=c.to||!B4(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new o_(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Gm,o=Re(n instanceof P4?[n]:i?function TKe(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(L4);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Go.empty=new Go([],[],null,-1),Go.empty.nextLayer=Go.empty;var Gm=function(){function t(){ke(this,t),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 Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new DKe(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,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.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=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Go.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Go.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function Fce(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{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(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)$4(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)$4(this.heap,o);(this.to-n||this.value.endSide-e)<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 n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),$4(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Nce(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function $4(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var o_=function(){function t(n,e,i){ke(this,t),this.minPoint=i,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=R4.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){fS(this.active,n),fS(this.activeTo,n),fS(this.activeRank,n),this.minActive=jce(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&fS(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Oce(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&B4(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!B4(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function B4(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function jce(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Pl(t,r)}return!0===i?-1:t.length}for(var Pce=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),H4=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Lce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},pp=function(){function t(n,e){ke(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==bn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Lce[Pce]||1;return Lce[Pce]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[H4]||new EKe(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),mS=null,EKe=function(){function t(n){if(ke(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(mS)return n.adoptedStyleSheets=[mS.sheet].concat(n.adoptedStyleSheets),n[H4]=mS;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),mS=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[H4]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Rce=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),AKe=typeof navigator<"u"&&/Mac/.test(navigator.platform),MKe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),IKe=AKe||Rce&&+Rce[1]<57,Ha=0;Ha<10;Ha++)mp[48+Ha]=mp[96+Ha]=String(Ha);for(Ha=1;Ha<=24;Ha++)mp[Ha+111]="F"+Ha;for(Ha=65;Ha<=90;Ha++)mp[Ha]=String.fromCharCode(Ha+32),a_[Ha]=String.fromCharCode(Ha);for(var z4 in mp)a_.hasOwnProperty(z4)||(a_[z4]=mp[z4]);function gS(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function D0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function vS(t,n){if(!n.anchorNode)return!1;try{return D0(t,n.anchorNode)}catch{return!1}}function l_(t){return 3==t.nodeType?E0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function yS(t,n,e,i){return!!e&&($ce(t,n,e,i,-1)||$ce(t,n,e,i,1))}function bS(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function $ce(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:c_(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=bS(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?c_(t):0}}}function c_(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Bce={left:0,right:0,top:0,bottom:0};function U4(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function FKe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Vce,NKe=function(){function t(){ke(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),T0=null;function Hce(t){if(t.setActive)return t.setActive();if(T0)return t.focus(T0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==T0?{get preventScroll(){return T0={preventScroll:!0},!0}}:void 0),!T0){T0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Vce||(Vce=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function A0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function zce(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ke(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,bS(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,bS(n)+1,e)}}]),t}(),G4=[],ws=function(){function t(){ke(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{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(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=Uce(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=Uce(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==c_(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G4;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function Uce(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ws.prototype.breakAfter=0;var Gce=function(){function t(n,e,i){ke(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function Wce(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:Qce||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:_S,ie_version:Xce?W4.documentMode||6:X4?+X4[1]:q4?+q4[1]:0,gecko:Yce,gecko_version:Yce?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Y4,chrome_version:Y4?+Y4[1]:0,ios:Qce,android:/Android\b/.test(Tc.userAgent),webkit:Jce,safari:Kce,webkit_version:Jce?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=W4.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},u_=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return J4(this.dom,i,r)}}]),e}(),Wm=function(t){wt(e,ws);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ke(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(zce(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),pr(qi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}}]),e}();function J4(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?U4(l,s<0):l||null}var K4=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:U4(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){pr(qi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),Zce=function(t){wt(e,K4);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Q4(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?eue(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Q4(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return J4(a,l,c)}):J4(a,i,r)}},{key:"destroy",value:function(){var i;pr(qi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Q4(t,n,e,i,r,o){if(e instanceof Wm){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ws.get(s);if(!a)return o(t,n);var l=D0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return fo.empty}}]),e}();function tue(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof Wm&&r.length&&(i=r[r.length-1])instanceof Wm&&i.mark.eq(n.mark)?nue(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function iue(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new rue(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new d_(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=oue(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new d_(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new ij(i)}},{key:"set",value:function(i){return Go.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();yi.none=Go.empty;var rue=function(t){wt(e,yi);var n=Ct(e);function e(i){var r;ke(this,e);var o=oue(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&tj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();rue.prototype.point=!1;var ij=function(t){wt(e,yi);var n=Ct(e);function e(i){return ke(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&tj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();ij.prototype.mapMode=Ll.TrackBefore,ij.prototype.point=!0;var d_=function(t){wt(e,yi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return ke(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ll.TrackBefore:Ll.TrackAfter:Ll.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return pr(qi(e.prototype),"range",this).call(this,i,r)}}]),e}();function oue(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function rj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}d_.prototype.point=!0;var od=function(t){wt(e,ws);var n=Ct(e);function e(){var i;return ke(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),qce(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){tj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){nue(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=ej(r,this.attrs||{})),o&&(this.attrs=ej({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return tue(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(zce(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&&(nj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),pr(qi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ws.get(s)instanceof Wm;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ws.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof u_})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof u_)||/[^ -~]/.test(s.text))return null;var a=l_(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return iue(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return _o.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),oj=function(t){wt(e,ws);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(xS(new Z4(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(xS(new u_(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof d_){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof d_)if(i.block){var l=i.type;l!=_o.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new oj(i.widget||new sue("div"),a,l))}else{var c=K4.create(i.widget||new sue("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(xS(new Z4(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(xS(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);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=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Go.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function xS(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new Wm(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var sue=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),aue=Qn.define(),lue=Qn.define(),cue=Qn.define(),uue=Qn.define(),sj=Qn.define(),due=Qn.define(),hue=Qn.define(),fue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),pue=Qn.define({combine:function(t){return t.some(function(n){return n})}}),mue=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ke(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),gue=hr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(uue);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var wS=Qn.define({combine:function(t){return!t.length||t[0]}}),PKe=0,h_=Qn.define(),ka=function(){function t(n,e,i,r){ke(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(PKe++,n,i.eventHandlers,function(a){var l=[h_.of(a)];return s&&l.push(f_.of(function(c){var u=c.plugin(a);return u?s(u):yi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),aj=function(){function t(n){ke(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),vue=Qn.define(),lj=Qn.define(),f_=Qn.define(),yue=Qn.define(),bue=Qn.define(),p_=Qn.define(),M0=function(){function t(n,e,i,r){ke(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),_ue=function(){function t(n,e,i){ke(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new M0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{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(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),us=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(us||(us={})),cj=us.LTR,LKe=us.RTL;function xue(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),ds=[];function Due(t){return[new I0(0,t,0)]}var Tue="";function HKe(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=I0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Pl(t.text,s,u);if(Tue=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return en.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ws.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Aue(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Mue=Se(function t(n,e){ke(this,t),this.node=n,this.offset=e,this.pos=-1}),Iue=function(t){wt(e,ws);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).view=i,r.compositionDeco=yi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new M0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=yi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Nue(a);if(!c)return yi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Eue([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=jKe.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,_=v.off,C=o.findPos(l,-1);Wce(this,C.i,C.off,y,_,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function zKe(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&yS(l.node,l.offset,d.anchorNode,d.anchorOffset)&&yS(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function qKe(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=gS(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function GKe(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=gS(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||vS(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ws.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=_o.WidgetBefore&&a.type!=_o.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==_o.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==us.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?l_(g):[];if(v.length){var y=v[v.length-1],_=u?y.right-m.left:m.right-y.left;_>c&&(c=_,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?us.RTL:us.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=l_(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new Gce(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(yi.replace({widget:new Fue(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return yi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(f_).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(bue).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,S,M,$,G,R,z,U){for(var q=C.ownerDocument,re=q.defaultView||window,L=C;L;)if(1==L.nodeType){var X=void 0,Z=L==q.body;if(Z)X=FKe(re);else{if(L.scrollHeight<=L.clientHeight&&L.scrollWidth<=L.clientWidth){L=L.assignedSlot||L.parentNode;continue}var H=L.getBoundingClientRect();X={left:H.left,right:H.left+L.clientWidth,top:H.top,bottom:H.top+L.clientHeight}}var he=0,E=0;if("nearest"==G)S.top0&&S.bottom>X.bottom+E&&(E=S.bottom-X.bottom+E+z)):S.bottom>X.bottom&&(E=S.bottom-X.bottom+z,M<0&&S.top-E0&&S.right>X.right+he&&(he=S.right-X.right+he+R)):S.right>X.right&&(he=S.right-X.right+R,M<0&&S.left0&&e<=0)n=c_(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var WKe=function(){function t(){ke(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){rj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){rj(n,e,this.changes)}}]),t}();function XKe(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function YKe(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function hj(t,n){return t.topn.top+1}function jue(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function fj(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=l_(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&hj(c,m)?c=Pue(c,m.bottom):u&&hj(u,m)&&(u=jue(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var _=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Lue(i,_,e):d&&"false"!=i.contentEditable?fj(i,_,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Lue(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&E0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Rue(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=_o.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:$ue(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,_=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,_=C.offset)}else if(m.caretRangeFromPoint){var S=m.caretRangeFromPoint(c,u);S&&(_=S.startOffset,(!t.contentDOM.contains(y=S.startContainer)||Zn.safari&&function JKe(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return E0(t,i-1,i).getBoundingClientRect().left>e}(y,_,c)||Zn.chrome&&function KKe(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():E0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,_,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var M=od.find(t.docView,p);if(!M)return d>r.top+r.height/2?r.to:r.from;var $=fj(M.dom,c,u);y=$.node,_=$.offset}var G=t.docView.nearest(y);if(!G)return null;if(G.isWidget){var R=G.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+V4(s,o,t.state.tabSize)}function Bue(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=HKe(r,o,s,a,e),u=Tue;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=en.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function pj(t,n,e){for(var i=t.state.facet(yue).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?en.cursor(a,1):en.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var ZKe=function(){function t(n){var e=this;ke(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=la[s];n.contentDOM.addEventListener(s,function(l){zue(n,l)&&i(a,l)},mj[s]),e.registeredEvents.push(s)};for(var o in la)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(la.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){zue(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,A0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Vue=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],eQe="dthko",Hue=[16,17,18,20,91,92,224,225];function CS(t){return.7*t+8}var tQe=function(){function t(n,e,i,r){ke(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(No.allowMultipleSelections)&&(a=e,(l=n.state.facet(aue)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(lue);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=gS(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Zue(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-CS(o.left-n.clientX):n.clientX>=o.right&&(i=CS(n.clientX-o.right)),n.clientY<=o.top?r=-CS(o.top-n.clientY):n.clientY>=o.bottom&&(r=CS(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.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:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function zue(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ws.get(i))&&e.ignoreEvent(n))return!1;return!0}var la=Object.create(null),mj=Object.create(null),Uue=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function Gue(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=gj&&i.selection.ranges.every(function(c){return c.empty})&&gj==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:en.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:en.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function Wue(t,n,e,i){if(1==i)return en.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return en.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Pl(h.text,f,!1):m=Pl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Pl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(cue));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=Yue(s=t,a=n),c=Zue(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=Yue(s,d),m=Wue(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=Wue(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(_){return _.eq(m)})?function(_,C){for(var S=0;;S++)if(_.ranges[S].eq(C))return en.create(_.ranges.slice(0,S).concat(_.ranges.slice(S+1)),_.mainIndex==S?0:_.mainIndex-(_.mainIndex>S?1:0))}(u,m):f?u.addRange(m):en.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new tQe(t,n,i,o)),o&&t.observer.ignore(function(){return Hce(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var que=function(t,n){return t>=n.top&&t<=n.bottom},Xue=function(t,n,e){return que(n,e)&&t>=e.left&&t<=e.right};function nQe(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&Xue(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&Xue(e,i,a)?1:s&&que(i,s)?-1:1}function Yue(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:nQe(t,e,n.clientX,n.clientY)}}var iQe=Zn.ie&&Zn.ie_version<=11,Jue=null,Kue=0,Que=0;function Zue(t){if(!iQe)return t.detail;var n=Jue,e=Que;return Jue=t,Que=Date.now(),Kue=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Kue+1)%3:1}function ede(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}la.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},la.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&ede(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(_){g.e(_)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){gj=o?i:null;var s=Uue?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var tde=fp.define();function nde(t,n){var e,i=[],r=Re(t.facet(hue));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:tde.of(!0)}):null}function ide(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=nde(t.state,n);e?t.dispatch(e):t.update([])}},10)}la.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ide(t)},la.blur=function(t){t.observer.clearSelectionRange(),ide(t)},la.compositionstart=la.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},la.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},la.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},la.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Vue.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var rde=["pre-wrap","normal","pre-line","break-spaces"],rQe=function(){function t(n){ke(this,t),this.lineWrapping=n,this.doc=fo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return rde.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ke(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Wo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Wo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),fh=function(t){wt(e,ode);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this,i,r,_o.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof F0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof F0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),F0=function(t){wt(e,sd);var n=Ct(e);function e(i){return ke(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new qm(f.from,f.length,m,p,_o.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new qm(v.from,v.length,o+u*g,u,_o.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Wo.ByHeight)return this.blockAt(i,o,s,a);if(r==Wo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new qm(c,l.to-c,0,0,_o.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new qm(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,_o.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new qm(m.from,m.length,p,v,_o.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new fh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),sQe=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return ke(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Wo.ByPosNoHeight?Wo.ByPosNoHeight:Wo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Wo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&sde(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function sde(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof F0&&(i=t[n+1])instanceof F0&&t.splice(n-1,3,new F0(e.length+1+i.length))}var aQe=function(){function t(n,e){ke(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof fh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new fh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new fh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new F0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof fh)return n;var e=new fh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=_o.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=_o.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof fh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function dQe(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var vj=function(){function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return yi.replace({widget:new hQe(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new kS(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?lde:new pQe(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:m_(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(f_).filter(function(c){return"function"!=typeof c});var o=M0.extendWithRanges(n.changedRanges,function lQe(t,n,e){var i=new cQe;return Go.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(pue)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?us.RTL:us.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?dQe:uQe)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var _=n.docView.measureTextSize(),C=_.lineHeight,S=_.charWidth;(s=C>0&&r.refresh(o,C,S,v/S,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var M,$=Re(this.viewports);try{for($.s();!(M=$.n()).done;){var G=M.value,R=G.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(G);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,fo.empty,this.heightOracle,[new M0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new oQe(G.from,R))}}catch(U){$.e(U)}finally{$.f()}r.heightChanged&&(c|=2)}var z=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return z&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.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(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new kS(r.lineAt(this.visibleTop-1e3*i,Wo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Wo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Wo.ByPos,o,0,0);l=new kS(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Wo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Wo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=us.LTR&&!r)return[];var l,c=[],u=function q(re,L,X,Z){if(!(L-rere&&N=X.from&&oe.to<=X.to&&Math.abs(oe.from-re)fe})});if(!Y){if(L=L})){var V=e.moveToLineBoundary(en.cursor(L),!1,!0).head;V>re&&(L=V)}Y=new vj(re,L,i.gapSize(X,re,L,Z))}c.push(Y)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||m_(this.heightMap.lineAt(n,Wo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return m_(this.heightMap.lineAt(this.scaler.fromDOM(n),Wo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return m_(this.heightMap.blockAt(this.scaler.fromDOM(n),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}}]),t}(),kS=Se(function t(n,e){ke(this,t),this.from=n,this.to=e});function fQe(t,n,e){var i=[],r=t,o=0;return Go.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function DS(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var lde={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},pQe=function(){function t(n,e,i){ke(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Wo.ByPos,n,0,0).top,p=e.lineAt(h,Wo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),bj=pp.newName(),cde=pp.newName(),ude=pp.newName(),dde={"&light":"."+cde,"&dark":"."+ude};function _j(t,n,e){return new pp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var mQe=_j("."+bj,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .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-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',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"}},dde),gQe=Se(function t(n,e,i,r){ke(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,_=m.focusOffset;return g&&(p.push(new Mue(g,v)),y==g&&_==v||p.push(new Mue(y,_))),p}(n),c=new Eue(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?en.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!D0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!D0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=en.single(h,d)}});function hde(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&Z>0&&R.charCodeAt(X-1)==z.charCodeAt(Z-1);)X--,Z--;return"end"==q&&(U-=X+Math.max(0,L-Math.min(X,Z))-L),X=X?L-U:0)+(Z-X),X=L):Z=Z?L-U:0)+(X-Z),Z=L),{from:L,toA:X,toB:Z}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:fo.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(wS)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=en.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:fo.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&A0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&A0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&A0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(due).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),_=Nue(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,S=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var z=R.to-C,U=z-y.length;if(R.to-R.from!=S||t.state.sliceDoc(U,z)!=y||_&&R.to>=_.from&&R.from<=_.to)return{range:R};var q=d.changes({from:U,to:z,insert:e.insert}),re=R.to-r.to;return{changes:q,range:v?en.range(Math.max(0,v.anchor+re),Math.max(0,v.head+re)):R.map(q)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var M="input.type";return t.composing&&(M+=".compose",t.inputState.compositionFirstChange&&(M+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:M}),!0}if(i&&!i.main.eq(r)){var $=!1,G="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&($=!0),G=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:$,userEvent:G}),!0}return!1}var vQe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},xj=Zn.ie&&Zn.ie_version<=11,yQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.active=!1,this.selectionRange=new NKe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),xj&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.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 i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(wS)?i.root.activeElement==this.dom:vS(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&yS(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(yS(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||gS(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=vS(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&vS(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gQe(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=hde(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=fde(e,n.previousSibling||n.target.previousSibling,-1),r=fde(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function fde(t,n,e){for(;n;){var i=ws.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function OKe(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new ade(e.state||No.create(e)),this.plugins=this.state.facet(h_).map(function(s){return new aj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new yQe(this),this.inputState=new ZKe(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Iue(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Ql?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(tde)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=nde(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(No.phrases)!=this.state.facet(No.phrases))return this.setState(a);(i=_ue.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var _=y.state.selection.main;m=new mue(_.empty?_:en.cursor(_.head,_.head>_.anchor?-1:1))}var C,S=Re(y.effects);try{for(S.s();!(C=S.n()).done;){var M=C.value;M.is(gue)&&(m=M.value)}}catch(R){S.e(R)}finally{S.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=mde.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(p_)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(TS)!=i.state.facet(TS)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var $,G=Re(this.state.facet(sj));try{for(G.s();!($=G.n()).done;)(0,$.value)(i)}catch(R){G.e(R)}finally{G.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!hde(e,p)&&f.force&&A0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){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=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new ade(n),this.plugins=n.facet(h_).map(function(a){return new aj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Iue(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(h_),i=n.state.facet(h_);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new aj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!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&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(z){return Ec(n.state,z),pde}}),g=_ue.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var _=0;_1||S<-1)&&(this.scrollDOM.scrollTop+=S,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var M,$=Re(this.state.facet(sj));try{for($.s();!(M=$.n()).done;)(0,M.value)(i)}catch(R){$.e(R)}finally{$.f()}}}}},{key:"themeClasses",get:function(){return bj+" "+(this.state.facet(yj)?ude:cde)+" "+this.state.facet(TS)}},{key:"updateAttrs",value:function(){var n=this,e=gde(this,vue,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(wS)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),gde(this,lj,i);var r=this.observer.ignore(function(){var o=nj(n.contentDOM,n.contentAttrs,i),s=nj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(p_),pp.mount(this.root,this.styleModules.concat(mQe).reverse())}},{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(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==us.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return en.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return en.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return pj(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return en.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var _=u+(v+y)*c,C=Rue(r,{x:g,y:_},!1,c);if(_h.bottom||(c<0?Cl))return en.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Rue(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return U4(i,o[I0.find(o,n-r.from,-1,e)].dir==us.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(fue)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>bQe)return Due(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==cj?1:2,d=l==cj?2:1;if(!a||1==u&&!VKe.test(a))return Due(c);for(var h=0,f=u,p=u;h=0;re-=3)if(hh[re+1]==-G){var L=hh[re+2],X=2&L?u:4&L?1&L?d:u:0;X&&(ds[z]=ds[hh[re]]=X),U=re;break}}else{if(189==hh.length)break;hh[U++]=z,hh[U++]=$,hh[U++]=q}else if(2==(R=ds[z])||1==R){var Z=R==u;q=Z?0:1;for(var H=U-3;H>=0;H-=3){var he=hh[H+2];if(2&he)break;if(Z)hh[H+2]|=2;else{if(4&he)break;hh[H+2]|=4}}}for(var E=0;EFe;){for(var ze=tt,ot=2!=ds[--tt];tt>Fe&&ot==(2!=ds[tt-1]);)tt--;oe.push(new I0(tt,ze,ot?2:1))}else oe.push(new I0(Fe,fe,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){Hce(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gue.of(new mue("number"==typeof n?en.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ka.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=pp.newName(),r=[TS.of(i),p_.of(_j(".".concat(i),n))];return e&&e.dark&&r.push(yj.of(!0)),r}},{key:"baseTheme",value:function(n){return k0.lowest(p_.of(_j("."+bj,n,dde)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ws.get(i)||ws.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=p_,Wn.inputHandler=due,Wn.focusChangeEffect=hue,Wn.perLineTextDirection=fue,Wn.exceptionSink=uue,Wn.updateListener=sj,Wn.editable=wS,Wn.mouseSelectionStyle=cue,Wn.dragMovesSelection=lue,Wn.clickAddsSelectionRange=aue,Wn.decorations=f_,Wn.atomicRanges=yue,Wn.scrollMargins=bue,Wn.darkTheme=yj,Wn.contentAttributes=lj,Wn.editorAttributes=vue,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=hr.define();var bQe=4096,pde={},mde=function(){function t(n,e,i,r){ke(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:us.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&ej(s,e)}return e}var _Qe=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function ES(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var wQe=k0.default(Wn.domEventHandlers({keydown:function(t,n){return bde(yde(n.state),t,n,"editor")}})),AS=Qn.define({enables:wQe}),vde=new WeakMap;function yde(t){var n=t.facet(AS),e=vde.get(n);return e||vde.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_Qe,s=Object.create(null),a=Object.create(null),l=function(M,$){var G=a[M];if(null==G)a[M]=$;else if(G!=$)throw new Error("Key binding "+M+" is used both as a regular binding and as a multi-stroke prefix")},c=function(M,$,G,R){for(var z,U,q=s[M]||(s[M]=Object.create(null)),re=$.split(/ (?!$)/).map(function(he){return function xQe(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==us.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=_de(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=wde(t,i),f=wde(t,r),p=h.type==_o.Text?h:null,m=f.type==_o.Text?f:null;if(t.lineWrapping&&(p&&(p=xde(t,i,p)),m&&(m=xde(t,r,m))),p&&m&&p.from==m.from)return C(S(e.from,e.to,p));var g=p?S(e.from,null,p):M(h,!1),v=m?S(null,e.to,m):M(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(_(u,g.bottom,d,v.top)):g.bottomX&&he.from=F)break;Fe>E&&re(Math.max(fe,E),null==$&&fe<=X,Math.min(Fe,F),null==G&&Fe>=Z,oe.dir)}}catch(xe){V.e(xe)}finally{V.f()}if((E=Y.to+1)>=F)break}}}catch(xe){H.e(xe)}finally{H.f()}return 0==q.length&&re(X,null==$,Z,null==G,t.textDirection),{top:z,bottom:U,horizontal:q}}function M($,G){var R=a.top+(G?$.top:$.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function _de(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==us.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function xde(t,n,e){var i=en.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:_o.Text}}function wde(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==_o.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var kQe=function(){function t(n,e){ke(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(MS)!=n.state.facet(MS)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(MS);e0&&void 0!==arguments[0]?arguments[0]:{}),DQe,TQe,EQe,pue.of(!0)]}function Sde(t){return t.startState.facet(g_)!=t.state.facet(g_)}var DQe=Cde({above:!0,markers:function(t){var n,e=t.state,i=e.facet(g_),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||kde:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:en.cursor(s.head,s.head>s.anchor?-1:1),d=Re(wj.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Sde(t);return e&&Dde(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Dde(n.state,t)},class:"cm-cursorLayer"});function Dde(t,n){n.style.animationDuration=t.facet(g_).cursorBlinkRate+"ms"}var TQe=Cde({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:wj.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Sde(t)},class:"cm-selectionLayer"}),Tde={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kde&&(Tde[".cm-line"].caretColor="transparent !important");var EQe=k0.highest(Wn.theme(Tde)),Ede=hr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),v_=Va.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Ede)?i.value:e},t)}}),AQe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(v_);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(v_)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(v_),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(v_)!=n&&this.view.dispatch({effects:Ede.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Ade(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var MQe=function(){function t(n){ke(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new Gm,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(_){m.e(_)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Ade(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),Cj=null!=/x/.unicode?"gu":"g",IQe=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",Cj),FQe={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"},kj=null,IS=Qn.define({combine:function(t){var n=su(t,{render:null,specialChars:IQe,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==kj&&typeof document<"u"&&document.body){var i=document.body.style;kj=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return kj||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,Cj)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,Cj)),n}});function NQe(){return[IS.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Mde||(Mde=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=yi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(IS)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new MQe({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Ba(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=s_(l.text,c,o-l.from);return yi.replace({widget:new PQe((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=yi.replace({widget:new jQe(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(IS);n.startState.facet(IS)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Mde=null,jQe=function(t){wt(e,gp);var n=Ct(e);function e(i,r){var o;return ke(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(FQe[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),PQe=function(t){wt(e,gp);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),LQe=yi.line({class:"cm-activeLine"}),RQe=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(LQe.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return yi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Ide(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):s_(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function BQe(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function $Qe(t,n){var e=Ide(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Ide(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(en.range(y.from+m,y.to+g))}else for(var _=Math.min(u.col,d.col),C=Math.max(u.col,d.col),S=h;S<=f;S++){var M=c.doc.line(S),$=V4(M.text,_,c.tabSize,!0);if($<0)p.push(en.cursor(M.to));else{var G=V4(M.text,C,c.tabSize);p.push(en.range(M.from+$,M.from+G))}}return p}(t.state,e,a);return l.length?en.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var VQe={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},HQe={style:"cursor: crosshair"};function zQe(){var n=Un(VQe[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ka.fromClass(function(){function o(s){ke(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?HQe:null})]}var Fde=function(){function t(n,e,i){ke(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(Sj);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(Sj).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Nde.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||WQe,v=this.view.textDirection==us.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),_=!!a.above;!a.strictSide&&(_?u.top-(d.bottom-d.top)-g.yr.bottom)&&_==r.bottom-u.bottom>u.top-r.top&&(_=!_);var C=(_?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topS&&(S=_?R.top-m-2-f:R.bottom+f+2)}}catch(z){G.e(z)}finally{G.f()}}"absolute"==this.position?(c.style.top=S-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=S+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:S,right:M,bottom:S+m}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(n.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 n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),GQe=Wn.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"}}}),WQe={x:0,y:0},FS=Qn.define({enables:[Ode,GQe]}),NS=Qn.define(),qQe=function(){function t(n){var e=this;ke(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Fde(n,NS,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),XQe=FS.compute([NS],function(t){var n=t.facet(NS).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,si(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,si(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:qQe.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),YQe=function(){function t(n,e,i,r,o){ke(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==us.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=hr.define(),i=Va.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ll.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(QQe)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return NS.from(r)}});return[i,ka.define(function(r){return new YQe(r,t,i,e,n.hoverTime||300)}),XQe]}var QQe=hr.define(),Pde=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function y_(t,n){var e=t.plugin(Lde),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Lde=ka.fromClass(function(){function t(n){ke(this,t),this.input=n.state.facet(b_),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Pde);this.top=new OS(n,!0,e.topContainer),this.bottom=new OS(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Pde);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new OS(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new OS(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(b_);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),zde=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Vde(e.markers(n)),e.initialSpacer&&(this.spacer=new Ude(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Vde(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Go.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),Ude=function(){function t(n,e,i,r){ke(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Bde(),iZe]}function Gde(t){for(var n=9;ni&&(i=s,e.push(oZe.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Go.of(e)}),aZe=0,Aj=Se(function t(n,e){ke(this,t),this.from=n,this.to=e}),gr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,t),this.id=aZe++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=au.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();gr.closedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.openedBy=new gr({deserialize:function(t){return t.split(" ")}}),gr.group=new gr({deserialize:function(t){return t.split(" ")}}),gr.contextHash=new gr({perNode:!0}),gr.lookAhead=new gr({perNode:!0}),gr.mounted=new gr({perNode:!0});var lZe=Object.create(null),au=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ke(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.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(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(gr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):lZe,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(gr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();au.none=new au("",Object.create(null),0,8);var za,cZe=function(){function t(n){ke(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=PS.get(this)||this.topNode,r=new $S(i);return r.moveTo(n,e),PS.set(this,r._tree),r}},{key:"topNode",get:function(){return new w_(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(PS.get(this)||this.topNode,n,e,!1);return PS.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=O0(Wde.get(this)||this.topNode,n,e,!0);return Wde.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|za.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:Fj(au.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(au.none,i,r,o)})}}],[{key:"build",value:function(n){return function hZe(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new uZe(e,e.length):e,d=i.types,h=0,f=0;function p(S,M,$,G,R){for(var z=u.id,U=u.start,q=u.end,re=u.size,L=f;re<0;){if(u.next(),-1==re)return $.push(a[z]),void G.push(U-S);if(-3==re)return void(h=z);if(-4==re)return void(f=z);throw new RangeError("Unrecognized record size: ".concat(re))}var Z,H,ot,he=d[z],E=U-S;if(q-U<=o&&(H=function(ot,B){var ne=u.fork(),ie=0,Ie=0,Ye=0,Le=ne.end-o,_t={size:0,start:0,skip:0};e:for(var At=ne.pos-ot;ne.pos>At;){var _n=ne.size;if(ne.id==B&&_n>=0)_t.size=ie,_t.start=Ie,_t.skip=Ye,Ye+=4,ie+=4,ne.next();else{var ci=ne.pos-_n;if(_n<0||ci=c?4:0,Fi=ne.start;for(ne.next();ne.pos>ci;){if(ne.size<0){if(-3!=ne.size)break e;on+=4}else ne.id>=c&&(on+=4);ne.next()}Ie=Fi,ie+=_n,Ye+=on}}return(B<0||ie==ot)&&(_t.size=ie,_t.start=Ie,_t.skip=Ye),_t.size>4?_t:void 0}(u.pos-M,R))){for(var F=new Uint16Array(H.size-H.skip),N=u.pos-H.size,Y=F.length;u.pos>N;)Y=v(H.start,F,Y);Z=new x_(F,q-H.start,i),E=H.start-S}else{var V=u.pos-re;u.next();for(var oe=[],fe=[],Fe=z>=c?z:-1,xe=0,tt=q;u.pos>V;)Fe>=0&&u.id==Fe&&u.size>=0?(u.end<=tt-o&&(m(oe,fe,U,xe,u.end,tt,Fe,L),xe=oe.length,tt=u.end),u.next()):p(U,V,oe,fe,Fe);if(Fe>=0&&xe>0&&xe-1&&xe>0){var ze=(ot=he,function(B,ne,ie){var Ie,Ye,Le=0,_t=B.length-1;if(_t>=0&&(Ie=B[_t])instanceof Ua){if(!_t&&Ie.type==ot&&Ie.length==ie)return Ie;(Ye=Ie.prop(gr.lookAhead))&&(Le=ne[_t]+Ie.length+Ye)}return g(ot,B,ne,ie,Le)});Z=Fj(he,oe,fe,0,oe.length,0,q-U,ze,ze)}else Z=g(he,oe,fe,q-U,L-q)}$.push(Z),G.push(E)}function m(S,M,$,G,R,z,U,q){for(var re=[],L=[];S.length>G;)re.push(S.pop()),L.push(M.pop()+$-R);S.push(g(i.types[U],re,L,z-R,q-z)),M.push(R-$)}function g(S,M,$,G){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,z=arguments.length>5?arguments[5]:void 0;if(h){var U=[gr.contextHash,h];z=z?[U].concat(z):[U]}if(R>25){var q=[gr.lookAhead,R];z=z?[q].concat(z):[q]}return new Ua(S,M,$,G,z)}function v(S,M,$){var G=u.id,R=u.start,z=u.end,U=u.size;if(u.next(),U>=0&&G4)for(var re=u.pos-(U-4);u.pos>re;)$=v(S,M,$);M[--$]=q,M[--$]=z-S,M[--$]=R-S,M[--$]=G}else-3==U?h=G:-4==U&&(f=G);return $}for(var y=[],_=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,_,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?_[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),_.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(au.none,[],[],0);var uZe=function(){function t(n,e){ke(this,t),this.buffer=n,this.index=e}return Se(t,[{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 t(this.buffer,this.index)}}]),t}(),x_=function(){function t(n,e,i){ke(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return au.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function Xde(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function O0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(qde(r,i,h,h+d.length))if(d instanceof x_){if(o&za.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new Mj(new dZe(s,d,n,h),null,f)}else if(o&za.IncludeAnonymous||!d.type.isAnonymous||Ij(d)){var p=void 0;if(!(o&za.IgnoreMounts)&&d.props&&(p=d.prop(gr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&za.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&za.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._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(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&za.IgnoreOverlays)&&(i=this._tree.prop(gr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}();function LS(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function RS(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var dZe=Se(function t(n,e,i,r){ke(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),Mj=function(){function t(n,e,i){ke(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(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(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&za.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);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(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new $S(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return O0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return Xde(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return LS(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return RS(this,n)}}]),t}(),$S=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ke(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof w_)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof w_?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);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(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&za.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&za.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&za.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&za.IncludeAnonymous||u instanceof x_||!u.type.isAnonymous||Ij(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return RS(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function Ij(t){return t.children.some(function(n){return n instanceof x_||!n.type.isAnonymous||Ij(n)})}var Yde=new WeakMap;function BS(t,n){if(!t.isAnonymous||n instanceof x_||n.type!=t)return 1;var e=Yde.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=BS(t,o)}}catch(s){r.e(s)}finally{r.f()}Yde.set(n,e)}return e}function Fj(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;$+=G}if(C==S+1){if($>d){var R=m[S];p(R.children,R.positions,0,R.children.length,g[S]+_);continue}h.push(m[S])}else h.push(Fj(t,m,g,S,C,M,g[C-1]+m[C-1].length-M,null,l));f.push(M+_-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var VS=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ke(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Kde.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),mZe=0,Kde=function(){function t(){ke(this,t),this.instances=[],this.id=mZe++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,_){return y==v[_]});var g,v});if(i)return i;var r,o=[],s=new yp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=Qde(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function Qde(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new gZe(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return ehe.add(n)}var ehe=new gr,gZe=function(){function t(n,e,i,r){ke(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new bZe(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var Nj,bZe=function(){function t(n,e,i){ke(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function($){return!$.scope||$.scope(s)}));for(var c=r,u=s.prop(ehe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=vZe(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(gr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function($){return!$.scope||$.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var _=v=C)&&n.nextSibling()););if(!_||C>i)break;(y=_.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,_.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),kn=yp.define,HS=kn(),bp=kn(),nhe=kn(bp),ihe=kn(bp),_p=kn(),zS=kn(_p),Oj=kn(_p),mh=kn(),Xm=kn(mh),gh=kn(),vh=kn(),jj=kn(),C_=kn(jj),US=kn(),fn={comment:HS,lineComment:kn(HS),blockComment:kn(HS),docComment:kn(HS),name:bp,variableName:kn(bp),typeName:nhe,tagName:kn(nhe),propertyName:ihe,attributeName:kn(ihe),className:kn(bp),labelName:kn(bp),namespace:kn(bp),macroName:kn(bp),literal:_p,string:zS,docString:kn(zS),character:kn(zS),attributeValue:kn(zS),number:Oj,integer:kn(Oj),float:kn(Oj),bool:kn(_p),regexp:kn(_p),escape:kn(_p),color:kn(_p),url:kn(_p),keyword:gh,self:kn(gh),null:kn(gh),atom:kn(gh),unit:kn(gh),modifier:kn(gh),operatorKeyword:kn(gh),controlKeyword:kn(gh),definitionKeyword:kn(gh),moduleKeyword:kn(gh),operator:vh,derefOperator:kn(vh),arithmeticOperator:kn(vh),logicOperator:kn(vh),bitwiseOperator:kn(vh),compareOperator:kn(vh),updateOperator:kn(vh),definitionOperator:kn(vh),typeOperator:kn(vh),controlOperator:kn(vh),punctuation:jj,separator:kn(jj),bracket:C_,angleBracket:kn(C_),squareBracket:kn(C_),paren:kn(C_),brace:kn(C_),content:mh,heading:Xm,heading1:kn(Xm),heading2:kn(Xm),heading3:kn(Xm),heading4:kn(Xm),heading5:kn(Xm),heading6:kn(Xm),contentSeparator:kn(mh),list:kn(mh),quote:kn(mh),emphasis:kn(mh),strong:kn(mh),link:kn(mh),monospace:kn(mh),strikethrough:kn(mh),inserted:kn(),deleted:kn(),changed:kn(),invalid:kn(),meta:US,documentMeta:kn(US),annotation:kn(US),processingInstruction:kn(US),definition:yp.defineModifier(),constant:yp.defineModifier(),function:yp.defineModifier(),standard:yp.defineModifier(),local:yp.defineModifier(),special:yp.defineModifier()};the([{tag:fn.link,class:"tok-link"},{tag:fn.heading,class:"tok-heading"},{tag:fn.emphasis,class:"tok-emphasis"},{tag:fn.strong,class:"tok-strong"},{tag:fn.keyword,class:"tok-keyword"},{tag:fn.atom,class:"tok-atom"},{tag:fn.bool,class:"tok-bool"},{tag:fn.url,class:"tok-url"},{tag:fn.labelName,class:"tok-labelName"},{tag:fn.inserted,class:"tok-inserted"},{tag:fn.deleted,class:"tok-deleted"},{tag:fn.literal,class:"tok-literal"},{tag:fn.string,class:"tok-string"},{tag:fn.number,class:"tok-number"},{tag:[fn.regexp,fn.escape,fn.special(fn.string)],class:"tok-string2"},{tag:fn.variableName,class:"tok-variableName"},{tag:fn.local(fn.variableName),class:"tok-variableName tok-local"},{tag:fn.definition(fn.variableName),class:"tok-variableName tok-definition"},{tag:fn.special(fn.variableName),class:"tok-variableName2"},{tag:fn.definition(fn.propertyName),class:"tok-propertyName tok-definition"},{tag:fn.typeName,class:"tok-typeName"},{tag:fn.namespace,class:"tok-namespace"},{tag:fn.className,class:"tok-className"},{tag:fn.macroName,class:"tok-macroName"},{tag:fn.propertyName,class:"tok-propertyName"},{tag:fn.operator,class:"tok-operator"},{tag:fn.comment,class:"tok-comment"},{tag:fn.meta,class:"tok-meta"},{tag:fn.invalid,class:"tok-invalid"},{tag:fn.punctuation,class:"tok-punctuation"}]);var j0=new gr,_Ze=new gr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ke(this,t),this.data=n,this.name=r,No.prototype.hasOwnProperty("tree")||Object.defineProperty(No.prototype,"tree",{get:function(){return hl(this)}}),this.parser=e,this.extension=[xp.of(this),No.languageData.of(function(o,s,a){var l=rhe(o,s,a),c=l.type.prop(j0);if(!c)return[];var u=o.facet(c),d=l.type.prop(_Ze);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return rhe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(j0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(xp);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(j0)!=e.data){var l=s.prop(gr.mounted);if(l){if(l.tree.prop(j0)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),k_=null,CZe=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ke(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new wZe(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(VS.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=k_;k_=this;try{return n()}finally{k_=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=ohe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=VS.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=ohe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,Jde);var i=Ct(r);function r(){return ke(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=k_;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(au.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return k_}}]),t}();function ohe(t,n,e){return VS.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var Pj=function(){function t(n){ke(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=CZe.create(n.facet(xp).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Va.define({create:Pj.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(xp)!=n.state.facet(xp)?Pj.init(n.state):t.apply(n)}});var she=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(she=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var Lj=typeof navigator<"u"&&null!==(Nj=navigator.scheduling)&&void 0!==Nj&&Nj.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,kZe=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=she(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return Lj&&Lj()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new Pj(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),xp=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,kZe,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),SZe=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ke(this,t),this.language=n,this.support=e,this.extension=[n,e]}),DZe=Qn.define(),GS=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function P0(t){var n=t.facet(GS);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function S_(t,n){var e="",i=t.tabSize,r=t.facet(GS)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ke(this,t),this.state=n,this.options=e,this.unit=P0(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return s_(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),ahe=new gr;function TZe(t){var n=t.type.prop(ahe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(gr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),_=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,S=g.state.doc.lineAt(y.from),M=null==C||C<=S.from?S.to:Math.min(S.to,C),$=y.to;;){var G=v.childAfter($);if(!G||G==_)return null;if(!G.type.isSkipped)return G.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var IZe=Qn.define(),uhe=new gr;function qS(t,n,e){var i,r=Re(t.facet(IZe));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=hl(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function dhe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var XS=hr.define({map:dhe}),D_=hr.define({map:dhe});function hhe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Ym=Va.define({create:function(){return yi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(XS)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[vhe.range(a.value.from,a.value.to)]}):a.is(D_)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function fhe(t,n){return t.field(Ym,!1)?n:n.concat(hr.appendConfig.of(ghe()))}function phe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var FZe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(hhe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=qS(t.state,i.from,i.to);if(r)return t.dispatch({effects:fhe(t.state,[XS.of(r),phe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Ym,!1))return!1;var n,e=[],i=Re(hhe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=YS(t.state,r.from,r.to);o&&e.push(D_.of(o),phe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},OZe),t),e=new $j(n,!0),i=new $j(n,!1),r=ka.fromClass(function(){function s(a){ke(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(xp)!=a.state.facet(xp)||a.startState.field(Ym,!1)!=a.state.field(Ym,!1)||hl(a.startState)!=hl(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new Gm,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=YS(a.state,d.from,d.to)?i:qS(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,$de({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Go.empty},initialSpacer:function(){return new $j(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=YS(s.state,a.from,a.to);if(c)return s.dispatch({effects:D_.of(c)}),!0;var u=qS(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:XS.of(u)}),!0)}})}),ghe()]}var PZe=Wn.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"}}),Bj=function(){function t(n,e){var i;function r(a){var l=pp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ke(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(j0)==s.data}:s?function(a){return a==s}:void 0,this.style=the(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new pp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),Vj=Qn.define(),yhe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function Hj(t){var n=t.facet(Vj);return n.length?n:t.facet(yhe)}function bhe(t,n){var e,i=[RZe];return t instanceof Bj&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?yhe.of(t):e?Vj.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):Vj.of(t)),i}var LZe=function(){function t(n){ke(this,t),this.markCache=Object.create(null),this.tree=hl(n.state),this.decorations=this.buildDeco(n,Hj(n.state))}return Se(t,[{key:"update",value:function(n){var e=hl(n.state),i=Hj(n.state),r=i!=Hj(n.startState);e.length0&&yh(n.state,s.head-1,1,r)||r.afterCursor&&(yh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),GZe]}var qZe=new gr;function zj(t,n,e){var i=t.prop(n<0?gr.openedBy:gr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function Uj(t){var n=t.type.prop(qZe);return n?n(t.node):t}function yh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=hl(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=zj(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return XZe(0,0,e,l,u,c,o)}}return function YZe(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function XZe(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(whe.push(t),console.warn(n))}function eet(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||fn[o];s?"function"==typeof s?i?i=s(i):Wj(o,"Modifier ".concat(o," used at start of tag")):i?Wj(o,"Tag ".concat(o," used as modifier")):i=s:Wj(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=au.define({id:xhe.length,name:a,props:[Zde(ql({},a,i))]});return xhe.push(l),l.id}function qj(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var tet=qj(function oet(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=Xj(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var re,L=[],X=Re(r);try{for(X.s();!(re=X.n()).done;){var Z=re.value,H=Z.line,he=Z.comment;if(he>=0){var F=H.from+he,N=F+Z.token.length;" "==H.text[N-H.from]&&N++,L.push({from:F,to:N})}}}catch(Y){X.e(Y)}finally{X.f()}return{changes:L}}return null},0),net=qj(She,0),iet=qj(function(t,n){return She(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function Xj(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function She(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return Xj(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function ret(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?Kj:"historyRedo"==n.inputType?KS:null;return!!i&&(n.preventDefault(),i(e))}})]}function JS(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(Jj,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var Kj=JS(0,!1),KS=JS(1,!1),uet=JS(0,!0),det=JS(1,!0);function The(t){return function(n){var e=n.field(Jj,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var het=The(0),fet=The(1),df=function(){function t(n,e,i,r,o){ke(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&C0.fromJSON(n.mapped),n.startSelection&&en.fromJSON(n.startSelection),n.selectionsAfter.map(en.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=lu,o=Re(n.startState.facet(aet));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,lu)}},{key:"selection",value:function(n){return new t(void 0,lu,void 0,void 0,n)}}]),t}();function QS(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Ehe(t,n){return t.length?n.length?t.concat(n):t:n}var lu=[];function Ahe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),QS(t,t.length-1,1e9,e.setSelAfter(i)))}return[df.selection([n])]}function pet(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function Qj(t,n){if(!t.length)return t;for(var e=t.length,i=lu;e;){var r=met(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[df.selection(i)]:lu}function met(t,n,e){var i=Ehe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):lu,e);if(!t.changes)return df.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new df(r,hr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var get=/^(input\.type|delete)($|\.)/,T_=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ke(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||get.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?QS(s,s.length-1,r.minDepth,new df(n.changes.compose(a.changes),Ehe(n.effects,a.effects),a.mapped,a.startSelection,lu)):QS(s,s.length,r.minDepth,n),lu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:lu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function eD(t,n,e){for(var i=hl(t).resolveInner(n.head),r=e?gr.closedBy:gr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;yet(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?yh(t,i.from,1):yh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,en.cursor(l,e?-1:1)}function Ohe(t,n){return ld(t,function(e){if(!e.empty)return ZS(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var jhe=function(t){return Ohe(t,!1)},Phe=function(t){return Ohe(t,!0)};function Lhe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=nD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=nD(t,s,!1),a=nD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:en.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function nD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var efe=function(t,n){return tD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function ofe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(iD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(en.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(en.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:en.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function sfe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(iD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var bet=afe(!1),_et=afe(!0);function afe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=hl(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(gr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new WS(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=Rj(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:en.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var lfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){r.push({from:i.from,insert:n.facet(GS)})}),{userEvent:"input.indent"})),!0)},cfe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(tP(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=s_(o,n.tabSize),a=0,l=S_(n,Math.max(0,s-P0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:rfe}].concat(xet.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Cet=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return eD(t.state,n,!fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,!fl(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return eD(t.state,n,fl(t))})},shift:function(t){return cu(t,function(n){return eD(t.state,n,fl(t))})}},{key:"Alt-ArrowUp",run:function(t){return ofe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return sfe(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return ofe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return sfe(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=en.create([i.main]):i.main.empty||(r=en.create([en.cursor(i.main.head)])),!!r&&(e(bh(n,r)),!0)}},{key:"Mod-Enter",run:_et},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=iD(n).map(function(r){return en.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:en.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=L0(n.selection,function(r){for(var o,s=hl(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return en.range(s.to,s.from)});return e(bh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:cfe},{key:"Mod-]",run:lfe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new WS(n,{overrideIndentation:function(s){return i[s]??-1}}),o=tP(n,function(s,a,l){var c=Rj(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=S_(n,c);(u!=d||l.from0?o--:s0&&yh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ke(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(dfe(a))}:dfe,this.query=this.normalize(e)}return Se(t,[{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 Ba(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=S4(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=Sc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ke(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=hfe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new mfe(n,e,i,r,o);this.re=new RegExp(e,nP+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=rD(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),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 n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=rD(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return iP.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=rD(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pfe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function rD(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function rP(t){var n=Oo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Un(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:oD.of(!1),selection:en.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Oo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:oD.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Oo("label",t.state.phrase("Go to line"),": ",n)," ",Oo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(ffe.prototype[Symbol.iterator]=mfe.prototype[Symbol.iterator]=function(){return this});var oD=hr.define(),gfe=Va.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(oD)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n?rP:null})}}),Det=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Tet={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vfe=Qn.define({combine:function(t){return su(t,Tet,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Eet=yi.mark({class:"cm-selectionMatch"}),Aet=yi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function yfe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==cs.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==cs.Word)}var Met=ka.fromClass(function(){function t(n){ke(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(vfe),i=n.state,r=i.selection;if(r.ranges.length>1)return yi.none;var o,y,_,C,S,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return yi.none;var l=i.wordAt(s.head);if(!l)return yi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return yi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!yfe(a=i.charCategorizer(s.head),i,s.from,s.to)||(S=s.to,(y=a)((_=i).sliceDoc(C=s.from,C+1))!=cs.Word||y(_.sliceDoc(S-1,S))!=cs.Word))return yi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return yi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new R0(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||yfe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Aet.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Eet.range(g,v)),d.length>e.maxMatches))return yi.none}}catch(y){h.e(y)}finally{h.f()}return yi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Iet=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),sD=Qn.define({combine:function(t){return su(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Vet(n)}})}});function Fet(t){return t?[sD.of(t),hP]:hP}var bfe=function(){function t(n){ke(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,nP),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Oet(this):new Net(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:No.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?B0(this,r,e,i):$0(this,r,e,i)}}]),t}(),_fe=Se(function t(n){ke(this,t),this.spec=n});function $0(t,n,e,i){return new R0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=$0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function B0(t,n,e,i){return new ffe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(aD(a.input,a.index))!=cs.Word||r(lD(a.input,a.index))!=cs.Word)&&(r(lD(a.input,a.index+a[0].length))!=cs.Word||r(aD(a.input,a.index+a[0].length))!=cs.Word)}):void 0},e,i);var r}function aD(t,n){return t.slice(Pl(t,n,!1),n)}function lD(t,n){return t.slice(n,Pl(t,n))}var Oet=function(t){wt(e,_fe);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=B0(this.spec,i,o,i.doc.length).next();return s.done&&(s=B0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=B0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=B0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),E_=hr.define(),oP=hr.define(),Cp=Va.define({create:function(t){return new sP(lP(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(E_)?t=new sP(r.value.create(),t.panel):r.is(oP)&&(t=new sP(t.query,r.value?aP:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return b_.from(t,function(n){return n.panel})}}),sP=Se(function t(n,e){ke(this,t),this.query=n,this.panel=e}),jet=yi.mark({class:"cm-searchMatch"}),Pet=yi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Let=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Cp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Cp);(e!=n.startState.field(Cp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return yi.none;for(var i=this.view,r=new Gm,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Pet:jet)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function A_(t){return function(n){var e=n.state.field(Cp,!1);return e&&e.query.spec.valid?t(n,e):cP(n)}}var cD=A_(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:dP(t,r),userEvent:"select.search"}),!0)}),uD=A_(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:dP(t,o),userEvent:"select.search"}),!0)}),Ret=A_(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:en.create(e.map(function(i){return en.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),xfe=A_(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(dP(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),$et=A_(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function aP(t){return t.state.facet(sD).createPanel(t)}function lP(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(sD);return new bfe({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var cP=function(t){var n=t.state.field(Cp,!1);if(n&&n.panel){var e=y_(t,aP);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=lP(t.state,n.query.spec);r.valid&&t.dispatch({effects:E_.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[oP.of(!0),n?E_.of(lP(t.state,n.query.spec)):hr.appendConfig.of(hP)]});return!0},uP=function(t){var n=t.state.field(Cp,!1);if(!n||!n.panel)return!1;var e=y_(t,aP);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:oP.of(!1)}),!0},Bet=[{key:"Mod-f",run:cP,scope:"editor search-panel"},{key:"F3",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:cD,shift:uD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:uP,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new R0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(en.range(c.value.from,c.value.to))}return e(n.update({selection:en.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=y_(t,rP);if(!n){var e=[oD.of(!0)];null==t.state.field(gfe,!1)&&e.push(hr.appendConfig.of([gfe,Det])),t.dispatch({effects:e}),n=y_(t,rP)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=en.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||en.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var _=s.wordAt(y.value.from);if(!_||_.from!=y.value.from||_.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new R0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new R0(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===bn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(en.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Vet=function(){function t(n){var e=this;ke(this,t),this.view=n;var i=this.query=n.state.field(Cp).query.spec;function r(o,s,a){return Oo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Oo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Oo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Oo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Oo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Oo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Oo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return cD(n)},[Ac(n,"next")]),r("prev",function(){return uD(n)},[Ac(n,"previous")]),r("select",function(){return Ret(n)},[Ac(n,"all")]),Oo("label",null,[this.caseField,Ac(n,"match case")]),Oo("label",null,[this.reField,Ac(n,"regexp")]),Oo("label",null,[this.wordField,Ac(n,"by word")])].concat(si(n.state.readOnly?[]:[Oo("br"),this.replaceField,r("replace",function(){return xfe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return $et(n)},[Ac(n,"replace all")])]),[Oo("button",{name:"close",onclick:function(){return uP(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new bfe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:E_.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return bde(yde(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?uD:cD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),xfe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(E_)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(sD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var dD=/[\s\.,:;?!]/;function dP(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!dD.test(l[c+1])&&dD.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!dD.test(l[u-1])&&dD.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Het=Wn.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"}}),hP=[Cp,k0.lowest(Let),Het],wfe=function(){function t(n,e,i){ke(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=hl(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Sfe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Cfe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var kfe=Se(function t(n,e,i){ke(this,t),this.completion=n,this.source=e,this.match=i});function kp(t){return t.selection.main.head}function Sfe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Dfe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:en.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:en.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var Tfe=new WeakMap;function Uet(t){if(!Array.isArray(t))return t;var n=Tfe.get(t);return n||Tfe.set(t,n=function zet(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Un(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(z=S4(R))!=z.toLowerCase()?1:z!=z.toUpperCase()?2:0;(!M||1==U&&C||0==G&&0!=U)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=M:s.length&&(S=!1)),G=U,M+=Sc(R)}return m==c&&0==s[0]&&S?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,_]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,_]:m==c?this.result((g?-200:0)-100-700+(S?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?Sc(Ba(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_h=Qn.define({combine:function(t){return su(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Efe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Wet=function(){function t(n,e){var i=this;ke(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_h);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,si(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,_))),C.className="cm-completionMatchedText",g=_}return g=this.range.to)&&(this.range=Efe(i.options.length,i.selected,this.view.state.facet(_h).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Mfe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,_=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=[1e9-m++];if(_){var $,G=Re(_(S));try{for(G.s();!($=G.n()).done;)M.push($.value)}catch(N){G.e(N)}finally{G.f()}}p.push(new kfe(S,v,M))}}catch(N){C.e(N)}finally{C.f()}}else{var z,U=new Get(h.sliceDoc(v.from,v.to)),q=void 0,re=Re(v.result.options);try{for(re.s();!(z=re.n()).done;){var L=z.value;(q=U.match(L.label))&&(null!=L.boost&&(q[0]+=L.boost),p.push(new kfe(L,v,q)))}}catch(N){re.e(N)}finally{re.f()}}}}catch(N){g.e(N)}finally{g.f()}var X,Z=[],H=null,he=h.facet(_h).compareCompletions,E=Re(p.sort(function(N,Y){return Y.match[0]-N.match[0]||he(N.completion,Y.completion)}));try{for(E.s();!(X=E.n()).done;){var F=X.value;!H||H.label!=F.completion.label||H.detail!=F.completion.detail||null!=H.type&&null!=F.completion.type&&H.type!=F.completion.type||H.apply!=F.completion.apply?Z.push(F):Afe(F.completion)>Afe(H)&&(Z[Z.length-1]=F),H=F.completion}}catch(N){E.e(N)}finally{E.f()}return Z}(n,e);if(!s.length)return null;var a,l=e.facet(_h).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var Jet=[];function fP(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var Jm=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ke(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=fP(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(pP))r=new t(r.source,1,a.value?kp(n.state):-1);else if(a.is(hD))r=new t(r.source,0);else if(a.is(Ife)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(kp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),Ket=function(t){wt(e,Jm);var n=Ct(e);function e(i,r,o,s,a){var l;return ke(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=kp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&kp(i.startState)==this.from)return new Jm(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Sfe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new wfe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:kp(i.state)):new Jm(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new Jm(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),pP=hr.define(),hD=hr.define(),Ife=hr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),Ffe=hr.define(),uu=Va.define({create:function(){return Xet.start()},update:function(t,n){return t.update(n)},provide:function(t){return[FS.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function fD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(uu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function KQe(t,n){var e=t.plugin(Ode);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:Ffe.of(a)}),!0}}var Qet=Se(function t(n,e){ke(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),Zet=ka.fromClass(function(){function t(n){ke(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(uu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(uu);if(n.selectionSet||n.docChanged||n.startState.field(uu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!fP(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,si(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==fP(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(uu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=kp(i),o=new wfe(i,r,n.explicitPos==r),s=new Qet(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:hD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_h),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new Ket(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:kp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(uu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new Jm(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),pD={brackets:["(","[","{","'",'"'],before:")]}:;>"},Km=hr.define({map:function(t,n){return n.mapPos(t,-1,Ll.TrackAfter)??void 0}}),mP=hr.define({map:function(t,n){return n.mapPos(t)}}),gP=new(function(t){wt(e,Um);var n=Ct(e);function e(){return ke(this,e),n.apply(this,arguments)}return Se(e)}());gP.startSide=1,gP.endSide=-1;var Nfe=Va.define({create:function(){return Go.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Go.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(Km)?t=t.update({add:[gP.range(a.value,a.value+1)]}):a.is(mP)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Ofe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return S4(t<128?t:t+1)}function jfe(t,n){return t.languageDataAt("closeBrackets",n)[0]||pD}var ttt="object"==(typeof navigator>"u"?"undefined":bn(navigator))&&/Android\b/.test(navigator.userAgent),ntt=Wn.inputHandler.of(function(t,n,e,i){if((ttt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==Sc(Ba(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=jfe(s,s.selection.main.head),u=c.brackets||pD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Ofe(Ba(h,0));if(a==h)return f==h?stt(s,h,u.indexOf(h+h+h)>-1):rtt(s,h,f,c.before||pD.before);if(a==f&&Pfe(s,s.selection.main.from))return ott(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),itt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=jfe(n,n.selection.main.head).brackets||pD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=Sc(Ba(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&mD(n.doc,s.head)==Ofe(Ba(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:en.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Pfe(t,n){var e=!1;return t.field(Nfe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function mD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,Sc(Ba(e,0)))}function rtt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Km.of(s.to+n.length),range:en.range(s.anchor+n.length,s.head+n.length)};var a=mD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Km.of(s.head+n.length),range:en.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function ott(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&mD(t.doc,o.head)==e?en.cursor(o.head+e.length):i=o});return i?null:t.update({selection:en.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return mP.of(o.from)})})}function stt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Km.of(o.to+n.length),range:en.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=mD(t.doc,s);if(a==n){if(Lfe(t,s))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(Pfe(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:en.cursor(s+n.length*(l?3:1)),effects:mP.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Lfe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=cs.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=cs.Word&&!function(u,d,h){for(var f=hl(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Km.of(s+n.length),range:en.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Lfe(t,n){var e=hl(t).resolveInner(n+1);return e.parent&&e.from==n}function att(){return[uu,_h.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Zet,ltt,ett]}var Rfe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(uu,!1)&&(t.dispatch({effects:pP.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(uu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:hD.of(null)}),0))}},{key:"ArrowDown",run:fD(!0)},{key:"ArrowUp",run:fD(!1)},{key:"PageDown",run:fD(!0,"page")},{key:"PageUp",run:fD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(uu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Dfe(t,n.open.options[n.open.selected]),0))}}],ltt=k0.highest(AS.computeN([_h],function(t){return t.facet(_h).defaultKeymap?[Rfe]:[]})),ctt=Se(function t(n,e,i){ke(this,t),this.from=n,this.to=e,this.diagnostic=i}),M_=function(){function t(n,e,i){ke(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Qm).markerFilter;o&&(r=o(r));var s=yi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?yi.widget({widget:new ptt(a),diagnostic:a}).range(a.from):yi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,V0(s))}}]),t}();function V0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new ctt(r,o,a.diagnostic),!1}),i}function $fe(t,n){return!(!t.effects.some(function(e){return e.is(gD)})&&!t.changes.touchesRange(n.pos))}function Bfe(t,n){return t.field(Mc,!1)?n:n.concat(hr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?yi.set([utt.range(r.from,r.to)]):yi.none}),JQe(dtt,{hideOn:$fe}),mtt]))}var gD=hr.define(),vP=hr.define(),Vfe=hr.define(),Mc=Va.define({create:function(){return new M_(yi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=V0(e,t.selected.diagnostic,r)||V0(e,null,r)}t=new M_(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(gD)?t=M_.init(a.value,t.panel,n.state):a.is(vP)?t=new M_(t.diagnostics,a.value?qfe.open:null,t.selected):a.is(Vfe)&&(t=new M_(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[b_.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),utt=yi.mark({class:"cm-lintRange cm-lintRange-active"});function dtt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=Ufe(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=V0(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Vfe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function vD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function yP(t){return vD(''),'width="6" height="3"')}var mtt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:yP("#d11")},".cm-lintRange-warning":{backgroundImage:yP("orange")},".cm-lintRange-info":{backgroundImage:yP("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gtt=function(t){wt(e,ph);var n=Ct(e);function e(i){var r;return ke(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(yD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:bP.of({pos:f.from,above:!1,create:function(){return{dom:Hfe(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var _=m.getBoundingClientRect();if(!(y.clientX>_.left-10&&y.clientX<_.right+10&&y.clientY>_.top-10&&y.clientY<_.bottom+10)){for(var C=y.target;C;C=C.parentNode)if(1==C.nodeType&&C.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",v),p.state.field(Yfe)&&p.dispatch({effects:bP.of(null)})}})}var d=a.state.facet(yD).hoverTime,h=setTimeout(u,d);l.onmouseout=function(){clearTimeout(h),l.onmouseout=l.onmousemove=null},l.onmousemove=function(){clearTimeout(h),h=setTimeout(u,d)}}(i,r,o)}),r}}]),e}();function vtt(t,n){var e,i=Object.create(null),r=Re(n);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t.lineAt(o.from);(i[s.from]||(i[s.from]=[])).push(o)}}catch(c){r.e(c)}finally{r.f()}var a=[];for(var l in i)a.push(new gtt(i[l]).range(+l));return Go.of(a,!0)}var ytt=$de({class:"cm-gutter-lint",markers:function(t){return t.state.field(Xfe)}}),Xfe=Va.define({create:function(){return Go.empty},update:function(t,n){t=t.map(n.changes);var e,i=n.state.facet(yD).markerFilter,r=Re(n.effects);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.is(gD)){var s=o.value;i&&(s=i(s||[])),t=vtt(n.state.doc,s.slice(0))}}}catch(a){r.e(a)}finally{r.f()}return t}}),bP=hr.define(),Yfe=Va.define({create:function(){return null},update:function(t,n){return t&&n.docChanged&&(t=$fe(n,t)?null:Object.assign(Object.assign({},t),{pos:n.changes.mapPos(t.pos)})),n.effects.reduce(function(e,i){return i.is(bP)?i.value:e},t)},provide:function(t){return FS.from(t)}}),btt=Wn.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:vD('')},".cm-lint-marker-warning":{content:vD('')},".cm-lint-marker-error":{content:vD('')}}),yD=Qn.define({combine:function(t){return su(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function _tt(){return[yD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Xfe,ytt,btt,Yfe]}var Jfe,xtt=function(){return[rZe(),sZe,NQe(),cet(),jZe(),SQe(),[v_,AQe],No.allowMultipleSelections.of(!0),No.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=Rj(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=S_(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),bhe($Ze,{fallback:!0}),WZe(),[ntt,Nfe],att(),BQe(),zQe(),RQe,(n=[Iet,Met],n),AS.of([].concat(itt,si(Cet),Bet,vet,FZe,Rfe,htt))];var n}(),wtt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ke(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%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(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ctt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!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 n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Kfe(r,r.start):null,0,null)}}]),t}(),Kfe=Se(function t(n,e){ke(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Jfe||(Jfe={}));var Ctt=function(){function t(n){ke(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),ktt=function(){function t(n,e,i){ke(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.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 t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),bD=Se(function t(){ke(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),Qfe=new bD,Stt=function(){function t(n,e){ke(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qfe,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,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(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=Qfe,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),_D=function(){function t(n,e){ke(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function xD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}_D.prototype.contextual=_D.prototype.fallback=_D.prototype.extend=!1;var Zfe,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),_P=null;function epe(t,n,e){var i=t.cursor(za.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Zfe||(Zfe={}));var tpe,Dtt=function(){function t(n,e){ke(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?epe(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?epe(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Ttt=function(){function t(n,e){ke(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new bD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new bD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new bD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Dtt(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,_=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var S=y.value,M=S.p.stoppedAt;(S.pos==S.p.stream.end||null!=M&&S.pos>M)&&S.p.parser.stateFlag(S.state,2)&&(!_||_.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(gr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(_):i.push(_)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return npe(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),npe(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],_=-v;_>0;_--)d(p[g++],m,y);g++}}}}catch(M){f.e(M)}finally{f.f()}}o.nodeSet=new cZe(s.map(function(M,$){return au.define({name:$>=o.minRepeatTerm?void 0:M,id:$,props:c[$],top:l.indexOf($)>-1,error:0==$,skipped:i.skippedNodes&&i.skippedNodes.indexOf($)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,si(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=xD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var S=0;S2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=hf(this.data,o+2)}if(r==hf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=hf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=ipe(this.data,this.tokenPrecTable,r);return o<0||ipe(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&ape(t);return{c:function(){n=be("div"),r&&r.c(),e=it(),o&&o.c(),i=it(),s&&s.c(),P(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),de(n,e),o&&o.m(n,null),de(n,i),s&&s.m(n,null)},p:function(a,l){var c=Un(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=ope(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=spe(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=ape(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:Lt,o:Lt,d:function(a){a&&je(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ptt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Ltt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ptt,jtt,ys,{editorState:3},Ott),r}return Se(e)}(),xP=Bj.define([{tag:fn.propertyName,color:"var(--jse-key-color)"},{tag:fn.number,color:"var(--jse-value-color-number)"},{tag:fn.bool,color:"var(--jse-value-color-boolean)"},{tag:fn.string,color:"var(--jse-value-color-string)"},{tag:fn.keyword,color:"var(--jse-value-color-null)"}]),Rtt=bhe(xP),$tt=xP.style;function wP(t){return t.doc.lineAt(t.selection.main.head)}function lpe(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=lpe(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=lpe(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=wP(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,_=g.from;_<=y;){var C=f.doc.lineAt(_);p.has(C)||p.add(C),_=C.to+1}}catch(S){m.e(S)}finally{m.f()}return p}(this.view,n),o=new Btt(r,n,this.unitWidth),s=n.facet(wD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Htt(c,this.unitWidth,s);i.add(l.from,l.from,yi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Utt(){return[wD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Vtt,ka.fromClass(ztt,{decorations:function(n){return n.decorations}})]}function Gtt(t){pi(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function CP(t){var n=t.slice();return n[93]=0===n[10].length,n}function cpe(t){var n,e;return n=new hKe({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Wtt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function qtt(t){var n,e,i,r,o,s=t[92]&&upe(t),a=!t[92]&&dpe(t);return{c:function(){n=be("div"),e=it(),s&&s.c(),i=it(),a&&a.c(),r=_r(),P(n,"class","jse-contents svelte-1yqirn0"),Mt(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Mt(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&Q(s,1)):((s=upe(l)).c(),Q(s,1),s.m(i.parentNode,i)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),l[92]?a&&($t(),ce(a,1,1,function(){a=null}),Bt()):a?(a.p(l,c),1152&c[0]&&Q(a,1)):((a=dpe(l)).c(),Q(a,1),a.m(r.parentNode,r))},i:function(l){o||(Q(s),Q(a),o=!0)},o:function(l){ce(s),ce(a),o=!1},d:function(l){l&&je(n),t[50](null),l&&je(e),s&&s.d(l),l&&je(i),a&&a.d(l),l&&je(r)}}}function upe(t){var n,e,i,r,o,s=oh(t[10]||"",2e4)+"";return n=new nd({props:{icon:$m,type:"error",message:"The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){mt(n.$$.fragment),e=it(),i=be("div"),r=tn(s),P(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){ft(n,a,l),Pe(a,e,l),Pe(a,i,l),de(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(sS(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(sS(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=oh(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(Q(n.$$.fragment,a),o=!0)},o:function(a){ce(n.$$.fragment,a),o=!1},d:function(a){pt(n,a),a&&je(e),a&&je(i)}}}function dpe(t){var n,e,i,r,o,s=!t[13]&&t[8]&&hoe(t[10]),a=t[2]&&hpe(t),l=t[13]&&fpe(t),c=s&&ppe(t);return r=new l4({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=it(),l&&l.c(),e=it(),c&&c.c(),i=it(),mt(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),ft(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&Q(a,1)):((a=hpe(u)).c(),Q(a,1),a.m(n.parentNode,n)):a&&($t(),ce(a,1,1,function(){a=null}),Bt()),u[13]?l?(l.p(u,d),8192&d[0]&&Q(l,1)):((l=fpe(u)).c(),Q(l,1),l.m(e.parentNode,e)):l&&($t(),ce(l,1,1,function(){l=null}),Bt()),9472&d[0]&&(s=!u[13]&&u[8]&&hoe(u[10])),s?c?(c.p(u,d),9472&d[0]&&Q(c,1)):((c=ppe(u)).c(),Q(c,1),c.m(i.parentNode,i)):c&&($t(),ce(c,1,1,function(){c=null}),Bt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!0)},o:function(u){ce(a),ce(l),ce(c),ce(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&je(n),l&&l.d(u),u&&je(e),c&&c.d(u),u&&je(i),pt(r,u)}}}function hpe(t){var n,e;return n=new Ltt({props:{editorState:t[6]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function fpe(t){var n,e;return n=new nd({props:{type:"error",icon:$m,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function ppe(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:m4,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:p0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Xtt(t){var n,e,i,r,o,s=t[1]&&cpe(CP(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[qtt,Wtt][i](c(t,i)),{c:function(){n=be("div"),s&&s.c(),e=it(),r.c(),P(n,"class","jse-text-mode svelte-1yqirn0"),Mt(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),de(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(CP(u),d),2&d[0]&&Q(s,1)):((s=cpe(CP(u))).c(),Q(s,1),s.m(n,e)):s&&($t(),ce(s,1,1,function(){s=null}),Bt()),r.p(c(u,i),d),(!o||2&d[0])&&Mt(n,"no-main-menu",!u[1])},i:function(u){o||(Q(s),Q(r),o=!0)},o:function(u){ce(s),ce(r),o=!1},d:function(u){u&&je(n),s&&s.d(),l[i].d(),t[52](null)}}}function mpe(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function Ytt(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,_=n.onChange,C=n.onChangeMode,S=n.onError,M=n.onFocus,$=n.onBlur,G=n.onRenderMenu,R=n.onSortModal,z=n.onTransformModal,U=wa("jsoneditor:TextMode"),q={key:"Mod-i",run:ie,shift:Ie,preventDefault:!0},re=typeof window>"u";U("isSSR:",re);var L=!1,X=!0,Z=[],H=new hp,he=new hp,E=new hp,F=new hp,N=new hp,Y=new hp,V=h,oe=Nk(V,f,g),fe=m;Wc(Zi(vn().mark(function gt(){return vn().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!re){On.next=2;break}return On.abrupt("return");case 2:try{s=ci({target:o,initialText:jo(oe,L)?"":i.escapeValue(oe),readOnly:c,indentation:f})}catch(ai){console.error(ai)}case 3:case"end":return On.stop()}},gt)}))),Hu(function(){s&&(U("Destroy CodeMirror editor"),s.destroy())});var Fe=!1,xe=!1,tt=ep(),ze=ep();function ot(){s&&(U("focus"),s.focus())}var B=!1;function ne(gt){U("patch",gt);var On=g.parse(oe),ai=Yu(On,gt),bi=FQ(On,gt);return Nr({text:g.stringify(ai,null,f)}),{json:ai,previousJson:On,undo:bi,redo:gt}}function ie(){if(U("format"),c)return!1;try{var gt=g.parse(oe);return Nr({text:g.stringify(gt,null,f)}),e(8,X=!0),!0}catch(On){S(On)}return!1}function Ie(){if(U("compact"),c)return!1;try{var gt=g.parse(oe);return Nr({text:g.stringify(gt)}),e(8,X=!1),!0}catch(On){S(On)}return!1}function Ye(){if(U("repair"),!c)try{Nr({text:Yd(oe)}),e(49,Nn="valid"),e(13,xt=null)}catch(gt){S(gt)}}function Le(gt){var On=gt.id,ai=gt.rootPath,bi=gt.onTransform,Er=gt.onClose;try{var qr=g.parse(oe);B=!0,z({id:On||ze,json:qr,rootPath:ai||[],onTransform:function(ao){bi?bi({operations:ao,json:qr,transformedJson:Yu(qr,ao)}):(U("onTransform",ao),ne(ao))},onClose:function(){B=!1,ot(),Er&&Er()}})}catch(ao){S(ao)}}function _t(gt,On){U("setSelection",{anchor:gt,head:On}),s&&s.dispatch(s.state.update({selection:{anchor:gt,head:On},scrollIntoView:!0}))}function At(gt,On){if(1===On.state.selection.ranges.length){var ai=On.state.selection.ranges[0],bi=oe.slice(ai.from,ai.to);if("{"===bi||"["===bi){var Er=O2.parse(oe),qr=Object.keys(Er.pointers).find(function(Js){var vr;return(null===(vr=Er.pointers[Js].value)||void 0===vr?void 0:vr.pos)===ai.from}),ao=Er.pointers[qr];qr&&ao&&ao.value&&ao.valueEnd&&(U("pointer found, selecting inner contents of path:",qr,ao),_t(ao.value.pos+1,ao.valueEnd.pos-1))}}}function _n(){return function(gt){return Qm.of({source:gt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ui,{delay:300})}function ci(gt){var On=gt.target,ai=gt.initialText,bi=gt.readOnly,Er=gt.indentation;U("Create CodeMirror editor",{readOnly:bi,indentation:Er});var qr=No.create({doc:ai,extensions:[AS.of([ket,q]),H.of(_n()),_tt(),xtt,Rtt,Utt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:At}),Wn.updateListener.of(function(ao){e(6,l=ao.state),ao.docChanged&&Ai()}),new SZe(Ntt),Fet({top:!0}),E.of(No.readOnly.of(bi)),he.of(Wn.editable.of(!bi)),N.of(No.tabSize.of(p)),F.of(wr(Er)),Y.of(Wn.theme({},{dark:on()})),Wn.lineWrapping]});return s=new Wn({state:qr,parent:On})}function on(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Fi(gt){var On=gt.path,ai=gt.message,bi=function(Er,qr){try{var ao=O2.parse(Er),Js=ln(qr),vr=ao.pointers[Js];if(vr)return{path:qr,line:vr.key?vr.key.line:vr.value?vr.value.line:0,column:vr.key?vr.key.column:vr.value?vr.value.column:0,from:vr.key?vr.key.pos:vr.value?vr.value.pos:0,to:vr.keyEnd?vr.keyEnd.pos:vr.valueEnd?vr.valueEnd.pos:0}}catch(Ks){console.error(Ks)}return null}(i.escapeValue(oe),On);return{path:On,line:bi.line,column:bi.column,from:bi.from,to:bi.to,message:ai,severity:Xd.warning,actions:[]}}function pn(gt,On){var Er=gt.position;return{path:[],line:gt.line,column:gt.column,from:Er,to:Er,severity:Xd.error,message:gt.message,actions:On&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function Nr(gt){var On=arguments.length>1&&void 0!==arguments[1]&&arguments[1],ai=Nk(gt,f,g),bi=!or(gt,V),Er=V;V=gt,e(10,oe=ai),U("setCodeMirrorContent",{isChanged:bi,forceUpdate:On}),s&&(bi||On)&&(jo(oe,L)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}}),Or(),bi&&Wr(V,Er))}function $r(){if(s){var gt=s?i.unescapeValue(s.state.doc.toString()):"",On=gt!==oe;if(U("onChangeCodeMirrorValue",{isChanged:On}),On){var ai=V;e(10,oe=gt),V={text:oe},Or(),Wr(V,ai)}}}function wr(gt){return GS.of("number"==typeof gt?" ".repeat(gt):gt)}function Or(){e(11,Fe=het(s.state)>0),e(12,xe=fet(s.state)>0),U({canUndo:Fe,canRedo:xe})}a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(a)},hasFocus:function(){return B&&document.hasFocus()||jk(a)},onFocus:M,onBlur:$});var Ai=Gv($r,300);function Wr(gt,On){_&&_(gt,On,{contentErrors:Ni(),patchResult:null})}function jo(gt,On){return!!gt&>.length>10485760&&!On}var Nn="valid",xt=null;function ui(){if(jo(oe,L))return[];var gt=Ni();return Dae(gt)?[mpe(pn(gt.parseError,gt.isRepairable))]:function Jqe(t){return Io(t)&&Array.isArray(t.validationErrors)}(gt)?gt.validationErrors.map(Fi).map(mpe):[]}function Ni(){U("validate:start"),Ai.flush();var gt=Cr(i.escapeValue(oe),v,g,y);return Dae(gt)?(e(49,Nn=gt.isRepairable?"repairable":"invalid"),e(13,xt=gt.parseError),e(9,Z=[])):(e(49,Nn="valid"),e(13,xt=null),e(9,Z=gt?.validationErrors||[])),U("validate:end"),gt}var Cr=Zb(Oqe);function xo(){xt&&function(gt){U("select parse error",gt);var On=pn(gt,!1);_t(On.from,On.to),ot()}(xt)}var Qo={icon:xWe,text:"Show me",title:"Move to the parse error location",onClick:xo};return t.$$set=function(gt){"readOnly"in gt&&e(0,c=gt.readOnly),"mainMenuBar"in gt&&e(1,u=gt.mainMenuBar),"statusBar"in gt&&e(2,d=gt.statusBar),"externalContent"in gt&&e(29,h=gt.externalContent),"indentation"in gt&&e(30,f=gt.indentation),"tabSize"in gt&&e(31,p=gt.tabSize),"escapeUnicodeCharacters"in gt&&e(32,m=gt.escapeUnicodeCharacters),"parser"in gt&&e(33,g=gt.parser),"validator"in gt&&e(34,v=gt.validator),"validationParser"in gt&&e(35,y=gt.validationParser),"onChange"in gt&&e(36,_=gt.onChange),"onChangeMode"in gt&&e(37,C=gt.onChangeMode),"onError"in gt&&e(38,S=gt.onError),"onFocus"in gt&&e(39,M=gt.onFocus),"onBlur"in gt&&e(40,$=gt.onBlur),"onRenderMenu"in gt&&e(3,G=gt.onRenderMenu),"onSortModal"in gt&&e(41,R=gt.onSortModal),"onTransformModal"in gt&&e(42,z=gt.onTransformModal)},t.$$.update=function(){var gt;2&t.$$.dirty[1]&&(i=TO({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&Nr(h),8&t.$$.dirty[1]&&(U("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(_n())})),1073741824&t.$$.dirty[0]&&(gt=f,s&&(U("updateIndentation",gt),s.dispatch({effects:F.reconfigure(wr(gt))}))),1&t.$$.dirty[1]&&function(gt){s&&(U("updateTabSize",gt),s.dispatch({effects:N.reconfigure(No.tabSize.of(gt))}))}(p),1&t.$$.dirty[0]&&function(gt){s&&(U("updateReadOnly",gt),s.dispatch({effects:[E.reconfigure(No.readOnly.of(gt)),he.reconfigure(Wn.editable.of(!gt))]}))}(c),131074&t.$$.dirty[1]&&fe!==m&&(e(48,fe=m),U("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(oe)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Nn||c?[Qo]:[{icon:zk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},Qo])},[c,u,d,G,o,a,l,L,X,Z,oe,Fe,xe,xt,r,re,ie,Ie,function(){var gt;if(!c)try{var On=g.parse(oe);B=!0,R({id:tt,json:On,rootPath:[],onSort:(gt=Zi(vn().mark(function ai(bi){var Er;return vn().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:U("onSort",Er=bi.operations),ne(Er);case 3:case"end":return qr.stop()}},ai)})),function(ai){return gt.apply(this,arguments)}),onClose:function(){B=!1,ot()}})}catch(ai){S(ai)}},function(){c||Le({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?uP(s):cP(s))},function(){c||s&&(Kj(s),ot())},function(){c||s&&(KS(s),ot())},function(){e(7,L=!0),Nr(h,!0)},function(){C(Jo.tree)},function(){$r()},function(gt){U("select validation error",gt);var On=Fi(gt);_t(On.from,On.to),ot()},jo,xo,h,f,p,m,g,v,y,_,C,S,M,$,R,z,ot,ne,Le,function(){U("refresh"),Xl().then(function(){if(s){var gt=on();U("updateTheme",{dark:gt}),s.dispatch({effects:[Y.reconfigure(Wn.theme({},{dark:gt}))]})}})},Ni,fe,Nn,function(gt){Vi[gt?"unshift":"push"](function(){e(4,o=gt)})},function(){return e(8,X=!1)},function(gt){Vi[gt?"unshift":"push"](function(){e(5,a=gt)})}]}var Jtt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Ytt,Xtt,Ei,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Gtt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function Ktt(t){var n,e;return n=new nS({props:{items:t[0]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};1&Un(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Qtt(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:Gk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:Hk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:bse,title:xF,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:JO,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:YO,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var Ztt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Qtt,Ktt,Ei,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function gpe(t,n,e){var i=t.slice();return i[9]=n[e],i}function vpe(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],_=Xi(v);_.length>0&&!Xc(m,_);)y.unshift({op:"add",path:ln(_),value:{}}),_=Xi(_);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&ip(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var nnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,tnt,ent,Ei,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function int(t){pi(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function rnt(t){var n,e,i,r,o=oh(t[2].stringify(t[1]),50)+"";return{c:function(){n=be("button"),e=tn(o),P(n,"type","button"),P(n,"class","jse-inline-value svelte-l28mqd"),Mt(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),de(n,e),i||(r=Nt(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Un(a,1)[0];6&l&&o!==(o=oh(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&Mt(n,"jse-selected",s[3])},i:Lt,o:Lt,d:function(s){s&&je(n),i=!1,r()}}}function ont(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=oo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var snt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ont,rnt,Ei,{path:0,value:1,parser:2,isSelected:3,onEdit:4},int),r}return Se(e)}();function ant(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function ype(t){var n,e,i,r;return e=new sr({props:{data:t[1]===qc.asc?ru:yse}}),{c:function(){n=be("span"),mt(e.$$.fragment),P(n,"class","jse-column-sort-icon svelte-h4fort"),P(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),ft(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===qc.asc?ru:yse),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&P(n,"title",i)},i:function(o){r||(Q(e.$$.fragment,o),r=!0)},o:function(o){ce(e.$$.fragment,o),r=!1},d:function(o){o&&je(n),pt(e)}}}function lnt(t){var n,e,i,r,o,s,a,l,c=oh(t[3],50)+"",u=void 0!==t[1]&&ype(t);return{c:function(){n=be("button"),e=be("span"),i=tn(c),r=it(),u&&u.c(),P(e,"class","jse-column-name"),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Mt(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),de(n,e),de(e,i),de(n,r),u&&u.m(n,null),s=!0,a||(l=Nt(n,"click",t[4]),a=!0)},p:function(d,h){var f=Un(h,1)[0];(!s||8&f)&&c!==(c=oh(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&Q(u,1)):((u=ype(d)).c(),Q(u,1),u.m(n,null)):u&&($t(),ce(u,1,1,function(){u=null}),Bt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&P(n,"title",o),(!s||1&f)&&Mt(n,"jse-readonly",d[0])},i:function(d){s||(Q(u),s=!0)},o:function(d){ce(u),s=!1},d:function(d){d&&je(n),u&&u.d(),a=!1,l()}}}function cnt(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Hi(s)?"values":tu(Kl(s))),96&t.$$.dirty&&e(1,r=or(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=H7e[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===qc.asc?qc.desc:qc.asc})},s,a,c]}var CD,kD,unt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,cnt,lnt,Ei,{path:5,sortedColumn:6,readOnly:0,onSort:7},ant),r}return Se(e)}();function bpe(t,n){return CD||(kD=new WeakMap,CD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=kD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),kD.set(t,n),CD.observe(t),{destroy:function(){kD.delete(t),CD.unobserve(t)}}}function dnt(t){var n,e;return n=new Jae({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function hnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,_=n.onEditValue,C=n.onEditRow,S=n.onToggleEnforceString,M=n.onCut,$=n.onCopy,G=n.onPaste,R=n.onRemove,z=n.onDuplicateRow,U=n.onInsertBeforeRow,q=n.onInsertAfterRow,re=n.onRemoveRow;function L(){y(),_()}function X(){y(),C()}function Z(){y(),S()}function H(){y(),M(!0)}function he(){y(),M(!1)}function E(){y(),$(!0)}function F(){y(),$(!1)}function N(){y(),G()}function Y(){y(),R()}function V(){y(),z()}function oe(){y(),U()}function fe(){y(),q()}function Fe(){y(),re()}return t.$$set=function(xe){"json"in xe&&e(2,p=xe.json),"documentState"in xe&&e(3,m=xe.documentState),"parser"in xe&&e(4,g=xe.parser),"showTip"in xe&&e(0,v=xe.showTip),"onCloseContextMenu"in xe&&e(5,y=xe.onCloseContextMenu),"onEditValue"in xe&&e(6,_=xe.onEditValue),"onEditRow"in xe&&e(7,C=xe.onEditRow),"onToggleEnforceString"in xe&&e(8,S=xe.onToggleEnforceString),"onCut"in xe&&e(9,M=xe.onCut),"onCopy"in xe&&e(10,$=xe.onCopy),"onPaste"in xe&&e(11,G=xe.onPaste),"onRemove"in xe&&e(12,R=xe.onRemove),"onDuplicateRow"in xe&&e(13,z=xe.onDuplicateRow),"onInsertBeforeRow"in xe&&e(14,U=xe.onInsertBeforeRow),"onInsertAfterRow"in xe&&e(15,q=xe.onInsertAfterRow),"onRemoveRow"in xe&&e(16,re=xe.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Hi(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Fr(i)||xs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Fr(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&zb(i)&&!s&&Array.isArray(Sn(p,Xi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&zb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!Ho(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Io(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&Lm(i)&&Ho(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&lf(a,m.enforceStringMap,ln(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:L,icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:h0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:L,disabled:!c},{type:"button",icon:h?$b:Bb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Z,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:d0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:d0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:d0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:he,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:sp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:sp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:sp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:F,disabled:!l}]},{type:"button",onClick:N,icon:mse,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:Y,icon:XO,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:X,icon:h0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:wse,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:oe,icon:f0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:fe,icon:f0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Fe,icon:XO,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,_,C,S,M,$,G,R,z,U,q,re,o,l,u,h,c,i,a,d,r,s]}var fnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,hnt,dnt,Ei,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function pnt(t){pi(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function _pe(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function mnt(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&je(n),i&&je(e)}}}function gnt(t){var n;return{c:function(){n=tn("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,i){Pe(e,n,i)},p:Lt,d:function(e){e&&je(n)}}}function xpe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=tu(Kl(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=be("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=be("span"),a=tn("("),l=tn(m),c=it(),u=tn(g),d=tn(")"),P(s,"class","jse-nested-array-count svelte-1te5h1h"),P(n,"type","button"),P(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,_){Pe(y,n,_),de(n,e),de(n,i),de(n,r),de(n,o),de(n,s),de(s,a),de(s,l),de(s,c),de(s,u),de(s,d),h||(f=Nt(n,"click",v),h=!0)},p:function(y,_){t=y,64&_&&qn(e,t[6]),8&_&&p!==(p=tu(Kl(t[12]))+"")&&qn(r,p),9&_&&m!==(m=t[13]+"")&&qn(l,m),9&_&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&je(n),h=!1,f()}}}function vnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(G,R){return G[4]?gnt:mnt}for(var _=y(t),C=_(t),S=t[3],M=[],$=0;$1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Mo(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Hi(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Mo(l)?"An object":oo(l)?"An empty array":"A ".concat(VF(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Jo.tree)}]}var bnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,ynt,vnt,Ei,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},pnt),r}return Se(e)}();function _nt(t){pi(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function xnt(t){var n,e,i,r,o,s;return e=new sr({props:{data:TWe}}),{c:function(){n=be("button"),mt(e.$$.fragment),P(n,"type","button"),P(n,"class","jse-column-header svelte-h4fort"),P(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),ft(e,n,null),r=!0,o||(s=Nt(n,"click",t[3]),o=!0)},p:function(a,l){var c=Un(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&P(n,"title",i)},i:function(a){r||(Q(e.$$.fragment,a),r=!0)},o:function(a){ce(e.$$.fragment,a),r=!1},d:function(a){a&&je(n),pt(e),o=!1,s()}}}function wnt(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Cnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,wnt,xnt,Ei,{count:0,maxSampleCount:1,onRefresh:2},_nt),r}return Se(e)}();function knt(t){pi(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function wpe(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Cpe(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function kpe(t,n,e){var i=t.slice();return i[125]=n[e],i}function Spe(t){var n,e;return n=new Ztt({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Snt(t){var n;return{c:function(){(n=be("div")).innerHTML='
    \n
    loading...
    ',P(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:Lt,i:Lt,o:Lt,d:function(e){e&&je(n)}}}function Dnt(t){var n,e,i,r,o,s,a,l,c,u=[Ant,Ent,Tnt],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=be("label"),e=be("input"),i=it(),o.c(),s=_r(),P(e,"type","text"),e.readOnly="readonly",P(e,"tabindex","-1"),P(e,"class","jse-hidden-input svelte-hs49xj"),P(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),de(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=Nt(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):($t(),ce(d[m],1,1,function(){d[m]=null}),Bt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),Q(o,1),o.m(s.parentNode,s))},i:function(f){a||(Q(o),a=!0)},o:function(f){ce(o),a=!1},d:function(f){f&&je(n),t[71](null),f&&je(i),d[r].d(f),f&&je(s),l=!1,c()}}}function Tnt(t){var n,e;return n=new bnt({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Ent(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:op,text:"Repair manually",onClick:t[35]}]}}),i=new tce({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){mt(n.$$.fragment),e=it(),mt(i.$$.fragment)},m:function(o,s){ft(n,o,s),Pe(o,e,s),ft(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:op,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!0)},o:function(o){ce(n.$$.fragment,o),ce(i.$$.fragment,o),r=!1},d:function(o){pt(n,o),o&&je(e),pt(i,o)}}}function Ant(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R=!Hi(null===(n=t[21])||void 0===n?void 0:n.root),z=R&&Dpe(t),U=t[9],q=[],re=0;re"u";a("isSSR:",m);var g,v,y,_,C,S,M=n.readOnly,$=n.externalContent,G=n.mainMenuBar,R=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,U=n.flattenColumns,q=n.parser,re=n.parseMemoizeOne,L=n.validator,X=n.validationParser,Z=n.indentation,H=n.onChange,he=n.onChangeMode,E=n.onRenderValue,F=n.onRenderMenu,N=n.onFocus,Y=n.onBlur,V=n.onSortModal,oe=n.onTransformModal,fe=n.onJSONEditorModal;a4({onMount:Wc,onDestroy:Hu,getWindow:function(){return e0(v)},hasFocus:function(){return ot&&document.hasFocus()||jk(v)},onFocus:function(){N&&N()},onBlur:function(){Y&&Y()}});var Fe,xe=void 0,tt=1e4,ze=[],ot=!1,B={},ne=600,ie=0;function Ie(Ee){a("updateSelection",Ee);var St="function"==typeof Ee?Ee(Le.selection):Ee;or(St,Le.selection)||e(10,Le=Ze(Ze({},Le),{},{selection:St}))}function Ye(Ee){void 0!==Le.selection&&void 0!==Ee&&(Le.selection&&Xc(Ee,Le.selection.anchorPath)&&Xc(Ee,Le.selection.focusPath)||(a("clearing selection: path does not exist anymore",Le.selection),e(10,Le=Ze(Ze({},Le),{},{selection:s0(Ee,Le)}))))}var At,Le=Lk(),_t=!1,_n=fae({onChange:function(Ee){e(19,ci=Ee)}}),ci=_n.getState();function Fi(Ee){var St=Ee.previousJson,Ht=Ee.previousState,sn=Ee.previousText,hn=Ee.previousTextIsRepaired;void 0===St&&void 0===sn||(void 0!==C?_n.add(void 0!==St?{undo:{patch:[{op:"replace",path:"",value:St}],state:ul(Ht),json:void 0,text:sn,textIsRepaired:hn},redo:{patch:[{op:"replace",path:"",value:C}],state:ul(Le),json:void 0,text:S,textIsRepaired:_t}}:{undo:{patch:void 0,json:void 0,text:sn,state:ul(Ht),textIsRepaired:hn},redo:{patch:void 0,json:C,state:ul(Le),text:S,textIsRepaired:_t}}):void 0!==St&&_n.add({undo:{patch:void 0,json:St,state:ul(Ht),text:sn,textIsRepaired:hn},redo:{patch:void 0,json:void 0,text:S,textIsRepaired:_t,state:ul(Le)}}))}var pn=[],Nr=Zb(pae);function $r(Ee,St,Ht,sn){g0(function(){var hn;try{hn=Nr(Ee,St,Ht,sn)}catch(ri){hn=[{path:[],message:"Failed to validate: "+ri.message,severity:Xd.warning}]}or(hn,pn)||(a("validationErrors changed:",hn),e(11,pn=hn))},function(hn){return a("validationErrors updated in ".concat(hn," ms"))})}function wr(){return a("validate"),xe?{parseError:xe,isRepairable:!1}:($r(C,L,q,X),Hi(pn)?null:{validationErrors:pn})}function Or(Ee,St){if(a("patch",Ee,St),void 0===C)throw new Error("Cannot apply patch: no JSON");var Ht={json:C},sn=C,hn=Le,ri=_t,Oi=ose(C,Ee),Bn=$oe(C,Le,Ee).json,ei=function MJe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=ou(Xu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return or(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ze(Ze({},t),{},{sortedColumn:void 0}):t}(Le,Ee,ze),Yn="function"==typeof St?St(Bn,ei):void 0;e(7,C=Yn&&void 0!==Yn.json?Yn.json:Bn);var br=Yn&&void 0!==Yn.state?Yn.state:ei;e(10,Le=br),e(15,S=void 0),e(18,_t=!1),e(17,Fe=void 0),_n.add({undo:{patch:Oi,json:void 0,text:void 0,state:ul(hn),textIsRepaired:ri},redo:{patch:Ee,json:void 0,state:ul(br),text:void 0,textIsRepaired:_t}});var Ar={json:C,previousJson:sn,undo:Oi,redo:Ee};return Wr(Ht,Ar),Ar}function Ai(Ee,St){if(!M)return Or(Ee,St)}function Wr(Ee,St){(void 0!==Ee.json||void 0!==Ee?.text)&&(void 0!==S?H({text:S,json:void 0},Ee,{contentErrors:wr(),patchResult:St}):void 0!==C&&H({text:void 0,json:C},Ee,{contentErrors:wr(),patchResult:St}))}function jo(Ee){a("handleFind",Ee)}function Nn(Ee){a("pasted json as text",Ee),e(17,Fe=Ee)}function xt(Ee){var St=parseInt(Ee[0]),Ht=[String(St+1)].concat(si(Ee.slice(1)));return Xc(C,Ht)?mr(Ht,!1):mr(Ee,!1)}function ui(){_&&(_.focus(),_.select())}function Ni(){Le.selection||Ie(function(){if(oo(C)&&!Hi(C)&&!Hi(ze))return mr(["0"].concat(si(ze[0])),!1)}())}function Cr(Ee){var St=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Ht=b4(Ee,ze,B,18),sn=Ht-ie,hn=gt(Ee);a("scrollTo",{path:Ee,top:Ht,scrollTop:ie,elem:hn});var ri=y.getBoundingClientRect();if(hn&&!St){var Oi=hn.getBoundingClientRect();if(Oi.bottom>ri.top&&Oi.topHt.right&&e(13,y.scrollLeft+=sn.right-Ht.right,y),sn.left(Bn=ie+ri.height-18)&&e(13,y.scrollTop+=hn-Bn,y),sn0&&void 0!==Ht[0])||Ht[0],void 0!==C){sn.next=3;break}return sn.abrupt("return");case 3:return sn.next=5,Kle({json:C,documentState:Le,indentation:St?Z:void 0,parser:q});case 5:case"end":return sn.stop()}},Ee)})),Xa.apply(this,arguments)}function Ic(){Zle({json:C,text:S,documentState:Le,keepSelection:!0,readOnly:M,onChange:H,onPatch:Ai})}function we(){!function IJe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&c0(e.selection)){var s=ou(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;jl("duplicate row",{rowIndex:a});var c=[String(a)];o(nse(n,[c]),function(u,d){var h=mr(zm({rowIndex:a0?a-1:void 0,h=void 0!==d?mr(zm({rowIndex:d,columnIndex:l},i),!1):void 0;return jl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ze(Ze({},u),{},{selection:h})}})}}({json:C,documentState:Le,columns:ze,readOnly:M,onPatch:Ai})}function Ue(){return(Ue=Zi(vn().mark(function Ee(St){return vn().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ece({char:St,selectInside:!1,refJsonEditor:v,json:C,documentState:Le,readOnly:M,parser:q,onPatch:Ai,onReplaceJson:Dn,onSelect:Ie});case 2:case"end":return Ht.stop()}},Ee)}))).apply(this,arguments)}function Dn(Ee,St){var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t,Bn=nu(C,Le,[],sh),ei="function"==typeof St?St(Ee,Bn):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Ee),e(10,Le=ei&&void 0!==ei.state?ei.state:Bn),e(15,S=void 0),e(18,_t=!1),Ye(C),Fi({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function ii(Ee,St){a("handleChangeText");var Ht=Le,sn=C,hn=S,ri={json:C,text:S},Oi=_t;try{e(7,C=re(Ee)),e(10,Le=nu(C,Le,[],sh)),e(15,S=void 0),e(18,_t=!1)}catch{try{e(7,C=re(Yd(Ee))),e(10,Le=nu(C,Le,[],sh)),e(15,S=Ee),e(18,_t=!0)}catch{e(7,C=void 0),e(10,Le=Lk({json:C,expand:sh})),e(15,S=Ee),e(18,_t=!1)}}if("function"==typeof St){var Bn=St(C,Le);e(7,C=Bn&&Bn.json?Bn.json:C),e(10,Le=Bn&&Bn.state?Bn.state:Le)}Ye(C),Fi({previousJson:sn,previousState:Ht,previousText:hn,previousTextIsRepaired:Oi}),Wr(ri,null)}function hi(Ee){var Ht=Ee.rootPath,sn=Ee.onTransform,hn=Ee.onClose;M||void 0===C||(ot=!0,oe({id:Ee.id||p,json:C,rootPath:Ht||[],onTransform:sn?function(ri){sn({operations:ri,json:C,transformedJson:Yu(C,ri)})}:function(ri){a("onTransform",Ht,ri),Ai(ri)},onClose:function(){ot=!1,ui(),hn&&hn()}}))}function di(Ee){a("openJSONEditorModal",{path:Ee}),ot=!0,fe({content:{json:Sn(C,Ee)},path:Ee,onPatch:At.onPatch,onClose:function(){ot=!1,ui()}})}function kr(Ee,St){l(jae,{text:Ee,onParse:Ik,onRepair:soe,onApply:St},Ze(Ze({},Cm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ui()}})}function Qr(){if(!M&&_n.getState().canUndo){var Ee=_n.undo();if(Ee){var St={json:C,text:S};e(7,C=Ee.undo.patch?Yu(C,Ee.undo.patch):Ee.undo.json),e(10,Le=Ee.undo.state),e(15,S=Ee.undo.text),e(18,_t=Ee.undo.textIsRepaired),a("undo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.undo.patch,undo:Ee.redo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function gi(){if(!M&&_n.getState().canRedo){var Ee=_n.redo();if(Ee){var St={json:C,text:S};e(7,C=Ee.redo.patch?Yu(C,Ee.redo.patch):Ee.redo.json),e(10,Le=Ee.redo.state),e(15,S=Ee.redo.text),e(18,_t=Ee.redo.textIsRepaired),a("redo",{item:Ee,json:C}),Wr(St,{json:C,previousJson:St.json,redo:Ee.redo.patch,undo:Ee.undo.patch}),ui(),Le.selection&&Cr(Le.selection.focusPath,!1)}}}function yr(Ee,St){e(68,B[St]=Ee.getBoundingClientRect().height,B)}return t.$$set=function(Ee){"readOnly"in Ee&&e(0,M=Ee.readOnly),"externalContent"in Ee&&e(47,$=Ee.externalContent),"mainMenuBar"in Ee&&e(1,G=Ee.mainMenuBar),"escapeControlCharacters"in Ee&&e(48,R=Ee.escapeControlCharacters),"escapeUnicodeCharacters"in Ee&&e(49,z=Ee.escapeUnicodeCharacters),"flattenColumns"in Ee&&e(50,U=Ee.flattenColumns),"parser"in Ee&&e(2,q=Ee.parser),"parseMemoizeOne"in Ee&&e(51,re=Ee.parseMemoizeOne),"validator"in Ee&&e(52,L=Ee.validator),"validationParser"in Ee&&e(53,X=Ee.validationParser),"indentation"in Ee&&e(3,Z=Ee.indentation),"onChange"in Ee&&e(54,H=Ee.onChange),"onChangeMode"in Ee&&e(4,he=Ee.onChangeMode),"onRenderValue"in Ee&&e(55,E=Ee.onRenderValue),"onRenderMenu"in Ee&&e(5,F=Ee.onRenderMenu),"onFocus"in Ee&&e(56,N=Ee.onFocus),"onBlur"in Ee&&e(57,Y=Ee.onBlur),"onSortModal"in Ee&&e(58,V=Ee.onSortModal),"onTransformModal"in Ee&&e(59,oe=Ee.onTransformModal),"onJSONEditorModal"in Ee&&e(60,fe=Ee.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=TO({escapeControlCharacters:R,escapeUnicodeCharacters:z})),65536&t.$$.dirty[1]&&function on(Ee){var St=C,Ht=Qv(Ee)?Ee.text!==S:!or(St,Ee.json);if(a("update external content",{isChanged:Ht}),Ht){var sn={json:C,text:S},hn=C,ri=Le,Oi=S,Bn=_t;if(Qv(Ee))try{e(7,C=re(Ee.text)),e(15,S=Ee.text),e(18,_t=!1),e(16,xe=void 0)}catch(ei){try{e(7,C=re(Yd(Ee.text))),e(15,S=Ee.text),e(18,_t=!0),e(16,xe=void 0)}catch{e(7,C=void 0),e(15,S=$.text),e(18,_t=!1),e(16,xe=Fk(S,ei.message||ei.toString()))}}else e(7,C=Ee.json),e(15,S=void 0),e(18,_t=!1),e(16,xe=void 0);Ye(C),Le.sortedColumn&&e(10,Le=Ze(Ze({},Le),{},{sortedColumn:void 0})),Fi({previousJson:hn,previousState:ri,previousText:Oi,previousTextIsRepaired:Bn}),Wr(sn,null)}}($),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,ze=oo(C)?function(Ee,St){var Ht,sn=new Set(St.map(ln)),hn=new Set(Ee.map(ln)),ri=Re(sn);try{for(ri.s();!(Ht=ri.n()).done;){var Oi=Ht.value;hn.has(Oi)||sn.delete(Oi)}}catch(br){ri.e(br)}finally{ri.f()}var Bn,ei=Re(hn);try{for(ei.s();!(Bn=ei.n()).done;){var Yn=Bn.value;sn.has(Yn)||sn.add(Yn)}}catch(br){ei.e(br)}finally{ei.f()}return si(sn).map(Xu)}(function(Ee,St){var Ht=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,sn={};Array.isArray(Ee)&&function LUe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rtt),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Ee,St,Ht,sn,hn){for(var ri=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Oi=oo(Ht)?Ht.length:0,Bn=function TJe(t,n){var e=Object.values(t);return Hi(e)?n:e.reduce(function(r,o){return r+o})/e.length}(sn,hn),ei=Ee-ri,Yn=St+2*ri,br=function(gd){return sn[gd]||hn},Ar=0,Po=0;Po0&&(Po-=br(--Ar));for(var ca=Ar,md=0;md0?mr(zm({rowIndex:br.rowIndex,columnIndex:Po-1},ei),!1):Yn;Ie(Ht),Qo(Ht.focusPath)}if("ArrowRight"===St&&(Ee.preventDefault(),Ni(),Le.selection)){var sn=function(ei,Yn){var br=ou(Yn.focusPath,ei),Po=br.columnIndex;return Po0?mr(zm({rowIndex:Ar-1,columnIndex:br.columnIndex},ei),!1):Yn}(ze,Le.selection);Ie(hn),Qo(hn.focusPath)}if("ArrowDown"===St&&(Ee.preventDefault(),Ni(),Le.selection)){var ri=function(ei,Yn,br){var Ar=ou(br.focusPath,Yn),Po=Ar.rowIndex;return Po1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Rpe({props:{mode:Ln(t[18]).mode,content:Ln(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:dh,onBlur:dh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&$pe(t),S=t[18].length>1&&Bpe(t);function M(R,z){return R[0]?Vnt:Hnt}var $=M(t),G=$(t);return{c:function(){n=be("div"),mt(e.$$.fragment),i=it(),r=be("div"),(o=be("div")).innerHTML='
    Path
    ',s=it(),a=be("input"),l=it(),(c=be("div")).innerHTML='
    Contents
    ',u=it(),d=be("div"),mt(h.$$.fragment),f=it(),p=be("div"),C&&C.c(),m=it(),S&&S.c(),g=it(),G.c(),P(o,"class","jse-label svelte-1hibiw3"),P(a,"class","jse-path svelte-1hibiw3"),P(a,"type","text"),a.readOnly=!0,P(a,"title","Selected path"),a.value=t[21],P(c,"class","jse-label svelte-1hibiw3"),P(d,"class","jse-modal-inline-editor svelte-1hibiw3"),P(p,"class","jse-actions svelte-1hibiw3"),P(r,"class","jse-modal-contents svelte-1hibiw3"),P(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,z){Pe(R,n,z),ft(e,n,null),de(n,i),de(n,r),de(r,o),de(r,s),de(r,a),de(r,l),de(r,c),de(r,u),de(r,d),ft(h,d,null),de(r,f),de(r,p),C&&C.m(p,null),de(p,m),S&&S.m(p,null),de(p,g),G.m(p,null),v=!0,y||(_=_a(iS.call(null,n,t[23])),y=!0)},p:function(R,z){var U={};262144&z[0]&&(U.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(U),(!v||2097152&z[0]&&a.value!==R[21])&&(a.value=R[21]);var q={};262144&z[0]&&(q.mode=Ln(R[18]).mode),262144&z[0]&&(q.content=Ln(R[18]).content),1&z[0]&&(q.readOnly=R[0]),2&z[0]&&(q.indentation=R[1]),4&z[0]&&(q.tabSize=R[2]),32&z[0]&&(q.statusBar=R[5]),8&z[0]&&(q.mainMenuBar=R[3]),16&z[0]&&(q.navigationBar=R[4]),64&z[0]&&(q.escapeControlCharacters=R[6]),128&z[0]&&(q.escapeUnicodeCharacters=R[7]),256&z[0]&&(q.flattenColumns=R[8]),512&z[0]&&(q.parser=R[9]),1048576&z[0]&&(q.parseMemoizeOne=R[20]),1024&z[0]&&(q.validator=R[10]),2048&z[0]&&(q.validationParser=R[11]),4096&z[0]&&(q.pathParser=R[12]),8192&z[0]&&(q.onRenderValue=R[13]),16384&z[0]&&(q.onClassName=R[14]),32768&z[0]&&(q.onRenderMenu=R[15]),65536&z[0]&&(q.onSortModal=R[16]),131072&z[0]&&(q.onTransformModal=R[17]),h.$set(q),R[19]?C?C.p(R,z):((C=$pe(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?S?(S.p(R,z),262144&z[0]&&Q(S,1)):((S=Bpe(R)).c(),Q(S,1),S.m(p,g)):S&&($t(),ce(S,1,1,function(){S=null}),Bt()),$===($=M(R))&&G?G.p(R,z):(G.d(1),(G=$(R))&&(G.c(),G.m(p,null)))},i:function(R){v||(Q(e.$$.fragment,R),Q(h.$$.fragment,R),Q(S),v=!0)},o:function(R){ce(e.$$.fragment,R),ce(h.$$.fragment,R),ce(S),v=!1},d:function(R){R&&je(n),pt(e),pt(h),C&&C.d(),S&&S.d(),G.d(),y=!1,_()}}}function Vpe(t){t.focus()}function Unt(t,n,e){var i,r,o,s=wa("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,_=n.parser,C=n.validator,S=n.validationParser,M=n.pathParser,$=n.onRenderValue,G=n.onClassName,R=n.onRenderMenu,z=n.onSortModal,U=n.onTransformModal,q=xa("simple-modal").close,re=[{mode:X(a),content:a,relativePath:l}],L=void 0;function X(H){return DO(H)&&oo(H.json)?Jo.table:Jo.tree}function Z(H){s("handleChange",H);var he=Ze(Ze({},Ln(re)),{},{content:H});e(18,re=[].concat(si(Xi(re)),[he]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,_=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,S=H.validationParser),"pathParser"in H&&e(12,M=H.pathParser),"onRenderValue"in H&&e(13,$=H.onRenderValue),"onClassName"in H&&e(14,G=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,z=H.onSortModal),"onTransformModal"in H&&e(17,U=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=re.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Hi(i)?"(whole document)":tu(Kl(i))),512&t.$$.dirty[0]&&e(20,o=Zb(_.parse))},[u,d,h,f,p,m,g,v,y,_,C,S,M,$,G,R,z,U,re,L,o,r,function(){if(s("handleApply"),!u)try{e(19,L=void 0);var H=[{op:"replace",path:ln(Ln(re).relativePath),value:loe(Ln(re).content,_).json}];if(re.length>1){var he={json:Yu(loe(re[re.length-2].content,_).json,H)};e(18,re=Xi(re)),Z(he)}else c(H),q()}catch(E){e(19,L=E.toString())}},function(){s("handleClose"),re.length>1?(e(18,re=Xi(re)),e(19,L=void 0)):q()},Z,function(H){s("handleChangeMode",H);var he=Ze(Ze({},Ln(re)),{},{mode:H});e(18,re=[].concat(si(Xi(re)),[he]))},function(H){e(19,L=H.toString()),console.error(H)},function(H){var he=H.content,E=H.path;s("handleJSONEditorModal",{content:he,path:E});var F={mode:X(he),content:he,relativePath:E};e(18,re=[].concat(si(re),[F]))},a,l,c,i]}var Gnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Unt,znt,Ei,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Bnt,[-1,-1]),r}return Se(e)}();function Wnt(t,n,e){var i=xa("simple-modal");return[i.open,i.close]}var qnt=function(t){wt(e,Fn);var n=Ct(e);function e(i){var r;return ke(this,e),Pn(An(r=n.call(this)),i,Wnt,null,Ei,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Xnt(t){pi(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function Hpe(t){var n,e;return n=new Rpe({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){mt(n.$$.fragment)},m:function(r,o){ft(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(Q(n.$$.fragment,r),e=!0)},o:function(r){ce(n.$$.fragment,r),e=!1},d:function(r){t[56](null),pt(n,r)}}}function Ynt(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new qnt({props:l}),Vi.push(function(){return Uu(n,"open",a)});var c=Hpe(t);return{c:function(){mt(n.$$.fragment),i=it(),r=be("div"),c.c(),P(r,"class","jse-main svelte-sxaskb"),Mt(r,"jse-focus",t[20])},m:function(u,d){ft(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],zu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ei(s,s=u[19])?($t(),ce(c,1,1,Lt),Bt(),(c=Hpe(u)).c(),Q(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Mt(r,"jse-focus",u[20])},i:function(u){o||(Q(n.$$.fragment,u),Q(c),o=!0)},o:function(u){ce(n.$$.fragment,u),ce(c),o=!1},d:function(u){pt(n,u),u&&je(i),u&&je(r),c.d(u)}}}function Jnt(t){var n,e;return n=new CQ({props:{closeOnEsc:!1,$$slots:{default:[Ynt]},$$scope:{ctx:t}}}),{c:function(){mt(n.$$.fragment)},m:function(i,r){ft(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(Q(n.$$.fragment,i),e=!0)},o:function(i){ce(n.$$.fragment,i),e=!1},d:function(i){pt(n,i)}}}function Knt(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},kQ,{closeOnEsc:!1}],o={$$slots:{default:[Jnt]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ke(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return ke(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(RW||(RW=Ae([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)($W||($W=Ae(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return ke(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ze(Ze({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var _=this._scope[m]||(this._scope[m]=[]),C=_.length;return _[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(BW||(BW=Ae(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(_){var C=d[_];if(!C)return"continue";var S=p[_]=p[_]||new Map;C.forEach(function(M){if(!S.has(M)){S.set(M,n.Started);var $=h(M);if($){var G=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(VW||(VW=Ae(["",""," "," = ",";",""])),g,G,M,$,f.opts._n)}else{if(!($=m?.(M)))throw new i(M);g=(0,e._)(HW||(HW=Ae(["","","",""])),g,$,f.opts._n)}S.set(M,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(eme)),eme}function xr(){return Zpe||(Zpe=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=DD(),e=tme(),i=DD();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=tme();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function N(){ke(this,N)}return Se(N,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(Y,V){return this}}]),N}(),s=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).varKind=oe,xe.name=fe,xe.rhs=Fe,xe}return Se(V,[{key:"render",value:function(oe){var Fe=oe._n,xe=oe.es5?e.varKinds.var:this.varKind,tt=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(xe," ").concat(this.name).concat(tt,";")+Fe}},{key:"optimizeNames",value:function(oe,fe){if(oe[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,oe,fe)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).lhs=oe,xe.rhs=fe,xe.sideEffects=Fe,xe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+fe}},{key:"optimizeNames",value:function(oe,fe){if(!(this.lhs instanceof n.Name)||oe[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,oe,fe),this}},{key:"names",get:function(){return re(this.lhs instanceof n.Name?{}:Ze({},this.lhs.names),this.rhs)}}]),V}(o),l=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this,oe,Fe,xe)).op=fe,tt}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+fe}}]),V}(a),c=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.label,":")+fe}}]),V}(o),u=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).label=oe,fe.names={},fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n,Fe=this.label?" ".concat(this.label):"";return"break".concat(Fe,";")+fe}}]),V}(o),d=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"throw ".concat(this.error,";")+fe}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).code=oe,fe}return Se(V,[{key:"render",value:function(oe){var fe=oe._n;return"".concat(this.code,";")+fe}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(oe,fe){return this.code=L(this.code,oe,fe),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(N){wt(V,N);var Y=Ct(V);function V(){var oe,fe=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ke(this,V),(oe=Y.call(this)).nodes=fe,oe}return Se(V,[{key:"render",value:function(oe){return this.nodes.reduce(function(fe,Fe){return fe+Fe.render(oe)},"")}},{key:"optimizeNodes",value:function(){for(var oe=this.nodes,fe=oe.length;fe--;){var Fe=oe[fe].optimizeNodes();Array.isArray(Fe)?oe.splice.apply(oe,[fe,1].concat(si(Fe))):Fe?oe[fe]=Fe:oe.splice(fe,1)}return oe.length>0?this:void 0}},{key:"optimizeNames",value:function(oe,fe){for(var Fe=this.nodes,xe=Fe.length;xe--;){var tt=Fe[xe];tt.optimizeNames(oe,fe)||(X(oe,tt.names),Fe.splice(xe,1))}return Fe.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(oe,fe){return q(oe,fe.names)},{})}}]),V}(o),p=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"{"+oe._n+pr(qi(V.prototype),"render",this).call(this,oe)+"}"+oe._n}}]),V}(f),m=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(f),g=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe){var Fe;return ke(this,V),(Fe=Y.call(this,fe)).condition=oe,Fe}return Se(V,[{key:"render",value:function(oe){var fe="if(".concat(this.condition,")")+pr(qi(V.prototype),"render",this).call(this,oe);return this.else&&(fe+="else "+this.else.render(oe)),fe}},{key:"optimizeNodes",value:function(){pr(qi(V.prototype),"optimizeNodes",this).call(this);var oe=this.condition;if(!0===oe)return this.nodes;var fe=this.else;if(fe){var Fe=fe.optimizeNodes();fe=this.else=Array.isArray(Fe)?new g(Fe):Fe}return fe?!1===oe?fe instanceof V?fe:fe.nodes:this.nodes.length?this:new V(Z(oe),fe instanceof V?[fe]:fe.nodes):!1!==oe&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(oe,fe){var Fe;if(this.else=null===(Fe=this.else)||void 0===Fe?void 0:Fe.optimizeNames(oe,fe),pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe)||this.else)return this.condition=L(this.condition,oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return re(oe,this.condition),this.else&&q(oe,this.else.names),oe}}]),V}(p);v.kind="if";var y=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V)}(p);y.kind="for";var _=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).iteration=oe,fe}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.iteration,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iteration=L(this.iteration,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this)).varKind=oe,tt.name=fe,tt.from=Fe,tt.to=xe,tt}return Se(V,[{key:"render",value:function(oe){var Fe=this.name,xe=this.from,tt=this.to;return"for(".concat(oe.es5?e.varKinds.var:this.varKind," ").concat(Fe,"=").concat(xe,"; ").concat(Fe,"<").concat(tt,"; ").concat(Fe,"++)")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"names",get:function(){var oe=re(pr(qi(V.prototype),"names",this),this.from);return re(oe,this.to)}}]),V}(y),S=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe,xe){var tt;return ke(this,V),(tt=Y.call(this)).loop=oe,tt.varKind=fe,tt.name=Fe,tt.iterable=xe,tt}return Se(V,[{key:"render",value:function(oe){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+pr(qi(V.prototype),"render",this).call(this,oe)}},{key:"optimizeNames",value:function(oe,fe){if(pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe))return this.iterable=L(this.iterable,oe,fe),this}},{key:"names",get:function(){return q(pr(qi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),M=function(N){wt(V,N);var Y=Ct(V);function V(oe,fe,Fe){var xe;return ke(this,V),(xe=Y.call(this)).name=oe,xe.args=fe,xe.async=Fe,xe}return Se(V,[{key:"render",value:function(oe){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);M.kind="func";var $=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"return "+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(f);$.kind="return";var G=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){var fe="try"+pr(qi(V.prototype),"render",this).call(this,oe);return this.catch&&(fe+=this.catch.render(oe)),this.finally&&(fe+=this.finally.render(oe)),fe}},{key:"optimizeNodes",value:function(){var oe,fe;return pr(qi(V.prototype),"optimizeNodes",this).call(this),null===(oe=this.catch)||void 0===oe||oe.optimizeNodes(),null===(fe=this.finally)||void 0===fe||fe.optimizeNodes(),this}},{key:"optimizeNames",value:function(oe,fe){var Fe,xe;return pr(qi(V.prototype),"optimizeNames",this).call(this,oe,fe),null===(Fe=this.catch)||void 0===Fe||Fe.optimizeNames(oe,fe),null===(xe=this.finally)||void 0===xe||xe.optimizeNames(oe,fe),this}},{key:"names",get:function(){var oe=pr(qi(V.prototype),"names",this);return this.catch&&q(oe,this.catch.names),this.finally&&q(oe,this.finally.names),oe}}]),V}(p),R=function(N){wt(V,N);var Y=Ct(V);function V(oe){var fe;return ke(this,V),(fe=Y.call(this)).error=oe,fe}return Se(V,[{key:"render",value:function(oe){return"catch(".concat(this.error,")")+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);R.kind="catch";var z=function(N){wt(V,N);var Y=Ct(V);function V(){return ke(this,V),Y.apply(this,arguments)}return Se(V,[{key:"render",value:function(oe){return"finally"+pr(qi(V.prototype),"render",this).call(this,oe)}}]),V}(p);z.kind="finally";var U=function(){function N(Y){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ke(this,N),this._values={},this._blockStarts=[],this._constants={},this.opts=Ze(Ze({},V),{},{_n:V.lines?"\n":""}),this._extScope=Y,this._scope=new e.Scope({parent:Y}),this._nodes=[new m]}return Se(N,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(Y){return this._scope.name(Y)}},{key:"scopeName",value:function(Y){return this._extScope.name(Y)}},{key:"scopeValue",value:function(Y,V){var oe=this._extScope.value(Y,V);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}},{key:"getScopeValue",value:function(Y,V){return this._extScope.getValue(Y,V)}},{key:"scopeRefs",value:function(Y){return this._extScope.scopeRefs(Y,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(Y,V,oe,fe){var Fe=this._scope.toName(V);return void 0!==oe&&fe&&(this._constants[Fe.str]=oe),this._leafNode(new s(Y,Fe,oe)),Fe}},{key:"const",value:function(Y,V,oe){return this._def(e.varKinds.const,Y,V,oe)}},{key:"let",value:function(Y,V,oe){return this._def(e.varKinds.let,Y,V,oe)}},{key:"var",value:function(Y,V,oe){return this._def(e.varKinds.var,Y,V,oe)}},{key:"assign",value:function(Y,V,oe){return this._leafNode(new a(Y,V,oe))}},{key:"add",value:function(Y,V){return this._leafNode(new l(Y,t.operators.ADD,V))}},{key:"code",value:function(Y){return"function"==typeof Y?Y():Y!==n.nil&&this._leafNode(new h(Y)),this}},{key:"object",value:function(){for(var Y=["{"],V=arguments.length,oe=new Array(V),fe=0;fe1&&Y.push(","),Y.push(ze),(ze!==ot||this.opts.es5)&&(Y.push(":"),(0,n.addCodeArg)(Y,ot))}return Y.push("}"),new n._Code(Y)}},{key:"if",value:function(Y,V,oe){if(this._blockNode(new v(Y)),V&&oe)this.code(V).else().code(oe).endIf();else if(V)this.code(V).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(Y){return this._elseNode(new v(Y))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(Y,V){return this._blockNode(Y),V&&this.code(V).endFor(),this}},{key:"for",value:function(Y,V){return this._for(new _(Y),V)}},{key:"forRange",value:function(Y,V,oe,fe){var Fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,xe=this._scope.toName(Y);return this._for(new C(Fe,xe,V,oe),function(){return fe(xe)})}},{key:"forOf",value:function(Y,V,oe){var fe=this,Fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,xe=this._scope.toName(Y);if(this.opts.es5){var tt=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(zW||(zW=Ae(["",".length"])),tt),function(ze){fe.var(xe,(0,n._)(UW||(UW=Ae(["","[","]"])),tt,ze)),oe(xe)})}return this._for(new S("of",Fe,xe,V),function(){return oe(xe)})}},{key:"forIn",value:function(Y,V,oe){var fe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(Y,(0,n._)(GW||(GW=Ae(["Object.keys(",")"])),V),oe);var Fe=this._scope.toName(Y);return this._for(new S("in",fe,Fe,V),function(){return oe(Fe)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(Y){return this._leafNode(new c(Y))}},{key:"break",value:function(Y){return this._leafNode(new u(Y))}},{key:"return",value:function(Y){var V=new $;if(this._blockNode(V),this.code(Y),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}},{key:"try",value:function(Y,V,oe){if(!V&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');var fe=new G;if(this._blockNode(fe),this.code(Y),V){var Fe=this.name("e");this._currNode=fe.catch=new R(Fe),V(Fe)}return oe&&(this._currNode=fe.finally=new z,this.code(oe)),this._endBlockNode(R,z)}},{key:"throw",value:function(Y){return this._leafNode(new d(Y))}},{key:"block",value:function(Y,V){return this._blockStarts.push(this._nodes.length),Y&&this.code(Y).endBlock(V),this}},{key:"endBlock",value:function(Y){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var oe=this._nodes.length-V;if(oe<0||void 0!==Y&&oe!==Y)throw new Error("CodeGen: wrong number of nodes: ".concat(oe," vs ").concat(Y," expected"));return this._nodes.length=V,this}},{key:"func",value:function(Y){var fe=arguments.length>3?arguments[3]:void 0;return this._blockNode(new M(Y,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),fe&&this.code(fe).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(M)}},{key:"optimize",value:function(){for(var Y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(Y){return this._currNode.nodes.push(Y),this}},{key:"_blockNode",value:function(Y){this._currNode.nodes.push(Y),this._nodes.push(Y)}},{key:"_endBlockNode",value:function(Y,V){var oe=this._currNode;if(oe instanceof Y||V&&oe instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(Y.kind,"/").concat(V.kind):Y.kind,'"'))}},{key:"_elseNode",value:function(Y){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=Y,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var Y=this._nodes;return Y[Y.length-1]},set:function(Y){var V=this._nodes;V[V.length-1]=Y}}]),N}();function q(N,Y){for(var V in Y)N[V]=(N[V]||0)+(Y[V]||0);return N}function re(N,Y){return Y instanceof n._CodeOrName?q(N,Y.names):N}function L(N,Y,V){return N instanceof n.Name?oe(N):(fe=N)instanceof n._Code&&fe._items.some(function(Fe){return Fe instanceof n.Name&&1===Y[Fe.str]&&void 0!==V[Fe.str]})?new n._Code(N._items.reduce(function(fe,Fe){return Fe instanceof n.Name&&(Fe=oe(Fe)),Fe instanceof n._Code?fe.push.apply(fe,si(Fe._items)):fe.push(Fe),fe},[])):N;var fe;function oe(fe){var Fe=V[fe.str];return void 0===Fe||1!==Y[fe.str]?fe:(delete Y[fe.str],Fe)}}function X(N,Y){for(var V in Y)N[V]=(N[V]||0)-(Y[V]||0)}function Z(N){return"boolean"==typeof N||"number"==typeof N||null===N?!N:(0,n._)(WW||(WW=Ae(["!",""])),F(N))}t.CodeGen=U,t.not=Z;var H=E(t.operators.AND);t.and=function(){for(var N=arguments.length,Y=new Array(N),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,_,C,S){var M=void 0===C?_:C instanceof n.Name?(_ instanceof n.Name?p(y,_,C):m(y,_,C),C):_ instanceof n.Name?(m(y,C,_),_):g(_,C);return S!==n.Name||M instanceof n.Name?M:v(y,M)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(aq||(aq=Ae(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(lq||(lq=Ae(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(YW||(YW=Ae(["",""])),p)}return(0,n._)(JW||(JW=Ae(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(KW||(KW=Ae([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(QW||(QW=Ae([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(ZW||(ZW=Ae([""," || {}"])),m)).code((0,n._)(eq||(eq=Ae(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(tq||(tq=Ae([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(nq||(nq=Ae([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Ze(Ze({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(iq||(iq=Ae([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(rq||(rq=Ae([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(oq||(oq=Ae([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(sq||(sq=Ae([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?cq||(cq=Ae(['"[" + ',' + "]"'])):uq||(uq=Ae(['"[\'" + ',' + "\']"'])):g?dq||(dq=Ae(['"/" + ',""])):hq||(hq=Ae(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Hr);var nme,ime,rme,TD={};function Sp(){if(nme)return TD;nme=1,Object.defineProperty(TD,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return TD.default=n,TD}function ED(){return ime||(ime=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Hr,i=Sp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(Dq||(Dq=Ae([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(Tq||(Tq=Ae(["[","]"])),f))},(0,n._)(Eq||(Eq=Ae(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(Aq||(Aq=Ae(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(Mq||(Mq=Ae(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(Iq||(Iq=Ae(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(fq||(fq=Ae(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(pq||(pq=Ae(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(mq||(mq=Ae(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,_=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,_):o(m,(0,n._)(gq||(gq=Ae(["[","]"])),_))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(vq||(vq=Ae([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(yq||(yq=Ae(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(_){h.const(y,(0,n._)(bq||(bq=Ae(["","[","]"])),i.default.vErrors,_)),h.if((0,n._)(_q||(_q=Ae(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(xq||(xq=Ae(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(wq||(wq=Ae(["",".schemaPath"])),y),(0,n.str)(Cq||(Cq=Ae(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(kq||(kq=Ae(["",".schema"])),y),p),h.assign((0,n._)(Sq||(Sq=Ae(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(Fq||(Fq=Ae(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,_=d.it,C=_.opts,S=_.propertyName,M=_.topSchemaRef,$=_.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(Pq||(Pq=Ae(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(Lq||(Lq=Ae(["","",""])),M,$)],[i.default.data,v]),S&&f.push([s.propertyName,S])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(Nq||(Nq=Ae(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(Oq||(Oq=Ae(["","/",""])),p,f);return m&&(g=(0,n.str)(jq||(jq=Ae(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(Ype)),Ype}var I_={},tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.getRules=tg.isJSONType=void 0;var ait=new Set(["string","number","integer","boolean","null","object","array"]);tg.isJSONType=function(t){return"string"==typeof t&&ait.has(t)},tg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ze(Ze({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var ome,pf={};function sme(){if(ome)return pf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return ome=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.shouldUseRule=pf.shouldUseGroup=pf.schemaHasRulesForType=void 0,pf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},pf.shouldUseGroup=t,pf.shouldUseRule=n,pf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=tg,i=sme(),r=ED(),o=xr(),s=Hr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var M,m=f.gen,g=f.data,v=f.opts,y=(M=v.coerceTypes)?p.filter(function($){return l.has($)||"array"===M&&"array"===$}):[],_=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(_){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(S,M,$){var G=S.gen,R=S.data,z=S.opts,U=G.let("dataType",(0,o._)($q||($q=Ae(["typeof ",""])),R)),q=G.let("coerced",(0,o._)(Bq||(Bq=Ae(["undefined"]))));"array"===z.coerceTypes&&G.if((0,o._)(Vq||(Vq=Ae([""," == 'object' && Array.isArray(",") && ",".length == 1"])),U,R,R),function(){return G.assign(R,(0,o._)(Hq||(Hq=Ae(["","[0]"])),R)).assign(U,(0,o._)(zq||(zq=Ae(["typeof ",""])),R)).if(u(M,R,z.strictNumbers),function(){return G.assign(q,R)})}),G.if((0,o._)(Uq||(Uq=Ae([""," !== undefined"])),q));var re,L=Re($);try{for(L.s();!(re=L.n()).done;){var X=re.value;(l.has(X)||"array"===X&&"array"===z.coerceTypes)&&Z(X)}}catch(H){L.e(H)}finally{L.f()}function Z(H){switch(H){case"string":return void G.elseIf((0,o._)(Wq||(Wq=Ae(["",' == "number" || ',' == "boolean"'])),U,U)).assign(q,(0,o._)(qq||(qq=Ae(['"" + ',""])),R)).elseIf((0,o._)(Xq||(Xq=Ae([""," === null"])),R)).assign(q,(0,o._)(Yq||(Yq=Ae(['""']))));case"number":return void G.elseIf((0,o._)(Jq||(Jq=Ae(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),U,R,U,R,R,R)).assign(q,(0,o._)(Kq||(Kq=Ae(["+",""])),R));case"integer":return void G.elseIf((0,o._)(Qq||(Qq=Ae(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),U,R,U,R,R,R,R)).assign(q,(0,o._)(Zq||(Zq=Ae(["+",""])),R));case"boolean":return void G.elseIf((0,o._)(eX||(eX=Ae(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(q,!1).elseIf((0,o._)(tX||(tX=Ae(["",' === "true" || '," === 1"])),R,R)).assign(q,!0);case"null":return G.elseIf((0,o._)(nX||(nX=Ae(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void G.assign(q,null);case"array":G.elseIf((0,o._)(iX||(iX=Ae(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),U,U,U,R)).assign(q,(0,o._)(rX||(rX=Ae(["[","]"])),R))}}G.else(),h(S),G.endIf(),G.if((0,o._)(Gq||(Gq=Ae([""," !== undefined"])),q),function(){var H,he,E,F,N;G.assign(R,q),he=q,F=(H=S).parentData,N=H.parentDataProperty,(E=H.gen).if((0,o._)(oX||(oX=Ae([""," !== undefined"])),F),function(){return E.assign((0,o._)(sX||(sX=Ae(["","[","]"])),F,N),he)})})}(f,p,y):h(f)})}return _};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(aX||(aX=Ae([""," "," null"])),p,y);case"array":g=(0,o._)(lX||(lX=Ae(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(cX||(cX=Ae([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=_((0,o._)(uX||(uX=Ae(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=_();break;default:return(0,o._)(dX||(dX=Ae(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function _(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(hX||(hX=Ae(["typeof ",' == "number"'])),p),C,m?(0,o._)(fX||(fX=Ae(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var _=(0,o._)(pX||(pX=Ae(["typeof ",' != "object"'])),p);v=y.null?_:(0,o._)(mX||(mX=Ae(["!"," || ",""])),p,_),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(gX||(gX=Ae(["{type: ","}"])),p):(0,o._)(vX||(vX=Ae(["{type: ","}"])),m)}};function h(f){var m,g,v,y,_,p=(g=(m=f).gen,v=m.data,_=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:_,schemaValue:_,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(I_);var ame,lme,cme,F_={},ud={},po={};function dd(){if(lme)return po;lme=1,Object.defineProperty(po,"__esModule",{value:!0}),po.validateUnion=po.validateArray=po.usePattern=po.callValidateCode=po.schemaProperties=po.allSchemaProperties=po.noPropertyInData=po.propertyInData=po.isOwnProperty=po.hasPropFunc=po.reportMissingProp=po.checkMissingProp=po.checkReportMissingProp=void 0;var t=xr(),n=Hr,e=Sp(),i=Hr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(kX||(kX=Ae(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(SX||(SX=Ae(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(EX||(EX=Ae(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}po.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(wX||(wX=Ae(["",""])),u)},!0),c.error()})},po.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,si(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(CX||(CX=Ae([""," = ",""])),d,m))})))},po.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},po.hasPropFunc=r,po.isOwnProperty=o,po.propertyInData=function(c,u,d,h){var f=(0,t._)(DX||(DX=Ae(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(TX||(TX=Ae([""," && ",""])),f,o(c,u,d)):f},po.noPropertyInData=s,po.allSchemaProperties=a,po.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},po.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,_=m.errorPath,C=c.it,S=h?(0,t._)(AX||(AX=Ae(["",", ",", ","",""])),f,p,v,y):p,M=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,_)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&M.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var $=(0,t._)(MX||(MX=Ae(["",", ",""])),S,g.object.apply(g,M));return d!==t.nil?(0,t._)(IX||(IX=Ae(["",".call(",", ",")"])),u,d,$):(0,t._)(FX||(FX=Ae(["","(",")"])),u,$)};var l=(0,t._)(NX||(NX=Ae(["new RegExp"])));return po.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(OX||(OX=Ae(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},po.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(jX||(jX=Ae(["",".length"])),d));u.forRange("i",0,y,function(_){c.subschema({keyword:h,dataProp:_,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},po.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(PX||(PX=Ae([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},po}var ume,mf={},Ga={},dme=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==bn(n)&&"object"==bn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},kP={},cit={get exports(){return kP},set exports(t){kP=t}},Dp=cit.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),AD(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function AD(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==bn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Dp.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!SP(t):!!n&&hme(t)<=n)};var pit=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function SP(t){for(var n in t){if(pit.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(SP)||"object"==bn(e)&&SP(e))return!0}return!1}function hme(t){var n=0;for(var e in t)if("$ref"===e||(n++,!fit.has(e)&&("object"==bn(t[e])&&(0,uit.eachItem)(t[e],function(i){return n+=hme(i)}),n===1/0)))return 1/0;return n}function fme(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=z0(n));var i=t.parse(n);return pme(t,i)}function pme(t,n){return t.serialize(n).split("#")[0]+"#"}Ga.getFullPath=fme,Ga._getFullPath=pme;var mit=/#\/?$/;function z0(t){return t?t.replace(mit,""):""}Ga.normalizeId=z0,Ga.resolveUrl=function(t,n,e){return e=z0(e),t.resolve(n,e)};var mme,git=/^[a-z_][-a-z0-9._]*$/i;function MD(){if(mme)return ff;mme=1,Object.defineProperty(ff,"__esModule",{value:!0}),ff.getData=ff.KeywordCxt=ff.validateFunctionCode=void 0;var t=function(){if(rme)return eg;rme=1,Object.defineProperty(eg,"__esModule",{value:!0}),eg.boolOrEmptySchema=eg.topBoolOrEmptySchema=void 0;var L=ED(),X=xr(),Z=Sp(),H={message:"boolean schema is false"};function he(E,F){(0,L.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,F)}return eg.topBoolOrEmptySchema=function(E){var F=E.gen,N=E.schema,Y=E.validateName;!1===N?he(E,!1):"object"==bn(N)&&!0===N.$async?F.return(Z.default.data):(F.assign((0,X._)(Rq||(Rq=Ae(["",".errors"])),Y),null),F.return(!0))},eg.boolOrEmptySchema=function(E,F){var N=E.gen;!1===E.schema?(N.var(F,!1),he(E)):N.var(F,!0)},eg}(),n=I_,e=sme(),i=I_,r=function(){if(ame)return F_;ame=1,Object.defineProperty(F_,"__esModule",{value:!0}),F_.assignDefaults=void 0;var L=xr(),X=Hr;function Z(H,he,E){var F=H.gen,N=H.compositeRule,Y=H.data,V=H.opts;if(void 0!==E){var oe=(0,L._)(yX||(yX=Ae(["","",""])),Y,(0,L.getProperty)(he));if(N)(0,X.checkStrictMode)(H,"default is ignored for: ".concat(oe));else{var fe=(0,L._)(bX||(bX=Ae([""," === undefined"])),oe);"empty"===V.useDefaults&&(fe=(0,L._)(_X||(_X=Ae([""," || "," === null || ",' === ""'])),fe,oe,oe)),F.if(fe,(0,L._)(xX||(xX=Ae([""," = ",""])),oe,(0,L.stringify)(E)))}}}return F_.assignDefaults=function(H,he){var E=H.schema,F=E.properties,N=E.items;if("object"===he&&F)for(var Y in F)Z(H,Y,F[Y].default);else"array"===he&&Array.isArray(N)&&N.forEach(function(V,oe){return Z(H,oe,V.default)})},F_}(),o=function lit(){if(cme)return ud;cme=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Sp(),e=dd(),i=ED();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(zX||(zX=Ae(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,S){if(S.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(VX||(VX=Ae(["await "]))):t.nil,S=p.opts.passContext?n.default.this:n.default.self,M=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(HX||(HX=Ae(["","",""])),C,(0,e.callValidateCode)(s,g,S,M)),a.modifying)}function _(C){var S;c.if((0,t.not)(null!==(S=a.valid)&&void 0!==S?S:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),_(function(){return s.error()});else{var C=a.async?(M=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(LX||(LX=Ae(["await "]))))},function($){return c.assign(v,!1).if((0,t._)(RX||(RX=Ae([""," instanceof ",""])),$,p.ValidationError),function(){return c.assign(M,(0,t._)($X||($X=Ae(["",".errors"])),$))},function(){return c.throw($)})}),M):(S=(0,t._)(BX||(BX=Ae(["",".errors"])),g),c.assign(S,null),y(t.nil),S);a.modifying&&r(s),_(function(){return function(M,$){var G=M.gen;G.if((0,t._)(UX||(UX=Ae(["Array.isArray(",")"])),$),function(){G.assign(n.default.vErrors,(0,t._)(GX||(GX=Ae([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,$,n.default.vErrors,$)).assign(n.default.errors,(0,t._)(WX||(WX=Ae(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(M)},function(){return M.error()})}(s,C)})}var M,S}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==bn(s)&&!Array.isArray(s):bn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(ume)return mf;ume=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.extendSubschemaMode=mf.extendSubschemaData=mf.getSubschema=void 0;var L=xr(),X=Hr;return mf.getSubschema=function(Z,H){var he=H.keyword,E=H.schemaProp,F=H.schema,N=H.schemaPath,Y=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==he&&void 0!==F)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==he){var oe=Z.schema[he];return void 0===E?{schema:oe,schemaPath:(0,L._)(qX||(qX=Ae(["","",""])),Z.schemaPath,(0,L.getProperty)(he)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he)}:{schema:oe[E],schemaPath:(0,L._)(XX||(XX=Ae(["","","",""])),Z.schemaPath,(0,L.getProperty)(he),(0,L.getProperty)(E)),errSchemaPath:"".concat(Z.errSchemaPath,"/").concat(he,"/").concat((0,X.escapeFragment)(E))}}if(void 0!==F){if(void 0===N||void 0===Y||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:F,schemaPath:N,topSchemaRef:V,errSchemaPath:Y}}throw new Error('either "keyword" or "schema" must be passed')},mf.extendSubschemaData=function(Z,H,he){var E=he.dataProp,F=he.dataPropType,N=he.data,Y=he.dataTypes,V=he.propertyName;if(void 0!==N&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var oe=H.gen;if(void 0!==E){var fe=H.errorPath,Fe=H.dataPathArr,xe=H.opts;tt(oe.let("data",(0,L._)(YX||(YX=Ae(["","",""])),H.data,(0,L.getProperty)(E)),!0)),Z.errorPath=(0,L.str)(JX||(JX=Ae(["","",""])),fe,(0,X.getErrorPath)(E,F,xe.jsPropertySyntax)),Z.parentDataProperty=(0,L._)(KX||(KX=Ae(["",""])),E),Z.dataPathArr=[].concat(si(Fe),[Z.parentDataProperty])}function tt(ze){Z.data=ze,Z.dataLevel=H.dataLevel+1,Z.dataTypes=[],H.definedProperties=new Set,Z.parentData=H.data,Z.dataNames=[].concat(si(H.dataNames),[ze])}void 0!==N&&(tt(N instanceof L.Name?N:oe.let("data",N,!0)),void 0!==V&&(Z.propertyName=V)),Y&&(Z.dataTypes=Y)},mf.extendSubschemaMode=function(Z,H){var he=H.jtdDiscriminator,E=H.jtdMetadata,F=H.compositeRule,N=H.createErrors,Y=H.allErrors;void 0!==F&&(Z.compositeRule=F),void 0!==N&&(Z.createErrors=N),void 0!==Y&&(Z.allErrors=Y),Z.jtdDiscriminator=he,Z.jtdMetadata=E},mf}(),a=xr(),l=Sp(),c=Ga,u=Hr,d=ED();function h(L,X){var N,Z=L.gen,H=L.validateName,he=L.schema,E=L.schemaEnv,F=L.opts;F.code.es5?Z.func(H,(0,a._)(QX||(QX=Ae(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var N,Y;Z.code((0,a._)(ZX||(ZX=Ae(['"use strict"; ',""])),f(he,F))),Y=F,(N=Z).if(l.default.valCxt,function(){N.var(l.default.instancePath,(0,a._)(iY||(iY=Ae(["",".",""])),l.default.valCxt,l.default.instancePath)),N.var(l.default.parentData,(0,a._)(rY||(rY=Ae(["",".",""])),l.default.valCxt,l.default.parentData)),N.var(l.default.parentDataProperty,(0,a._)(oY||(oY=Ae(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),N.var(l.default.rootData,(0,a._)(sY||(sY=Ae(["",".",""])),l.default.valCxt,l.default.rootData)),Y.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(aY||(aY=Ae(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){N.var(l.default.instancePath,(0,a._)(lY||(lY=Ae(['""'])))),N.var(l.default.parentData,(0,a._)(cY||(cY=Ae(["undefined"])))),N.var(l.default.parentDataProperty,(0,a._)(uY||(uY=Ae(["undefined"])))),N.var(l.default.rootData,l.default.data),Y.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(dY||(dY=Ae(["{}"]))))}),Z.code(X)}):Z.func(H,(0,a._)(eY||(eY=Ae(["",", ",""])),l.default.data,(N=F,(0,a._)(tY||(tY=Ae(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,N.dynamicRef?(0,a._)(nY||(nY=Ae([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return Z.code(f(he,F)).code(X)})}function f(L,X){var Z="object"==bn(L)&&L[X.schemaId];return Z&&(X.code.source||X.code.process)?(0,a._)(bY||(bY=Ae(["/*# sourceURL="," */"])),Z):a.nil}function m(L){var X=L.schema,Z=L.self;if("boolean"==typeof X)return!X;for(var H in X)if(Z.RULES.all[H])return!0;return!1}function g(L){return"boolean"!=typeof L.schema}function v(L){var X,Z,H,E;(0,u.checkUnknownRules)(L),H=(X=L).errSchemaPath,E=X.self,(Z=X.schema).$ref&&X.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(Z,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(L,X){if(L.opts.jtd)return C(L,[],!1,X);var Z=(0,n.getSchemaTypes)(L.schema);C(L,Z,!(0,n.coerceAndCheckDataType)(L,Z),X)}function _(L){var X=L.gen,Z=L.schemaEnv,he=L.errSchemaPath,E=L.opts,F=L.schema.$comment;if(!0===E.$comment)X.code((0,a._)(xY||(xY=Ae(["",".logger.log(",")"])),l.default.self,F));else if("function"==typeof E.$comment){var N=(0,a.str)(wY||(wY=Ae(["","/$comment"])),he),Y=X.scopeValue("root",{ref:Z.root});X.code((0,a._)(CY||(CY=Ae(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,F,N,Y))}}function C(L,X,Z,H){var fe,Fe,xe,tt,he=L.gen,E=L.schema,F=L.data,N=L.allErrors,Y=L.opts,V=L.self.RULES;function oe(fe){(0,e.shouldUseGroup)(E,fe)&&(fe.type?(he.if((0,i.checkDataType)(fe.type,F,Y.strictNumbers)),S(L,fe),1===X.length&&X[0]===fe.type&&Z&&(he.else(),(0,i.reportTypeError)(L)),he.endIf()):S(L,fe),N||he.if((0,a._)(MY||(MY=Ae([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!Y.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(Y.jtd||(Fe=X,(fe=L).schemaEnv.meta||!fe.opts.strictTypes||(function(xe,tt){if(tt.length){if(!xe.dataTypes.length)return void(xe.dataTypes=tt);tt.forEach(function(ze){$(xe.dataTypes,ze)||G(xe,'type "'.concat(ze,'" not allowed by context "').concat(xe.dataTypes.join(","),'"'))}),function(ze,ot){var B,ne=[],ie=Re(ze.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Ie=B.value;$(ot,Ie)?ne.push(Ie):ot.includes("integer")&&"number"===Ie&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}ze.dataTypes=ne}(xe,tt)}}(fe,Fe),fe.opts.allowUnionTypes||(xe=fe,(tt=Fe).length>1&&(2!==tt.length||!tt.includes("null"))&&G(xe,"use allowUnionTypes to allow union type keyword")),function(xe,tt){var ze=xe.self.RULES.all;for(var ot in ze){var B=ze[ot];if("object"==bn(B)&&(0,e.shouldUseRule)(xe.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return M(tt,ie)})&&G(xe,'missing type "'.concat(ne.join(","),'" for keyword "').concat(ot,'"'))}}}(fe,fe.dataTypes))),he.block(function(){var fe,Fe=Re(V.rules);try{for(Fe.s();!(fe=Fe.n()).done;)oe(fe.value)}catch(xe){Fe.e(xe)}finally{Fe.f()}oe(V.post)})):he.block(function(){return z(L,"$ref",V.all.$ref.definition)})}function S(L,X){var Z=L.gen,H=L.schema;L.opts.useDefaults&&(0,r.assignDefaults)(L,X.type),Z.block(function(){var he,E=Re(X.rules);try{for(E.s();!(he=E.n()).done;){var F=he.value;(0,e.shouldUseRule)(H,F)&&z(L,F.keyword,F.definition,X.type)}}catch(N){E.e(N)}finally{E.f()}})}function M(L,X){return L.includes(X)||"number"===X&&L.includes("integer")}function $(L,X){return L.includes(X)||"integer"===X&&L.includes("number")}function G(L,X){X+=' at "'.concat(L.schemaEnv.baseId+L.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(L,X,L.opts.strictTypes)}ff.validateFunctionCode=function(L){var X,Z,H,he;g(L)&&(v(L),m(L))?(Z=(X=L).schema,H=X.opts,he=X.gen,h(X,function(){var E,N;H.$comment&&Z.$comment&&_(X),N=(E=X).opts,void 0!==E.schema.default&&N.useDefaults&&N.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),he.let(l.default.vErrors,null),he.let(l.default.errors,0),H.unevaluated&&function(E){var F=E.gen,N=E.validateName;E.evaluated=F.const("evaluated",(0,a._)(hY||(hY=Ae(["",".evaluated"])),N)),F.if((0,a._)(fY||(fY=Ae(["",".dynamicProps"])),E.evaluated),function(){return F.assign((0,a._)(pY||(pY=Ae(["",".props"])),E.evaluated),(0,a._)(mY||(mY=Ae(["undefined"]))))}),F.if((0,a._)(gY||(gY=Ae(["",".dynamicItems"])),E.evaluated),function(){return F.assign((0,a._)(vY||(vY=Ae(["",".items"])),E.evaluated),(0,a._)(yY||(yY=Ae(["undefined"]))))})}(X),y(X),function(E){var fe,Fe,xe,tt,ze,F=E.gen,Y=E.validateName,V=E.ValidationError,oe=E.opts;E.schemaEnv.$async?F.if((0,a._)(kY||(kY=Ae([""," === 0"])),l.default.errors),function(){return F.return(l.default.data)},function(){return F.throw((0,a._)(SY||(SY=Ae(["new ","(",")"])),V,l.default.vErrors))}):(F.assign((0,a._)(DY||(DY=Ae(["",".errors"])),Y),l.default.vErrors),oe.unevaluated&&(Fe=(fe=E).gen,xe=fe.evaluated,ze=fe.items,(tt=fe.props)instanceof a.Name&&Fe.assign((0,a._)(EY||(EY=Ae(["",".props"])),xe),tt),ze instanceof a.Name&&Fe.assign((0,a._)(AY||(AY=Ae(["",".items"])),xe),ze)),F.return((0,a._)(TY||(TY=Ae([""," === 0"])),l.default.errors)))}(X)})):h(L,function(){return(0,t.topBoolOrEmptySchema)(L)})};var R=function(){function L(X,Z,H){if(ke(this,L),(0,o.validateKeywordUsage)(X,Z,H),this.gen=X.gen,this.allErrors=X.allErrors,this.keyword=H,this.data=X.data,this.schema=X.schema[H],this.$data=Z.$data&&X.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(X,this.schema,H,this.$data),this.schemaType=Z.schemaType,this.parentSchema=X.schema,this.params={},this.it=X,this.def=Z,this.$data)this.schemaCode=X.gen.const("vSchema",re(this.$data,X));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,Z.schemaType,Z.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(Z.schemaType)));("code"in Z?Z.trackErrors:!1!==Z.errors)&&(this.errsCount=X.gen.const("_errs",l.default.errors))}return Se(L,[{key:"result",value:function(X,Z,H){this.failResult((0,a.not)(X),Z,H)}},{key:"failResult",value:function(X,Z,H){this.gen.if(X),H?H():this.error(),Z?(this.gen.else(),Z(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(X,Z){this.failResult((0,a.not)(X),void 0,Z)}},{key:"fail",value:function(X){if(void 0===X)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(X),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(X){if(!this.$data)return this.fail(X);var Z=this.schemaCode;this.fail((0,a._)(IY||(IY=Ae([""," !== undefined && (",")"])),Z,(0,a.or)(this.invalid$data(),X)))}},{key:"error",value:function(X,Z,H){if(Z)return this.setParams(Z),this._error(X,H),void this.setParams({});this._error(X,H)}},{key:"_error",value:function(X,Z){(X?d.reportExtraError:d.reportError)(this,this.def.error,Z)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(X){this.allErrors||this.gen.if(X)}},{key:"setParams",value:function(X,Z){Z?Object.assign(this.params,X):this.params=X}},{key:"block$data",value:function(X,Z){var H=this,he=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(X,he),Z()})}},{key:"check$data",value:function(){var X=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,Z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,he=this.schemaCode,E=this.schemaType,F=this.def;H.if((0,a.or)((0,a._)(FY||(FY=Ae([""," === undefined"])),he),Z)),X!==a.nil&&H.assign(X,!0),(E.length||F.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),X!==a.nil&&H.assign(X,!1)),H.else()}}},{key:"invalid$data",value:function(){var X=this.gen,Z=this.schemaCode,H=this.schemaType,he=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(Z instanceof a.Name))throw new Error("ajv implementation error");var F=Array.isArray(H)?H:[H];return(0,a._)(NY||(NY=Ae(["",""])),(0,i.checkDataTypes)(F,Z,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(he.validateSchema){var F=X.scopeValue("validate$data",{ref:he.validateSchema});return(0,a._)(OY||(OY=Ae(["!","(",")"])),F,Z)}return a.nil}())}},{key:"subschema",value:function(X,Z){var H=(0,s.getSubschema)(this.it,X);(0,s.extendSubschemaData)(H,this.it,X),(0,s.extendSubschemaMode)(H,X);var he=Ze(Ze(Ze({},this.it),H),{},{items:void 0,props:void 0});return function p(L,X){g(L)&&(v(L),m(L))?function(Z,H){var N,Y,E=Z.gen;Z.opts.$comment&&Z.schema.$comment&&_(Z),(Y=(N=Z).schema[N.opts.schemaId])&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,Y)),function(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}(Z);var F=E.const("_errs",l.default.errors);y(Z,F),E.var(H,(0,a._)(_Y||(_Y=Ae([""," === ",""])),F,l.default.errors))}(L,X):(0,t.boolOrEmptySchema)(L,X)}(he,Z),he}},{key:"mergeEvaluated",value:function(X,Z){var H=this.it,he=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==X.props&&(H.props=u.mergeEvaluated.props(he,X.props,H.props,Z)),!0!==H.items&&void 0!==X.items&&(H.items=u.mergeEvaluated.items(he,X.items,H.items,Z)))}},{key:"mergeValidEvaluated",value:function(X,Z){var H=this,he=this.it;if(he.opts.unevaluated&&(!0!==he.props||!0!==he.items))return this.gen.if(Z,function(){return H.mergeEvaluated(X,a.Name)}),!0}}]),L}();function z(L,X,Z,H){var he=new R(L,Z,X);"code"in Z?Z.code(he,H):he.$data&&Z.validate?(0,o.funcKeywordCode)(he,Z):"macro"in Z?(0,o.macroKeywordCode)(he,Z):(Z.compile||Z.validate)&&(0,o.funcKeywordCode)(he,Z)}ff.KeywordCxt=R;var U=/^\/(?:[^~]|~0|~1)*$/,q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(L,X){var Z,H,he=X.dataLevel,E=X.dataNames,F=X.dataPathArr;if(""===L)return l.default.rootData;if("/"===L[0]){if(!U.test(L))throw new Error("Invalid JSON-pointer: ".concat(L));Z=L,H=l.default.rootData}else{var N=q.exec(L);if(!N)throw new Error("Invalid JSON-pointer: ".concat(L));var Y=+N[1];if("#"===(Z=N[2])){if(Y>=he)throw new Error(xe("property/index",Y));return F[he-Y]}if(Y>he)throw new Error(xe("data",Y));if(H=E[he-Y],!Z)return H}var V,oe=H,fe=Re(Z.split("/"));try{for(fe.s();!(V=fe.n()).done;){var Fe=V.value;Fe&&(H=(0,a._)(jY||(jY=Ae(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Fe))),oe=(0,a._)(PY||(PY=Ae([""," && ",""])),oe,H))}}catch(tt){fe.e(tt)}finally{fe.f()}return oe;function xe(tt,ze){return"Cannot access ".concat(tt," ").concat(ze," levels up, current level is ").concat(he)}}return ff.getData=re,ff}Ga.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=z0(t[r]||n),a={"":s},l=fme(o,s,!1),c={},u=new Set;return hit(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=_.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function _(S){if(S=z0(y?(0,this.opts.uriResolver.resolve)(y,S):S),u.has(S))throw h(S);u.add(S);var $=this.refs[S];return"string"==typeof $&&($=this.refs[$]),"object"==bn($)?d(f,$.schema,S):S!==z0(v)&&("#"===S[0]?(d(f,c[S],S),c[S]=f):this.refs[S]=v),S}function C(S){if("string"==typeof S){if(!git.test(S))throw new Error('invalid anchor "'.concat(S,'"'));_.call(this,"#".concat(S))}}}),c;function d(f,p,m){if(void 0!==p&&!dit(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var gme,ID={};function DP(){if(gme)return ID;gme=1,Object.defineProperty(ID,"__esModule",{value:!0});var t=function(n){wt(i,lb(Error));var e=Ct(i);function i(r){var o;return ke(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return ID.default=t,ID}var vme,FD={};function TP(){if(vme)return FD;vme=1,Object.defineProperty(FD,"__esModule",{value:!0});var t=Ga,n=function(e){wt(r,lb(Error));var i=Ct(r);function r(o,s,a,l){var c;return ke(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return FD.default=n,FD}var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.resolveSchema=Zl.getCompilingSchema=Zl.resolveRef=Zl.compileSchema=Zl.SchemaEnv=void 0;var hd=xr(),vit=DP(),ng=Sp(),fd=Ga,yme=Hr,yit=MD(),ND=Se(function t(n){var e,i;ke(this,t),this.refs={},this.dynamicAnchors={},"object"==bn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function EP(t){var n=bme.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:vit.default,code:(0,hd._)(LY||(LY=Ae(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:ng.default.data,parentData:ng.default.parentData,parentDataProperty:ng.default.parentDataProperty,dataNames:[ng.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(RY||(RY=Ae(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,yit.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(ng.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(ng.default.self),"".concat(ng.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function bit(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:EP.call(this,t)}function bme(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function _it(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||OD.call(this,t,n)}function OD(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return AP.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=OD.call(this,t,s);return"object"!==bn(a?.schema)?void 0:AP.call(this,e,a)}if("object"===bn(s?.schema)){if(s.validate||EP.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new ND({schema:l,schemaId:c,root:t,baseId:r})}return AP.call(this,e,s)}}Zl.SchemaEnv=ND,Zl.compileSchema=EP,Zl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=_it.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new ND({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=bit.call(this,o):void 0},Zl.getCompilingSchema=bme,Zl.resolveSchema=OD;var xit=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function AP(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,yme.unescapeFragment)(c)];if(void 0===u)return;var d="object"===bn(r=u)&&r[this.opts.schemaId];!xit.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,yme.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=OD.call(this,o,h)}return(a=a||new ND({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var wit={$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},MP={},_me={};(function(t){function n(){for(var we=arguments.length,He=Array(we),qe=0;qe1){He[0]=He[0].slice(0,-1);for(var ut=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,U=String.fromCharCode;function q(we){throw new RangeError(G[we])}function L(we,He){var qe=we.split("@"),ut="";return qe.length>1&&(ut=qe[0]+"@",we=qe[1]),ut+function re(we,He){for(var qe=[],ut=we.length;ut--;)qe[ut]=He(we[ut]);return qe}((we=we.replace($,".")).split("."),He).join(".")}function X(we){for(var He=[],qe=0,ut=we.length;qe=55296&&Ue<=56319&&qe>1,we+=z(we/He);we>455;ut+=f)we=z(we/35);return z(ut+36*we/(we+38))},F=function(we){var He=[],qe=we.length,ut=0,Ue=128,Dn=72,ii=we.lastIndexOf("-");ii<0&&(ii=0);for(var hi=0;hi=128&&q("not-basic"),He.push(we.charCodeAt(hi));for(var di=ii>0?ii+1:0;di=qe&&q("invalid-input");var yr=H(we.charCodeAt(di++));(yr>=f||yr>z((h-ut)/Qr))&&q("overflow"),ut+=yr*Qr;var Ee=gi<=Dn?1:gi>=Dn+26?26:gi-Dn;if(yrz(h/St)&&q("overflow"),Qr*=St}var Ht=He.length+1;Dn=E(ut-kr,Ht,0==kr),z(ut/Ht)>h-Ue&&q("overflow"),Ue+=z(ut/Ht),ut%=Ht,He.splice(ut++,0,Ue)}return String.fromCodePoint.apply(String,He)},N=function(we){var He=[],qe=(we=X(we)).length,ut=128,Ue=0,Dn=72,ii=!0,hi=!1,di=void 0;try{for(var kr,Qr=we[Symbol.iterator]();!(ii=(kr=Qr.next()).done);ii=!0){var gi=kr.value;gi<128&&He.push(U(gi))}}catch(vd){hi=!0,di=vd}finally{try{!ii&&Qr.return&&Qr.return()}finally{if(hi)throw di}}var yr=He.length,Ee=yr;for(yr&&He.push("-");Ee=ut&&Bnz((h-Ue)/ei)&&q("overflow"),Ue+=(St-ut)*ei,ut=St;var Yn=!0,br=!1,Ar=void 0;try{for(var Po,ca=we[Symbol.iterator]();!(Yn=(Po=ca.next()).done);Yn=!0){var md=Po.value;if(mdh&&q("overflow"),md==ut){for(var hu=Ue,ua=f;;ua+=f){var Rl=ua<=Dn?1:ua>=Dn+26?26:ua-Dn;if(hu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function xe(we){for(var He="",qe=0,ut=we.length;qe=194&&Ue<224){if(ut-qe>=6){var Dn=parseInt(we.substr(qe+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&Dn)}else He+=we.substr(qe,6);qe+=6}else if(Ue>=224){if(ut-qe>=9){var ii=parseInt(we.substr(qe+4,2),16),hi=parseInt(we.substr(qe+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ii)<<6|63&hi)}else He+=we.substr(qe,9);qe+=9}else He+=we.substr(qe,3),qe+=3}return He}function tt(we,He){function qe(ut){var Ue=xe(ut);return Ue.match(He.UNRESERVED)?Ue:ut}return we.scheme&&(we.scheme=String(we.scheme).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==we.userinfo&&(we.userinfo=String(we.userinfo).replace(He.PCT_ENCODED,qe).replace(He.NOT_USERINFO,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.host&&(we.host=String(we.host).replace(He.PCT_ENCODED,qe).toLowerCase().replace(He.NOT_HOST,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.path&&(we.path=String(we.path).replace(He.PCT_ENCODED,qe).replace(we.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.query&&(we.query=String(we.query).replace(He.PCT_ENCODED,qe).replace(He.NOT_QUERY,Fe).replace(He.PCT_ENCODED,r)),void 0!==we.fragment&&(we.fragment=String(we.fragment).replace(He.PCT_ENCODED,qe).replace(He.NOT_FRAGMENT,Fe).replace(He.PCT_ENCODED,r)),we}function ze(we){return we.replace(/^0*(.*)/,"$1")||"0"}function ot(we,He){var qe=we.match(He.IPV4ADDRESS)||[],ut=u(qe,2)[1];return ut?ut.split(".").map(ze).join("."):we}function B(we,He){var qe=we.match(He.IPV6ADDRESS)||[],ut=u(qe,3),Ue=ut[1],Dn=ut[2];if(Ue){for(var ii=Ue.toLowerCase().split("::").reverse(),hi=u(ii,2),di=hi[0],kr=hi[1],Qr=kr?kr.split(":").map(ze):[],gi=di.split(":").map(ze),yr=He.IPV4ADDRESS.test(gi[gi.length-1]),Ee=yr?7:8,St=gi.length-Ee,Ht=Array(Ee),sn=0;sn1){var Oi=Ht.slice(0,hn.index),Bn=Ht.slice(hn.index+hn.length);ri=Oi.join(":")+"::"+Bn.join(":")}else ri=Ht.join(":");return Dn&&(ri+="%"+Dn),ri}return we}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Ie(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe={},ut=!1!==He.iri?c:l;"suffix"===He.reference&&(we=(He.scheme?He.scheme+":":"")+"//"+we);var Ue=we.match(ne);if(Ue){ie?(qe.scheme=Ue[1],qe.userinfo=Ue[3],qe.host=Ue[4],qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=Ue[7],qe.fragment=Ue[8],isNaN(qe.port)&&(qe.port=Ue[5])):(qe.scheme=Ue[1]||void 0,qe.userinfo=-1!==we.indexOf("@")?Ue[3]:void 0,qe.host=-1!==we.indexOf("//")?Ue[4]:void 0,qe.port=parseInt(Ue[5],10),qe.path=Ue[6]||"",qe.query=-1!==we.indexOf("?")?Ue[7]:void 0,qe.fragment=-1!==we.indexOf("#")?Ue[8]:void 0,isNaN(qe.port)&&(qe.port=we.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),qe.host&&(qe.host=B(ot(qe.host,ut),ut)),qe.reference=void 0!==qe.scheme||void 0!==qe.userinfo||void 0!==qe.host||void 0!==qe.port||qe.path||void 0!==qe.query?void 0===qe.scheme?"relative":void 0===qe.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==qe.reference&&(qe.error=qe.error||"URI is not a "+He.reference+" reference.");var Dn=fe[(He.scheme||qe.scheme||"").toLowerCase()];if(He.unicodeSupport||Dn&&Dn.unicodeSupport)tt(qe,ut);else{if(qe.host&&(He.domainHost||Dn&&Dn.domainHost))try{qe.host=oe.toASCII(qe.host.replace(ut.PCT_ENCODED,xe).toLowerCase())}catch(ii){qe.error=qe.error||"Host's domain name can not be converted to ASCII via punycode: "+ii}tt(qe,l)}Dn&&Dn.parse&&Dn.parse(qe,He)}else qe.error=qe.error||"URI can not be parsed.";return qe}var Le=/^\.\.?\//,_t=/^\/\.(\/|$)/,At=/^\/\.\.(\/|$)/,_n=/^\/?(?:.|\n)*?(?=\/|$)/;function ci(we){for(var He=[];we.length;)if(we.match(Le))we=we.replace(Le,"");else if(we.match(_t))we=we.replace(_t,"/");else if(we.match(At))we=we.replace(At,"/"),He.pop();else if("."===we||".."===we)we="";else{var qe=we.match(_n);if(!qe)throw new Error("Unexpected dot segment condition");var ut=qe[0];we=we.slice(ut.length),He.push(ut)}return He.join("")}function on(we){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},qe=He.iri?c:l,ut=[],Ue=fe[(He.scheme||we.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(we,He),we.host&&!qe.IPV6ADDRESS.test(we.host)&&(He.domainHost||Ue&&Ue.domainHost))try{we.host=He.iri?oe.toUnicode(we.host):oe.toASCII(we.host.replace(qe.PCT_ENCODED,xe).toLowerCase())}catch(hi){we.error=we.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+hi}tt(we,qe),"suffix"!==He.reference&&we.scheme&&(ut.push(we.scheme),ut.push(":"));var Dn=function Ye(we,He){var qe=!1!==He.iri?c:l,ut=[];return void 0!==we.userinfo&&(ut.push(we.userinfo),ut.push("@")),void 0!==we.host&&ut.push(B(ot(String(we.host),qe),qe).replace(qe.IPV6ADDRESS,function(Ue,Dn,ii){return"["+Dn+(ii?"%25"+ii:"")+"]"})),"number"!=typeof we.port&&"string"!=typeof we.port||(ut.push(":"),ut.push(String(we.port))),ut.length?ut.join(""):void 0}(we,He);if(void 0!==Dn&&("suffix"!==He.reference&&ut.push("//"),ut.push(Dn),we.path&&"/"!==we.path.charAt(0)&&ut.push("/")),void 0!==we.path){var ii=we.path;He.absolutePath||Ue&&Ue.absolutePath||(ii=ci(ii)),void 0===Dn&&(ii=ii.replace(/^\/\//,"/%2F")),ut.push(ii)}return void 0!==we.query&&(ut.push("?"),ut.push(we.query)),void 0!==we.fragment&&(ut.push("#"),ut.push(we.fragment)),ut.join("")}function Fi(we,He){var qe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ut={};return arguments[3]||(we=Ie(on(we,qe),qe),He=Ie(on(He,qe),qe)),!(qe=qe||{}).tolerant&&He.scheme?(ut.scheme=He.scheme,ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(ut.userinfo=He.userinfo,ut.host=He.host,ut.port=He.port,ut.path=ci(He.path||""),ut.query=He.query):(He.path?("/"===He.path.charAt(0)?ut.path=ci(He.path):(ut.path=void 0===we.userinfo&&void 0===we.host&&void 0===we.port||we.path?we.path?we.path.slice(0,we.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,ut.path=ci(ut.path)),ut.query=He.query):(ut.path=we.path,ut.query=void 0!==He.query?He.query:we.query),ut.userinfo=we.userinfo,ut.host=we.host,ut.port=we.port),ut.scheme=we.scheme),ut.fragment=He.fragment,ut}function Or(we,He){return we&&we.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,xe)}var Ai={scheme:"http",domainHost:!0,parse:function(we,He){return we.host||(we.error=we.error||"HTTP URIs must have a host."),we},serialize:function(we,He){var qe="https"===String(we.scheme).toLowerCase();return we.port!==(qe?443:80)&&""!==we.port||(we.port=void 0),we.path||(we.path="/"),we}},Wr={scheme:"https",domainHost:Ai.domainHost,parse:Ai.parse,serialize:Ai.serialize};function jo(we){return"boolean"==typeof we.secure?we.secure:"wss"===String(we.scheme).toLowerCase()}var Nn={scheme:"ws",domainHost:!0,parse:function(we,He){var qe=we;return qe.secure=jo(qe),qe.resourceName=(qe.path||"/")+(qe.query?"?"+qe.query:""),qe.path=void 0,qe.query=void 0,qe},serialize:function(we,He){if(we.port!==(jo(we)?443:80)&&""!==we.port||(we.port=void 0),"boolean"==typeof we.secure&&(we.scheme=we.secure?"wss":"ws",we.secure=void 0),we.resourceName){var qe=we.resourceName.split("?"),ut=u(qe,2),Ue=ut[0],Dn=ut[1];we.path=Ue&&"/"!==Ue?Ue:void 0,we.query=Dn,we.resourceName=void 0}return we.fragment=void 0,we}},xt={scheme:"wss",domainHost:Nn.domainHost,parse:Nn.parse,serialize:Nn.serialize},ui={},Ni="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",xo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),gt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ai=new RegExp(Ni,"g"),bi=new RegExp(xo,"g"),Er=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',gt),"g"),qr=new RegExp(n("[^]",Ni,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ao=qr;function Js(we){var He=xe(we);return He.match(ai)?He:we}var vr={scheme:"mailto",parse:function(we,He){var qe=we,ut=qe.to=qe.path?qe.path.split(","):[];if(qe.path=void 0,qe.query){for(var Ue=!1,Dn={},ii=qe.query.split("&"),hi=0,di=ii.length;hi 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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=function(){function E(){var F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,F=this.opts=Ze(Ze({},F),function y(E){var F,N,Y,V,oe,fe,Fe,xe,tt,ze,ot,B,ne,ie,Ie,Ye,Le,_t,At,_n,ci,on,Fi,pn,Nr,$r=E.strict,wr=null===(F=E.code)||void 0===F?void 0:F.optimize,Or=!0===wr||void 0===wr?1:wr||0,Ai=null!==(Y=null===(N=E.code)||void 0===N?void 0:N.regExp)&&void 0!==Y?Y:f,Wr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(fe=null!==(oe=E.strictSchema)&&void 0!==oe?oe:$r)||void 0===fe||fe,strictNumbers:null===(xe=null!==(Fe=E.strictNumbers)&&void 0!==Fe?Fe:$r)||void 0===xe||xe,strictTypes:null!==(ze=null!==(tt=E.strictTypes)&&void 0!==tt?tt:$r)&&void 0!==ze?ze:"log",strictTuples:null!==(B=null!==(ot=E.strictTuples)&&void 0!==ot?ot:$r)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:$r)&&void 0!==ie&&ie,code:E.code?Ze(Ze({},E.code),{},{optimize:Or,regExp:Ai}):{optimize:Or,regExp:Ai},loopRequired:null!==(Ie=E.loopRequired)&&void 0!==Ie?Ie:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(Le=E.meta)||void 0===Le||Le,messages:null===(_t=E.messages)||void 0===_t||_t,inlineRefs:null===(At=E.inlineRefs)||void 0===At||At,schemaId:null!==(_n=E.schemaId)&&void 0!==_n?_n:"$id",addUsedSchema:null===(ci=E.addUsedSchema)||void 0===ci||ci,validateSchema:null===(on=E.validateSchema)||void 0===on||on,validateFormats:null===(Fi=E.validateFormats)||void 0===Fi||Fi,unicodeRegExp:null===(pn=E.unicodeRegExp)||void 0===pn||pn,int32range:null===(Nr=E.int32range)||void 0===Nr||Nr,uriResolver:Wr}}(F));var N=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:N.es5,lines:N.lines}),this.logger=function U(E){if(!1===E)return z;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")}(F.logger);var oe=F.validateFormats;F.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,F,"NOT SUPPORTED"),C.call(this,v,F,"DEPRECATED","warn"),this._metaOpts=R.call(this),F.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),F.keywords&&G.call(this,F.keywords),"object"==bn(F.meta)&&this.addMetaSchema(F.meta),M.call(this),F.validateFormats=oe}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var F=this.opts,N=F.$data,Y=F.meta,V=F.schemaId,oe=d;"id"===V&&((oe=Ze({},d)).id=oe.$id,delete oe.$id),Y&&N&&this.addMetaSchema(oe,oe[V],!1)}},{key:"defaultMeta",value:function(){var F=this.opts,N=F.meta,Y=F.schemaId;return this.opts.defaultMeta="object"==bn(N)?N[Y]||N:void 0}},{key:"validate",value:function(F,N){var Y;if("string"==typeof F){if(!(Y=this.getSchema(F)))throw new Error('no schema with key or ref "'.concat(F,'"'))}else Y=this.compile(F);var V=Y(N);return"$async"in Y||(this.errors=Y.errors),V}},{key:"compile",value:function(F,N){var Y=this._addSchema(F,N);return Y.validate||this._compileSchemaEnv(Y)}},{key:"compileAsync",value:function(F,N){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var Y=this.opts.loadSchema;return V.call(this,F,N);function V(Ie,Ye){return oe.apply(this,arguments)}function oe(){return(oe=Zi(vn().mark(function Ie(Ye,Le){var _t;return vn().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return At.next=2,fe.call(this,Ye.$schema);case 2:return _t=this._addSchema(Ye,Le),At.abrupt("return",_t.validate||xe.call(this,_t));case 4:case"end":return At.stop()}},Ie,this)}))).apply(this,arguments)}function fe(Ie){return Fe.apply(this,arguments)}function Fe(){return(Fe=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!Ye||this.getSchema(Ye)){Le.next=3;break}return Le.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return Le.stop()}},Ie,this)}))).apply(this,arguments)}function xe(Ie){return tt.apply(this,arguments)}function tt(){return(tt=Zi(vn().mark(function Ie(Ye){return vn().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.prev=0,Le.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(Le.prev=4,Le.t0=Le.catch(0),Le.t0 instanceof r.default){Le.next=8;break}throw Le.t0;case 8:return ze.call(this,Le.t0),Le.next=11,ot.call(this,Le.t0.missingSchema);case 11:return Le.abrupt("return",xe.call(this,Ye));case 12:case"end":return Le.stop()}},Ie,this,[[0,4]])}))).apply(this,arguments)}function ze(Ie){var Ye=Ie.missingSchema,Le=Ie.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(Le," cannot be resolved"))}function ot(Ie){return B.apply(this,arguments)}function B(){return(B=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,ne.call(this,Ye);case 2:if(Le=_t.sent,this.refs[Ye]){_t.next=6;break}return _t.next=6,fe.call(this,Le.$schema);case 6:this.refs[Ye]||this.addSchema(Le,Ye,N);case 7:case"end":return _t.stop()}},Ie,this)}))).apply(this,arguments)}function ne(Ie){return ie.apply(this,arguments)}function ie(){return(ie=Zi(vn().mark(function Ie(Ye){var Le;return vn().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(!(Le=this._loading[Ye])){_t.next=3;break}return _t.abrupt("return",Le);case 3:return _t.prev=3,_t.next=6,this._loading[Ye]=Y(Ye);case 6:return _t.abrupt("return",_t.sent);case 7:return _t.prev=7,delete this._loading[Ye],_t.finish(7);case 10:case"end":return _t.stop()}},Ie,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(F,N,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(F)){var fe,Fe=Re(F);try{for(Fe.s();!(fe=Fe.n()).done;)this.addSchema(fe.value,void 0,Y,oe)}catch(ze){Fe.e(ze)}finally{Fe.f()}return this}if("object"===bn(F)){var tt=this.opts.schemaId;if(void 0!==(V=F[tt])&&"string"!=typeof V)throw new Error("schema ".concat(tt," must be string"))}return N=(0,l.normalizeId)(N||V),this._checkUnique(N),this.schemas[N]=this._addSchema(F,Y,N,oe,!0),this}},{key:"addMetaSchema",value:function(F,N){return this.addSchema(F,N,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(F,N){if("boolean"==typeof F)return!0;var Y;if(void 0!==(Y=F.$schema)&&"string"!=typeof Y)throw new Error("$schema must be a string");if(!(Y=Y||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(Y,F);if(!V&&N){var oe="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(oe);this.logger.error(oe)}return V}},{key:"getSchema",value:function(F){for(var N;"string"==typeof(N=S.call(this,F));)F=N;if(void 0===N){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(N=s.resolveSchema.call(this,V,F)))return;this.refs[F]=N}return N.validate||this._compileSchemaEnv(N)}},{key:"removeSchema",value:function(F){if(F instanceof RegExp)return this._removeAllSchemas(this.schemas,F),this._removeAllSchemas(this.refs,F),this;switch(bn(F)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var N=S.call(this,F);return"object"==bn(N)&&this._cache.delete(N.schema),delete this.schemas[F],delete this.refs[F],this;case"object":this._cache.delete(F);var V=F[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(F){var N,Y=Re(F);try{for(Y.s();!(N=Y.n()).done;)this.addKeyword(N.value)}catch(oe){Y.e(oe)}finally{Y.f()}return this}},{key:"addKeyword",value:function(F,N){var Y,V=this;if("string"==typeof F)Y=F,"object"==bn(N)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),N.keyword=Y);else{if("object"!=bn(F)||void 0!==N)throw new Error("invalid addKeywords parameters");if(Y=(N=F).keyword,Array.isArray(Y)&&!Y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(re.call(this,Y,N),!N)return(0,u.eachItem)(Y,function(fe){return L.call(V,fe)}),this;Z.call(this,N);var oe=Ze(Ze({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)});return(0,u.eachItem)(Y,0===oe.type.length?function(fe){return L.call(V,fe,oe)}:function(fe){return oe.type.forEach(function(Fe){return L.call(V,fe,oe,Fe)})}),this}},{key:"getKeyword",value:function(F){var N=this.RULES.all[F];return"object"==bn(N)?N.definition:!!N}},{key:"removeKeyword",value:function(F){var N=this.RULES;delete N.keywords[F],delete N.all[F];var Y,V=Re(N.rules);try{for(V.s();!(Y=V.n()).done;){var oe=Y.value,fe=oe.rules.findIndex(function(Fe){return Fe.keyword===F});fe>=0&&oe.rules.splice(fe,1)}}catch(Fe){V.e(Fe)}finally{V.f()}return this}},{key:"addFormat",value:function(F,N){return"string"==typeof N&&(N=new RegExp(N)),this.formats[F]=N,this}},{key:"errorsText",value:function(){var F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Y=N.separator,V=void 0===Y?", ":Y,oe=N.dataVar,fe=void 0===oe?"data":oe;return F&&0!==F.length?F.map(function(Fe){return"".concat(fe).concat(Fe.instancePath," ").concat(Fe.message)}).reduce(function(Fe,xe){return Fe+V+xe}):"No errors"}},{key:"$dataMetaSchema",value:function(F,N){var Y=this.RULES.all;F=JSON.parse(JSON.stringify(F));var V,oe=Re(N);try{for(oe.s();!(V=oe.n()).done;){var fe,Fe=V.value.split("/").slice(1),xe=F,tt=Re(Fe);try{for(tt.s();!(fe=tt.n()).done;)xe=xe[fe.value]}catch(ie){tt.e(ie)}finally{tt.f()}for(var ze in Y){var ot=Y[ze];if("object"==bn(ot)){var ne=xe[ze];ot.definition.$data&&ne&&(xe[ze]=he(ne))}}}}catch(ie){oe.e(ie)}finally{oe.f()}return F}},{key:"_removeAllSchemas",value:function(F,N){for(var Y in F){var V=F[Y];N&&!N.test(Y)||("string"==typeof V?delete F[Y]:V&&!V.meta&&(this._cache.delete(V.schema),delete F[Y]))}}},{key:"_addSchema",value:function(F,N,Y){var V,oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,fe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Fe=this.opts.schemaId;if("object"==bn(F))V=F[Fe];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof F)throw new Error("schema must be object or boolean")}var xe=this._cache.get(F);if(void 0!==xe)return xe;Y=(0,l.normalizeId)(V||Y);var tt=l.getSchemaRefs.call(this,F,Y);return xe=new s.SchemaEnv({schema:F,schemaId:Fe,meta:N,baseId:Y,localRefs:tt}),this._cache.set(xe.schema,xe),fe&&!Y.startsWith("#")&&(Y&&this._checkUnique(Y),this.refs[Y]=xe),oe&&this.validateSchema(F,!0),xe}},{key:"_checkUnique",value:function(F){if(this.schemas[F]||this.refs[F])throw new Error('schema with key or id "'.concat(F,'" already exists'))}},{key:"_compileSchemaEnv",value:function(F){if(F.meta?this._compileMetaSchema(F):s.compileSchema.call(this,F),!F.validate)throw new Error("ajv implementation error");return F.validate}},{key:"_compileMetaSchema",value:function(F){var N=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,F)}finally{this.opts=N}}}]),E}();function C(E,F,N){var Y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var oe=V;oe in F&&this.logger[Y]("".concat(N,": option ").concat(V,". ").concat(E[oe]))}}function S(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function M(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var F in E)this.addSchema(E[F],F)}function $(){for(var E in this.opts.formats){var F=this.opts.formats[E];F&&this.addFormat(E,F)}}function G(E){if(Array.isArray(E))this.addVocabulary(E);else for(var F in this.logger.warn("keywords option as map is deprecated, pass array"),E){var N=E[F];N.keyword||(N.keyword=F),this.addKeyword(N)}}function R(){var E,F=Ze({},this.opts),N=Re(p);try{for(N.s();!(E=N.n()).done;)delete F[E.value]}catch(Y){N.e(Y)}finally{N.f()}return F}t.default=_,_.ValidationError=i.default,_.MissingRefError=r.default;var z={log:function(){},warn:function(){},error:function(){}},q=/^[a-z_$][a-z0-9_$:-]*$/i;function re(E,F){var N=this.RULES;if((0,u.eachItem)(E,function(Y){if(N.keywords[Y])throw new Error("Keyword ".concat(Y," is already defined"));if(!q.test(Y))throw new Error("Keyword ".concat(Y," has invalid name"))}),F&&F.$data&&!("code"in F)&&!("validate"in F))throw new Error('$data keyword must have "code" or "validate" function')}function L(E,F,N){var Y,V=this,oe=F?.post;if(N&&oe)throw new Error('keyword with "post" flag cannot have "type"');var fe=this.RULES,Fe=oe?fe.post:fe.rules.find(function(tt){return tt.type===N});if(Fe||fe.rules.push(Fe={type:N,rules:[]}),fe.keywords[E]=!0,F){var xe={keyword:E,definition:Ze(Ze({},F),{},{type:(0,c.getJSONTypes)(F.type),schemaType:(0,c.getJSONTypes)(F.schemaType)})};F.before?X.call(this,Fe,xe,F.before):Fe.rules.push(xe),fe.all[E]=xe,null===(Y=F.implements)||void 0===Y||Y.forEach(function(tt){return V.addKeyword(tt)})}}function X(E,F,N){var Y=E.rules.findIndex(function(V){return V.keyword===N});Y>=0?E.rules.splice(Y,0,F):(E.rules.push(F),this.logger.warn("rule ".concat(N," is not defined")))}function Z(E){var F=E.metaSchema;void 0!==F&&(E.$data&&this.opts.$data&&(F=he(F)),E.validateSchema=this.compile(F,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(E){return{anyOf:[E,H]}}}(Xpe);var IP={},FP={},NP={};Object.defineProperty(NP,"__esModule",{value:!0}),NP.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.callRef=ig.getValidate=void 0;var kit=TP(),wme=dd(),ec=xr(),U0=Sp(),Cme=Zl,jD=Hr,Sit={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return PD(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return PD(t,(0,ec._)($Y||($Y=Ae(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Cme.resolveRef.call(l,c,r,e);if(void 0===p)throw new kit.default(i.opts.uriResolver,r,e);return p instanceof Cme.SchemaEnv?(g=kme(t,m=p),void PD(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,ec.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:ec.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function kme(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,ec._)(BY||(BY=Ae(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function PD(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?U0.default.this:ec.nil;function c(d){var h=(0,ec._)(zY||(zY=Ae(["",".errors"])),d);r.assign(U0.default.vErrors,(0,ec._)(UY||(UY=Ae([""," === null ? "," : ",".concat(",")"])),U0.default.vErrors,h,U0.default.vErrors,h)),r.assign(U0.default.errors,(0,ec._)(GY||(GY=Ae(["",".length"])),U0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=jD.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,ec._)(WY||(WY=Ae(["",".evaluated.props"])),d));o.props=jD.mergeEvaluated.props(r,p,o.props,ec.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=jD.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,ec._)(qY||(qY=Ae(["",".evaluated.items"])),d));o.items=jD.mergeEvaluated.items(r,m,o.items,ec.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,ec._)(VY||(VY=Ae(["await ",""])),(0,wme.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,ec._)(HY||(HY=Ae(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,wme.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}ig.getValidate=kme,ig.callRef=PD,ig.default=Sit,Object.defineProperty(FP,"__esModule",{value:!0}),FP.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",NP.default,ig.default];var OP={},jP={};Object.defineProperty(jP,"__esModule",{value:!0});var LD=xr(),Tp=LD.operators,RD={maximum:{okStr:"<=",ok:Tp.LTE,fail:Tp.GT},minimum:{okStr:">=",ok:Tp.GTE,fail:Tp.LT},exclusiveMaximum:{okStr:"<",ok:Tp.LT,fail:Tp.GTE},exclusiveMinimum:{okStr:">",ok:Tp.GT,fail:Tp.LTE}},Eit={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD.str)(XY||(XY=Ae(["must be "," ",""])),RD[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,LD._)(YY||(YY=Ae(["{comparison: ",", limit: ","}"])),RD[n].okStr,e)}},Ait={keyword:Object.keys(RD),type:"number",schemaType:"number",$data:!0,error:Eit,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,LD._)(JY||(JY=Ae([""," "," "," || isNaN(",")"])),e,RD[n].fail,i,e))}};jP.default=Ait;var PP={};Object.defineProperty(PP,"__esModule",{value:!0});var N_=xr(),Mit={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,N_.str)(KY||(KY=Ae(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,N_._)(QY||(QY=Ae(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,N_._)(ZY||(ZY=Ae(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,N_._)(eJ||(eJ=Ae([""," !== parseInt(",")"])),o,o);t.fail$data((0,N_._)(tJ||(tJ=Ae(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};PP.default=Mit;var LP={},RP={};function Sme(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(P_.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,j_.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:_=v}),void n.forOf(_,i,function(){n.assign(C,(0,j_.propertyInData)(n,r,_,a.ownProperties)),n.if((0,P_.not)(C),function(){t.error(),n.break()})},P_.nil);var _,C}),t.ok(y)}else n.if((0,j_.checkMissingProp)(t,e,v)),(0,j_.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,$it.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,j_.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};VP.default=Bit;var HP={};Object.defineProperty(HP,"__esModule",{value:!0});var L_=xr(),Vit={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,L_.str)(gJ||(gJ=Ae(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,L_._)(vJ||(vJ=Ae(["{limit: ","}"])),n)}},Hit={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Vit,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?L_.operators.GT:L_.operators.LT;t.fail$data((0,L_._)(yJ||(yJ=Ae(["",".length "," ",""])),e,r,i))}};HP.default=Hit;var zP={},R_={};Object.defineProperty(R_,"__esModule",{value:!0});var Dme=dme;Dme.code='require("ajv/dist/runtime/equal").default',R_.default=Dme,Object.defineProperty(zP,"__esModule",{value:!0});var UP=I_,Wa=xr(),zit=Hr,Uit=R_,Git={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa.str)(bJ||(bJ=Ae(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Wa._)(_J||(_J=Ae(["{i: ",", j: ","}"])),e,i)}},Wit={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Git,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,UP.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Wa._)(wJ||(wJ=Ae(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Wa._)(CJ||(CJ=Ae([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Wa._)(xJ||(xJ=Ae([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,UP.checkDataTypes)(c,p,a.opts.strictNumbers,UP.DataType.Wrong),g=n.const("indices",(0,Wa._)(kJ||(kJ=Ae(["{}"]))));n.for((0,Wa._)(SJ||(SJ=Ae([";","--;"])),h),function(){n.let(p,(0,Wa._)(DJ||(DJ=Ae(["","[","]"])),e,h)),n.if(m,(0,Wa._)(TJ||(TJ=Ae(["continue"])))),c.length>1&&n.if((0,Wa._)(EJ||(EJ=Ae(["typeof ",' == "string"'])),p),(0,Wa._)(AJ||(AJ=Ae(["",' += "_"'])),p)),n.if((0,Wa._)(MJ||(MJ=Ae(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Wa._)(IJ||(IJ=Ae(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Wa._)(FJ||(FJ=Ae(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,zit.useFunc)(n,Uit.default),m=n.name("outer");n.label(m).for((0,Wa._)(NJ||(NJ=Ae([";","--;"])),h),function(){return n.for((0,Wa._)(OJ||(OJ=Ae([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Wa._)(jJ||(jJ=Ae(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};zP.default=Wit;var GP={};Object.defineProperty(GP,"__esModule",{value:!0});var WP=xr(),qit=Hr,Xit=R_,Yit={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,WP._)(PJ||(PJ=Ae(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==bn(o)?t.fail$data((0,WP._)(LJ||(LJ=Ae(["!","(",", ",")"])),(0,qit.useFunc)(n,Xit.default),e,r)):t.fail((0,WP._)(RJ||(RJ=Ae([""," !== ",""])),o,e))}};GP.default=Yit;var qP={};Object.defineProperty(qP,"__esModule",{value:!0});var $_=xr(),Jit=Hr,Kit=R_,Qit={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,$_._)($J||($J=Ae(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,Jit.useFunc)(n,Kit.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,$_._)(BJ||(BJ=Ae(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=$_.or.apply(void 0,si(r.map(function(h,f){return p=d,"object"===bn(g=r[m=f])&&null!==g?(0,$_._)(VJ||(VJ=Ae(["","(",", ","[","])"])),u(),e,p,m):(0,$_._)(HJ||(HJ=Ae([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};qP.default=Qit,Object.defineProperty(OP,"__esModule",{value:!0}),OP.default=[jP.default,PP.default,LP.default,$P.default,BP.default,VP.default,HP.default,zP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},GP.default,qP.default];var XP={},G0={};Object.defineProperty(G0,"__esModule",{value:!0}),G0.validateAdditionalItems=void 0;var og=xr(),YP=Hr,crt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,og.str)(zJ||(zJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,og._)(UJ||(UJ=Ae(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?Tme(t,i):(0,YP.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function Tme(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,og._)(GJ||(GJ=Ae(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,og._)(WJ||(WJ=Ae([""," <= ",""])),a,n.length));else if("object"==bn(i)&&!(0,YP.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,og._)(qJ||(qJ=Ae([""," <= ",""])),a,n.length));e.if((0,og.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:YP.Type.Num},c),s.allErrors||e.if((0,og.not)(c),function(){return e.break()})});var c}),t.ok(l)}}G0.validateAdditionalItems=Tme,G0.default=crt;var JP={},W0={};Object.defineProperty(W0,"__esModule",{value:!0}),W0.validateTuple=void 0;var Eme=xr(),BD=Hr,urt=dd(),drt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Ame(t,"additionalItems",n);e.items=!0,(0,BD.alwaysValidSchema)(e,n)||t.ok((0,urt.validateArray)(t))}};function Ame(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,BD.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=BD.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Eme._)(XJ||(XJ=Ae(["",".length"])),o));e.forEach(function(d,h){(0,BD.alwaysValidSchema)(a,d)||(i.if((0,Eme._)(YJ||(YJ=Ae([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}W0.validateTuple=Ame,W0.default=drt,Object.defineProperty(JP,"__esModule",{value:!0});var hrt=W0,frt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,hrt.validateTuple)(t,"items")}};JP.default=frt;var KP={};Object.defineProperty(KP,"__esModule",{value:!0});var Mme=xr(),prt=Hr,mrt=dd(),grt=G0,vrt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Mme.str)(JJ||(JJ=Ae(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Mme._)(KJ||(KJ=Ae(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,prt.alwaysValidSchema)(i,n)||(r?(0,grt.validateAdditionalItems)(t,r):t.ok((0,mrt.validateArray)(t)))}};KP.default=vrt;var QP={};Object.defineProperty(QP,"__esModule",{value:!0});var du=xr(),VD=Hr,yrt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du.str)(QJ||(QJ=Ae(["must contain at least "," valid item(s)"])),e):(0,du.str)(ZJ||(ZJ=Ae(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,du._)(eK||(eK=Ae(["{minContains: ","}"])),e):(0,du._)(tK||(tK=Ae(["{minContains: ",", maxContains: ","}"])),e,i)}},brt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:yrt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,du._)(nK||(nK=Ae(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,VD.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,VD.alwaysValidSchema)(a,r)){var d=(0,du._)(iK||(iK=Ae([""," >= ",""])),u,n);return void 0!==e&&(d=(0,du._)(rK||(rK=Ae([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,du._)(oK||(oK=Ae(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,VD.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,du._)(sK||(sK=Ae(["","++"])),v)),void(void 0===e?i.if((0,du._)(aK||(aK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,du._)(lK||(lK=Ae([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,du._)(cK||(cK=Ae([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:VD.Type.Num,compositeRule:!0},m),g()})}}};QP.default=brt;var Ime={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Hr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(uK||(uK=Ae(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(dK||(dK=Ae(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Un(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,_=Re(g);try{for(_.s();!(y=_.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(S){_.e(S)}finally{_.f()}}):(c.if((0,n._)(hK||(hK=Ae([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Ime);var ZP={};Object.defineProperty(ZP,"__esModule",{value:!0});var Fme=xr(),_rt=Hr,xrt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,Fme._)(fK||(fK=Ae(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,_rt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,Fme.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};ZP.default=xrt;var HD={};Object.defineProperty(HD,"__esModule",{value:!0});var zD=dd(),pd=xr(),wrt=Sp(),UD=Hr,Crt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(pK||(pK=Ae(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,UD.alwaysValidSchema)(s,e)){var c=(0,zD.allSchemaProperties)(i.properties),u=(0,zD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,UD.schemaRefOrVal)(s,i.properties,"properties");g=(0,zD.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,si(c.map(function(y){return(0,pd._)(gK||(gK=Ae([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(si(u.map(function(y){return(0,pd._)(vK||(vK=Ae(["",".test(",")"])),(0,zD.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(mK||(mK=Ae([""," === ",""])),o,wrt.default.errors))}function d(p){n.code((0,pd._)(yK||(yK=Ae(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==bn(e)&&!(0,UD.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:UD.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};HD.default=Crt;var eL={};Object.defineProperty(eL,"__esModule",{value:!0});var krt=MD(),Nme=dd(),tL=Hr,Ome=HD,Srt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Ome.default.code(new krt.KeywordCxt(o,Ome.default,"additionalProperties"));var s,a=(0,Nme.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=tL.mergeEvaluated.props(n,(0,tL.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,tL.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Nme.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};eL.default=Srt;var nL={};Object.defineProperty(nL,"__esModule",{value:!0});var jme=dd(),GD=xr(),Pme=Hr,Lme=Hr,Drt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,jme.allSchemaProperties)(e),l=a.filter(function(p){return(0,Pme.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof GD.Name||(o.props=(0,Lme.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Pme.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,GD._)(bK||(bK=Ae(["",".test(",")"])),(0,jme.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Lme.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,GD._)(_K||(_K=Ae(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,GD.not)(u),function(){return n.break()})})})}}};nL.default=Drt;var iL={};Object.defineProperty(iL,"__esModule",{value:!0});var Trt=Hr,Ert={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Trt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};iL.default=Ert;var rL={};Object.defineProperty(rL,"__esModule",{value:!0});var Art={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};rL.default=Art;var oL={};Object.defineProperty(oL,"__esModule",{value:!0});var WD=xr(),Mrt=Hr,Irt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,WD._)(xK||(xK=Ae(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Mrt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,WD._)(wK||(wK=Ae([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,WD._)(CK||(CK=Ae(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,WD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};oL.default=Irt;var sL={};Object.defineProperty(sL,"__esModule",{value:!0});var Frt=Hr,Nrt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Frt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};sL.default=Nrt;var aL={};Object.defineProperty(aL,"__esModule",{value:!0});var qD=xr(),Rme=Hr,Ort={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,qD.str)(kK||(kK=Ae(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,qD._)(SK||(SK=Ae(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Rme.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=$me(i,"then"),o=$me(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,qD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,qD._)(DK||(DK=Ae(["",""])),d)):t.setParams({ifClause:d})}}}};function $me(t,n){var e=t.schema[n];return void 0!==e&&!(0,Rme.alwaysValidSchema)(t,e)}aL.default=Ort;var lL={};Object.defineProperty(lL,"__esModule",{value:!0});var jrt=Hr,Prt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,jrt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};lL.default=Prt,Object.defineProperty(XP,"__esModule",{value:!0});var Lrt=G0,Rrt=JP,$rt=W0,Brt=KP,Vrt=QP,Hrt=Ime,zrt=ZP,Urt=HD,Grt=eL,Wrt=nL,qrt=iL,Xrt=rL,Yrt=oL,Jrt=sL,Krt=aL,Qrt=lL;XP.default=function(){var n=[qrt.default,Xrt.default,Yrt.default,Jrt.default,Krt.default,Qrt.default,zrt.default,Urt.default,Hrt.default,Grt.default,Wrt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Rrt.default,Brt.default):n.push(Lrt.default,$rt.default),n.push(Vrt.default),n};var cL={},uL={};Object.defineProperty(uL,"__esModule",{value:!0});var js=xr(),Zrt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,js.str)(TK||(TK=Ae(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,js._)(EK||(EK=Ae(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,js._)(AK||(AK=Ae(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,js._)(MK||(MK=Ae(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,js._)(IK||(IK=Ae(["",'.type || "string"'])),f)).assign(m,(0,js._)(FK||(FK=Ae(["",".validate"])),f))},function(){return e.assign(p,(0,js._)(NK||(NK=Ae(['"string"'])))).assign(m,f)}),t.fail$data((0,js.or)(!1===l.strictSchema?js.nil:(0,js._)(OK||(OK=Ae([""," && !",""])),s,m),(g=u.$async?(0,js._)(jK||(jK=Ae(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,js._)(PK||(PK=Ae(["","(",")"])),m,i),v=(0,js._)(LK||(LK=Ae(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,js._)(RK||(RK=Ae([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Un(function(v){var y=v instanceof RegExp?(0,js.regexpCode)(v):l.code.formats?(0,js._)($K||($K=Ae(["","",""])),l.code.formats,(0,js.getProperty)(o)):void 0,_=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=bn(v)||v instanceof RegExp?["string",v,_]:[v.type||"string",v.validate,(0,js._)(BK||(BK=Ae(["",".validate"])),_)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==bn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,js._)(VK||(VK=Ae(["await ","(",")"])),g,i)}return(0,js._)("function"==typeof m?HK||(HK=Ae(["","(",")"])):zK||(zK=Ae(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};uL.default=Zrt,Object.defineProperty(cL,"__esModule",{value:!0}),cL.default=[uL.default];var q0={};Object.defineProperty(q0,"__esModule",{value:!0}),q0.contentVocabulary=q0.metadataVocabulary=void 0,q0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],q0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(IP,"__esModule",{value:!0});var iot=cL,Bme=q0,rot=[FP.default,OP.default,(0,XP.default)(),iot.default,Bme.metadataVocabulary,Bme.contentVocabulary];IP.default=rot;var dL={},Vme={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Vme),Object.defineProperty(dL,"__esModule",{value:!0});var X0=xr(),hL=Vme,Hme=Zl,oot=Hr,sot={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===hL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,X0._)(UK||(UK=Ae(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,X0._)(GK||(GK=Ae(["","",""])),e,(0,X0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,X0.Name),h}n.if((0,X0._)(WK||(WK=Ae(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",_="Expref",C="Pipe",$="EQ",G="GT",R="LT",z="GTE",U="LTE",q="NE",re="Flatten",L="Star",X="Filter",Z="Dot",he="Lbrace",E="Lbracket",F="Lparen",N="Literal",Y={".":Z,"*":L,",":p,":":m,"{":he,"}":g,"]":h,"(":F,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},oe={" ":!0,"\t":!0,"\n":!0};function fe(B){return B>="0"&&B<="9"||"-"===B}function Fe(){}Fe.prototype={tokenize:function(B){var ne,ie,Ie,Ye,Le=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),Le.push({type:u,value:ie,start:ne});else if(void 0!==Y[B[this._current]])Le.push({type:Y[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(fe(B[this._current]))Ie=this._consumeNumber(B),Le.push(Ie);else if("["===B[this._current])Ie=this._consumeLBracket(B),Le.push(Ie);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),Le.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),Le.push({type:N,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var _t=this._consumeLiteral(B);Le.push({type:N,value:_t,start:ne})}else if(void 0!==V[B[this._current]])Le.push(this._consumeOperator(B));else if(void 0!==oe[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,Le.push({type:"And",value:"&&",start:ne})):Le.push({type:_,value:"&",start:ne});else{if("|"!==B[this._current]){var At=new Error("Unknown character:"+B[this._current]);throw At.name="LexerError",At}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,Le.push({type:"Or",value:"||",start:ne})):Le.push({type:C,value:"|",start:ne})}return Le},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:z,value:">=",start:ne}):{type:G,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:$,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Ie=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var xe={};function tt(){}function ze(B){this.runtime=B}function ot(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}xe.EOF=0,xe.UnquotedIdentifier=0,xe.QuotedIdentifier=0,xe.Rbracket=0,xe.Rparen=0,xe.Comma=0,xe.Rbrace=0,xe.Number=0,xe.Current=0,xe.Expref=0,xe.Pipe=1,xe.Or=2,xe.And=3,xe.EQ=5,xe.GT=5,xe.LT=5,xe.GTE=5,xe.LTE=5,xe.NE=5,xe.Flatten=9,xe.Star=20,xe.Filter=21,xe.Dot=40,xe.Not=45,xe.Lbrace=50,xe.Lbracket=55,xe.Lparen=60,tt.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Ie=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Ie.name="ParserError",Ie}return ne},_loadTokens:function(B){var ne=(new Fe).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Ie=this._lookahead(0);B=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===he?(this._match(he),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(xe[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===X)ne=this.expression(B);else{if(this._lookahead(0)!==Z){var ie=this._lookaheadToken(0),Ie=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Ie.name="ParserError",Ie}this._match(Z),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Ie=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Ie.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Ie}}},ze.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Ie,Ye,Le,_t,At,_n,ci,on;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(At=ne[B.name])?null:At:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),on=1;on0)for(on=$r;onwr;on+=Or)Ye.push(ne[on]);return Ye;case"Projection":var Ai=this.visit(B.children[0],ne);if(!n(Ai))return null;for(ci=[],on=0;on_t;break;case z:Ye=Le>=_t;break;case R:Ye=Le<_t;break;case U:Ye=Le<=_t;break;default:throw new Error("Unknown comparator: "+B.name)}return Ye;case re:var ui=this.visit(B.children[0],ne);if(!n(ui))return null;var Ni=[];for(on=0;on=B&&(ne=ie<0?B-1:B),ne}},ot.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Ie,Ye,Le,_t;if(ie[ie.length-1].variadic){if(ne.length=0;Ie--)ie+=ne[Ie];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Ie=0;Ie=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Ie=B[0],Ye=B[1],Le=0;Le0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Ie0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Ie=1;Iepn?1:Fi_t&&(_t=ie,ne=Ye[At]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],Le=this.createKeyFunction(B[1],[s,a]),_t=1/0,At=0;At1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var dot=function(){function t(n,e,i,r){fL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=XD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=XD(p,4),_=m[3];void 0===_&&(_=1),o.rgba=[m[0],m[1],m[2],_]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return pL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return Gme(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return Gme(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.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=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,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=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=uot[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=XD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),hot=function(){function t(){fL(this,t),this._events=[]}return pL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function mL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function xh(t,n){return(n||document).querySelector(t)}function Wme(t){t.preventDefault(),t.stopPropagation()}function gL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&Wme(o),i(o))})}var qme=function(){function t(n){fL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new hot,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return pL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),gL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(Wme(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new dot(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=xh(".picker_hue",o),this._domSL=xh(".picker_sl",o),this._domA=xh(".picker_alpha",o),this._domEdit=xh(".picker_editor input",o),this._domSample=xh(".picker_sample",o),this._domOkay=xh(".picker_done button",o),this._domCancel=xh(".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 n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),mL(r,this._domH,function(l,c){return e._setHSLA(l)}),mL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&mL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),gL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),gL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=xh(".picker_selector",this._domH),d=xh(".picker_selector",l),h=xh(".picker_selector",c);_(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,_(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), 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",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function _(S,M,$){M.style.left=100*$+"%"}function C(S,M,$){M.style.top=100*$+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),vL=document.createElement("style");vL.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(vL),qme.StyleElement=vL;var fot=Object.freeze({__proto__:null,default:qme});const pot=["editor"];function mot(t,n){if(1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",39),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while modifying storage object: ",e.error,"")}}function got(t,n){1&t&&(b(0,"ngb-alert",40),ge(1,"img",41),b(2,"h6",39),I(3,"Storage object was modified successfully."),x()()),2&t&&k("dismissible",!1)}function vot(t,n){1&t&&(b(0,"span"),I(1,"Save as a copy"),x())}function yot(t,n){1&t&&I(0,"Save")}function bot(t,n){if(1&t&&(b(0,"button",42),J(1,vot,2,0,"span",43),J(2,yot,1,0,"ng-template",null,44,Ur),x()),2&t){const e=uo(3),i=j();k("disabled",i.updating),w(1),k("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const yL=function(){return["/storage"]},_ot=function(t){return{collection:t}},xot=function(t,n){return{collection:t,key:n}},wot=function(t,n,e){return{collection:t,key:n,user_id:e}},bL=function(t){return{"is-invalid":t}};let Cot=(()=>{class t{ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Do.required],keyname:["",Do.required],user_id:["",Do.required],permission_read:[0,Do.required],permission_write:[0,Do.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"object",void 0),K(this,"objectForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(pot,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Storage Object"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),I(6,"Storage"),x(),b(7,"li",4)(8,"a",5),I(9),x()(),b(10,"li",4)(11,"a",5),I(12),x()(),b(13,"li",4)(14,"a",5),I(15),x()()()()(),J(16,mot,4,2,"ngb-alert",6),J(17,got,4,1,"ngb-alert",7),b(18,"form",8),ye("ngSubmit",function(){return i.updateObject()}),b(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),I(23,"Collection"),x()(),ge(24,"input",13),b(25,"div",14),I(26,"Collection is required"),x()(),b(27,"div",10)(28,"div",11)(29,"label",15),I(30,"Key"),x()(),ge(31,"input",16),b(32,"div",14),I(33,"Key is required"),x()()(),b(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),I(38,"User ID"),x()(),ge(39,"input",18),b(40,"div",14),I(41,"User ID is required"),x()(),b(42,"div",19)(43,"div",11)(44,"label",20),I(45,"Read Permission"),x()(),b(46,"div",21)(47,"label",22),ge(48,"input",23),I(49," No Read "),x(),b(50,"label",22),ge(51,"input",23),I(52," Owner Read "),x(),b(53,"label",22),ge(54,"input",23),I(55," Public Read "),x()()()(),b(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),I(60,"Version"),x()(),ge(61,"input",25),x(),b(62,"div",19)(63,"div",11)(64,"label",26),I(65,"Write Permission"),x()(),b(66,"div",27)(67,"label",22),ge(68,"input",23),I(69," No Write "),x(),b(70,"label",22),ge(71,"input",23),I(72," Owner Write "),x()()()(),b(73,"div",28)(74,"div",10)(75,"div",11)(76,"label",29),I(77,"Create Time"),x()(),ge(78,"input",30),x(),b(79,"div",10)(80,"div",11)(81,"label",31),I(82,"Update Time"),x()(),ge(83,"input",32),x()(),b(84,"div",33),ge(85,"div",34,35),x(),J(87,bot,4,3,"button",36),x()),2&e&&(w(8),k("routerLink",wl(32,yL))("queryParams",lr(33,_ot,i.object.collection)),w(1),Dt(i.object.collection),w(2),k("routerLink",wl(35,yL))("queryParams",Sr(36,xot,i.object.collection,i.object.key)),w(1),Dt(i.object.key),w(2),k("routerLink",wl(39,yL))("queryParams",Ug(40,wot,i.object.collection,i.object.key,i.object.user_id)),w(1),Dt(i.object.user_id),w(1),k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.objectForm),w(6),k("ngClass",lr(44,bL,i.f.collection.dirty&&i.f.collection.errors)),w(1),k("hidden",i.f.collection.disabled||i.f.collection.valid||i.f.collection.pristine),w(6),k("ngClass",lr(46,bL,i.f.keyname.dirty&&i.f.keyname.errors)),w(1),k("hidden",i.f.keyname.disabled||i.f.keyname.valid||i.f.keyname.pristine),w(7),k("ngClass",lr(48,bL,i.f.user_id.dirty&&i.f.user_id.errors)),w(1),k("hidden",i.f.user_id.disabled||i.f.user_id.valid||i.f.user_id.pristine),w(8),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(3),k("disabled",!i.updateAllowed())("value",2),w(7),k("value",i.object.version),w(7),k("disabled",!i.updateAllowed())("value",0),w(3),k("disabled",!i.updateAllowed())("value",1),w(7),k("value",i.object.create_time),w(5),k("value",i.object.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Fu,Rh,gn,To,AC,F3,IH,sl,Na,rl,ol,Ff,fa,ja],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),kot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sot(t,n){if(1&t&&(b(0,"ngb-alert",18),ge(1,"img",19),b(2,"h6",20),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Dot(t,n){1&t&&(b(0,"th",21),I(1,"Remove"),x())}function Tot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Eot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Aot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"Yes"),x()}}function Mot(t,n){if(1&t){const e=vt();b(0,"td",25),ye("click",function(){$e(e);const r=j().$implicit;return Be(j().viewLeaderboardEntries(r))}),I(1,"No"),x()}}function Iot(t,n){if(1&t){const e=vt();b(0,"td",26)(1,"button",27),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLeaderboard(r,s,a))}),I(2,"Delete"),x()()}}function Fot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(2),x(),b(3,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(4),x(),b(5,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(6),x(),b(7,"td",22),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewLeaderboardEntries(o))}),I(8),x(),J(9,Tot,2,0,"td",23),J(10,Eot,2,0,"td",23),J(11,Aot,2,0,"td",23),J(12,Mot,2,0,"td",23),J(13,Iot,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(i.orderString[e.sort_order]),w(2),Dt(i.operatorString[e.operator]),w(2),Dt(""===e.reset_schedule?"-":e.reset_schedule),w(1),k("ngIf",e.authoritative),w(1),k("ngIf",!e.authoritative),w(1),k("ngIf",e.tournament),w(1),k("ngIf",!e.tournament),w(1),k("ngIf",i.deleteAllowed())}}function Not(t,n){1&t&&(b(0,"tr")(1,"td",28),I(2,"No leaderboards were found."),x()())}let Oot=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"authService",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"leaderboards",[]),K(this,"nextCursor",""),K(this,"leaderboardsCount",0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),this.route=e,this.router=i,this.authService=r,this.consoleService=o}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Xo),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(e,i){1&e&&(b(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),I(4,"Leaderboards"),x(),b(5,"h6",4),I(6),x()(),b(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return i.search(0)}),ge(10,"img",8),x(),b(11,"button",7),ye("click",function(){return i.search(1)}),ge(12,"img",9),x()()()()(),J(13,Sot,4,2,"ngb-alert",10),b(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),I(18,"Leaderboard ID"),x(),b(19,"th",13),I(20,"Sort Order"),x(),b(21,"th",13),I(22,"Operator"),x(),b(23,"th",13),I(24,"Reset Schedule"),x(),b(25,"th",14),I(26,"Authoritative"),x(),b(27,"th",14),I(28,"Tournament"),x(),J(29,Dot,2,0,"th",15),x()(),b(30,"tbody"),J(31,Fot,14,9,"tr",16),J(32,Not,3,0,"tr",17),x()()),2&e&&(w(6),xn("",i.leaderboardsCount," leaderboards found."),w(3),k("disabled",0===i.leaderboards.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(16),k("ngIf",i.deleteAllowed()),w(2),k("ngForOf",i.leaderboards),w(1),k("ngIf",0===i.leaderboards.length))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),jot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Pot(t,n){if(1&t&&(b(0,"ngb-alert",31),ge(1,"img",32),b(2,"h6",33),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying accounts: ",e.error,"")}}function Lot(t,n){1&t&&(b(0,"th",34),I(1,"Remove"),x())}function Rot(t,n){1&t&&(b(0,"tr")(1,"td",35),I(2,"No users found - change the filter criteria or add new user accounts."),x()())}function $ot(t,n){1&t&&ge(0,"td")}function Bot(t,n){if(1&t){const e=vt();b(0,"td",38)(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteAccount(r,s,a))}),I(2,"Delete"),x()()}}function Vot(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",36),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(8),x(),J(9,$ot,1,0,"td",29),J(10,Bot,3,0,"td",37),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.username),w(2),Dt(e.display_name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Hot=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"accountsCount",0),K(this,"accounts",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"})},o=>{this.error=o})}deleteAccount(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Accounts"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"span",9),ye("click",function(){return i.f.filter.setValue(i.systemUserId)}),ge(12,"img",10),x()(),b(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return i.f.filter_type.setValue(0),i.search(0)}),I(16,"Search"),x(),b(17,"div",13),ge(18,"button",14),b(19,"div",15)(20,"button",16),ye("click",function(){return i.f.filter_type.setValue(1),i.search(0)}),I(21,"Tombstones"),x()()()()()()()(),b(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return i.search(0)}),ge(25,"img",20),x(),b(26,"button",19),ye("click",function(){return i.search(1)}),ge(27,"img",21),x()()()()(),J(28,Pot,4,2,"ngb-alert",22),b(29,"div",23)(30,"table",24)(31,"thead",25)(32,"tr")(33,"th",26),I(34,"User ID"),x(),b(35,"th"),I(36,"Username"),x(),b(37,"th"),I(38,"Display Name"),x(),b(39,"th",27),I(40,"Last Update"),x(),J(41,Lot,2,0,"th",28),x()(),b(42,"tbody"),J(43,Rot,3,0,"tr",29),J(44,Vot,11,6,"tr",30),x()()()),2&e&&(w(3),xn("",i.accountsCount," accounts found."),w(4),k("formGroup",i.searchForm),w(11),k("disabled",!i.f.filter.value||""===i.f.filter.value),w(6),k("disabled",0===i.accounts.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.accounts.length),w(1),k("ngForOf",i.accounts))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),zot=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Uot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().exportAccount(r))}),ge(1,"img",16),I(2,"Export"),x()}}function Got(t,n){1&t&&(b(0,"span"),I(1,"Unban"),x())}function Wot(t,n){1&t&&(b(0,"span"),I(1,"Ban"),x())}function qot(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().banUnbanAccount(r))}),ge(1,"img",17),J(2,Got,2,0,"span",18),J(3,Wot,2,0,"span",18),x()}if(2&t){const e=j();w(2),k("ngIf",e.account.disable_time),w(1),k("ngIf",!e.account.disable_time)}}function Xot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!1))}),ge(1,"img",20),I(2,"Delete"),x()}}function Yot(t,n){if(1&t){const e=vt();b(0,"button",19),ye("click",function(r){return $e(e),Be(j().deleteAccount(r,!0))}),ge(1,"img",21),I(2,"Recorded delete"),x()}}function Jot(t,n){if(1&t&&(b(0,"ngb-alert",22),ge(1,"img",23),b(2,"h6",24),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const Kot=function(t,n){return["/accounts",t,n]};function Qot(t,n){if(1&t&&(b(0,"div"),ta(1,25),b(2,"a",26),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,Kot,i.account.user.id,e.path)),w(1),Dt(e.label)}}const Zot=function(){return["/accounts"]},est=function(){return["/storage"]},tst=function(t){return{user_id:t}};let nst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"account",void 0),K(this,"error",""),K(this,"views",[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rF.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Account"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Account"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,Uot,3,0,"button",7),J(12,qot,4,2,"button",7),J(13,Xot,3,0,"button",8),J(14,Yot,3,0,"button",8),x()(),J(15,Jot,4,2,"ngb-alert",9),b(16,"nav",10,11),J(18,Qot,4,6,"div",12),b(19,"div"),ta(20,13),b(21,"a",14),I(22," Storage "),x(),na(),x()(),ge(23,"router-outlet")),2&e&&(w(6),k("routerLink",wl(10,Zot)),w(3),Dt(i.account.user.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.banAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views),w(3),k("routerLink",wl(11,est))("queryParams",lr(12,tst,i.account.user.id)))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),ist=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const rst=["editor"];function ost(t,n){if(1&t&&(b(0,"ngb-alert",29),ge(1,"img",30),b(2,"h6",31),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function sst(t,n){1&t&&(b(0,"ngb-alert",32),ge(1,"img",33),b(2,"h6",31),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function ast(t,n){1&t&&(b(0,"button",34),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const lst=function(t){return{"is-invalid":t}};let cst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Do.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(rst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ost,4,2,"ngb-alert",0),J(1,sst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"User ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Username"),x()(),ge(13,"input",9),b(14,"div",10),I(15,"Username is required"),x()()(),b(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),I(20,"Display Name"),x()(),ge(21,"input",12),x(),b(22,"div",13)(23,"div",5)(24,"label",14),I(25,"Avatar URL"),x()(),ge(26,"input",15),x()(),b(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),I(31,"Location"),x()(),ge(32,"input",17),x(),b(33,"div",13)(34,"div",5)(35,"label",18),I(36,"Timezone"),x()(),ge(37,"input",19),x()(),b(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),I(42,"Create Time"),x()(),ge(43,"input",22),x(),b(44,"div",4)(45,"div",5)(46,"label",23),I(47,"Update Time"),x()(),ge(48,"input",24),x()(),b(49,"div",25),ge(50,"div",26,27),x(),J(52,ast,2,1,"button",28),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(6),k("value",i.account.user.id),w(5),k("ngClass",lr(9,lst,i.f.username.dirty&&i.f.username.errors)),w(1),k("hidden",i.f.username.disabled||i.f.username.valid||i.f.username.pristine),w(29),k("value",i.account.user.create_time),w(5),k("value",i.account.user.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Rh,gn,To,sl,Na,rl,ol,Ff,fa,ja]})),t})();function ust(t,n){if(1&t&&(b(0,"ngb-alert",36),ge(1,"img",37),b(2,"h6",38),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function dst(t,n){1&t&&(b(0,"ngb-alert",39),ge(1,"img",40),b(2,"h6",38),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function hst(t,n){if(1&t&&(b(0,"option",41),I(1),x()),2&t){const e=n.$implicit,i=n.index;Nh("value",i),k("selected",0===i),w(1),Dt(e.id)}}function fst(t,n){1&t&&(b(0,"button",42),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}let pst=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"accountForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,ust,4,2,"ngb-alert",0),J(1,dst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateAccount()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Device IDs"),x()(),b(8,"div",7)(9,"button",8),ye("click",function(){return i.copyDeviceIdToClipboard(i.f.selected_device_id_index.value)}),ge(10,"img",9),I(11," Copy "),x(),b(12,"select",10),J(13,hst,2,3,"option",11),x(),b(14,"div",12)(15,"button",13),ye("click",function(o){return i.unlinkDeviceId(o)}),I(16,"Unlink"),x()()()(),b(17,"div",4)(18,"div",5)(19,"label",14),I(20,"Custom ID"),x()(),b(21,"div",7),ge(22,"input",15),b(23,"div",12)(24,"button",13),ye("click",function(o){return i.unlinkCustomID(o)}),I(25,"Unlink"),x()()()()(),b(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),I(30,"Facebook ID"),x()(),b(31,"div",7),ge(32,"input",17),b(33,"div",12)(34,"button",13),ye("click",function(o){return i.unlinkFacebook(o)}),I(35,"Unlink"),x()()()(),b(36,"div",18)(37,"div",5)(38,"label",19),I(39,"FB Instant Game ID"),x()(),b(40,"div",7),ge(41,"input",20),b(42,"div",12)(43,"button",13),ye("click",function(o){return i.unlinkFacebookInstantGames(o)}),I(44,"Unlink"),x()()()()(),b(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),I(49,"Apple ID"),x()(),b(50,"div",7),ge(51,"input",22),b(52,"div",12)(53,"button",13),ye("click",function(o){return i.unlinkApple(o)}),I(54,"Unlink"),x()()()(),b(55,"div",18)(56,"div",5)(57,"label",23),I(58,"GameCenter ID"),x()(),b(59,"div",7),ge(60,"input",24),b(61,"div",12)(62,"button",13),ye("click",function(o){return i.unlinkGameCenter(o)}),I(63,"Unlink"),x()()()()(),b(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),I(68,"Google ID"),x()(),b(69,"div",7),ge(70,"input",26),b(71,"div",12)(72,"button",13),ye("click",function(o){return i.unlinkGoogle(o)}),I(73,"Unlink"),x()()()(),b(74,"div",4)(75,"div",5)(76,"label",27),I(77,"Steam ID"),x()(),b(78,"div",7),ge(79,"input",28),b(80,"div",12)(81,"button",13),ye("click",function(o){return i.unlinkSteam(o)}),I(82,"Unlink"),x()()()()(),b(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),I(87,"Email"),x(),ge(88,"br"),x(),ge(89,"input",30),x(),b(90,"div",4)(91,"div",5)(92,"label",31),I(93,"Password"),x()(),ge(94,"input",32),x()(),b(95,"div",33)(96,"div",4),ge(97,"div",5),b(98,"span",34),I(99),x()(),ge(100,"div",4),x(),J(101,fst,2,1,"button",35),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.accountForm),w(11),k("ngForOf",i.account.devices),w(2),k("disabled",!i.updateAllowed()||0===i.account.devices.length),w(7),k("value",i.account.custom_id),w(2),k("disabled",!i.updateAllowed()||!i.account.custom_id||""===i.account.custom_id),w(8),k("value",i.account.user.facebook_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_id||""===i.account.user.facebook_id),w(7),k("value",i.account.user.facebook_instant_game_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.facebook_instant_game_id||""===i.account.user.facebook_instant_game_id),w(8),k("value",i.account.user.apple_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.apple_id||""===i.account.user.apple_id),w(7),k("value",i.account.user.gamecenter_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.gamecenter_id||""===i.account.user.gamecenter_id),w(8),k("value",i.account.user.google_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.google_id||""===i.account.user.google_id),w(7),k("value",i.account.user.steam_id),w(2),k("disabled",!i.updateAllowed()||!i.account.user.steam_id||""===i.account.user.steam_id),w(18),xn("Verification Status: ",null===i.account.verify_time?"Not Verified":"Verified",""),w(2),k("ngIf",i.updateAllowed()))},dependencies:[jn,gn,To,sl,xy,wy,Na,ov,rl,ol,fa,ja],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})),t})();const mst=["editor"];function gst(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vst(t,n){1&t&&(b(0,"ngb-alert",27),ge(1,"img",28),b(2,"h6",26),I(3,"Account was modified successfully."),x()()),2&t&&k("dismissible",!1)}function yst(t,n){if(1&t){const e=vt();b(0,"button",29),ye("click",function(){return $e(e),Be(j().updateWallet())}),I(1,"Save"),x()}2&t&&k("disabled",j().updating)}function bst(t,n){1&t&&(b(0,"th",30),I(1,"Remove"),x())}function _st(t,n){1&t&&(b(0,"tr")(1,"td",31),I(2,"No wallet ledger items found."),x()())}function xst(t,n){1&t&&ge(0,"div",37)}function wst(t,n){1&t&&ge(0,"div",38)}function Cst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",39),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteLedgerItem(r,s,a))}),I(2,"Delete"),x()()}}function kst(t,n){if(1&t&&(b(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Sst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=$e(e).index,s=j();return Be(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),J(3,xst,1,0,"div",33),J(4,wst,1,0,"div",34),x(),I(5),x(),b(6,"td",35)(7,"pre",36),I(8),x()(),b(9,"td"),I(10),x(),J(11,Cst,3,0,"td",22),x(),J(12,kst,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),k("ngIf",r.walletLedgerMetadataOpen[e]),w(1),xn(" ",i.id," "),w(3),Dt(i.changeset),w(2),Dt(i.update_time),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.walletLedgerMetadataOpen[e])}}let Dst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"walletLedger",[]),K(this,"walletLedgerMetadataOpen",[]),K(this,"updating",!1),K(this,"updated",!1),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"limit",100),K(this,"userID",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,gst,4,2,"ngb-alert",0),J(1,vst,4,1,"ngb-alert",1),b(2,"div",2),ge(3,"div",3,4),x(),J(5,yst,2,1,"button",5),ge(6,"hr",6),b(7,"div",7)(8,"div",8),ge(9,"div",9),b(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return i.loadData("")}),ge(13,"img",13),x(),b(14,"button",12),ye("click",function(){return i.loadData(i.prevCursor)}),ge(15,"img",14),x(),b(16,"button",12),ye("click",function(){return i.loadData(i.nextCursor)}),ge(17,"img",15),x()()()()(),b(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),I(23,"ID"),x(),b(24,"th"),I(25,"Changeset"),x(),b(26,"th",20),I(27,"Update Time"),x(),J(28,bst,2,0,"th",21),x()(),b(29,"tbody"),J(30,_st,3,0,"tr",22),J(31,Sst,13,7,"ng-template",23),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(4),k("ngIf",i.updateAllowed()),w(7),k("disabled",0===i.walletLedger.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(12),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.walletLedger.length),w(1),k("ngForOf",i.walletLedger))},dependencies:[jn,gn,To],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})),t})(),Tst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Est(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Ast(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Mst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No friends found."),x()())}function Ist(t,n){1&t&&(b(0,"span"),I(1,"Friend (0)"),x())}function Fst(t,n){1&t&&(b(0,"span"),I(1,"Invite Sent (1)"),x())}function Nst(t,n){1&t&&(b(0,"span"),I(1,"Invite Received (2)"),x())}function Ost(t,n){1&t&&(b(0,"span"),I(1,"Blocked (3)"),x())}function jst(t,n){if(1&t){const e=vt();b(0,"td",16)(1,"button",17),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteFriend(r,s,a))}),I(2,"Delete"),x()()}}function Pst(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),J(6,Ist,2,0,"span",8),J(7,Fst,2,0,"span",8),J(8,Nst,2,0,"span",8),J(9,Ost,2,0,"span",8),x(),b(10,"td"),I(11),x(),J(12,jst,3,0,"td",15),x()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Lst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"friends",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,Est,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"User ID"),x(),b(7,"th"),I(8,"Username"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Ast,2,0,"th",7),x()(),b(14,"tbody"),J(15,Mst,3,0,"tr",8),J(16,Pst,13,8,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.friends.length),w(1),k("ngForOf",i.friends))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Rst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function $st(t,n){if(1&t&&(b(0,"ngb-alert",10),ge(1,"img",11),b(2,"h6",12),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Bst(t,n){1&t&&(b(0,"th",13),I(1,"Remove"),x())}function Vst(t,n){1&t&&(b(0,"tr")(1,"td",14),I(2,"No group membership found."),x()())}function Hst(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function zst(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function Ust(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function Gst(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function Wst(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function qst(t,n){if(1&t){const e=vt();b(0,"td")(1,"button",16),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function Xst(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,Hst,2,0,"span",8),J(7,zst,2,0,"span",8),J(8,Ust,2,0,"span",8),J(9,Gst,2,0,"span",8),J(10,Wst,2,0,"span",8),x(),b(11,"td",15),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,qst,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.group.id),w(2),Dt(e.group.name),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.group.update_time),w(1),k("ngIf",i.deleteAllowed())}}let Yst=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"account",void 0),K(this,"groups",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,$st,4,2,"ngb-alert",0),b(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),I(6,"Group ID"),x(),b(7,"th"),I(8,"Name"),x(),b(9,"th",5),I(10,"State"),x(),b(11,"th",6),I(12,"Update Time"),x(),J(13,Bst,2,0,"th",7),x()(),b(14,"tbody"),J(15,Vst,3,0,"tr",8),J(16,Xst,14,9,"tr",9),x()()()),2&e&&(k("ngIf",i.error),w(13),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Jst=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Kst=["editor"];function Qst(t,n){if(1&t&&(b(0,"ngb-alert",34),ge(1,"img",35),b(2,"h6",36),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Zst(t,n){1&t&&(b(0,"ngb-alert",37),ge(1,"img",38),b(2,"h6",36),I(3,"Group was modified successfully."),x()()),2&t&&k("dismissible",!1)}function eat(t,n){1&t&&(b(0,"button",39),I(1,"Save"),x()),2&t&&k("disabled",j().updating)}const tat=function(t){return["/accounts",t]},nat=function(t){return{"is-invalid":t}};let iat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"jsonEditor",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"groupForm",void 0),K(this,"updating",!1),K(this,"updated",!1),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Do.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zv(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(Kst,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){1&e&&(J(0,Qst,4,2,"ngb-alert",0),J(1,Zst,4,1,"ngb-alert",1),b(2,"form",2),ye("ngSubmit",function(){return i.updateGroup()}),b(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),I(7,"Group ID"),x()(),ge(8,"input",7),x(),b(9,"div",4)(10,"div",5)(11,"label",8),I(12,"Creator ID"),x()(),b(13,"a",9),ge(14,"input",10),x()()(),b(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),I(19,"Name"),x()(),ge(20,"input",12),b(21,"div",13),I(22,"Name is required"),x()(),b(23,"div",4)(24,"div",5)(25,"label",14),I(26,"Description"),x()(),ge(27,"input",15),x()(),b(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),I(32,"Avatar URL"),x()(),ge(33,"input",18),x(),b(34,"div",4)(35,"div",5)(36,"label",19),I(37,"Language"),x()(),ge(38,"input",20),x()(),b(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),I(43,"Members"),x()(),ge(44,"input",21),x(),b(45,"div",16)(46,"div",5)(47,"label",22),I(48,"Max Count"),x()(),ge(49,"input",23),x()(),b(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),I(54,"Open"),x()(),ge(55,"input",24),x()(),b(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),I(60,"Create Time"),x()(),ge(61,"input",27),x(),b(62,"div",4)(63,"div",5)(64,"label",28),I(65,"Update Time"),x()(),ge(66,"input",29),x()(),b(67,"div",30),ge(68,"div",31,32),x(),J(70,eat,2,1,"button",33),x()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",i.updated),w(1),k("formGroup",i.groupForm),w(6),k("value",i.group.id),w(5),k("routerLink",lr(12,tat,i.group.creator_id)),w(1),k("value",i.group.creator_id),w(6),k("ngClass",lr(14,nat,i.f.name.dirty&&i.f.name.errors)),w(1),k("hidden",i.f.name.disabled||i.f.name.valid||i.f.name.pristine),w(23),k("value",i.group.edge_count),w(17),k("value",i.group.create_time),w(5),k("value",i.group.update_time),w(4),k("ngIf",i.updateAllowed()))},dependencies:[Fu,Rh,gn,To,sl,Na,aC,rl,ol,Ff,fa,ja]})),t})();function rat(t,n){if(1&t&&(b(0,"ngb-alert",13),ge(1,"img",14),b(2,"h6",15),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function oat(t,n){1&t&&(b(0,"span"),I(1,"Add by membership state"),x())}function sat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j(2);w(1),Dt(e.activeState)}}function aat(t,n){if(1&t){const e=vt();b(0,"button",20),ye("click",function(){const o=$e(e).$implicit;return Be(j(2).activeState=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function lat(t,n){if(1&t&&(b(0,"div",16)(1,"button",17),J(2,oat,2,0,"span",11),J(3,sat,2,1,"span",11),x(),b(4,"div",18),J(5,aat,2,1,"button",19),x()()),2&t){const e=j();w(2),k("ngIf",!e.activeState||""===e.activeState),w(1),k("ngIf",e.activeState&&""!==e.activeState),w(2),k("ngForOf",e.states)}}function cat(t,n){if(1&t){const e=vt();b(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ge(5,"input",26),b(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return $e(e),Be(j().add())}),I(9,"Add"),x()()()()()()()()}if(2&t){const e=j();w(3),k("formGroup",e.addForm)}}function uat(t,n){1&t&&(b(0,"th",30),I(1,"Demote"),x())}function dat(t,n){1&t&&(b(0,"th",30),I(1,"Promote"),x())}function hat(t,n){1&t&&(b(0,"th",31),I(1,"Remove"),x())}function fat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No group membership found."),x()())}function pat(t,n){1&t&&(b(0,"span"),I(1,"Superadmin (0)"),x())}function mat(t,n){1&t&&(b(0,"span"),I(1,"Admin (1)"),x())}function gat(t,n){1&t&&(b(0,"span"),I(1,"Member (2)"),x())}function vat(t,n){1&t&&(b(0,"span"),I(1,"Join Request (3)"),x())}function yat(t,n){1&t&&(b(0,"span"),I(1,"Banned (4)"),x())}function bat(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().demoteGroupUser(r,s,a))}),at(),b(2,"svg",38),ge(3,"path",39),x()()()}}function _at(t,n){if(1&t){const e=vt();b(0,"td",36)(1,"button",37),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().promoteGroupUser(r,s,a))}),at(),b(2,"svg",40),ge(3,"path",41),x()()()}}function xat(t,n){if(1&t){const e=vt();b(0,"td",42)(1,"button",43),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroupUser(r,s,a))}),I(2,"Delete"),x()()}}function wat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(2),x(),b(3,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),J(6,pat,2,0,"span",11),J(7,mat,2,0,"span",11),J(8,gat,2,0,"span",11),J(9,vat,2,0,"span",11),J(10,yat,2,0,"span",11),x(),b(11,"td",33),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(12),x(),J(13,bat,4,0,"td",34),J(14,_at,4,0,"td",34),J(15,xat,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.user.id),w(2),Dt(e.user.username),w(2),k("ngIf",0===e.state),w(1),k("ngIf",1===e.state),w(1),k("ngIf",2===e.state),w(1),k("ngIf",3===e.state),w(1),k("ngIf",4===e.state),w(2),Dt(e.user.update_time),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed())}}let Cat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"group",void 0),K(this,"members",[]),K(this,"activeState","Add Member"),K(this,"states",["Add Member","Join"]),K(this,"addForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(J(0,rat,4,2,"ngb-alert",0),J(1,lat,6,3,"div",1),J(2,cat,10,1,"div",2),b(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),I(8,"User ID"),x(),b(9,"th"),I(10,"Name"),x(),b(11,"th",7),I(12,"State"),x(),b(13,"th",8),I(14,"Update Time"),x(),J(15,uat,2,0,"th",9),J(16,dat,2,0,"th",9),J(17,hat,2,0,"th",10),x()(),b(18,"tbody"),J(19,fat,3,0,"tr",11),J(20,wat,16,11,"tr",12),x()()()),2&e&&(k("ngIf",i.error),w(1),k("ngIf",!i.group.open&&i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(13),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(1),k("ngIf",i.editionAllowed()),w(2),k("ngIf",0===i.members.length),w(1),k("ngForOf",i.members))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),kat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Sat(t,n){if(1&t&&(b(0,"ngb-alert",28),ge(1,"img",29),b(2,"h6",30),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function Dat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeType)}}function Tat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeType=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Eat(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeNode)}}function Aat(t,n){if(1&t){const e=vt();b(0,"button",31),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeNode=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function Mat(t,n){1&t&&(b(0,"tr")(1,"td",32),I(2,"No realtime matches were found."),x()())}function Iat(t,n){1&t&&ge(0,"div",40)}function Fat(t,n){1&t&&ge(0,"div",41)}function Nat(t,n){if(1&t){const e=vt();b(0,"div",37),ye("click",function(){$e(e);const r=j(),o=r.index,s=r.$implicit,a=j();return a.getMatchState(o,s),Be(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),J(1,Iat,1,0,"div",38),J(2,Fat,1,0,"div",39),x()}if(2&t){const e=j().index,i=j();w(1),k("ngIf",!i.matchStatesOpen[e]),w(1),k("ngIf",i.matchStatesOpen[e])}}function Oat(t,n){1&t&&ge(0,"div",42)}function jat(t,n){1&t&&(b(0,"span"),I(1,"Yes"),x())}function Pat(t,n){1&t&&(b(0,"span"),I(1,"No"),x())}function Lat(t,n){1&t&&ge(0,"img",51)}function Rat(t,n){if(1&t&&(b(0,"div")(1,"small")(2,"b"),I(3,"Current Tick"),x()(),b(4,"pre",47)(5,"small"),I(6),x()(),b(7,"small")(8,"b"),I(9,"Match State"),x()(),b(10,"pre",47)(11,"small"),I(12),x()()()),2&t){const e=j(2).index,i=j();w(6),Dt(i.matchStates[e].tick),w(6),Dt(i.matchStates[e].state)}}function $at(t,n){1&t&&ge(0,"img",51)}function Bat(t,n){if(1&t&&(b(0,"pre",47)(1,"small"),I(2),x()()),2&t){const e=j(2).index,i=j();w(2),Dt(i.getMatchPresencesString(i.matchStates[e].presences))}}function Vat(t,n){if(1&t&&(b(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),I(6,"Match Label"),x()(),b(7,"pre",47)(8,"small"),I(9),x()()(),b(10,"div",48),J(11,Lat,1,0,"img",49),J(12,Rat,13,2,"div",7),x(),b(13,"div",48)(14,"small")(15,"b"),I(16,"Match Presences"),x()(),J(17,$at,1,0,"img",49),J(18,Bat,3,1,"pre",50),x()()()()),2&t){const e=j(),i=e.$implicit,r=e.index,o=j();w(9),Dt(i.api_match.label),w(2),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r]),w(5),k("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),k("ngIf",null!==o.matchStates[r])}}function Hat(t,n){if(1&t&&(b(0,"tr")(1,"td"),J(2,Nat,3,2,"div",33),J(3,Oat,1,0,"div",34),I(4),x(),b(5,"td"),I(6),x(),b(7,"td",35),J(8,jat,2,0,"span",7),J(9,Pat,2,0,"span",7),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x()(),J(16,Vat,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=j();w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(1),xn(" ",i.api_match.match_id," "),w(2),Dt(i.api_match.size),w(2),k("ngIf",i.api_match.authoritative),w(1),k("ngIf",!i.api_match.authoritative),w(2),Dt(i.node),w(2),Dt(i.api_match.handler_name),w(2),Dt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),k("ngIf",r.matchStatesOpen[e])}}let zat=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"formBuilder",void 0),K(this,"consoleService",void 0),K(this,"error",""),K(this,"matches",[]),K(this,"matchStates",[]),K(this,"matchStatesOpen",[]),K(this,"updated",!1),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"activeType","All"),K(this,"types",["All","Authoritative","Relayed"]),K(this,"activeNode","All Nodes"),K(this,"nodes",["All Nodes"]),this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));let i=e.get("type");this.type=Number(i);let r=e.get("node");if(this.route.data.subscribe(o=>{console.log(o),o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1==this.type||2==this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,Xme(this.consoleService,e,0==e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(Tl),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Active Matches"),x(),b(2,"h6",1),I(3),x(),J(4,Sat,4,2,"ngb-alert",2),b(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),J(9,Dat,2,1,"span",7),x(),b(10,"div",8),J(11,Tat,2,1,"button",9),x()()(),b(12,"div",10)(13,"button",11),ye("click",function(){return i.search()}),I(14,"Search"),x()()(),b(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return i.search()}),b(19,"div",16),ge(20,"input",17),x()(),b(21,"form",15),ye("ngSubmit",function(){return i.search()}),b(22,"div",16),ge(23,"input",17),x()(),b(24,"form",15),ye("ngSubmit",function(){return i.search()}),b(25,"div",16),ge(26,"input",18),b(27,"div",10)(28,"div",5)(29,"button",19),J(30,Eat,2,1,"span",7),x(),b(31,"div",8),J(32,Aat,2,1,"button",9),x()()()()()()()(),b(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),I(39,"Match ID"),x()(),b(40,"th",23),I(41,"Presence Count"),x(),b(42,"th",24),I(43,"Authoritative"),x(),b(44,"th",24),I(45,"Node"),x(),b(46,"th",25),I(47,"Handler Name"),x(),b(48,"th",26),I(49,"Tick Rate"),x()()(),b(50,"tbody"),J(51,Mat,3,0,"tr",7),J(52,Hat,17,10,"ng-template",27),x()()()),2&e&&(w(3),xn("",i.matches.length," running matches found."),w(1),k("ngIf",i.error),w(5),k("ngIf",i.activeType&&""!==i.activeType),w(2),k("ngForOf",i.types),w(7),k("hidden","All"!==i.activeType)("formGroup",i.searchForm1),w(3),k("hidden","Relayed"!==i.activeType)("formGroup",i.searchForm2),w(3),k("hidden","Authoritative"!==i.activeType)("formGroup",i.searchForm3),w(6),k("ngIf",i.activeNode&&""!==i.activeNode),w(2),k("ngForOf",i.nodes),w(6),Mn("pl-3",i.matches.length>0),w(13),k("ngIf",0===i.matches.length),w(1),k("ngForOf",i.matches))},dependencies:[jn,gn,To,Pu,rm,Pf,jf,sl,Na,rl,ol,fa,ja],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})),t})(),Uat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));return Xme(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Xme(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $n(null)}let Gat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(nt(r=>$n(r.nodes.map(o=>o.name)))).pipe(Ul(r=>(e.data={...e.data,error:r},$n([]))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Wat(t,n){if(1&t&&(b(0,"ngb-alert",25),ge(1,"img",26),b(2,"h6",27),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying groups: ",e.error,"")}}function qat(t,n){1&t&&(b(0,"th",28),I(1,"Remove"),x())}function Xat(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No groups found - change the filter criteria or add new user groups."),x()())}function Yat(t,n){1&t&&ge(0,"td")}function Jat(t,n){if(1&t){const e=vt();b(0,"td",32)(1,"button",33),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteGroup(r,s,a))}),I(2,"Delete"),x()()}}function Kat(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(2),x(),b(3,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(4),x(),b(5,"td",30),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewGroup(o))}),I(6),x(),J(7,Yat,1,0,"td",23),J(8,Jat,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=j();w(2),Dt(e.id),w(2),Dt(e.name),w(2),Dt(e.update_time),w(1),k("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),k("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Qat=(()=>{class t{constructor(e,i,r,o,s){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"groupsCount",0),K(this,"groups",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"searchForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Groups"),x(),b(2,"h6",1),I(3),x(),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return i.search(0)}),b(8,"div",6),ge(9,"input",7),b(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return i.search(0)}),I(13,"Search"),x()()()()()(),b(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return i.search(0)}),ge(17,"img",14),x(),b(18,"button",13),ye("click",function(){return i.search(1)}),ge(19,"img",15),x()()()()(),J(20,Wat,4,2,"ngb-alert",16),b(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),I(26,"Group ID"),x(),b(27,"th"),I(28,"Name"),x(),b(29,"th",21),I(30,"Last Update"),x(),J(31,qat,2,0,"th",22),x()(),b(32,"tbody"),J(33,Xat,3,0,"tr",23),J(34,Kat,9,5,"tr",24),x()()()),2&e&&(w(3),xn("",i.groupsCount," groups found."),w(4),k("formGroup",i.searchForm),w(9),k("disabled",0===i.groups.length),w(2),k("disabled",""===i.nextCursor),w(2),k("ngIf",i.error),w(11),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.groups.length),w(1),k("ngForOf",i.groups))},dependencies:[jn,gn,To,sl,Na,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})),t})(),Zat=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function elt(t,n){if(1&t){const e=vt();b(0,"button",13),ye("click",function(r){return $e(e),Be(j().exportGroup(r))}),ge(1,"img",14),I(2,"Export"),x()}}function tlt(t,n){if(1&t){const e=vt();b(0,"button",15),ye("click",function(r){return $e(e),Be(j().deleteGroup(r,!1))}),ge(1,"img",16),I(2,"Delete"),x()}}function nlt(t,n){if(1&t&&(b(0,"ngb-alert",17),ge(1,"img",18),b(2,"h6",19),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ilt=function(t,n){return["/groups",t,n]};function rlt(t,n){if(1&t&&(b(0,"div"),ta(1,20),b(2,"a",21),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ilt,i.group.id,e.path)),w(1),Dt(e.label)}}const olt=function(){return["/groups"]};let slt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"group",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Members",path:"members"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,rF.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"User Group"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Group"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,elt,3,0,"button",7),J(12,tlt,3,0,"button",8),x()(),J(13,nlt,4,2,"ngb-alert",9),b(14,"nav",10,11),J(16,rlt,4,6,"div",12),x(),ge(17,"router-outlet")),2&e&&(w(6),k("routerLink",wl(6,olt)),w(3),Dt(i.group.id),w(2),k("ngIf",i.exportAllowed()),w(1),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),alt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function llt(t,n){if(1&t){const e=vt();b(0,"button",12),ye("click",function(r){return $e(e),Be(j().deleteLeaderboard(r))}),ge(1,"img",13),I(2,"Delete Leaderboard"),x()}}function clt(t,n){if(1&t&&(b(0,"ngb-alert",14),ge(1,"img",15),b(2,"h6",16),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}const ult=function(t,n){return["/leaderboards",t,n]};function dlt(t,n){if(1&t&&(b(0,"div"),ta(1,17),b(2,"a",18),I(3),x(),na(),x()),2&t){const e=n.$implicit,i=j();w(1),k("ngbNavItem",e.path),w(1),k("routerLink",Sr(3,ult,i.leaderboard.id,e.path)),w(1),Dt(e.label)}}const hlt=function(){return["/leaderboards"]};let flt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"leaderboard",void 0),K(this,"error",""),K(this,"views",[{label:"Details",path:"details"},{label:"Records",path:"records"}]),this.route=e,this.router=i,this.consoleService=r,this.authService=o}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_DEVELOPER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Leaderboard"),x(),b(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),I(7,"Leaderboards"),x()(),b(8,"li",6),I(9),x()()(),b(10,"div"),J(11,llt,3,0,"button",7),x()(),J(12,clt,4,2,"ngb-alert",8),b(13,"nav",9,10),J(15,dlt,4,6,"div",11),x(),ge(16,"router-outlet")),2&e&&(w(6),k("routerLink",wl(5,hlt)),w(3),Dt(i.leaderboard.id),w(2),k("ngIf",i.deleteAllowed()),w(1),k("ngIf",i.error),w(3),k("ngForOf",i.views))},dependencies:[Jp,Fu,hy,jn,gn,To,am,sm,fv],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})(),plt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const mlt=["editor"];function glt(t,n){if(1&t&&(b(0,"ngb-alert",24),ge(1,"img",25),b(2,"h6",26),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function vlt(t,n){if(1&t&&(b(0,"div",27)(1,"h6"),I(2,"Tournament"),x(),ge(3,"hr",28),b(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),I(8,"Title"),x()(),ge(9,"input",30),x(),b(10,"div",3)(11,"div",4)(12,"label",31),I(13,"Description"),x()(),ge(14,"input",32),x()(),b(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),I(19,"Category"),x()(),ge(20,"input",34),x(),b(21,"div",3)(22,"div",4)(23,"label",35),I(24,"Max Num Score"),x()(),ge(25,"input",36),x()(),b(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),I(30,"Size"),x()(),ge(31,"input",38),x(),b(32,"div",3)(33,"div",4)(34,"label",39),I(35,"Max Size"),x()(),ge(36,"input",40),x()(),b(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),I(41,"Duration"),x()(),ge(42,"input",42),x(),b(43,"div",3)(44,"div",4)(45,"label",43),I(46,"Join Required"),x()(),ge(47,"input",44),x()(),b(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),I(52,"Start Time"),x()(),ge(53,"input",46),x(),b(54,"div",3)(55,"div",4)(56,"label",47),I(57,"End Time"),x()(),ge(58,"input",48),x()(),b(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),I(63,"Start Active"),x()(),ge(64,"input",50),x(),b(65,"div",3)(66,"div",4)(67,"label",51),I(68,"End Active"),x()(),ge(69,"input",52),x()()()),2&t){const e=j();w(9),k("value",e.leaderboard.title),w(5),k("value",e.leaderboard.description),w(6),k("value",e.leaderboard.category),w(5),k("value",e.leaderboard.max_num_score),w(6),k("value",e.leaderboard.size),w(5),k("value",e.leaderboard.max_size),w(6),k("value",e.leaderboard.duration),w(5),k("value",e.leaderboard.join_required),w(6),k("value",e.leaderboard.start_time),w(5),k("value",e.leaderboard.end_time),w(6),k("value",e.leaderboard.start_active),w(5),k("value",e.leaderboard.end_active)}}let ylt=(()=>{class t{constructor(e){K(this,"route",void 0),K(this,"editor",void 0),K(this,"orderString",{0:"Ascending",1:"Descending"}),K(this,"operatorString",{0:"Best",1:"Set",2:"Increment",3:"Decrement"}),K(this,"jsonEditor",void 0),K(this,"leaderboard",void 0),K(this,"error",""),this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&io(mlt,5),2&e){let r;cn(r=un())&&(i.editor=r.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(e,i){1&e&&(J(0,glt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),I(6,"ID"),x()(),ge(7,"input",6),x(),b(8,"div",3)(9,"div",4)(10,"label",7),I(11,"Authoritative"),x()(),ge(12,"input",8),x()(),b(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),I(17,"Sort Order"),x()(),ge(18,"input",10),x(),b(19,"div",3)(20,"div",4)(21,"label",11),I(22,"Operator"),x()(),ge(23,"input",12),x()(),b(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),I(28,"Reset Schedule"),x()(),ge(29,"input",14),x(),b(30,"div",3)(31,"div",4)(32,"label",15),I(33,"Create Time"),x()(),ge(34,"input",16),x()(),b(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),I(39,"Prev Reset"),x()(),ge(40,"input",18),x(),b(41,"div",3)(42,"div",4)(43,"label",15),I(44,"Next Reset"),x()(),ge(45,"input",19),x()()(),J(46,vlt,70,12,"div",20),b(47,"div",21),ge(48,"div",22,23),x()),2&e&&(k("ngIf",i.error),w(7),k("value",i.leaderboard.id),w(5),k("value",i.leaderboard.authoritative),w(6),k("value",i.orderString[i.leaderboard.sort_order]),w(5),k("value",i.operatorString[i.leaderboard.operator]),w(6),k("value",i.leaderboard.reset_schedule),w(5),k("value",i.leaderboard.create_time),w(6),k("value",i.leaderboard.prev_reset),w(5),k("value",i.leaderboard.next_reset),w(1),k("ngIf",i.leaderboard.tournament))},dependencies:[gn,To],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})),t})();function blt(t,n){if(1&t&&(b(0,"ngb-alert",19),ge(1,"img",20),b(2,"h6",21),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("An error occurred: ",e.error,"")}}function _lt(t,n){1&t&&(b(0,"th",22),I(1,"Remove"),x())}function xlt(t,n){1&t&&(b(0,"tr")(1,"td",23),I(2,"No records found."),x()())}function wlt(t,n){1&t&&ge(0,"div",28)}function Clt(t,n){1&t&&ge(0,"div",29)}function klt(t,n){if(1&t){const e=vt();b(0,"td",30)(1,"button",31),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteRecord(r,s,a))}),I(2,"Delete"),x()()}}function Slt(t,n){if(1&t&&(b(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),I(4),x()()()()),2&t){const e=j().$implicit;w(4),Dt(e.metadata)}}function Dlt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=$e(e).index,s=j();return Be(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),J(3,wlt,1,0,"div",25),J(4,Clt,1,0,"div",26),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x(),b(14,"td"),I(15),x(),b(16,"td"),I(17),x(),J(18,klt,3,0,"td",27),x(),J(19,Slt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.recordsMetadataOpen[e]),w(1),k("ngIf",r.recordsMetadataOpen[e]),w(1),xn(" ",i.owner_id," "),w(2),Dt(i.username),w(2),Dt(i.score),w(2),Dt(i.subscore),w(2),Dt(i.rank),w(2),Dt(i.num_score),w(2),Dt(i.expiry_time?i.expiry_time:"-"),w(1),k("ngIf",r.deleteAllowed()),w(1),k("ngIf",r.recordsMetadataOpen[e])}}let Tlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"error",""),K(this,"leaderboard",void 0),K(this,"records",[]),K(this,"recordsMetadataOpen",[]),K(this,"nextCursor",""),K(this,"prevCursor",""),this.route=e,this.consoleService=i,this.authService=r}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(xi),le(Xo))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(e,i){1&e&&(J(0,blt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadRecords(0)}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadRecords(-1)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadRecords(1)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),I(17,"Owner ID"),x(),b(18,"th"),I(19,"Username"),x(),b(20,"th",14),I(21,"Score"),x(),b(22,"th",14),I(23,"Subscore"),x(),b(24,"th",14),I(25,"Rank"),x(),b(26,"th",14),I(27,"No. of scores"),x(),b(28,"th",15),I(29,"Expiry Time"),x(),J(30,_lt,2,0,"th",16),x()(),b(31,"tbody"),J(32,xlt,3,0,"tr",17),J(33,Dlt,20,11,"ng-template",18),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.records.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(20),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.records.length),w(1),k("ngForOf",i.records))},dependencies:[jn,gn,To]})),t})(),Elt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();const Alt=["editor"],Mlt=["editorResponse"];function Ilt(t,n){if(1&t&&(b(0,"ngb-alert",23),ge(1,"img",24),b(2,"h6",25),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error whilst making RPC call: ",e.error,"")}}function Flt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Nh("value",e.method),w(1),Dt(e.method)}}function Nlt(t,n){if(1&t&&(b(0,"option",26),I(1),x()),2&t){const e=n.$implicit;Nh("value",e.method),w(1),Dt(e.method)}}let Olt=(()=>{class t{constructor(e,i,r,o){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"formBuilder",void 0),K(this,"editor",void 0),K(this,"editorResponse",void 0),K(this,"jsonEditor",void 0),K(this,"jsonEditorResponse",void 0),K(this,"error",""),K(this,"rpcEndpoints",[]),K(this,"endpoints",[]),K(this,"endpointCallForm",void 0),this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Do.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditor=new Zm({target:this.editor.nativeElement,props:{mode:Jo.text,readOnly:!0}}),this.jsonEditorResponse=new Zm({target:this.editorResponse.nativeElement,props:{mode:Jo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zv(this.jsonEditor.get()).text}catch(o){return void(this.error=o)}const i={user_id:this.f.user_id.value,body:e};let r=null;r=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,i):this.consoleService.callApiEndpoint("",this.f.method.value,i),r.subscribe(o=>{if(o.error_message&&""!==o.error_message)this.jsonEditorResponse.set({json:o.error_message});else{e="";try{e=JSON.stringify(JSON.parse(o.body),null,2)}catch(s){return void(this.error=s)}this.jsonEditorResponse.set({text:e})}},o=>{this.jsonEditorResponse.set({text:""}),this.error=o})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditor){if(!e||""===e)return this.jsonEditor.set({text:""}),void this.jsonEditor.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditor.set({text:i}),this.jsonEditor.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}else console.log("problem?")}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Tl))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],viewQuery:function(e,i){if(1&e&&(io(Alt,5),io(Mlt,5)),2&e){let r;cn(r=un())&&(i.editor=r.first),cn(r=un())&&(i.editorResponse=r.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"API Explorer"),x(),J(2,Ilt,4,2,"ngb-alert",1),b(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return i.sendRequest()}),b(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),I(11,"Select Endpoint"),x(),J(12,Flt,2,2,"option",10),b(13,"option",11),I(14,"----"),x(),J(15,Nlt,2,2,"option",10),x()(),ge(16,"input",12),b(17,"div",13)(18,"button",14),I(19,"Send Request"),x()()()()()()(),b(20,"div",15)(21,"div",16)(22,"h5"),I(23,"Request Body"),x(),ge(24,"hr",17),b(25,"div",18),ge(26,"div",19,20),x()(),b(28,"div",21)(29,"h5"),I(30,"Response"),x(),ge(31,"hr",17),b(32,"div",18),ge(33,"div",19,22),x()()()),2&e&&(w(2),k("ngIf",i.error),w(4),k("formGroup",i.endpointCallForm),w(4),k("value",""),w(2),k("ngForOf",i.rpcEndpoints),w(3),k("ngForOf",i.endpoints),w(3),k("disabled",i.f.method.invalid))},dependencies:[jn,gn,To,sl,xy,wy,Na,ov,rl,ol,fa,ja],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})),t})(),jlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Plt(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function Llt(t,n){1&t&&ge(0,"div",23)}function Rlt(t,n){1&t&&ge(0,"div",24)}function $lt(t,n){if(1&t&&(b(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),I(6,"Provider Response"),x()()(),b(7,"div")(8,"pre",28)(9,"small"),I(10),x()()()()()()),2&t){const e=j().$implicit;w(10),Dt(e.provider_response)}}function Blt(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=$e(e).index,s=j();return Be(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),J(3,Llt,1,0,"div",20),J(4,Rlt,1,0,"div",21),x(),I(5),x(),b(6,"td"),I(7),x(),b(8,"td"),I(9),x(),b(10,"td"),I(11),x(),b(12,"td"),I(13),x()(),J(14,$lt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=j();w(3),k("ngIf",!r.purchasesRowsOpen[e]),w(1),k("ngIf",r.purchasesRowsOpen[e]),w(1),xn(" ",i.product_id," "),w(2),Dt(i.transaction_id),w(2),Dt(r.getStoreText(i.store)),w(2),Dt(i.purchase_time),w(2),Dt(i.create_time),w(1),k("ngIf",r.purchasesRowsOpen[e])}}function Vlt(t,n){1&t&&(b(0,"tr")(1,"td",29),I(2,"No purchases were found."),x()())}let Hlt=(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"purchases",[]),K(this,"purchasesRowsOpen",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.purchases=e[0].validated_purchases,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listPurchases("",this.userID,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-purchases"]],decls:29,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"]],template:function(e,i){1&e&&(J(0,Plt,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Create Time"),x()()(),b(26,"tbody"),J(27,Blt,15,8,"ng-template",14),J(28,Vlt,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.purchases.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(17),k("ngForOf",i.purchases),w(1),k("ngIf",0===i.purchases.length))},dependencies:[jn,gn,To]})),t})(),zlt=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listPurchases("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function Ult(t,n){1&t&&(b(0,"span"),I(1,"Filter by type"),x())}function Glt(t,n){if(1&t&&(b(0,"span"),I(1),x()),2&t){const e=j();w(1),Dt(e.activeFilter)}}function Wlt(t,n){if(1&t){const e=vt();b(0,"button",40),ye("click",function(){const o=$e(e).$implicit;return Be(j().activeFilter=o)}),I(1),x()}if(2&t){const e=n.$implicit;w(1),Dt(e)}}function qlt(t,n){if(1&t&&(b(0,"h6"),I(1),x()),2&t){const e=j();w(1),xn("Showing results for chat room label: ",e.f1.label.value,"")}}const Xlt=function(t){return["/groups",t]};function Ylt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for group ID: "),b(2,"a",41),I(3),x()()),2&t){const e=j();w(2),k("routerLink",lr(2,Xlt,e.route.snapshot.queryParamMap.get("group_id"))),w(1),Dt(e.f2.group_id.value)}}const Yme=function(t){return["/accounts",t]};function Jlt(t,n){if(1&t&&(b(0,"h6"),I(1,"Showing results for user IDs: "),b(2,"a",41),I(3),x(),I(4,", "),b(5,"a",41),I(6),x()()),2&t){const e=j();w(2),k("routerLink",lr(4,Yme,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),Dt(e.f3.user_id_one.value),w(2),k("routerLink",lr(6,Yme,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),Dt(e.f3.user_id_two.value)}}function Klt(t,n){if(1&t&&(b(0,"ngb-alert",42),ge(1,"img",43),b(2,"h6",44),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error when querying messages: ",e.error,"")}}function Qlt(t,n){1&t&&(b(0,"th",45),I(1,"Remove"),x())}function Zlt(t,n){if(1&t&&(b(0,"tr")(1,"td",46),I(2,"No messages found."),x()()),2&t){const e=j();w(1),ht("colspan",e.deleteAllowed()?6:5)}}function ect(t,n){1&t&&ge(0,"div",55)}function tct(t,n){1&t&&ge(0,"div",56)}function nct(t,n){1&t&&ge(0,"td")}function ict(t,n){if(1&t){const e=vt();b(0,"td",57)(1,"button",58),ye("click",function(r){$e(e);const o=j(),s=o.index,a=o.$implicit;return Be(j().deleteMessage(r,s,a))}),I(2,"Delete"),x()()}}function rct(t,n){if(1&t&&(b(0,"tr",59)(1,"td"),I(2),x()()),2&t){const e=j().$implicit,i=j();w(1),ht("colspan",i.deleteAllowed()?6:5),w(1),xn(" ",e.content," ")}}function oct(t,n){if(1&t){const e=vt();b(0,"tr")(1,"td"),I(2),x(),b(3,"td",47),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(4),x(),b(5,"td",48),ye("click",function(){const o=$e(e).$implicit;return Be(j().viewAccount(o))}),I(6),x(),b(7,"td",49)(8,"div",50),ye("click",function(){const o=$e(e).index,s=j();return Be(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),J(9,ect,1,0,"div",51),J(10,tct,1,0,"div",52),x(),I(11),x(),b(12,"td"),I(13),x(),J(14,nct,1,0,"td",3),J(15,ict,3,0,"td",53),x(),J(16,rct,3,2,"tr",54)}if(2&t){const e=n.$implicit,i=n.index,r=j();w(2),Dt(e.code),w(2),Dt(e.sender_id),w(2),Dt(e.username),w(3),k("ngIf",!r.messageStatesOpen[i]),w(1),k("ngIf",r.messageStatesOpen[i]),w(1),xn(" ",e.content," "),w(2),Dt(e.create_time),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),k("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),k("ngIf",r.messageStatesOpen[i])}}function sct(t,n){if(1&t&&(b(0,"ngb-alert",60),ge(1,"img",43),b(2,"h6",44),I(3,"Failed to delete data."),x(),b(4,"p",61),I(5),x()()),2&t){const e=j();k("dismissible",!1),w(5),Dt(e.deleteError)}}function act(t,n){if(1&t){const e=vt();b(0,"ngb-alert",62),ye("close",function(){return $e(e),Be(j().deleteSuccess=!1)}),ge(1,"img",63),b(2,"h6",44),I(3),x()()}if(2&t){const e=j();k("dismissible",!0),w(3),Ld("",e.total_deleted," messages ",e.total_deleted>0?"successfully":""," deleted.")}}const lct=function(t){return{"is-invalid":t}};function cct(t,n){if(1&t){const e=vt();b(0,"div",64)(1,"h5",65),I(2,"Delete messages"),x(),b(3,"button",66),ye("click",function(){return Be($e(e).$implicit.dismiss())}),b(4,"span",67),I(5,"\xd7"),x()()(),b(6,"div",68)(7,"div",69)(8,"form",70)(9,"div",71)(10,"p")(11,"b"),I(12,"Choose how many days to retain: "),x(),ge(13,"input",72),x()(),ge(14,"input",73),x()()(),b(15,"div",74)(16,"button",75),ye("click",function(){return Be($e(e).$implicit.dismiss())}),I(17,"Cancel"),x(),b(18,"button",76),ye("click",function(){return Be($e(e).$implicit.close())}),I(19,"DELETE"),x()()}if(2&t){const e=j();w(8),k("formGroup",e.confirmDeleteForm),w(6),k("ngClass",lr(3,lct,e.f.delete.touched&&e.f.delete.invalid)),w(4),k("disabled",e.f.delete.invalid)}}function uct(t,n){if(1&t){const e=vt();b(0,"button",76),ye("click",function(){$e(e);const r=j(),o=uo(68);return Be(r.openDeleteDataModal(o))}),I(1,"Delete messages"),x()}2&t&&k("disabled",j().deleting)}let dct=(()=>{class t{constructor(e,i,r,o,s,a){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"authService",void 0),K(this,"formBuilder",void 0),K(this,"modalService",void 0),K(this,"systemUserId","00000000-0000-0000-0000-000000000000"),K(this,"error",""),K(this,"messages",[]),K(this,"nextCursor",""),K(this,"searchForm1",void 0),K(this,"searchForm2",void 0),K(this,"searchForm3",void 0),K(this,"type",void 0),K(this,"confirmDeleteForm",void 0),K(this,"deleteError",""),K(this,"deleteSuccess",!1),K(this,"deleting",!1),K(this,"total_deleted",0),K(this,"activeFilter",""),K(this,"filters",["Chat Room","Group Chat","Direct Chat"]),K(this,"messageStatesOpen",[]),this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Do.compose([Do.required,Do.pattern("DELETE")])],days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");let i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2==this.type||3==this.type||4==this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})}deleteAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=oi.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}openDeleteDataModal(e){this.modalService.open(e,{centered:!0}).result.then(()=>{this.deleteData(),this.confirmDeleteForm.controls.delete.setValue("")},()=>{this.confirmDeleteForm.controls.delete.setValue("")})}deleteData(){this.deleteError="",this.deleting=!0;let e=new Date;e.setDate(e.getDate()-this.f.days.value),this.consoleService.deleteChannelMessages("",e.toISOString(),null).subscribe(i=>{this.total_deleted=Number(i.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const r=this.route.snapshot.queryParamMap;let o=r.get("type"),s=r.get("label");s||(s="0");let a=r.get("group_id"),l=r.get("user_id_one"),c=r.get("user_id_two"),u=r.get("cursor");u||(u=""),o&&this.updateMessages(Number(o),s,a,l,c,u)},i=>{this.deleting=!1,this.deleteError=i})}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi),le(Xo),le(Tl),le(H3))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["ng-component"]],decls:70,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["confirmDelete",""],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],[1,"mt-2"],["type","number","value","30","min","0","formControlName","days",2,"width","80px"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(e,i){1&e&&(b(0,"h2",0),I(1,"Chat Messages"),x(),b(2,"div",1)(3,"button",2),J(4,Ult,2,0,"span",3),J(5,Glt,2,1,"span",3),x(),b(6,"div",4),J(7,Wlt,2,1,"button",5),x()(),b(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ge(13,"input",11),b(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return i.type=2,i.search(0)}),I(17,"Search"),x()()()()(),b(18,"form",9)(19,"div",10),ge(20,"input",15),b(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return i.type=3,i.search(0)}),I(24,"Search "),x()()()()(),b(25,"form",9)(26,"div",10),ge(27,"input",16),b(28,"div",12)(29,"span",17),ye("click",function(){return i.f3.user_id_one.setValue(i.systemUserId)}),ge(30,"img",18),x()(),ge(31,"input",19),b(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return i.type=4,i.search(0)}),I(35,"Search "),x()()()()()(),b(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return i.search(0)}),ge(39,"img",23),x(),b(40,"button",22),ye("click",function(){return i.search(1)}),ge(41,"img",24),x()()()()(),J(42,qlt,2,1,"h6",3),J(43,Ylt,4,4,"h6",3),J(44,Jlt,7,8,"h6",3),J(45,Klt,4,2,"ngb-alert",25),b(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),I(51,"Code"),x(),b(52,"th",30),I(53,"Sender ID"),x(),b(54,"th",31),I(55,"Username"),x(),b(56,"th"),I(57,"Content"),x(),b(58,"th",32),I(59,"Create Time"),x(),J(60,Qlt,2,0,"th",33),x()(),b(61,"tbody"),J(62,Zlt,3,1,"tr",3),J(63,oct,17,10,"ng-template",34),x()()(),J(64,sct,6,2,"ngb-alert",35),J(65,act,4,3,"ngb-alert",36),b(66,"div",37),J(67,cct,20,5,"ng-template",null,38,Ur),J(69,uct,2,1,"button",39),x()),2&e&&(w(4),k("ngIf",!i.activeFilter||""===i.activeFilter),w(1),k("ngIf",i.activeFilter&&""!==i.activeFilter),w(2),k("ngForOf",i.filters),w(4),k("hidden","Chat Room"!==i.activeFilter)("formGroup",i.searchForm1),w(7),k("hidden","Group Chat"!==i.activeFilter)("formGroup",i.searchForm2),w(7),k("hidden","Direct Chat"!==i.activeFilter)("formGroup",i.searchForm3),w(13),k("disabled",0===i.messages.length),w(2),k("disabled",""===i.nextCursor||null===i.nextCursor),w(2),k("ngIf",0!=i.messages.length&&""===i.error&&2==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&3==i.type),w(1),k("ngIf",0!=i.messages.length&&""===i.error&&4==i.type),w(1),k("ngIf",i.error),w(15),k("ngIf",i.deleteAllowed()),w(2),k("ngIf",0===i.messages.length),w(1),k("ngForOf",i.messages),w(1),k("ngIf",i.deleteError),w(1),k("ngIf",i.deleteSuccess),w(4),k("ngIf",i.deleteMessagesAllowed()))},dependencies:[Fu,Rh,jn,gn,To,Pu,rm,Pf,jf,sl,Na,c3,rl,ol,p3,fa,ja],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})),t})(),hct=(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){let r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ul(o=>(e.data={...e.data,error:o},$n(null))));default:return $n(null)}}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})();function fct(t,n){if(1&t&&(b(0,"ngb-alert",16),ge(1,"img",17),b(2,"h6",18),I(3),x()()),2&t){const e=j();k("dismissible",!1),w(3),xn("Error while processing request: ",e.error,"")}}function pct(t,n){if(1&t&&(b(0,"tr")(1,"td"),I(2),x(),b(3,"td"),I(4),x(),b(5,"td"),I(6),x(),b(7,"td"),I(8),x(),b(9,"td"),I(10),x(),b(11,"td"),I(12),x()()),2&t){const e=n.$implicit,i=j();w(2),Dt(e.product_id),w(2),Dt(e.original_transaction_id),w(2),Dt(i.getStoreText(e.store)),w(2),Dt(e.purchase_time),w(2),Dt(e.expiry_time),w(2),Dt(e.create_time)}}function mct(t,n){1&t&&(b(0,"tr")(1,"td",19),I(2,"No purchases were found."),x()())}const gct=[{path:"",component:yNe,canActivate:[tMe],canActivateChild:[bNe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:rBe,resolve:[oBe]},{path:"config",component:OBe,resolve:[jBe]},{path:"users",component:BBe,resolve:[VBe]},{path:"modules",component:t7e,resolve:[n7e]},{path:"storage",component:d7e,resolve:[h7e,f7e],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Cot,resolve:[kot],pathMatch:"full"},{path:"leaderboards",component:Oot,resolve:[jot]},{path:"leaderboards/:id",component:flt,resolve:[plt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:ylt,resolve:[]},{path:"records",component:Tlt,resolve:[Elt]}]},{path:"matches",component:zat,resolve:[Uat,Gat]},{path:"groups",component:Qat,resolve:[Zat]},{path:"groups/:id",component:slt,resolve:[alt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:iat,resolve:[]},{path:"members",component:Cat,resolve:[kat],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Hot,resolve:[zot]},{path:"accounts/:id",component:nst,resolve:[ist],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:cst,resolve:[]},{path:"authentication",component:pst,resolve:[]},{path:"wallet",component:Dst,resolve:[Tst]},{path:"friends",component:Lst,resolve:[Rst]},{path:"groups",component:Yst,resolve:[Jst]},{path:"purchases",component:Hlt,resolve:[zlt]},{path:"subscriptions",component:(()=>{class t{constructor(e,i,r){K(this,"route",void 0),K(this,"router",void 0),K(this,"consoleService",void 0),K(this,"subscriptions",[]),K(this,"error",""),K(this,"nextCursor",""),K(this,"prevCursor",""),K(this,"userID",void 0),K(this,"limit",100),this.route=e,this.router=i,this.consoleService=r}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.subscriptions=e[0].validated_subscriptions,this.nextCursor=e[0].cursor,this.prevCursor=e[0].prev_cursor})}loadData(e){this.consoleService.listSubscriptions("",this.userID,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(Sy[e])}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}}return K(t,"\u0275fac",function(e){return new(e||t)(le(Rr),le(cr),le(xi))}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-subscriptions"]],decls:31,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colspan","6",1,"text-muted"]],template:function(e,i){1&e&&(J(0,fct,4,2,"ngb-alert",0),b(1,"div",1)(2,"div",2),ge(3,"div",3),b(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return i.loadData("")}),ge(7,"img",7),x(),b(8,"button",6),ye("click",function(){return i.loadData(i.prevCursor)}),ge(9,"img",8),x(),b(10,"button",6),ye("click",function(){return i.loadData(i.nextCursor)}),ge(11,"img",9),x()()()()(),b(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),I(17,"Product ID"),x(),b(18,"th"),I(19,"Original Transaction ID"),x(),b(20,"th"),I(21,"Store"),x(),b(22,"th",13),I(23,"Purchase Time"),x(),b(24,"th",13),I(25,"Expiry Time"),x(),b(26,"th",13),I(27,"Create Time"),x()()(),b(28,"tbody"),J(29,pct,13,6,"ng-template",14),J(30,mct,3,0,"tr",15),x()()()),2&e&&(k("ngIf",i.error),w(6),k("disabled",0===i.subscriptions.length),w(2),k("disabled",""===i.prevCursor),w(2),k("disabled",""===i.nextCursor),w(19),k("ngForOf",i.subscriptions),w(1),k("ngIf",0===i.subscriptions.length))},dependencies:[jn,gn,To]})),t})(),resolve:[(()=>{class t{constructor(e){K(this,"consoleService",void 0),this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listSubscriptions("",r,100,"")}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(xi))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac,providedIn:"root"})),t})()]}]},{path:"apiexplorer",component:Olt,resolve:[jlt]},{path:"chat",component:dct,resolve:[hct]}]},{path:"login",component:ZAe,canActivate:[eMe]},{path:"**",redirectTo:""}];let vct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t})),K(t,"\u0275inj",Ci({imports:[J9.forRoot(gct,{useHash:!0}),J9]})),t})(),yct=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275cmp",Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(e,i){1&e&&ge(0,"router-outlet")},dependencies:[Jp]})),t})();new class kct extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Dct=1;const Tct=Promise.resolve(),YD={};function Jme(t){return t in YD&&(delete YD[t],!0)}const Kme={setImmediate(t){const n=Dct++;return YD[n]=!0,Tct.then(()=>Jme(n)&&t()),n},clearImmediate(t){Jme(t)}};new class Act extends Hd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=Kme.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(Kme.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const Cs={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};Cs[Cs.Tab]="Tab",Cs[Cs.Enter]="Enter",Cs[Cs.Esc]="Esc",Cs[Cs.Space]="Space",Cs[Cs.ArrowUp]="ArrowUp",Cs[Cs.ArrowDown]="ArrowDown",Cs[Cs.Backspace]="Backspace";const ige=new zn("ng-select-selection-model");class jut{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}const Put=function Out(){return new jut};let Lut=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Di({type:t}),t.\u0275inj=Ci({providers:[{provide:ige,useValue:Put}],imports:[Vs]}),t})(),Rut=(()=>{class t{constructor(e){K(this,"authenticationService",void 0),this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),$ut=(()=>{class t{constructor(e,i){K(this,"authenticationService",void 0),K(this,"router",void 0),this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ul(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),qp(r.error.message||r.statusText))))}}return K(t,"\u0275fac",function(e){return new(e||t)(ct(Xo),ct(cr))}),K(t,"\u0275prov",Et({token:t,factory:t.\u0275fac})),t})(),But=(()=>{class t{}return K(t,"\u0275fac",function(e){return new(e||t)}),K(t,"\u0275mod",Di({type:t,bootstrap:[yct]})),K(t,"\u0275inj",Ci({providers:[JAe,Iz,{provide:C3,useValue:{host:document.location.origin,timeout:15e3}},{provide:x3,useClass:Rut,multi:!0},{provide:x3,useClass:$ut,multi:!0}],imports:[pBe,vct,qA,SSe,qAe,cNe,L$e,SAe.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),DSe,wAe,ZV,Lut]})),t})();g2e().bootstrapModule(But).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Tn)=>{"use strict";Tn.byteLength=function Ve(T){var O=et(T),Me=O[1];return 3*(O[0]+Me)/4-Me},Tn.toByteArray=function se(T){var O,wn,te=et(T),Me=te[0],Je=te[1],kt=new Oe(function ve(T,O,te){return 3*(O+te)/4-te}(0,Me,Je)),jt=0,Wt=Je>0?Me-4:Me;for(wn=0;wn>16&255,kt[jt++]=O>>8&255,kt[jt++]=255&O;return 2===Je&&(O=rt[T.charCodeAt(wn)]<<2|rt[T.charCodeAt(wn+1)]>>4,kt[jt++]=255&O),1===Je&&(O=rt[T.charCodeAt(wn)]<<10|rt[T.charCodeAt(wn+1)]<<4|rt[T.charCodeAt(wn+2)]>>2,kt[jt++]=O>>8&255,kt[jt++]=255&O),kt},Tn.fromByteArray=function D(T){for(var O,te=T.length,Me=te%3,Je=[],jt=0,Wt=te-Me;jtWt?Wt:jt+16383));return 1===Me?Je.push(De[(O=T[te-1])>>2]+De[O<<4&63]+"=="):2===Me&&Je.push(De[(O=(T[te-2]<<8)+T[te-1])>>10]+De[O>>4&63]+De[O<<2&63]+"="),Je.join("")};for(var De=[],rt=[],Oe=typeof Uint8Array<"u"?Uint8Array:Array,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=0,_e=dt.length;Ge<_e;++Ge)De[Ge]=dt[Ge],rt[dt.charCodeAt(Ge)]=Ge;function et(T){var O=T.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var te=T.indexOf("=");return-1===te&&(te=O),[te,te===O?0:4-te%4]}function ue(T){return De[T>>18&63]+De[T>>12&63]+De[T>>6&63]+De[63&T]}function ae(T,O,te){for(var Je=[],kt=O;kt{"use strict";var Oe=De(343),dt=De(461),Ge="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Tn.lW=ve,Tn.h2=50;var _e=2147483647;function Ve(Te){if(Te>_e)throw new RangeError('The value "'+Te+'" is invalid for option "size"');var W=new Uint8Array(Te);return Object.setPrototypeOf(W,ve.prototype),W}function ve(Te,W,ee){if("number"==typeof Te){if("string"==typeof W)throw new TypeError('The "string" argument must be of type string. Received type number');return D(Te)}return se(Te,W,ee)}function se(Te,W,ee){if("string"==typeof Te)return function T(Te,W){if(("string"!=typeof W||""===W)&&(W="utf8"),!ve.isEncoding(W))throw new TypeError("Unknown encoding: "+W);var ee=0|Wt(Te,W),Ne=Ve(ee),nt=Ne.write(Te,W);return nt!==ee&&(Ne=Ne.slice(0,nt)),Ne}(Te,W);if(ArrayBuffer.isView(Te))return function te(Te){if(da(Te,Uint8Array)){var W=new Uint8Array(Te);return Me(W.buffer,W.byteOffset,W.byteLength)}return O(Te)}(Te);if(null==Te)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te);if(da(Te,ArrayBuffer)||Te&&da(Te.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(da(Te,SharedArrayBuffer)||Te&&da(Te.buffer,SharedArrayBuffer)))return Me(Te,W,ee);if("number"==typeof Te)throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=Te.valueOf&&Te.valueOf();if(null!=Ne&&Ne!==Te)return ve.from(Ne,W,ee);var nt=function Je(Te){if(ve.isBuffer(Te)){var W=0|kt(Te.length),ee=Ve(W);return 0===ee.length||Te.copy(ee,0,0,W),ee}return void 0!==Te.length?"number"!=typeof Te.length||co(Te.length)?Ve(0):O(Te):"Buffer"===Te.type&&Array.isArray(Te.data)?O(Te.data):void 0}(Te);if(nt)return nt;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Te[Symbol.toPrimitive])return ve.from(Te[Symbol.toPrimitive]("string"),W,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Te)}function ue(Te){if("number"!=typeof Te)throw new TypeError('"size" argument must be of type number');if(Te<0)throw new RangeError('The value "'+Te+'" is invalid for option "size"')}function D(Te){return ue(Te),Ve(Te<0?0:0|kt(Te))}function O(Te){for(var W=Te.length<0?0:0|kt(Te.length),ee=Ve(W),Ne=0;Ne=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return 0|Te}function Wt(Te,W){if(ve.isBuffer(Te))return Te.length;if(ArrayBuffer.isView(Te)||da(Te,ArrayBuffer))return Te.byteLength;if("string"!=typeof Te)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Te);var ee=Te.length,Ne=arguments.length>2&&!0===arguments[2];if(!Ne&&0===ee)return 0;for(var nt=!1;;)switch(W){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return Nc(Te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return vu(Te).length;default:if(nt)return Ne?-1:Nc(Te).length;W=(""+W).toLowerCase(),nt=!0}}function wn(Te,W,ee){var Ne=!1;if((void 0===W||W<0)&&(W=0),W>this.length||((void 0===ee||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(W>>>=0))return"";for(Te||(Te="utf8");;)switch(Te){case"hex":return gu(this,W,ee);case"utf8":case"utf-8":return yn(this,W,ee);case"ascii":return Kn(this,W,ee);case"latin1":case"binary":return Fc(this,W,ee);case"base64":return Sa(this,W,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ro(this,W,ee);default:if(Ne)throw new TypeError("Unknown encoding: "+Te);Te=(Te+"").toLowerCase(),Ne=!0}}function rn(Te,W,ee){var Ne=Te[W];Te[W]=Te[ee],Te[ee]=Ne}function Mi(Te,W,ee,Ne,nt){if(0===Te.length)return-1;if("string"==typeof ee?(Ne=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),co(ee=+ee)&&(ee=nt?0:Te.length-1),ee<0&&(ee=Te.length+ee),ee>=Te.length){if(nt)return-1;ee=Te.length-1}else if(ee<0){if(!nt)return-1;ee=0}if("string"==typeof W&&(W=ve.from(W,Ne)),ve.isBuffer(W))return 0===W.length?-1:zr(Te,W,ee,Ne,nt);if("number"==typeof W)return W&=255,"function"==typeof Uint8Array.prototype.indexOf?nt?Uint8Array.prototype.indexOf.call(Te,W,ee):Uint8Array.prototype.lastIndexOf.call(Te,W,ee):zr(Te,[W],ee,Ne,nt);throw new TypeError("val must be string, number or Buffer")}function zr(Te,W,ee,Ne,nt){var st,zt=1,Qt=Te.length,nr=W.length;if(void 0!==Ne&&("ucs2"===(Ne=String(Ne).toLowerCase())||"ucs-2"===Ne||"utf16le"===Ne||"utf-16le"===Ne)){if(Te.length<2||W.length<2)return-1;zt=2,Qt/=2,nr/=2,ee/=2}function A(mn,pe){return 1===zt?mn[pe]:mn.readUInt16BE(pe*zt)}if(nt){var Tt=-1;for(st=ee;stQt&&(ee=Qt-nr),st=ee;st>=0;st--){for(var Ut=!0,Vt=0;Vtnt&&(Ne=nt):Ne=nt;var zt=W.length;Ne>zt/2&&(Ne=zt/2);for(var Qt=0;Qt>8,zt.push(ee%256),zt.push(Ne);return zt}(W,Te.length-ee),Te,ee,Ne)}function Sa(Te,W,ee){return Oe.fromByteArray(0===W&&ee===Te.length?Te:Te.slice(W,ee))}function yn(Te,W,ee){ee=Math.min(Te.length,ee);for(var Ne=[],nt=W;nt239?4:zt>223?3:zt>191?2:1;if(nt+nr<=ee)switch(nr){case 1:zt<128&&(Qt=zt);break;case 2:128==(192&(A=Te[nt+1]))&&(Ut=(31&zt)<<6|63&A)>127&&(Qt=Ut);break;case 3:st=Te[nt+2],128==(192&(A=Te[nt+1]))&&128==(192&st)&&(Ut=(15&zt)<<12|(63&A)<<6|63&st)>2047&&(Ut<55296||Ut>57343)&&(Qt=Ut);break;case 4:st=Te[nt+2],Tt=Te[nt+3],128==(192&(A=Te[nt+1]))&&128==(192&st)&&128==(192&Tt)&&(Ut=(15&zt)<<18|(63&A)<<12|(63&st)<<6|63&Tt)>65535&&Ut<1114112&&(Qt=Ut)}null===Qt?(Qt=65533,nr=1):Qt>65535&&(Ne.push((Qt-=65536)>>>10&1023|55296),Qt=56320|1023&Qt),Ne.push(Qt),nt+=nr}return function kd(Te){var W=Te.length;if(W<=Cd)return String.fromCharCode.apply(String,Te);for(var ee="",Ne=0;Nent.length?ve.from(Qt).copy(nt,zt):Uint8Array.prototype.set.call(nt,Qt,zt);else{if(!ve.isBuffer(Qt))throw new TypeError('"list" argument must be an Array of Buffers');Qt.copy(nt,zt)}zt+=Qt.length}return nt},ve.byteLength=Wt,ve.prototype._isBuffer=!0,ve.prototype.swap16=function(){var W=this.length;if(W%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ee=0;eeee&&(W+=" ... "),""},Ge&&(ve.prototype[Ge]=ve.prototype.inspect),ve.prototype.compare=function(W,ee,Ne,nt,zt){if(da(W,Uint8Array)&&(W=ve.from(W,W.offset,W.byteLength)),!ve.isBuffer(W))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof W);if(void 0===ee&&(ee=0),void 0===Ne&&(Ne=W?W.length:0),void 0===nt&&(nt=0),void 0===zt&&(zt=this.length),ee<0||Ne>W.length||nt<0||zt>this.length)throw new RangeError("out of range index");if(nt>=zt&&ee>=Ne)return 0;if(nt>=zt)return-1;if(ee>=Ne)return 1;if(this===W)return 0;for(var Qt=(zt>>>=0)-(nt>>>=0),nr=(Ne>>>=0)-(ee>>>=0),A=Math.min(Qt,nr),st=this.slice(nt,zt),Tt=W.slice(ee,Ne),Ut=0;Ut>>=0,isFinite(Ne)?(Ne>>>=0,void 0===nt&&(nt="utf8")):(nt=Ne,Ne=void 0)}var zt=this.length-ee;if((void 0===Ne||Ne>zt)&&(Ne=zt),W.length>0&&(Ne<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");nt||(nt="utf8");for(var Qt=!1;;)switch(nt){case"hex":return Xr(this,W,ee,Ne);case"utf8":case"utf-8":return hs(this,W,ee,Ne);case"ascii":case"latin1":case"binary":return Ya(this,W,ee,Ne);case"base64":return tr(this,W,ee,Ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mu(this,W,ee,Ne);default:if(Qt)throw new TypeError("Unknown encoding: "+nt);nt=(""+nt).toLowerCase(),Qt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(Te,W,ee){var Ne="";ee=Math.min(Te.length,ee);for(var nt=W;ntNe)&&(ee=Ne);for(var nt="",zt=W;ztee)throw new RangeError("Trying to access beyond buffer length")}function lo(Te,W,ee,Ne,nt,zt){if(!ve.isBuffer(Te))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>nt||WTe.length)throw new RangeError("Index out of range")}function Da(Te,W,ee,Ne,nt,zt){if(ee+Ne>Te.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function Zr(Te,W,ee,Ne,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,4),dt.write(Te,W,ee,Ne,23,4),ee+4}function pl(Te,W,ee,Ne,nt){return W=+W,ee>>>=0,nt||Da(Te,0,ee,8),dt.write(Te,W,ee,Ne,52,8),ee+8}ve.prototype.slice=function(W,ee){var Ne=this.length;(W=~~W)<0?(W+=Ne)<0&&(W=0):W>Ne&&(W=Ne),(ee=void 0===ee?Ne:~~ee)<0?(ee+=Ne)<0&&(ee=0):ee>Ne&&(ee=Ne),ee>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W+--ee],zt=1;ee>0&&(zt*=256);)nt+=this[W+--ee]*zt;return nt},ve.prototype.readUint8=ve.prototype.readUInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),this[W]},ve.prototype.readUint16LE=ve.prototype.readUInt16LE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]|this[W+1]<<8},ve.prototype.readUint16BE=ve.prototype.readUInt16BE=function(W,ee){return W>>>=0,ee||Co(W,2,this.length),this[W]<<8|this[W+1]},ve.prototype.readUint32LE=ve.prototype.readUInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),(this[W]|this[W+1]<<8|this[W+2]<<16)+16777216*this[W+3]},ve.prototype.readUint32BE=ve.prototype.readUInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),16777216*this[W]+(this[W+1]<<16|this[W+2]<<8|this[W+3])},ve.prototype.readIntLE=function(W,ee,Ne){W>>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=this[W],zt=1,Qt=0;++Qt=(zt*=128)&&(nt-=Math.pow(2,8*ee)),nt},ve.prototype.readIntBE=function(W,ee,Ne){W>>>=0,ee>>>=0,Ne||Co(W,ee,this.length);for(var nt=ee,zt=1,Qt=this[W+--nt];nt>0&&(zt*=256);)Qt+=this[W+--nt]*zt;return Qt>=(zt*=128)&&(Qt-=Math.pow(2,8*ee)),Qt},ve.prototype.readInt8=function(W,ee){return W>>>=0,ee||Co(W,1,this.length),128&this[W]?-1*(255-this[W]+1):this[W]},ve.prototype.readInt16LE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Ne=this[W]|this[W+1]<<8;return 32768&Ne?4294901760|Ne:Ne},ve.prototype.readInt16BE=function(W,ee){W>>>=0,ee||Co(W,2,this.length);var Ne=this[W+1]|this[W]<<8;return 32768&Ne?4294901760|Ne:Ne},ve.prototype.readInt32LE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]|this[W+1]<<8|this[W+2]<<16|this[W+3]<<24},ve.prototype.readInt32BE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),this[W]<<24|this[W+1]<<16|this[W+2]<<8|this[W+3]},ve.prototype.readFloatLE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!0,23,4)},ve.prototype.readFloatBE=function(W,ee){return W>>>=0,ee||Co(W,4,this.length),dt.read(this,W,!1,23,4)},ve.prototype.readDoubleLE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!0,52,8)},ve.prototype.readDoubleBE=function(W,ee){return W>>>=0,ee||Co(W,8,this.length),dt.read(this,W,!1,52,8)},ve.prototype.writeUintLE=ve.prototype.writeUIntLE=function(W,ee,Ne,nt){W=+W,ee>>>=0,Ne>>>=0,nt||lo(this,W,ee,Ne,Math.pow(2,8*Ne)-1,0);var Qt=1,nr=0;for(this[ee]=255&W;++nr>>=0,Ne>>>=0,nt||lo(this,W,ee,Ne,Math.pow(2,8*Ne)-1,0);var Qt=Ne-1,nr=1;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)this[ee+Qt]=W/nr&255;return ee+Ne},ve.prototype.writeUint8=ve.prototype.writeUInt8=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,1,255,0),this[ee]=255&W,ee+1},ve.prototype.writeUint16LE=ve.prototype.writeUInt16LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,65535,0),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeUint16BE=ve.prototype.writeUInt16BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,65535,0),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeUint32LE=ve.prototype.writeUInt32LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,4294967295,0),this[ee+3]=W>>>24,this[ee+2]=W>>>16,this[ee+1]=W>>>8,this[ee]=255&W,ee+4},ve.prototype.writeUint32BE=ve.prototype.writeUInt32BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,4294967295,0),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeIntLE=function(W,ee,Ne,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Ne-1);lo(this,W,ee,Ne,zt-1,-zt)}var Qt=0,nr=1,A=0;for(this[ee]=255&W;++Qt>0)-A&255;return ee+Ne},ve.prototype.writeIntBE=function(W,ee,Ne,nt){if(W=+W,ee>>>=0,!nt){var zt=Math.pow(2,8*Ne-1);lo(this,W,ee,Ne,zt-1,-zt)}var Qt=Ne-1,nr=1,A=0;for(this[ee+Qt]=255&W;--Qt>=0&&(nr*=256);)W<0&&0===A&&0!==this[ee+Qt+1]&&(A=1),this[ee+Qt]=(W/nr>>0)-A&255;return ee+Ne},ve.prototype.writeInt8=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,1,127,-128),W<0&&(W=255+W+1),this[ee]=255&W,ee+1},ve.prototype.writeInt16LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,32767,-32768),this[ee]=255&W,this[ee+1]=W>>>8,ee+2},ve.prototype.writeInt16BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,2,32767,-32768),this[ee]=W>>>8,this[ee+1]=255&W,ee+2},ve.prototype.writeInt32LE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,2147483647,-2147483648),this[ee]=255&W,this[ee+1]=W>>>8,this[ee+2]=W>>>16,this[ee+3]=W>>>24,ee+4},ve.prototype.writeInt32BE=function(W,ee,Ne){return W=+W,ee>>>=0,Ne||lo(this,W,ee,4,2147483647,-2147483648),W<0&&(W=4294967295+W+1),this[ee]=W>>>24,this[ee+1]=W>>>16,this[ee+2]=W>>>8,this[ee+3]=255&W,ee+4},ve.prototype.writeFloatLE=function(W,ee,Ne){return Zr(this,W,ee,!0,Ne)},ve.prototype.writeFloatBE=function(W,ee,Ne){return Zr(this,W,ee,!1,Ne)},ve.prototype.writeDoubleLE=function(W,ee,Ne){return pl(this,W,ee,!0,Ne)},ve.prototype.writeDoubleBE=function(W,ee,Ne){return pl(this,W,ee,!1,Ne)},ve.prototype.copy=function(W,ee,Ne,nt){if(!ve.isBuffer(W))throw new TypeError("argument should be a Buffer");if(Ne||(Ne=0),!nt&&0!==nt&&(nt=this.length),ee>=W.length&&(ee=W.length),ee||(ee=0),nt>0&&nt=this.length)throw new RangeError("Index out of range");if(nt<0)throw new RangeError("sourceEnd out of bounds");nt>this.length&&(nt=this.length),W.length-ee>>=0,Ne=void 0===Ne?this.length:Ne>>>0,W||(W=0),"number"==typeof W)for(Qt=ee;Qt55295&&ee<57344){if(!nt){if(ee>56319){(W-=3)>-1&&zt.push(239,191,189);continue}if(Qt+1===Ne){(W-=3)>-1&&zt.push(239,191,189);continue}nt=ee;continue}if(ee<56320){(W-=3)>-1&&zt.push(239,191,189),nt=ee;continue}ee=65536+(nt-55296<<10|ee-56320)}else nt&&(W-=3)>-1&&zt.push(239,191,189);if(nt=null,ee<128){if((W-=1)<0)break;zt.push(ee)}else if(ee<2048){if((W-=2)<0)break;zt.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((W-=3)<0)break;zt.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;zt.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return zt}function vu(Te){return Oe.toByteArray(function Sd(Te){if((Te=(Te=Te.split("=")[0]).trim().replace(nc,"")).length<2)return"";for(;Te.length%4!=0;)Te+="=";return Te}(Te))}function Ja(Te,W,ee,Ne){for(var nt=0;nt=W.length||nt>=Te.length);++nt)W[nt+ee]=Te[nt];return nt}function da(Te,W){return Te instanceof W||null!=Te&&null!=Te.constructor&&null!=Te.constructor.name&&Te.constructor.name===W.name}function co(Te){return Te!=Te}var ml=function(){for(var Te="0123456789abcdef",W=new Array(256),ee=0;ee<16;++ee)for(var Ne=16*ee,nt=0;nt<16;++nt)W[Ne+nt]=Te[ee]+Te[nt];return W}()},797:function(Yt){Yt.exports=function(Tn){var De={};function rt(Oe){if(De[Oe])return De[Oe].exports;var dt=De[Oe]={exports:{},id:Oe,loaded:!1};return Tn[Oe].call(dt.exports,dt,dt.exports,rt),dt.loaded=!0,dt.exports}return rt.m=Tn,rt.c=De,rt.p="",rt(0)}([function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(1),dt=rt(3),Ge=rt(8),_e=rt(15);function et(ae,D,T){var O=null,te=function(Mi,zr){T&&T(Mi,zr),O&&O.visit(Mi,zr)},Me="function"==typeof T?te:null,Je=!1;if(D){var kt="boolean"==typeof D.attachComment&&D.attachComment;((Je="boolean"==typeof D.comment&&D.comment)||kt)&&((O=new Oe.CommentHandler).attach=kt,D.comment=!0,Me=te)}var Wt,jt=!1;D&&"string"==typeof D.sourceType&&(jt="module"===D.sourceType),Wt=D&&"boolean"==typeof D.jsx&&D.jsx?new dt.JSXParser(ae,D,Me):new Ge.Parser(ae,D,Me);var rn=jt?Wt.parseModule():Wt.parseScript();return Je&&O&&(rn.comments=O.comments),Wt.config.tokens&&(rn.tokens=Wt.tokens),Wt.config.tolerant&&(rn.errors=Wt.errorHandler.errors),rn}De.parse=et,De.parseModule=function Ve(ae,D,T){var O=D||{};return O.sourceType="module",et(ae,O,T)},De.parseScript=function ve(ae,D,T){var O=D||{};return O.sourceType="script",et(ae,O,T)},De.tokenize=function se(ae,D,T){var te,O=new _e.Tokenizer(ae,D);te=[];try{for(;;){var Me=O.getNextToken();if(!Me)break;T&&(Me=T(Me)),te.push(Me)}}catch(Je){O.errorHandler.tolerate(Je)}return O.errorHandler.tolerant&&(te.errors=O.errors()),te};var ue=rt(2);De.Syntax=ue.Syntax,De.version="4.0.1"},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2),dt=function(){function Ge(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return Ge.prototype.insertInnerComments=function(_e,et){if(_e.type===Oe.Syntax.BlockStatement&&0===_e.body.length){for(var Ve=[],ve=this.leading.length-1;ve>=0;--ve){var se=this.leading[ve];et.end.offset>=se.start&&(Ve.unshift(se.comment),this.leading.splice(ve,1),this.trailing.splice(ve,1))}Ve.length&&(_e.innerComments=Ve)}},Ge.prototype.findTrailingComments=function(_e){var et=[];if(this.trailing.length>0){for(var Ve=this.trailing.length-1;Ve>=0;--Ve){var ve=this.trailing[Ve];ve.start>=_e.end.offset&&et.unshift(ve.comment)}return this.trailing.length=0,et}var se=this.stack[this.stack.length-1];if(se&&se.node.trailingComments){var ue=se.node.trailingComments[0];ue&&ue.range[0]>=_e.end.offset&&(et=se.node.trailingComments,delete se.node.trailingComments)}return et},Ge.prototype.findLeadingComments=function(_e){for(var Ve,et=[];this.stack.length>0&&(ve=this.stack[this.stack.length-1])&&ve.start>=_e.start.offset;)Ve=ve.node,this.stack.pop();if(Ve){for(var ue=(Ve.leadingComments?Ve.leadingComments.length:0)-1;ue>=0;--ue){var ae=Ve.leadingComments[ue];ae.range[1]<=_e.start.offset&&(et.unshift(ae),Ve.leadingComments.splice(ue,1))}return Ve.leadingComments&&0===Ve.leadingComments.length&&delete Ve.leadingComments,et}for(ue=this.leading.length-1;ue>=0;--ue){var ve;(ve=this.leading[ue]).start<=_e.start.offset&&(et.unshift(ve.comment),this.leading.splice(ue,1))}return et},Ge.prototype.visitNode=function(_e,et){if(!(_e.type===Oe.Syntax.Program&&_e.body.length>0)){this.insertInnerComments(_e,et);var Ve=this.findTrailingComments(et),ve=this.findLeadingComments(et);ve.length>0&&(_e.leadingComments=ve),Ve.length>0&&(_e.trailingComments=Ve),this.stack.push({node:_e,start:et.start.offset})}},Ge.prototype.visitComment=function(_e,et){var Ve="L"===_e.type[0]?"Line":"Block",ve={type:Ve,value:_e.value};if(_e.range&&(ve.range=_e.range),_e.loc&&(ve.loc=_e.loc),this.comments.push(ve),this.attach){var se={comment:{type:Ve,value:_e.value,range:[et.start.offset,et.end.offset]},start:et.start.offset};_e.loc&&(se.comment.loc=_e.loc),_e.type=Ve,this.leading.push(se),this.trailing.push(se)}},Ge.prototype.visit=function(_e,et){"LineComment"===_e.type||"BlockComment"===_e.type?this.visitComment(_e,et):this.attach&&this.visitNode(_e,et)},Ge}();De.CommentHandler=dt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Tn,De,rt){"use strict";var D,Oe=this&&this.__extends||(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,O){T.__proto__=O}||function(T,O){for(var te in O)O.hasOwnProperty(te)&&(T[te]=O[te])},function(T,O){function te(){this.constructor=T}D(T,O),T.prototype=null===O?Object.create(O):(te.prototype=O.prototype,new te)});Object.defineProperty(De,"__esModule",{value:!0});var dt=rt(4),Ge=rt(5),_e=rt(6),et=rt(7),Ve=rt(8),ve=rt(13),se=rt(14);function ue(D){var T;switch(D.type){case _e.JSXSyntax.JSXIdentifier:T=D.name;break;case _e.JSXSyntax.JSXNamespacedName:var te=D;T=ue(te.namespace)+":"+ue(te.name);break;case _e.JSXSyntax.JSXMemberExpression:var Me=D;T=ue(Me.object)+"."+ue(Me.property)}return T}ve.TokenName[100]="JSXIdentifier",ve.TokenName[101]="JSXText";var ae=function(D){function T(O,te,Me){return D.call(this,O,te,Me)||this}return Oe(T,D),T.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():D.prototype.parsePrimaryExpression.call(this)},T.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},T.prototype.finishJSX=function(){this.nextToken()},T.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},T.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},T.prototype.scanXHTMLEntity=function(O){for(var te="&",Me=!0,Je=!1,kt=!1,jt=!1;!this.scanner.eof()&&Me&&!Je;){var Wt=this.scanner.source[this.scanner.index];if(Wt===O)break;if(Je=";"===Wt,te+=Wt,++this.scanner.index,!Je)switch(te.length){case 2:kt="#"===Wt;break;case 3:kt&&(Me=(jt="x"===Wt)||dt.Character.isDecimalDigit(Wt.charCodeAt(0)),kt=kt&&!jt);break;default:Me=(Me=Me&&!(kt&&!dt.Character.isDecimalDigit(Wt.charCodeAt(0))))&&!(jt&&!dt.Character.isHexDigit(Wt.charCodeAt(0)))}}if(Me&&Je&&te.length>2){var wn=te.substr(1,te.length-2);kt&&wn.length>1?te=String.fromCharCode(parseInt(wn.substr(1),10)):jt&&wn.length>2?te=String.fromCharCode(parseInt("0"+wn.substr(1),16)):!kt&&!jt&&se.XHTMLEntities[wn]&&(te=se.XHTMLEntities[wn])}return te},T.prototype.lexJSX=function(){var O=this.scanner.source.charCodeAt(this.scanner.index);if(60===O||62===O||47===O||58===O||61===O||123===O||125===O)return{type:7,value:te=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===O||39===O){for(var Me=this.scanner.index,Je=this.scanner.source[this.scanner.index++],kt="";!this.scanner.eof()&&(jt=this.scanner.source[this.scanner.index++])!==Je;)kt+="&"===jt?this.scanXHTMLEntity(Je):jt;return{type:8,value:kt,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(46===O){var te,Wt=this.scanner.source.charCodeAt(this.scanner.index+1),wn=this.scanner.source.charCodeAt(this.scanner.index+2);return Me=this.scanner.index,this.scanner.index+=(te=46===Wt&&46===wn?"...":".").length,{type:7,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}if(96===O)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(dt.Character.isIdentifierStart(O)&&92!==O){for(Me=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var jt=this.scanner.source.charCodeAt(this.scanner.index);if(dt.Character.isIdentifierPart(jt)&&92!==jt)++this.scanner.index;else{if(45!==jt)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Me,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Me,end:this.scanner.index}}return this.scanner.lex()},T.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var O=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(O)),O},T.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var O=this.scanner.index,te="";!this.scanner.eof();){var Me=this.scanner.source[this.scanner.index];if("{"===Me||"<"===Me)break;++this.scanner.index,te+=Me,dt.Character.isLineTerminator(Me.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Me&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:te,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:O,end:this.scanner.index};return te.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},T.prototype.peekJSXToken=function(){var O=this.scanner.saveState();this.scanner.scanComments();var te=this.lexJSX();return this.scanner.restoreState(O),te},T.prototype.expectJSX=function(O){var te=this.nextJSXToken();(7!==te.type||te.value!==O)&&this.throwUnexpectedToken(te)},T.prototype.matchJSX=function(O){var te=this.peekJSXToken();return 7===te.type&&te.value===O},T.prototype.parseJSXIdentifier=function(){var O=this.createJSXNode(),te=this.nextJSXToken();return 100!==te.type&&this.throwUnexpectedToken(te),this.finalize(O,new Ge.JSXIdentifier(te.value))},T.prototype.parseJSXElementName=function(){var O=this.createJSXNode(),te=this.parseJSXIdentifier();if(this.matchJSX(":")){var Me=te;this.expectJSX(":");var Je=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Me,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var kt=te;this.expectJSX(".");var jt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXMemberExpression(kt,jt))}return te},T.prototype.parseJSXAttributeName=function(){var te,O=this.createJSXNode(),Me=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Me;this.expectJSX(":");var kt=this.parseJSXIdentifier();te=this.finalize(O,new Ge.JSXNamespacedName(Je,kt))}else te=Me;return te},T.prototype.parseJSXStringLiteralAttribute=function(){var O=this.createJSXNode(),te=this.nextJSXToken();8!==te.type&&this.throwUnexpectedToken(te);var Me=this.getTokenRaw(te);return this.finalize(O,new et.Literal(te.value,Me))},T.prototype.parseJSXExpressionAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},T.prototype.parseJSXNameValueAttribute=function(){var O=this.createJSXNode(),te=this.parseJSXAttributeName(),Me=null;return this.matchJSX("=")&&(this.expectJSX("="),Me=this.parseJSXAttributeValue()),this.finalize(O,new Ge.JSXAttribute(te,Me))},T.prototype.parseJSXSpreadAttribute=function(){var O=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var te=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(O,new Ge.JSXSpreadAttribute(te))},T.prototype.parseJSXAttributes=function(){for(var O=[];!this.matchJSX("/")&&!this.matchJSX(">");){var te=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();O.push(te)}return O},T.prototype.parseJSXOpeningElement=function(){var O=this.createJSXNode();this.expectJSX("<");var te=this.parseJSXElementName(),Me=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(te,Je,Me))},T.prototype.parseJSXBoundaryElement=function(){var O=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var te=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(O,new Ge.JSXClosingElement(te))}var Me=this.parseJSXElementName(),Je=this.parseJSXAttributes(),kt=this.matchJSX("/");return kt&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(O,new Ge.JSXOpeningElement(Me,kt,Je))},T.prototype.parseJSXEmptyExpression=function(){var O=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(O,new Ge.JSXEmptyExpression)},T.prototype.parseJSXExpressionContainer=function(){var te,O=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(te=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),te=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(O,new Ge.JSXExpressionContainer(te))},T.prototype.parseJSXChildren=function(){for(var O=[];!this.scanner.eof();){var te=this.createJSXChildNode(),Me=this.nextJSXText();if(Me.start0))break;jt=this.finalize(O.node,new Ge.JSXElement(O.opening,O.children,O.closing)),(O=te[te.length-1]).children.push(jt),te.pop()}}return O},T.prototype.parseJSXElement=function(){var O=this.createJSXNode(),te=this.parseJSXOpeningElement(),Me=[],Je=null;if(!te.selfClosing){var kt=this.parseComplexJSXElement({node:O,opening:te,closing:Je,children:Me});Me=kt.children,Je=kt.closing}return this.finalize(O,new Ge.JSXElement(te,Me,Je))},T.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var O=this.parseJSXElement();return this.finishJSX(),O},T.prototype.isStartOfExpression=function(){return D.prototype.isStartOfExpression.call(this)||this.match("<")},T}(Ve.Parser);De.JSXParser=ae},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};De.Character={fromCodePoint:function(Oe){return Oe<65536?String.fromCharCode(Oe):String.fromCharCode(55296+(Oe-65536>>10))+String.fromCharCode(56320+(Oe-65536&1023))},isWhiteSpace:function(Oe){return 32===Oe||9===Oe||11===Oe||12===Oe||160===Oe||Oe>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Oe)>=0},isLineTerminator:function(Oe){return 10===Oe||13===Oe||8232===Oe||8233===Oe},isIdentifierStart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||92===Oe||Oe>=128&&rt.NonAsciiIdentifierStart.test(De.Character.fromCodePoint(Oe))},isIdentifierPart:function(Oe){return 36===Oe||95===Oe||Oe>=65&&Oe<=90||Oe>=97&&Oe<=122||Oe>=48&&Oe<=57||92===Oe||Oe>=128&&rt.NonAsciiIdentifierPart.test(De.Character.fromCodePoint(Oe))},isDecimalDigit:function(Oe){return Oe>=48&&Oe<=57},isHexDigit:function(Oe){return Oe>=48&&Oe<=57||Oe>=65&&Oe<=70||Oe>=97&&Oe<=102},isOctalDigit:function(Oe){return Oe>=48&&Oe<=55}}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(6);De.JSXClosingElement=function O(te){this.type=Oe.JSXSyntax.JSXClosingElement,this.name=te},De.JSXElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXElement,this.openingElement=te,this.children=Me,this.closingElement=Je},De.JSXEmptyExpression=function O(){this.type=Oe.JSXSyntax.JSXEmptyExpression},De.JSXExpressionContainer=function O(te){this.type=Oe.JSXSyntax.JSXExpressionContainer,this.expression=te},De.JSXIdentifier=function O(te){this.type=Oe.JSXSyntax.JSXIdentifier,this.name=te},De.JSXMemberExpression=function O(te,Me){this.type=Oe.JSXSyntax.JSXMemberExpression,this.object=te,this.property=Me},De.JSXAttribute=function O(te,Me){this.type=Oe.JSXSyntax.JSXAttribute,this.name=te,this.value=Me},De.JSXNamespacedName=function O(te,Me){this.type=Oe.JSXSyntax.JSXNamespacedName,this.namespace=te,this.name=Me},De.JSXOpeningElement=function O(te,Me,Je){this.type=Oe.JSXSyntax.JSXOpeningElement,this.name=te,this.selfClosing=Me,this.attributes=Je},De.JSXSpreadAttribute=function O(te){this.type=Oe.JSXSyntax.JSXSpreadAttribute,this.argument=te},De.JSXText=function O(te,Me){this.type=Oe.JSXSyntax.JSXText,this.value=te,this.raw=Me}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(2);De.ArrayExpression=function We(Xe){this.type=Oe.Syntax.ArrayExpression,this.elements=Xe},De.ArrayPattern=function We(Xe){this.type=Oe.Syntax.ArrayPattern,this.elements=Xe},De.ArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!1},De.AssignmentExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.AssignmentExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.AssignmentPattern=function We(Xe,bt){this.type=Oe.Syntax.AssignmentPattern,this.left=Xe,this.right=bt},De.AsyncArrowFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ArrowFunctionExpression,this.id=null,this.params=Xe,this.body=bt,this.generator=!1,this.expression=Cn,this.async=!0},De.AsyncFunctionDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AsyncFunctionExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=!1,this.expression=!1,this.async=!0},De.AwaitExpression=function We(Xe){this.type=Oe.Syntax.AwaitExpression,this.argument=Xe},De.BinaryExpression=function We(Xe,bt,Cn){this.type="||"===Xe||"&&"===Xe?Oe.Syntax.LogicalExpression:Oe.Syntax.BinaryExpression,this.operator=Xe,this.left=bt,this.right=Cn},De.BlockStatement=function We(Xe){this.type=Oe.Syntax.BlockStatement,this.body=Xe},De.BreakStatement=function We(Xe){this.type=Oe.Syntax.BreakStatement,this.label=Xe},De.CallExpression=function We(Xe,bt){this.type=Oe.Syntax.CallExpression,this.callee=Xe,this.arguments=bt},De.CatchClause=function We(Xe,bt){this.type=Oe.Syntax.CatchClause,this.param=Xe,this.body=bt},De.ClassBody=function We(Xe){this.type=Oe.Syntax.ClassBody,this.body=Xe},De.ClassDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassDeclaration,this.id=Xe,this.superClass=bt,this.body=Cn},De.ClassExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ClassExpression,this.id=Xe,this.superClass=bt,this.body=Cn},De.ComputedMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!0,this.object=Xe,this.property=bt},De.ConditionalExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.ConditionalExpression,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ContinueStatement=function We(Xe){this.type=Oe.Syntax.ContinueStatement,this.label=Xe},De.DebuggerStatement=function We(){this.type=Oe.Syntax.DebuggerStatement},De.Directive=function We(Xe,bt){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe,this.directive=bt},De.DoWhileStatement=function We(Xe,bt){this.type=Oe.Syntax.DoWhileStatement,this.body=Xe,this.test=bt},De.EmptyStatement=function We(){this.type=Oe.Syntax.EmptyStatement},De.ExportAllDeclaration=function We(Xe){this.type=Oe.Syntax.ExportAllDeclaration,this.source=Xe},De.ExportDefaultDeclaration=function We(Xe){this.type=Oe.Syntax.ExportDefaultDeclaration,this.declaration=Xe},De.ExportNamedDeclaration=function We(Xe,bt,Cn){this.type=Oe.Syntax.ExportNamedDeclaration,this.declaration=Xe,this.specifiers=bt,this.source=Cn},De.ExportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ExportSpecifier,this.exported=bt,this.local=Xe},De.ExpressionStatement=function We(Xe){this.type=Oe.Syntax.ExpressionStatement,this.expression=Xe},De.ForInStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForInStatement,this.left=Xe,this.right=bt,this.body=Cn,this.each=!1},De.ForOfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.ForOfStatement,this.left=Xe,this.right=bt,this.body=Cn},De.ForStatement=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.ForStatement,this.init=Xe,this.test=bt,this.update=Cn,this.body=jr},De.FunctionDeclaration=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionDeclaration,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.FunctionExpression=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.FunctionExpression,this.id=Xe,this.params=bt,this.body=Cn,this.generator=jr,this.expression=!1,this.async=!1},De.Identifier=function We(Xe){this.type=Oe.Syntax.Identifier,this.name=Xe},De.IfStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.IfStatement,this.test=Xe,this.consequent=bt,this.alternate=Cn},De.ImportDeclaration=function We(Xe,bt){this.type=Oe.Syntax.ImportDeclaration,this.specifiers=Xe,this.source=bt},De.ImportDefaultSpecifier=function We(Xe){this.type=Oe.Syntax.ImportDefaultSpecifier,this.local=Xe},De.ImportNamespaceSpecifier=function We(Xe){this.type=Oe.Syntax.ImportNamespaceSpecifier,this.local=Xe},De.ImportSpecifier=function We(Xe,bt){this.type=Oe.Syntax.ImportSpecifier,this.local=Xe,this.imported=bt},De.LabeledStatement=function We(Xe,bt){this.type=Oe.Syntax.LabeledStatement,this.label=Xe,this.body=bt},De.Literal=function We(Xe,bt){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt},De.MetaProperty=function We(Xe,bt){this.type=Oe.Syntax.MetaProperty,this.meta=Xe,this.property=bt},De.MethodDefinition=function We(Xe,bt,Cn,jr,Y0){this.type=Oe.Syntax.MethodDefinition,this.key=Xe,this.computed=bt,this.value=Cn,this.kind=jr,this.static=Y0},De.Module=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="module"},De.NewExpression=function We(Xe,bt){this.type=Oe.Syntax.NewExpression,this.callee=Xe,this.arguments=bt},De.ObjectExpression=function We(Xe){this.type=Oe.Syntax.ObjectExpression,this.properties=Xe},De.ObjectPattern=function We(Xe){this.type=Oe.Syntax.ObjectPattern,this.properties=Xe},De.Property=function We(Xe,bt,Cn,jr,Y0,Gi){this.type=Oe.Syntax.Property,this.key=bt,this.computed=Cn,this.value=jr,this.kind=Xe,this.method=Y0,this.shorthand=Gi},De.RegexLiteral=function We(Xe,bt,Cn,jr){this.type=Oe.Syntax.Literal,this.value=Xe,this.raw=bt,this.regex={pattern:Cn,flags:jr}},De.RestElement=function We(Xe){this.type=Oe.Syntax.RestElement,this.argument=Xe},De.ReturnStatement=function We(Xe){this.type=Oe.Syntax.ReturnStatement,this.argument=Xe},De.Script=function We(Xe){this.type=Oe.Syntax.Program,this.body=Xe,this.sourceType="script"},De.SequenceExpression=function We(Xe){this.type=Oe.Syntax.SequenceExpression,this.expressions=Xe},De.SpreadElement=function We(Xe){this.type=Oe.Syntax.SpreadElement,this.argument=Xe},De.StaticMemberExpression=function We(Xe,bt){this.type=Oe.Syntax.MemberExpression,this.computed=!1,this.object=Xe,this.property=bt},De.Super=function We(){this.type=Oe.Syntax.Super},De.SwitchCase=function We(Xe,bt){this.type=Oe.Syntax.SwitchCase,this.test=Xe,this.consequent=bt},De.SwitchStatement=function We(Xe,bt){this.type=Oe.Syntax.SwitchStatement,this.discriminant=Xe,this.cases=bt},De.TaggedTemplateExpression=function We(Xe,bt){this.type=Oe.Syntax.TaggedTemplateExpression,this.tag=Xe,this.quasi=bt},De.TemplateElement=function We(Xe,bt){this.type=Oe.Syntax.TemplateElement,this.value=Xe,this.tail=bt},De.TemplateLiteral=function We(Xe,bt){this.type=Oe.Syntax.TemplateLiteral,this.quasis=Xe,this.expressions=bt},De.ThisExpression=function We(){this.type=Oe.Syntax.ThisExpression},De.ThrowStatement=function We(Xe){this.type=Oe.Syntax.ThrowStatement,this.argument=Xe},De.TryStatement=function We(Xe,bt,Cn){this.type=Oe.Syntax.TryStatement,this.block=Xe,this.handler=bt,this.finalizer=Cn},De.UnaryExpression=function We(Xe,bt){this.type=Oe.Syntax.UnaryExpression,this.operator=Xe,this.argument=bt,this.prefix=!0},De.UpdateExpression=function We(Xe,bt,Cn){this.type=Oe.Syntax.UpdateExpression,this.operator=Xe,this.argument=bt,this.prefix=Cn},De.VariableDeclaration=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclaration,this.declarations=Xe,this.kind=bt},De.VariableDeclarator=function We(Xe,bt){this.type=Oe.Syntax.VariableDeclarator,this.id=Xe,this.init=bt},De.WhileStatement=function We(Xe,bt){this.type=Oe.Syntax.WhileStatement,this.test=Xe,this.body=bt},De.WithStatement=function We(Xe,bt){this.type=Oe.Syntax.WithStatement,this.object=Xe,this.body=bt},De.YieldExpression=function We(Xe,bt){this.type=Oe.Syntax.YieldExpression,this.argument=Xe,this.delegate=bt}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(10),Ge=rt(11),_e=rt(7),et=rt(12),Ve=rt(2),ve=rt(13),se="ArrowParameterPlaceHolder",ue=function(){function ae(D,T,O){void 0===T&&(T={}),this.config={range:"boolean"==typeof T.range&&T.range,loc:"boolean"==typeof T.loc&&T.loc,source:null,tokens:"boolean"==typeof T.tokens&&T.tokens,comment:"boolean"==typeof T.comment&&T.comment,tolerant:"boolean"==typeof T.tolerant&&T.tolerant},this.config.loc&&T.source&&null!==T.source&&(this.config.source=String(T.source)),this.delegate=O,this.errorHandler=new dt.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new et.Scanner(D,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return ae.prototype.throwError=function(D){for(var T=[],O=1;O0&&this.delegate)for(var T=0;T>="===D||">>>="===D||"&="===D||"^="===D||"|="===D},ae.prototype.isolateCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=T,this.context.isAssignmentTarget=O,this.context.firstCoverInitializedNameError=te,Me},ae.prototype.inheritCoverGrammar=function(D){var T=this.context.isBindingElement,O=this.context.isAssignmentTarget,te=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Me=D.call(this);return this.context.isBindingElement=this.context.isBindingElement&&T,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&O,this.context.firstCoverInitializedNameError=te||this.context.firstCoverInitializedNameError,Me},ae.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},ae.prototype.parsePrimaryExpression=function(){var T,O,te,D=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),T=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(D,new _e.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(O.value,te));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal("true"===O.value,te));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,O=this.nextToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.Literal(null,te));break;case 10:T=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,T=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":T=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":T=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,O=this.nextRegexToken(),te=this.getTokenRaw(O),T=this.finalize(D,new _e.RegexLiteral(O.regex,te,O.pattern,O.flags));break;default:T=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?T=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?T=this.finalize(D,new _e.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?T=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),T=this.finalize(D,new _e.ThisExpression)):T=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:T=this.throwUnexpectedToken(this.nextToken())}return T},ae.prototype.parseSpreadElement=function(){var D=this.createNode();this.expect("...");var T=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(D,new _e.SpreadElement(T))},ae.prototype.parseArrayInitializer=function(){var D=this.createNode(),T=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),T.push(null);else if(this.match("...")){var O=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),T.push(O)}else T.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(D,new _e.ArrayExpression(T))},ae.prototype.parsePropertyMethod=function(D){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var T=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=D.simple;var te=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&D.firstRestricted&&this.tolerateUnexpectedToken(D.firstRestricted,D.message),this.context.strict&&D.stricted&&this.tolerateUnexpectedToken(D.stricted,D.message),this.context.strict=T,this.context.allowStrictDirective=O,te},ae.prototype.parsePropertyMethodFunction=function(){var T=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(T,new _e.FunctionExpression(null,te.params,Me,!1))},ae.prototype.parsePropertyMethodAsyncFunction=function(){var D=this.createNode(),T=this.context.allowYield,O=this.context.await;this.context.allowYield=!1,this.context.await=!0;var te=this.parseFormalParameters(),Me=this.parsePropertyMethod(te);return this.context.allowYield=T,this.context.await=O,this.finalize(D,new _e.AsyncFunctionExpression(null,te.params,Me))},ae.prototype.parseObjectPropertyKey=function(){var O,D=this.createNode(),T=this.nextToken();switch(T.type){case 8:case 6:this.context.strict&&T.octal&&this.tolerateUnexpectedToken(T,Ge.Messages.StrictOctalLiteral);var te=this.getTokenRaw(T);O=this.finalize(D,new _e.Literal(T.value,te));break;case 3:case 1:case 5:case 4:O=this.finalize(D,new _e.Identifier(T.value));break;case 7:"["===T.value?(O=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):O=this.throwUnexpectedToken(T);break;default:O=this.throwUnexpectedToken(T)}return O},ae.prototype.isPropertyKey=function(D,T){return D.type===Ve.Syntax.Identifier&&D.name===T||D.type===Ve.Syntax.Literal&&D.value===T},ae.prototype.parseObjectProperty=function(D){var te,T=this.createNode(),O=this.lookahead,Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(3===O.type){var rn=O.value;this.nextToken(),kt=this.match("["),Me=(wn=!(this.hasLineTerminator||"async"!==rn||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(T,new _e.Identifier(rn))}else this.match("*")?this.nextToken():(kt=this.match("["),Me=this.parseObjectPropertyKey());var Mi=this.qualifiedPropertyName(this.lookahead);if(3===O.type&&!wn&&"get"===O.value&&Mi)te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===O.type&&!wn&&"set"===O.value&&Mi)te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===O.type&&"*"===O.value&&Mi)te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0;else if(Me||this.throwUnexpectedToken(this.lookahead),te="init",this.match(":")&&!wn)!kt&&this.isPropertyKey(Me,"__proto__")&&(D.value&&this.tolerateError(Ge.Messages.DuplicateProtoProperty),D.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0;else if(3===O.type)if(rn=this.finalize(T,new _e.Identifier(O.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Wt=!0;var zr=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(T,new _e.AssignmentPattern(rn,zr))}else Wt=!0,Je=rn;else this.throwUnexpectedToken(this.nextToken());return this.finalize(T,new _e.Property(te,Me,kt,Je,jt,Wt))},ae.prototype.parseObjectInitializer=function(){var D=this.createNode();this.expect("{");for(var T=[],O={value:!1};!this.match("}");)T.push(this.parseObjectProperty(O)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(D,new _e.ObjectExpression(T))},ae.prototype.parseTemplateHead=function(){Oe.assert(this.lookahead.head,"Template literal must start with a template head");var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var D=this.createNode(),T=this.nextToken();return this.finalize(D,new _e.TemplateElement({raw:T.value,cooked:T.cooked},T.tail))},ae.prototype.parseTemplateLiteral=function(){var D=this.createNode(),T=[],O=[],te=this.parseTemplateHead();for(O.push(te);!te.tail;)T.push(this.parseExpression()),te=this.parseTemplateElement(),O.push(te);return this.finalize(D,new _e.TemplateLiteral(O,T))},ae.prototype.reinterpretExpressionAsPattern=function(D){switch(D.type){case Ve.Syntax.Identifier:case Ve.Syntax.MemberExpression:case Ve.Syntax.RestElement:case Ve.Syntax.AssignmentPattern:break;case Ve.Syntax.SpreadElement:D.type=Ve.Syntax.RestElement,this.reinterpretExpressionAsPattern(D.argument);break;case Ve.Syntax.ArrayExpression:D.type=Ve.Syntax.ArrayPattern;for(var T=0;T")||this.expect("=>"),D={type:se,params:[],async:!1};else{var T=this.lookahead,O=[];if(this.match("..."))D=this.parseRestElement(O),this.expect(")"),this.match("=>")||this.expect("=>"),D={type:se,params:[D],async:!1};else{var te=!1;if(this.context.isBindingElement=!0,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Me=[];for(this.context.isAssignmentTarget=!1,Me.push(D);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(D.type===Ve.Syntax.Identifier&&"yield"===D.name&&(te=!0,D={type:se,params:[D],async:!1}),!te)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),D.type===Ve.Syntax.SequenceExpression)for(Je=0;Je")){for(var jt=0;jt0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Me=[D,this.lookahead],Je=T,kt=this.isolateCoverGrammar(this.parseExponentiationExpression),jt=[Je,O.value,kt],Wt=[te];!((te=this.binaryPrecedence(this.lookahead))<=0);){for(;jt.length>2&&te<=Wt[Wt.length-1];){kt=jt.pop();var wn=jt.pop();Wt.pop(),Je=jt.pop(),Me.pop();var rn=this.startNode(Me[Me.length-1]);jt.push(this.finalize(rn,new _e.BinaryExpression(wn,Je,kt)))}jt.push(this.nextToken().value),Wt.push(te),Me.push(this.lookahead),jt.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Mi=jt.length-1;T=jt[Mi];for(var zr=Me.pop();Mi>1;){var Xr=Me.pop();rn=this.startNode(Xr,zr&&zr.lineStart),T=this.finalize(rn,new _e.BinaryExpression(wn=jt[Mi-1],jt[Mi-2],T)),Mi-=2,zr=Xr}}return T},ae.prototype.parseConditionalExpression=function(){var D=this.lookahead,T=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var O=this.context.allowIn;this.context.allowIn=!0;var te=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=O,this.expect(":");var Me=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(D),new _e.ConditionalExpression(T,te,Me)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return T},ae.prototype.checkPatternParam=function(D,T){switch(T.type){case Ve.Syntax.Identifier:this.validateParam(D,T,T.name);break;case Ve.Syntax.RestElement:this.checkPatternParam(D,T.argument);break;case Ve.Syntax.AssignmentPattern:this.checkPatternParam(D,T.left);break;case Ve.Syntax.ArrayPattern:for(var O=0;O")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Me=D.async,Je=this.reinterpretAsCoverFormalsList(D);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var kt=this.context.strict,jt=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Wt=this.context.allowYield,wn=this.context.await;this.context.allowYield=!0,this.context.await=Me;var rn=this.startNode(T);this.expect("=>");var Mi=void 0;if(this.match("{")){var zr=this.context.allowIn;this.context.allowIn=!0,Mi=this.parseFunctionSourceElements(),this.context.allowIn=zr}else Mi=this.isolateCoverGrammar(this.parseAssignmentExpression);var Xr=Mi.type!==Ve.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),D=this.finalize(rn,Me?new _e.AsyncArrowFunctionExpression(Je.params,Mi,Xr):new _e.ArrowFunctionExpression(Je.params,Mi,Xr)),this.context.strict=kt,this.context.allowStrictDirective=jt,this.context.allowYield=Wt,this.context.await=wn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Ge.Messages.InvalidLHSInAssignment),this.context.strict&&D.type===Ve.Syntax.Identifier){var hs=D;this.scanner.isRestrictedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(hs.name)&&this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(D):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(O=this.nextToken()).value,tr=this.isolateCoverGrammar(this.parseAssignmentExpression);D=this.finalize(this.startNode(T),new _e.AssignmentExpression(Ya,D,tr)),this.context.firstCoverInitializedNameError=null}}return D},ae.prototype.parseExpression=function(){var D=this.lookahead,T=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var O=[];for(O.push(T);2!==this.lookahead.type&&this.match(",");)this.nextToken(),O.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(D),new _e.SequenceExpression(O))}return T},ae.prototype.parseStatementListItem=function(){var D;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalExportDeclaration),D=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.IllegalImportDeclaration),D=this.parseImportDeclaration();break;case"const":D=this.parseLexicalDeclaration({inFor:!1});break;case"function":D=this.parseFunctionDeclaration();break;case"class":D=this.parseClassDeclaration();break;case"let":D=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:D=this.parseStatement()}else D=this.parseStatement();return D},ae.prototype.parseBlock=function(){var D=this.createNode();this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseStatementListItem());return this.expect("}"),this.finalize(D,new _e.BlockStatement(T))},ae.prototype.parseLexicalBinding=function(D,T){var O=this.createNode(),Me=this.parsePattern([],D);this.context.strict&&Me.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(Me.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Je=null;return"const"===D?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Ge.Messages.DeclarationMissingInitializer,"const")):(!T.inFor&&Me.type!==Ve.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(O,new _e.VariableDeclarator(Me,Je))},ae.prototype.parseBindingList=function(D,T){for(var O=[this.parseLexicalBinding(D,T)];this.match(",");)this.nextToken(),O.push(this.parseLexicalBinding(D,T));return O},ae.prototype.isLexicalDeclaration=function(){var D=this.scanner.saveState();this.scanner.scanComments();var T=this.scanner.lex();return this.scanner.restoreState(D),3===T.type||7===T.type&&"["===T.value||7===T.type&&"{"===T.value||4===T.type&&"let"===T.value||4===T.type&&"yield"===T.value},ae.prototype.parseLexicalDeclaration=function(D){var T=this.createNode(),O=this.nextToken().value;Oe.assert("let"===O||"const"===O,"Lexical declaration must be either let or const");var te=this.parseBindingList(O,D);return this.consumeSemicolon(),this.finalize(T,new _e.VariableDeclaration(te,O))},ae.prototype.parseBindingRestElement=function(D,T){var O=this.createNode();this.expect("...");var te=this.parsePattern(D,T);return this.finalize(O,new _e.RestElement(te))},ae.prototype.parseArrayPattern=function(D,T){var O=this.createNode();this.expect("[");for(var te=[];!this.match("]");)if(this.match(","))this.nextToken(),te.push(null);else{if(this.match("...")){te.push(this.parseBindingRestElement(D,T));break}te.push(this.parsePatternWithDefault(D,T)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(O,new _e.ArrayPattern(te))},ae.prototype.parsePropertyPattern=function(D,T){var kt,jt,O=this.createNode(),te=!1,Me=!1;if(3===this.lookahead.type){var Wt=this.lookahead;kt=this.parseVariableIdentifier();var wn=this.finalize(O,new _e.Identifier(Wt.value));if(this.match("=")){D.push(Wt),Me=!0,this.nextToken();var rn=this.parseAssignmentExpression();jt=this.finalize(this.startNode(Wt),new _e.AssignmentPattern(wn,rn))}else this.match(":")?(this.expect(":"),jt=this.parsePatternWithDefault(D,T)):(D.push(Wt),Me=!0,jt=wn)}else te=this.match("["),kt=this.parseObjectPropertyKey(),this.expect(":"),jt=this.parsePatternWithDefault(D,T);return this.finalize(O,new _e.Property("init",kt,te,jt,!1,Me))},ae.prototype.parseObjectPattern=function(D,T){var O=this.createNode(),te=[];for(this.expect("{");!this.match("}");)te.push(this.parsePropertyPattern(D,T)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(O,new _e.ObjectPattern(te))},ae.prototype.parsePattern=function(D,T){var O;return this.match("[")?O=this.parseArrayPattern(D,T):this.match("{")?O=this.parseObjectPattern(D,T):(this.matchKeyword("let")&&("const"===T||"let"===T)&&this.tolerateUnexpectedToken(this.lookahead,Ge.Messages.LetInLexicalBinding),D.push(this.lookahead),O=this.parseVariableIdentifier(T)),O},ae.prototype.parsePatternWithDefault=function(D,T){var O=this.lookahead,te=this.parsePattern(D,T);if(this.match("=")){this.nextToken();var Me=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Me,te=this.finalize(this.startNode(O),new _e.AssignmentPattern(te,Je))}return te},ae.prototype.parseVariableIdentifier=function(D){var T=this.createNode(),O=this.nextToken();return 4===O.type&&"yield"===O.value?this.context.strict?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(O):3!==O.type?this.context.strict&&4===O.type&&this.scanner.isStrictModeReservedWord(O.value)?this.tolerateUnexpectedToken(O,Ge.Messages.StrictReservedWord):(this.context.strict||"let"!==O.value||"var"!==D)&&this.throwUnexpectedToken(O):(this.context.isModule||this.context.await)&&3===O.type&&"await"===O.value&&this.tolerateUnexpectedToken(O),this.finalize(T,new _e.Identifier(O.value))},ae.prototype.parseVariableDeclaration=function(D){var T=this.createNode(),te=this.parsePattern([],"var");this.context.strict&&te.type===Ve.Syntax.Identifier&&this.scanner.isRestrictedWord(te.name)&&this.tolerateError(Ge.Messages.StrictVarName);var Me=null;return this.match("=")?(this.nextToken(),Me=this.isolateCoverGrammar(this.parseAssignmentExpression)):te.type!==Ve.Syntax.Identifier&&!D.inFor&&this.expect("="),this.finalize(T,new _e.VariableDeclarator(te,Me))},ae.prototype.parseVariableDeclarationList=function(D){var T={inFor:D.inFor},O=[];for(O.push(this.parseVariableDeclaration(T));this.match(",");)this.nextToken(),O.push(this.parseVariableDeclaration(T));return O},ae.prototype.parseVariableStatement=function(){var D=this.createNode();this.expectKeyword("var");var T=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(D,new _e.VariableDeclaration(T,"var"))},ae.prototype.parseEmptyStatement=function(){var D=this.createNode();return this.expect(";"),this.finalize(D,new _e.EmptyStatement)},ae.prototype.parseExpressionStatement=function(){var D=this.createNode(),T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ExpressionStatement(T))},ae.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Ge.Messages.StrictFunction),this.parseStatement()},ae.prototype.parseIfStatement=function(){var T,D=this.createNode(),O=null;this.expectKeyword("if"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),O=this.parseIfClause())),this.finalize(D,new _e.IfStatement(te,T,O))},ae.prototype.parseDoWhileStatement=function(){var D=this.createNode();this.expectKeyword("do");var T=this.context.inIteration;this.context.inIteration=!0;var O=this.parseStatement();this.context.inIteration=T,this.expectKeyword("while"),this.expect("(");var te=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(D,new _e.DoWhileStatement(O,te))},ae.prototype.parseWhileStatement=function(){var T,D=this.createNode();this.expectKeyword("while"),this.expect("(");var O=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var te=this.context.inIteration;this.context.inIteration=!0,T=this.parseStatement(),this.context.inIteration=te}return this.finalize(D,new _e.WhileStatement(O,T))},ae.prototype.parseForStatement=function(){var Me,Je,Xr,D=null,T=null,O=null,te=!0,kt=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){D=this.createNode(),this.nextToken();var jt=this.context.allowIn;this.context.allowIn=!1;var Wt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=jt,1===Wt.length&&this.matchKeyword("in")){var wn=Wt[0];wn.init&&(wn.id.type===Ve.Syntax.ArrayPattern||wn.id.type===Ve.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(Ge.Messages.ForInOfLoopInitializer,"for-in"),D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseExpression(),D=null}else 1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(D=this.finalize(D,new _e.VariableDeclaration(Wt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){D=this.createNode();var rn=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(jt=this.context.allowIn,this.context.allowIn=!1,Wt=this.parseBindingList(rn,{inFor:!0}),this.context.allowIn=jt,1===Wt.length&&null===Wt[0].init&&this.matchKeyword("in")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null):1===Wt.length&&null===Wt[0].init&&this.matchContextualKeyword("of")?(D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)),this.nextToken(),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1):(this.consumeSemicolon(),D=this.finalize(D,new _e.VariableDeclaration(Wt,rn)))):(D=this.finalize(D,new _e.Identifier(rn)),this.nextToken(),Me=D,Je=this.parseExpression(),D=null)}else{var Mi=this.lookahead;if(jt=this.context.allowIn,this.context.allowIn=!1,D=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=jt,this.matchKeyword("in"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseExpression(),D=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||D.type===Ve.Syntax.AssignmentExpression)&&this.tolerateError(Ge.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(D),Me=D,Je=this.parseAssignmentExpression(),D=null,te=!1;else{if(this.match(",")){for(var zr=[D];this.match(",");)this.nextToken(),zr.push(this.isolateCoverGrammar(this.parseAssignmentExpression));D=this.finalize(this.startNode(Mi),new _e.SequenceExpression(zr))}this.expect(";")}}if(typeof Me>"u"&&(this.match(";")||(T=this.parseExpression()),this.expect(";"),this.match(")")||(O=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Xr=this.finalize(this.createNode(),new _e.EmptyStatement);else{this.expect(")");var hs=this.context.inIteration;this.context.inIteration=!0,Xr=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=hs}return this.finalize(kt,typeof Me>"u"?new _e.ForStatement(D,T,O,Xr):te?new _e.ForInStatement(Me,Je,Xr):new _e.ForOfStatement(Me,Je,Xr))},ae.prototype.parseContinueStatement=function(){var D=this.createNode();this.expectKeyword("continue");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();T=O,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name)}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&this.throwError(Ge.Messages.IllegalContinue),this.finalize(D,new _e.ContinueStatement(T))},ae.prototype.parseBreakStatement=function(){var D=this.createNode();this.expectKeyword("break");var T=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var O=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+O.name)||this.throwError(Ge.Messages.UnknownLabel,O.name),T=O}return this.consumeSemicolon(),null===T&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(Ge.Messages.IllegalBreak),this.finalize(D,new _e.BreakStatement(T))},ae.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Ge.Messages.IllegalReturn);var D=this.createNode();this.expectKeyword("return");var O=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ReturnStatement(O))},ae.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Ge.Messages.StrictModeWith);var T,D=this.createNode();this.expectKeyword("with"),this.expect("(");var O=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),T=this.finalize(this.createNode(),new _e.EmptyStatement)):(this.expect(")"),T=this.parseStatement()),this.finalize(D,new _e.WithStatement(O,T))},ae.prototype.parseSwitchCase=function(){var T,D=this.createNode();this.matchKeyword("default")?(this.nextToken(),T=null):(this.expectKeyword("case"),T=this.parseExpression()),this.expect(":");for(var O=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)O.push(this.parseStatementListItem());return this.finalize(D,new _e.SwitchCase(T,O))},ae.prototype.parseSwitchStatement=function(){var D=this.createNode();this.expectKeyword("switch"),this.expect("(");var T=this.parseExpression();this.expect(")");var O=this.context.inSwitch;this.context.inSwitch=!0;var te=[],Me=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Me&&this.throwError(Ge.Messages.MultipleDefaultsInSwitch),Me=!0),te.push(Je)}return this.expect("}"),this.context.inSwitch=O,this.finalize(D,new _e.SwitchStatement(T,te))},ae.prototype.parseLabelledStatement=function(){var O,D=this.createNode(),T=this.parseExpression();if(T.type===Ve.Syntax.Identifier&&this.match(":")){this.nextToken();var te=T,Me="$"+te.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Me)&&this.throwError(Ge.Messages.Redeclaration,"Label",te.name),this.context.labelSet[Me]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var kt=this.lookahead,jt=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(kt,Ge.Messages.StrictFunction):jt.generator&&this.tolerateUnexpectedToken(kt,Ge.Messages.GeneratorInLegacyContext),Je=jt}else Je=this.parseStatement();delete this.context.labelSet[Me],O=new _e.LabeledStatement(te,Je)}else this.consumeSemicolon(),O=new _e.ExpressionStatement(T);return this.finalize(D,O)},ae.prototype.parseThrowStatement=function(){var D=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Ge.Messages.NewlineAfterThrow);var T=this.parseExpression();return this.consumeSemicolon(),this.finalize(D,new _e.ThrowStatement(T))},ae.prototype.parseCatchClause=function(){var D=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var T=[],O=this.parsePattern(T),te={},Me=0;Me0&&this.tolerateError(Ge.Messages.BadGetterArity);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseSetterMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();1!==te.params.length?this.tolerateError(Ge.Messages.BadSetterArity):te.params[0]instanceof _e.RestElement&&this.tolerateError(Ge.Messages.BadSetterRestParameter);var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,false))},ae.prototype.parseGeneratorMethod=function(){var D=this.createNode(),O=this.context.allowYield;this.context.allowYield=!0;var te=this.parseFormalParameters();this.context.allowYield=!1;var Me=this.parsePropertyMethod(te);return this.context.allowYield=O,this.finalize(D,new _e.FunctionExpression(null,te.params,Me,!0))},ae.prototype.isStartOfExpression=function(){var D=!0,T=this.lookahead.value;switch(this.lookahead.type){case 7:D="["===T||"("===T||"{"===T||"+"===T||"-"===T||"!"===T||"~"===T||"++"===T||"--"===T||"/"===T||"/="===T;break;case 4:D="class"===T||"delete"===T||"function"===T||"let"===T||"new"===T||"super"===T||"this"===T||"typeof"===T||"void"===T||"yield"===T}return D},ae.prototype.parseYieldExpression=function(){var D=this.createNode();this.expectKeyword("yield");var T=null,O=!1;if(!this.hasLineTerminator){var te=this.context.allowYield;this.context.allowYield=!1,(O=this.match("*"))?(this.nextToken(),T=this.parseAssignmentExpression()):this.isStartOfExpression()&&(T=this.parseAssignmentExpression()),this.context.allowYield=te}return this.finalize(D,new _e.YieldExpression(T,O))},ae.prototype.parseClassElement=function(D){var T=this.lookahead,O=this.createNode(),te="",Me=null,Je=null,kt=!1,jt=!1,Wt=!1,wn=!1;if(this.match("*"))this.nextToken();else if(kt=this.match("["),"static"===(Me=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(T=this.lookahead,Wt=!0,kt=this.match("["),this.match("*")?this.nextToken():Me=this.parseObjectPropertyKey()),3===T.type&&!this.hasLineTerminator&&"async"===T.value){var Mi=this.lookahead.value;":"!==Mi&&"("!==Mi&&"*"!==Mi&&(wn=!0,T=this.lookahead,Me=this.parseObjectPropertyKey(),3===T.type&&"constructor"===T.value&&this.tolerateUnexpectedToken(T,Ge.Messages.ConstructorIsAsync))}var zr=this.qualifiedPropertyName(this.lookahead);return 3===T.type?"get"===T.value&&zr?(te="get",kt=this.match("["),Me=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===T.value&&zr&&(te="set",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===T.type&&"*"===T.value&&zr&&(te="init",kt=this.match("["),Me=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),jt=!0),!te&&Me&&this.match("(")&&(te="init",Je=wn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),jt=!0),te||this.throwUnexpectedToken(this.lookahead),"init"===te&&(te="method"),kt||(Wt&&this.isPropertyKey(Me,"prototype")&&this.throwUnexpectedToken(T,Ge.Messages.StaticPrototype),!Wt&&this.isPropertyKey(Me,"constructor")&&(("method"!==te||!jt||Je&&Je.generator)&&this.throwUnexpectedToken(T,Ge.Messages.ConstructorSpecialMethod),D.value?this.throwUnexpectedToken(T,Ge.Messages.DuplicateConstructor):D.value=!0,te="constructor")),this.finalize(O,new _e.MethodDefinition(Me,kt,Je,te,Wt))},ae.prototype.parseClassElementList=function(){var D=[],T={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():D.push(this.parseClassElement(T));return this.expect("}"),D},ae.prototype.parseClassBody=function(){var D=this.createNode(),T=this.parseClassElementList();return this.finalize(D,new _e.ClassBody(T))},ae.prototype.parseClassDeclaration=function(D){var T=this.createNode(),O=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var te=D&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Me=null;this.matchKeyword("extends")&&(this.nextToken(),Me=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=O,this.finalize(T,new _e.ClassDeclaration(te,Me,Je))},ae.prototype.parseClassExpression=function(){var D=this.createNode(),T=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var O=3===this.lookahead.type?this.parseVariableIdentifier():null,te=null;this.matchKeyword("extends")&&(this.nextToken(),te=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Me=this.parseClassBody();return this.context.strict=T,this.finalize(D,new _e.ClassExpression(O,te,Me))},ae.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Module(T))},ae.prototype.parseScript=function(){for(var D=this.createNode(),T=this.parseDirectivePrologues();2!==this.lookahead.type;)T.push(this.parseStatementListItem());return this.finalize(D,new _e.Script(T))},ae.prototype.parseModuleSpecifier=function(){var D=this.createNode();8!==this.lookahead.type&&this.throwError(Ge.Messages.InvalidModuleSpecifier);var T=this.nextToken(),O=this.getTokenRaw(T);return this.finalize(D,new _e.Literal(T.value,O))},ae.prototype.parseImportSpecifier=function(){var T,O,D=this.createNode();return 3===this.lookahead.type?(O=T=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseVariableIdentifier())):(O=T=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),O=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(D,new _e.ImportSpecifier(O,T))},ae.prototype.parseNamedImports=function(){this.expect("{");for(var D=[];!this.match("}");)D.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),D},ae.prototype.parseImportDefaultSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName();return this.finalize(D,new _e.ImportDefaultSpecifier(T))},ae.prototype.parseImportNamespaceSpecifier=function(){var D=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Ge.Messages.NoAsAfterImportNamespace),this.nextToken();var T=this.parseIdentifierName();return this.finalize(D,new _e.ImportNamespaceSpecifier(T))},ae.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalImportDeclaration);var D=this.createNode();this.expectKeyword("import");var T,O=[];return 8===this.lookahead.type||(this.match("{")?O=O.concat(this.parseNamedImports()):this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(O.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?O.push(this.parseImportNamespaceSpecifier()):this.match("{")?O=O.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),T=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(D,new _e.ImportDeclaration(O,T))},ae.prototype.parseExportSpecifier=function(){var D=this.createNode(),T=this.parseIdentifierName(),O=T;return this.matchContextualKeyword("as")&&(this.nextToken(),O=this.parseIdentifierName()),this.finalize(D,new _e.ExportSpecifier(T,O))},ae.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Ge.Messages.IllegalExportDeclaration);var T,D=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var O=this.parseFunctionDeclaration(!0);T=this.finalize(D,new _e.ExportDefaultDeclaration(O))}else this.matchKeyword("class")?(O=this.parseClassDeclaration(!0),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):this.matchContextualKeyword("async")?(O=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O))):(this.matchContextualKeyword("from")&&this.throwError(Ge.Messages.UnexpectedToken,this.lookahead.value),O=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),T=this.finalize(D,new _e.ExportDefaultDeclaration(O)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Me=this.parseModuleSpecifier();this.consumeSemicolon(),T=this.finalize(D,new _e.ExportAllDeclaration(Me))}else if(4===this.lookahead.type){switch(O=void 0,this.lookahead.value){case"let":case"const":O=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":O=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null))}else if(this.matchAsyncFunction())O=this.parseFunctionDeclaration(),T=this.finalize(D,new _e.ExportNamedDeclaration(O,[],null));else{var Je=[],kt=null,jt=!1;for(this.expect("{");!this.match("}");)jt=jt||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),kt=this.parseModuleSpecifier(),this.consumeSemicolon()):jt?this.throwError(this.lookahead.value?Ge.Messages.UnexpectedToken:Ge.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),T=this.finalize(D,new _e.ExportNamedDeclaration(null,Je,kt))}return T},ae}();De.Parser=ue},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.assert=function rt(Oe,dt){if(!Oe)throw new Error("ASSERT: "+dt)}},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var rt=function(){function Oe(){this.errors=[],this.tolerant=!1}return Oe.prototype.recordError=function(dt){this.errors.push(dt)},Oe.prototype.tolerate=function(dt){if(!this.tolerant)throw dt;this.recordError(dt)},Oe.prototype.constructError=function(dt,Ge){var _e=new Error(dt);try{throw _e}catch(et){Object.create&&Object.defineProperty&&(_e=Object.create(et),Object.defineProperty(_e,"column",{value:Ge}))}return _e},Oe.prototype.createError=function(dt,Ge,_e,et){var ve=this.constructError("Line "+Ge+": "+et,_e);return ve.index=dt,ve.lineNumber=Ge,ve.description=et,ve},Oe.prototype.throwError=function(dt,Ge,_e,et){throw this.createError(dt,Ge,_e,et)},Oe.prototype.tolerateError=function(dt,Ge,_e,et){var Ve=this.createError(dt,Ge,_e,et);if(!this.tolerant)throw Ve;this.recordError(Ve)},Oe}();De.ErrorHandler=rt},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(9),dt=rt(4),Ge=rt(11);function _e(ve){return"0123456789abcdef".indexOf(ve.toLowerCase())}function et(ve){return"01234567".indexOf(ve)}var Ve=function(){function ve(se,ue){this.source=se,this.errorHandler=ue,this.trackComment=!1,this.isModule=!1,this.length=se.length,this.index=0,this.lineNumber=se.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ve.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ve.prototype.restoreState=function(se){this.index=se.index,this.lineNumber=se.lineNumber,this.lineStart=se.lineStart},ve.prototype.eof=function(){return this.index>=this.length},ve.prototype.throwUnexpectedToken=function(se){return void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.tolerateUnexpectedToken=function(se){void 0===se&&(se=Ge.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,se)},ve.prototype.skipSingleLineComment=function(se){var ae,D,ue=[];for(this.trackComment&&(ue=[],ae=this.index-se,D={start:{line:this.lineNumber,column:this.index-this.lineStart-se},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(++this.index,dt.Character.isLineTerminator(T))return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart-1},ue.push({multiLine:!1,slice:[ae+se,this.index-1],range:[ae,this.index-1],loc:D})),13===T&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue}return this.trackComment&&(D.end={line:this.lineNumber,column:this.index-this.lineStart},ue.push({multiLine:!1,slice:[ae+se,this.index],range:[ae,this.index],loc:D})),ue},ve.prototype.skipMultiLineComment=function(){var ue,ae,se=[];for(this.trackComment&&(se=[],ue=this.index-2,ae={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var D=this.source.charCodeAt(this.index);if(dt.Character.isLineTerminator(D))13===D&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===D){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index-2],range:[ue,this.index],loc:ae})),se;++this.index}else++this.index}return this.trackComment&&(ae.end={line:this.lineNumber,column:this.index-this.lineStart},se.push({multiLine:!0,slice:[ue+2,this.index],range:[ue,this.index],loc:ae})),this.tolerateUnexpectedToken(),se},ve.prototype.scanComments=function(){var se;this.trackComment&&(se=[]);for(var ue=0===this.index;!this.eof();){var ae=this.source.charCodeAt(this.index);if(dt.Character.isWhiteSpace(ae))++this.index;else if(dt.Character.isLineTerminator(ae))++this.index,13===ae&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ue=!0;else if(47===ae)if(47===(ae=this.source.charCodeAt(this.index+1))){this.index+=2;var D=this.skipSingleLineComment(2);this.trackComment&&(se=se.concat(D)),ue=!0}else{if(42!==ae)break;this.index+=2,D=this.skipMultiLineComment(),this.trackComment&&(se=se.concat(D))}else if(ue&&45===ae){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,D=this.skipSingleLineComment(3),this.trackComment&&(se=se.concat(D))}else{if(60!==ae||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,D=this.skipSingleLineComment(4),this.trackComment&&(se=se.concat(D))}}return se},ve.prototype.isFutureReservedWord=function(se){switch(se){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ve.prototype.isStrictModeReservedWord=function(se){switch(se){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ve.prototype.isRestrictedWord=function(se){return"eval"===se||"arguments"===se},ve.prototype.isKeyword=function(se){switch(se.length){case 2:return"if"===se||"in"===se||"do"===se;case 3:return"var"===se||"for"===se||"new"===se||"try"===se||"let"===se;case 4:return"this"===se||"else"===se||"case"===se||"void"===se||"with"===se||"enum"===se;case 5:return"while"===se||"break"===se||"catch"===se||"throw"===se||"const"===se||"yield"===se||"class"===se||"super"===se;case 6:return"return"===se||"typeof"===se||"delete"===se||"switch"===se||"export"===se||"import"===se;case 7:return"default"===se||"finally"===se||"extends"===se;case 8:return"function"===se||"continue"===se||"debugger"===se;case 10:return"instanceof"===se;default:return!1}},ve.prototype.codePointAt=function(se){var ue=this.source.charCodeAt(se);if(ue>=55296&&ue<=56319){var ae=this.source.charCodeAt(se+1);ae>=56320&&ae<=57343&&(ue=1024*(ue-55296)+ae-56320+65536)}return ue},ve.prototype.scanHexEscape=function(se){for(var ue="u"===se?4:2,ae=0,D=0;D1114111||"}"!==se)&&this.throwUnexpectedToken(),dt.Character.fromCodePoint(ue)},ve.prototype.getIdentifier=function(){for(var se=this.index++;!this.eof();){var ue=this.source.charCodeAt(this.index);if(92===ue)return this.index=se,this.getComplexIdentifier();if(ue>=55296&&ue<57343)return this.index=se,this.getComplexIdentifier();if(!dt.Character.isIdentifierPart(ue))break;++this.index}return this.source.slice(se,this.index)},ve.prototype.getComplexIdentifier=function(){var ae,se=this.codePointAt(this.index),ue=dt.Character.fromCodePoint(se);for(this.index+=ue.length,92===se&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierStart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue=ae);!this.eof()&&(se=this.codePointAt(this.index),dt.Character.isIdentifierPart(se));)ue+=ae=dt.Character.fromCodePoint(se),this.index+=ae.length,92===se&&(ue=ue.substr(0,ue.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,ae=this.scanUnicodeCodePointEscape()):(null===(ae=this.scanHexEscape("u"))||"\\"===ae||!dt.Character.isIdentifierPart(ae.charCodeAt(0)))&&this.throwUnexpectedToken(),ue+=ae);return ue},ve.prototype.octalToDecimal=function(se){var ue="0"!==se,ae=et(se);return!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ue=!0,ae=8*ae+et(this.source[this.index++]),"0123".indexOf(se)>=0&&!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ae=8*ae+et(this.source[this.index++]))),{code:ae,octal:ue}},ve.prototype.scanIdentifier=function(){var se,ue=this.index,ae=92===this.source.charCodeAt(ue)?this.getComplexIdentifier():this.getIdentifier();if(3!=(se=1===ae.length?3:this.isKeyword(ae)?4:"null"===ae?5:"true"===ae||"false"===ae?1:3)&&ue+ae.length!==this.index){var D=this.index;this.index=ue,this.tolerateUnexpectedToken(Ge.Messages.InvalidEscapedReservedWord),this.index=D}return{type:se,value:ae,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.scanPunctuator=function(){var se=this.index,ue=this.source[this.index];switch(ue){case"(":case"{":"{"===ue&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ue="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ue=this.source.substr(this.index,4))?this.index+=4:"==="===(ue=ue.substr(0,3))||"!=="===ue||">>>"===ue||"<<="===ue||">>="===ue||"**="===ue?this.index+=3:"&&"===(ue=ue.substr(0,2))||"||"===ue||"=="===ue||"!="===ue||"+="===ue||"-="===ue||"*="===ue||"/="===ue||"++"===ue||"--"===ue||"<<"===ue||">>"===ue||"&="===ue||"|="===ue||"^="===ue||"%="===ue||"<="===ue||">="===ue||"=>"===ue||"**"===ue?this.index+=2:"<>=!+-*%&|^/".indexOf(ue=this.source[this.index])>=0&&++this.index}return this.index===se&&this.throwUnexpectedToken(),{type:7,value:ue,lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanHexLiteral=function(se){for(var ue="";!this.eof()&&dt.Character.isHexDigit(this.source.charCodeAt(this.index));)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ue,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanBinaryLiteral=function(se){for(var ae,ue="";!this.eof()&&("0"===(ae=this.source[this.index])||"1"===ae);)ue+=this.source[this.index++];return 0===ue.length&&this.throwUnexpectedToken(),this.eof()||(ae=this.source.charCodeAt(this.index),(dt.Character.isIdentifierStart(ae)||dt.Character.isDecimalDigit(ae))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ue,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:se,end:this.index}},ve.prototype.scanOctalLiteral=function(se,ue){var ae="",D=!1;for(dt.Character.isOctalDigit(se.charCodeAt(0))?(D=!0,ae="0"+this.source[this.index++]):++this.index;!this.eof()&&dt.Character.isOctalDigit(this.source.charCodeAt(this.index));)ae+=this.source[this.index++];return!D&&0===ae.length&&this.throwUnexpectedToken(),(dt.Character.isIdentifierStart(this.source.charCodeAt(this.index))||dt.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(ae,8),octal:D,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ue,end:this.index}},ve.prototype.isImplicitOctalLiteral=function(){for(var se=this.index+1;se=0&&(D=D.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(O,te,Me){var Je=parseInt(te||Me,16);return Je>1114111&&T.throwUnexpectedToken(Ge.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(D)}catch{this.throwUnexpectedToken(Ge.Messages.InvalidRegExp)}try{return new RegExp(se,ue)}catch{return null}},ve.prototype.scanRegExpBody=function(){var se=this.source[this.index];Oe.assert("/"===se,"Regular expression literal must start with a slash");for(var ue=this.source[this.index++],ae=!1,D=!1;!this.eof();)if(ue+=se=this.source[this.index++],"\\"===se)se=this.source[this.index++],dt.Character.isLineTerminator(se.charCodeAt(0))&&this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue+=se;else if(dt.Character.isLineTerminator(se.charCodeAt(0)))this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp);else if(ae)"]"===se&&(ae=!1);else{if("/"===se){D=!0;break}"["===se&&(ae=!0)}return D||this.throwUnexpectedToken(Ge.Messages.UnterminatedRegExp),ue.substr(1,ue.length-2)},ve.prototype.scanRegExpFlags=function(){for(var ue="";!this.eof();){var ae=this.source[this.index];if(!dt.Character.isIdentifierPart(ae.charCodeAt(0)))break;if(++this.index,"\\"!==ae||this.eof())ue+=ae;else if("u"===(ae=this.source[this.index])){++this.index;var D=this.index,T=this.scanHexEscape("u");if(null!==T)for(ue+=T;D=55296&&se<57343&&dt.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ve}();De.Scanner=Ve},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.TokenName={},De.TokenName[1]="Boolean",De.TokenName[2]="",De.TokenName[3]="Identifier",De.TokenName[4]="Keyword",De.TokenName[5]="Null",De.TokenName[6]="Numeric",De.TokenName[7]="Punctuator",De.TokenName[8]="String",De.TokenName[9]="RegularExpression",De.TokenName[10]="Template"},function(Tn,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Tn,De,rt){"use strict";Object.defineProperty(De,"__esModule",{value:!0});var Oe=rt(10),dt=rt(12),Ge=rt(13),_e=function(){function Ve(){this.values=[],this.curly=this.paren=-1}return Ve.prototype.beforeFunctionExpression=function(ve){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ve)>=0},Ve.prototype.isRegexStart=function(){var ve=this.values[this.values.length-1],se=null!==ve;switch(ve){case"this":case"]":se=!1;break;case")":var ue=this.values[this.paren-1];se="if"===ue||"while"===ue||"for"===ue||"with"===ue;break;case"}":if(se=!1,"function"===this.values[this.curly-3])se=!!(ae=this.values[this.curly-4])&&!this.beforeFunctionExpression(ae);else if("function"===this.values[this.curly-4]){var ae;se=!(ae=this.values[this.curly-5])||!this.beforeFunctionExpression(ae)}}return se},Ve.prototype.push=function(ve){7===ve.type||4===ve.type?("{"===ve.value?this.curly=this.values.length:"("===ve.value&&(this.paren=this.values.length),this.values.push(ve.value)):this.values.push(null)},Ve}(),et=function(){function Ve(ve,se){this.errorHandler=new Oe.ErrorHandler,this.errorHandler.tolerant=!!se&&"boolean"==typeof se.tolerant&&se.tolerant,this.scanner=new dt.Scanner(ve,this.errorHandler),this.scanner.trackComment=!!se&&"boolean"==typeof se.comment&&se.comment,this.trackRange=!!se&&"boolean"==typeof se.range&&se.range,this.trackLoc=!!se&&"boolean"==typeof se.loc&&se.loc,this.buffer=[],this.reader=new _e}return Ve.prototype.errors=function(){return this.errorHandler.errors},Ve.prototype.getNextToken=function(){if(0===this.buffer.length){var ve=this.scanner.scanComments();if(this.scanner.trackComment)for(var se=0;se=ae.status}function et(ue){try{ue.dispatchEvent(new MouseEvent("click"))}catch{var ae=document.createEvent("MouseEvents");ae.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ue.dispatchEvent(ae)}}var Ve="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ve=Ve.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),se=Ve.saveAs||("object"!=typeof window||window!==Ve?function(){}:"download"in HTMLAnchorElement.prototype&&!ve?function(ue,ae,D){var T=Ve.URL||Ve.webkitURL,O=document.createElement("a");O.download=ae=ae||ue.name||"download",O.rel="noopener","string"==typeof ue?(O.href=ue,O.origin===location.origin?et(O):_e(O.href)?Ge(ue,ae,D):et(O,O.target="_blank")):(O.href=T.createObjectURL(ue),setTimeout(function(){T.revokeObjectURL(O.href)},4e4),setTimeout(function(){et(O)},0))}:"msSaveOrOpenBlob"in navigator?function(ue,ae,D){if(ae=ae||ue.name||"download","string"!=typeof ue)navigator.msSaveOrOpenBlob(function dt(ue,ae){return typeof ae>"u"?ae={autoBom:!1}:"object"!=typeof ae&&(console.warn("Deprecated: Expected third argument to be a object"),ae={autoBom:!ae}),ae.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ue.type)?new Blob(["\ufeff",ue],{type:ue.type}):ue}(ue,D),ae);else if(_e(ue))Ge(ue,ae,D);else{var T=document.createElement("a");T.href=ue,T.target="_blank",setTimeout(function(){et(T)})}}:function(ue,ae,D,T){if((T=T||open("","_blank"))&&(T.document.title=T.document.body.innerText="downloading..."),"string"==typeof ue)return Ge(ue,ae,D);var O="application/octet-stream"===ue.type,te=/constructor/i.test(Ve.HTMLElement)||Ve.safari,Me=/CriOS\/[\d]+/.test(navigator.userAgent);if((Me||O&&te||ve)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Wt=Je.result;Wt=Me?Wt:Wt.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=Wt:location=Wt,T=null},Je.readAsDataURL(ue)}else{var kt=Ve.URL||Ve.webkitURL,jt=kt.createObjectURL(ue);T?T.location=jt:location.href=jt,T=null,setTimeout(function(){kt.revokeObjectURL(jt)},4e4)}});Ve.saveAs=se.saveAs=se,Yt.exports=se})?De.apply(Tn,[]):De)&&(Yt.exports=Oe)},461:(Yt,Tn)=>{Tn.read=function(De,rt,Oe,dt,Ge){var _e,et,Ve=8*Ge-dt-1,ve=(1<>1,ue=-7,ae=Oe?Ge-1:0,D=Oe?-1:1,T=De[rt+ae];for(ae+=D,_e=T&(1<<-ue)-1,T>>=-ue,ue+=Ve;ue>0;_e=256*_e+De[rt+ae],ae+=D,ue-=8);for(et=_e&(1<<-ue)-1,_e>>=-ue,ue+=dt;ue>0;et=256*et+De[rt+ae],ae+=D,ue-=8);if(0===_e)_e=1-se;else{if(_e===ve)return et?NaN:1/0*(T?-1:1);et+=Math.pow(2,dt),_e-=se}return(T?-1:1)*et*Math.pow(2,_e-dt)},Tn.write=function(De,rt,Oe,dt,Ge,_e){var et,Ve,ve,se=8*_e-Ge-1,ue=(1<>1,D=23===Ge?Math.pow(2,-24)-Math.pow(2,-77):0,T=dt?0:_e-1,O=dt?1:-1,te=rt<0||0===rt&&1/rt<0?1:0;for(rt=Math.abs(rt),isNaN(rt)||rt===1/0?(Ve=isNaN(rt)?1:0,et=ue):(et=Math.floor(Math.log(rt)/Math.LN2),rt*(ve=Math.pow(2,-et))<1&&(et--,ve*=2),(rt+=et+ae>=1?D/ve:D*Math.pow(2,1-ae))*ve>=2&&(et++,ve/=2),et+ae>=ue?(Ve=0,et=ue):et+ae>=1?(Ve=(rt*ve-1)*Math.pow(2,Ge),et+=ae):(Ve=rt*Math.pow(2,ae-1)*Math.pow(2,Ge),et=0));Ge>=8;De[Oe+T]=255&Ve,T+=O,Ve/=256,Ge-=8);for(et=et<0;De[Oe+T]=255&et,T+=O,et/=256,se-=8);De[Oe+T-O]|=128*te}},870:(Yt,Tn,De)=>{"use strict";var rt=De(133);Yt.exports=rt},133:(Yt,Tn,De)=>{"use strict";var rt=De(840),Oe=De(34);function dt(Ge){return function(){throw new Error("Function "+Ge+" is deprecated and cannot be used.")}}Yt.exports.Type=De(647),Yt.exports.Schema=De(372),Yt.exports.FAILSAFE_SCHEMA=De(746),Yt.exports.JSON_SCHEMA=De(147),Yt.exports.CORE_SCHEMA=De(192),Yt.exports.DEFAULT_SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_FULL_SCHEMA=De(94),Yt.exports.load=rt.load,Yt.exports.loadAll=rt.loadAll,Yt.exports.safeLoad=rt.safeLoad,Yt.exports.safeLoadAll=rt.safeLoadAll,Yt.exports.dump=Oe.dump,Yt.exports.safeDump=Oe.safeDump,Yt.exports.YAMLException=De(314),Yt.exports.MINIMAL_SCHEMA=De(746),Yt.exports.SAFE_SCHEMA=De(31),Yt.exports.DEFAULT_SCHEMA=De(94),Yt.exports.scan=dt("scan"),Yt.exports.parse=dt("parse"),Yt.exports.compose=dt("compose"),Yt.exports.addConstructor=dt("addConstructor")},997:Yt=>{"use strict";function Tn(_e){return typeof _e>"u"||null===_e}Yt.exports.isNothing=Tn,Yt.exports.isObject=function De(_e){return"object"==typeof _e&&null!==_e},Yt.exports.toArray=function rt(_e){return Array.isArray(_e)?_e:Tn(_e)?[]:[_e]},Yt.exports.repeat=function dt(_e,et){var ve,Ve="";for(ve=0;ve{"use strict";var rt=De(997),Oe=De(314),dt=De(94),Ge=De(31),_e=Object.prototype.toString,et=Object.prototype.hasOwnProperty,Ve=9,ve=10,se=13,ue=32,ae=33,D=34,T=35,O=37,te=38,Me=39,Je=42,kt=44,jt=45,Wt=58,wn=61,rn=62,Mi=63,zr=64,Xr=91,hs=93,Ya=96,tr=123,mu=124,Sa=125,yn={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(pe){var yt,Ft,Kt;if(yt=pe.toString(16).toUpperCase(),pe<=255)Ft="x",Kt=2;else if(pe<=65535)Ft="u",Kt=4;else{if(!(pe<=4294967295))throw new Oe("code point within a string may not be greater than 0xFFFFFFFF");Ft="U",Kt=8}return"\\"+Ft+rt.repeat("0",Kt-yt.length)+yt}function Fc(pe){this.schema=pe.schema||dt,this.indent=Math.max(1,pe.indent||2),this.noArrayIndent=pe.noArrayIndent||!1,this.skipInvalid=pe.skipInvalid||!1,this.flowLevel=rt.isNothing(pe.flowLevel)?-1:pe.flowLevel,this.styleMap=function kd(pe,yt){var Ft,Kt,Xt,Pt,dn,qt,We;if(null===yt)return{};for(Ft={},Xt=0,Pt=(Kt=Object.keys(yt)).length;Xt0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}else{for(Pt=0;PtKt&&" "!==pe[Cn+1],Cn=Pt);else if(!Da(dn))return Ja;qt=Pt>0?pe.charCodeAt(Pt-1):null,jr=jr&&pl(dn,qt)}Xe=Xe||bt&&Pt-Cn-1>Kt&&" "!==pe[Cn+1]}return We||Xe?Ft>9&&Sd(pe)?Ja:Xe?vu:Dd:jr&&!Xt(pe)?Nc:Oc}(yt,Kt||pe.flowLevel>-1&&Ft>=pe.flowLevel,pe.indent,Pt,function qt(We){return function Co(pe,yt){var Ft,Kt;for(Ft=0,Kt=pe.implicitTypes.length;Ft"+ml(yt,pe.indent)+Te(gu(function W(pe,yt){for(var Pt,dn,Ft=/(\n+)([^\n]*)/g,Kt=(Xe=void 0,Xe=pe.indexOf("\n"),Ft.lastIndex=Xe=-1!==Xe?Xe:pe.length,ee(pe.slice(0,Xe),yt)),Xt="\n"===pe[0]||" "===pe[0];dn=Ft.exec(pe);){var We=dn[2];Pt=" "===We[0],Kt+=dn[1]+(Xt||Pt||""===We?"":"\n")+ee(We,yt),Xt=Pt}var Xe;return Kt}(yt,Pt),Xt));case Ja:return'"'+function Ne(pe){for(var Ft,Kt,Xt,yt="",Pt=0;Pt=55296&&Ft<=56319&&(Kt=pe.charCodeAt(Pt+1))>=56320&&Kt<=57343?(yt+=Kn(1024*(Ft-55296)+Kt-56320+65536),Pt++):yt+=!(Xt=yn[Ft])&&Da(Ft)?pe[Pt]:Xt||Kn(Ft);return yt}(yt)+'"';default:throw new Oe("impossible error: invalid scalar style")}}()}function ml(pe,yt){var Ft=Sd(pe)?String(yt):"",Kt="\n"===pe[pe.length-1];return Ft+(!Kt||"\n"!==pe[pe.length-2]&&"\n"!==pe?Kt?"":"-":"+")+"\n"}function Te(pe){return"\n"===pe[pe.length-1]?pe.slice(0,-1):pe}function ee(pe,yt){if(""===pe||" "===pe[0])return pe;for(var Kt,Pt,Ft=/ [^ ]/g,Xt=0,dn=0,qt=0,We="";Kt=Ft.exec(pe);)(qt=Kt.index)-Xt>yt&&(We+="\n"+pe.slice(Xt,Pt=dn>Xt?dn:qt),Xt=Pt+1),dn=qt;return We+="\n",(We+=pe.length-Xt>yt&&dn>Xt?pe.slice(Xt,dn)+"\n"+pe.slice(dn+1):pe.slice(Xt)).slice(1)}function A(pe,yt,Ft){var Kt,Xt,Pt,dn,qt,We;for(Pt=0,dn=(Xt=Ft?pe.explicitTypes:pe.implicitTypes).length;Pt tag resolver accepts not "'+We+'" style');Kt=qt.represent[We](yt,We)}pe.dump=Kt}return!0}return!1}function st(pe,yt,Ft,Kt,Xt,Pt){pe.tag=null,pe.dump=Ft,A(pe,Ft,!1)||A(pe,Ft,!0);var dn=_e.call(pe.dump);Kt&&(Kt=pe.flowLevel<0||pe.flowLevel>yt);var We,Xe,qt="[object Object]"===dn||"[object Array]"===dn;if(qt&&(Xe=-1!==(We=pe.duplicates.indexOf(Ft))),(null!==pe.tag&&"?"!==pe.tag||Xe||2!==pe.indent&&yt>0)&&(Xt=!1),Xe&&pe.usedDuplicates[We])pe.dump="*ref_"+We;else{if(qt&&Xe&&!pe.usedDuplicates[We]&&(pe.usedDuplicates[We]=!0),"[object Object]"===dn)Kt&&0!==Object.keys(pe.dump).length?(function nr(pe,yt,Ft,Kt){var qt,We,Xe,bt,Cn,jr,Xt="",Pt=pe.tag,dn=Object.keys(Ft);if(!0===pe.sortKeys)dn.sort();else if("function"==typeof pe.sortKeys)dn.sort(pe.sortKeys);else if(pe.sortKeys)throw new Oe("sortKeys must be a boolean or a function");for(qt=0,We=dn.length;qt1024)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+="?":jr+="? "),jr+=pe.dump,Cn&&(jr+=Ro(pe,yt)),st(pe,yt+1,bt,!0,Cn)&&(pe.dump&&ve===pe.dump.charCodeAt(0)?jr+=":":jr+=": ",Xt+=jr+=pe.dump));pe.tag=Pt,pe.dump=Xt||"{}"}(pe,yt,pe.dump,Xt),Xe&&(pe.dump="&ref_"+We+pe.dump)):(function Qt(pe,yt,Ft){var dn,qt,We,Xe,bt,Kt="",Xt=pe.tag,Pt=Object.keys(Ft);for(dn=0,qt=Pt.length;dn1024&&(bt+="? "),bt+=pe.dump+(pe.condenseFlow?'"':"")+":"+(pe.condenseFlow?"":" "),st(pe,yt,Xe,!1,!1)&&(Kt+=bt+=pe.dump));pe.tag=Xt,pe.dump="{"+Kt+"}"}(pe,yt,pe.dump),Xe&&(pe.dump="&ref_"+We+" "+pe.dump));else if("[object Array]"===dn){var bt=pe.noArrayIndent&&yt>0?yt-1:yt;Kt&&0!==pe.dump.length?(function zt(pe,yt,Ft,Kt){var dn,qt,Xt="",Pt=pe.tag;for(dn=0,qt=Ft.length;dn "+pe.dump)}return!0}function Tt(pe,yt){var Xt,Pt,Ft=[],Kt=[];for(Ut(pe,Ft,Kt),Xt=0,Pt=Kt.length;Xt{"use strict";function Tn(De,rt){Error.call(this),this.name="YAMLException",this.reason=De,this.mark=rt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Tn.prototype=Object.create(Error.prototype)).constructor=Tn,Tn.prototype.toString=function(rt){var Oe=this.name+": ";return Oe+=this.reason||"(unknown reason)",!rt&&this.mark&&(Oe+=" "+this.mark.toString()),Oe},Yt.exports=Tn},840:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(48),Ge=De(31),_e=De(94),et=Object.prototype.hasOwnProperty,Ve=1,ve=2,se=3,ue=4,ae=1,D=2,T=3,O=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,te=/[\x85\u2028\u2029]/,Me=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,kt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jt(A){return Object.prototype.toString.call(A)}function Wt(A){return 10===A||13===A}function wn(A){return 9===A||32===A}function rn(A){return 9===A||32===A||10===A||13===A}function Mi(A){return 44===A||91===A||93===A||123===A||125===A}function zr(A){var st;return 48<=A&&A<=57?A-48:97<=(st=32|A)&&st<=102?st-97+10:-1}function Xr(A){return 120===A?2:117===A?4:85===A?8:0}function hs(A){return 48<=A&&A<=57?A-48:-1}function Ya(A){return 48===A?"\0":97===A?"\x07":98===A?"\b":116===A||9===A?"\t":110===A?"\n":118===A?"\v":102===A?"\f":114===A?"\r":101===A?"\x1b":32===A?" ":34===A?'"':47===A?"/":92===A?"\\":78===A?"\x85":95===A?"\xa0":76===A?"\u2028":80===A?"\u2029":""}function tr(A){return A<=65535?String.fromCharCode(A):String.fromCharCode(55296+(A-65536>>10),56320+(A-65536&1023))}for(var mu=new Array(256),Sa=new Array(256),yn=0;yn<256;yn++)mu[yn]=Ya(yn)?1:0,Sa[yn]=Ya(yn);function Cd(A,st){this.input=A,this.filename=st.filename||null,this.schema=st.schema||_e,this.onWarning=st.onWarning||null,this.legacy=st.legacy||!1,this.json=st.json||!1,this.listener=st.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=A.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function kd(A,st){return new Oe(st,new dt(A.filename,A.input,A.position,A.line,A.position-A.lineStart))}function Kn(A,st){throw kd(A,st)}function Fc(A,st){A.onWarning&&A.onWarning.call(null,kd(A,st))}var gu={YAML:function(st,Tt,Ut){var Vt,mn,pe;null!==st.version&&Kn(st,"duplication of %YAML directive"),1!==Ut.length&&Kn(st,"YAML directive accepts exactly one argument"),null===(Vt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(st,"ill-formed argument of the YAML directive"),mn=parseInt(Vt[1],10),pe=parseInt(Vt[2],10),1!==mn&&Kn(st,"unacceptable YAML version of the document"),st.version=Ut[0],st.checkLineBreaks=pe<2,1!==pe&&2!==pe&&Fc(st,"unsupported YAML version of the document")},TAG:function(st,Tt,Ut){var Vt,mn;2!==Ut.length&&Kn(st,"TAG directive accepts exactly two arguments"),mn=Ut[1],Je.test(Vt=Ut[0])||Kn(st,"ill-formed tag handle (first argument) of the TAG directive"),et.call(st.tagMap,Vt)&&Kn(st,'there is a previously declared suffix for "'+Vt+'" tag handle'),kt.test(mn)||Kn(st,"ill-formed tag prefix (second argument) of the TAG directive"),st.tagMap[Vt]=mn}};function Ro(A,st,Tt,Ut){var Vt,mn,pe,yt;if(st1&&(A.result+=rt.repeat("\n",st-1))}function Ja(A,st){var Tt,Ft,Ut=A.tag,Vt=A.anchor,mn=[],yt=!1;for(null!==A.anchor&&(A.anchorMap[A.anchor]=mn),Ft=A.input.charCodeAt(A.position);0!==Ft&&45===Ft&&rn(A.input.charCodeAt(A.position+1));)if(yt=!0,A.position++,Zr(A,!0,-1)&&A.lineIndent<=st)mn.push(null),Ft=A.input.charCodeAt(A.position);else if(Tt=A.line,W(A,st,se,!1,!0),mn.push(A.result),Zr(A,!0,-1),Ft=A.input.charCodeAt(A.position),(A.line===Tt||A.lineIndent>st)&&0!==Ft)Kn(A,"bad indentation of a sequence entry");else if(A.lineIndentst?Ft=1:A.lineIndent===st?Ft=0:A.lineIndentst?Ft=1:A.lineIndent===st?Ft=0:A.lineIndentst)&&(W(A,st,ue,!0,Vt)&&(We?dn=A.result:qt=A.result),We||(lo(A,Kt,Xt,Pt,dn,qt,mn,pe),Pt=dn=qt=null),Zr(A,!0,-1),bt=A.input.charCodeAt(A.position)),A.lineIndent>st&&0!==bt)Kn(A,"bad indentation of a mapping entry");else if(A.lineIndent=0))break;0===Xt?Kn(A,"bad explicit indentation width of a block scalar; it cannot be less than one"):pe?Kn(A,"repeat of an indentation width identifier"):(yt=st+Xt-1,pe=!0)}if(wn(Pt)){do{Pt=A.input.charCodeAt(++A.position)}while(wn(Pt));if(35===Pt)do{Pt=A.input.charCodeAt(++A.position)}while(!Wt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Da(A),A.lineIndent=0,Pt=A.input.charCodeAt(A.position);(!pe||A.lineIndentyt&&(yt=A.lineIndent),Wt(Pt))Ft++;else{if(A.lineIndent0){for(Vt=pe,mn=0;Vt>0;Vt--)(pe=zr(yt=A.input.charCodeAt(++A.position)))>=0?mn=(mn<<4)+pe:Kn(A,"expected hexadecimal character");A.result+=tr(mn),A.position++}else Kn(A,"unknown escape sequence");Tt=Ut=A.position}else Wt(yt)?(Ro(A,Tt,Ut,!0),nc(A,Zr(A,!1,st)),Tt=Ut=A.position):A.position===A.lineStart&&pl(A)?Kn(A,"unexpected end of the document within a double quoted scalar"):(A.position++,Ut=A.position)}Kn(A,"unexpected end of the stream within a double quoted scalar")}(A,We)?Xt=!0:function Te(A){var st,Tt,Ut;if(42!==(Ut=A.input.charCodeAt(A.position)))return!1;for(Ut=A.input.charCodeAt(++A.position),st=A.position;0!==Ut&&!rn(Ut)&&!Mi(Ut);)Ut=A.input.charCodeAt(++A.position);return A.position===st&&Kn(A,"name of an alias node must contain at least one character"),Tt=A.input.slice(st,A.position),A.anchorMap.hasOwnProperty(Tt)||Kn(A,'unidentified alias "'+Tt+'"'),A.result=A.anchorMap[Tt],Zr(A,!0,-1),!0}(A)?(Xt=!0,(null!==A.tag||null!==A.anchor)&&Kn(A,"alias node should not have any properties")):function Sd(A,st,Tt){var Vt,mn,pe,yt,Ft,Kt,Xt,qt,Pt=A.kind,dn=A.result;if(rn(qt=A.input.charCodeAt(A.position))||Mi(qt)||35===qt||38===qt||42===qt||33===qt||124===qt||62===qt||39===qt||34===qt||37===qt||64===qt||96===qt||(63===qt||45===qt)&&(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt)))return!1;for(A.kind="scalar",A.result="",mn=pe=A.position,yt=!1;0!==qt;){if(58===qt){if(rn(Vt=A.input.charCodeAt(A.position+1))||Tt&&Mi(Vt))break}else if(35===qt){if(rn(A.input.charCodeAt(A.position-1)))break}else{if(A.position===A.lineStart&&pl(A)||Tt&&Mi(qt))break;if(Wt(qt)){if(Ft=A.line,Kt=A.lineStart,Xt=A.lineIndent,Zr(A,!1,-1),A.lineIndent>=st){yt=!0,qt=A.input.charCodeAt(A.position);continue}A.position=pe,A.line=Ft,A.lineStart=Kt,A.lineIndent=Xt;break}}yt&&(Ro(A,mn,pe,!1),nc(A,A.line-Ft),mn=pe=A.position,yt=!1),wn(qt)||(pe=A.position+1),qt=A.input.charCodeAt(++A.position)}return Ro(A,mn,pe,!1),!!A.result||(A.kind=Pt,A.result=dn,!1)}(A,We,Ve===Tt)&&(Xt=!0,null===A.tag&&(A.tag="?")),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):0===Ft&&(Xt=yt&&Ja(A,Xe))),null!==A.tag&&"!"!==A.tag)if("?"===A.tag){for(null!==A.result&&"scalar"!==A.kind&&Kn(A,'unacceptable node kind for ! tag; it should be "scalar", not "'+A.kind+'"'),Pt=0,dn=A.implicitTypes.length;Pt tag; it should be "'+qt.kind+'", not "'+A.kind+'"'),qt.resolve(A.result)?(A.result=qt.construct(A.result),null!==A.anchor&&(A.anchorMap[A.anchor]=A.result)):Kn(A,"cannot resolve a node with !<"+A.tag+"> explicit tag")):Kn(A,"unknown tag !<"+A.tag+">");return null!==A.listener&&A.listener("close",A),null!==A.tag||null!==A.anchor||Xt}function ee(A){var Tt,Ut,Vt,pe,st=A.position,mn=!1;for(A.version=null,A.checkLineBreaks=A.legacy,A.tagMap={},A.anchorMap={};0!==(pe=A.input.charCodeAt(A.position))&&(Zr(A,!0,-1),pe=A.input.charCodeAt(A.position),!(A.lineIndent>0||37!==pe));){for(mn=!0,pe=A.input.charCodeAt(++A.position),Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);for(Vt=[],(Ut=A.input.slice(Tt,A.position)).length<1&&Kn(A,"directive name must not be less than one character in length");0!==pe;){for(;wn(pe);)pe=A.input.charCodeAt(++A.position);if(35===pe){do{pe=A.input.charCodeAt(++A.position)}while(0!==pe&&!Wt(pe));break}if(Wt(pe))break;for(Tt=A.position;0!==pe&&!rn(pe);)pe=A.input.charCodeAt(++A.position);Vt.push(A.input.slice(Tt,A.position))}0!==pe&&Da(A),et.call(gu,Ut)?gu[Ut](A,Ut,Vt):Fc(A,'unknown document directive "'+Ut+'"')}Zr(A,!0,-1),0===A.lineIndent&&45===A.input.charCodeAt(A.position)&&45===A.input.charCodeAt(A.position+1)&&45===A.input.charCodeAt(A.position+2)?(A.position+=3,Zr(A,!0,-1)):mn&&Kn(A,"directives end mark is expected"),W(A,A.lineIndent-1,ue,!1,!0),Zr(A,!0,-1),A.checkLineBreaks&&te.test(A.input.slice(st,A.position))&&Fc(A,"non-ASCII line breaks are interpreted as content"),A.documents.push(A.result),A.position===A.lineStart&&pl(A)?46===A.input.charCodeAt(A.position)&&(A.position+=3,Zr(A,!0,-1)):A.position"u"&&(Tt=st,st=null);var Ut=Ne(A,Tt);if("function"!=typeof st)return Ut;for(var Vt=0,mn=Ut.length;Vt"u"&&(Tt=st,st=null),nt(A,st,rt.extend({schema:Ge},Tt))},Yt.exports.safeLoad=function nr(A,st){return zt(A,rt.extend({schema:Ge},st))}},48:(Yt,Tn,De)=>{"use strict";var rt=De(997);function Oe(dt,Ge,_e,et,Ve){this.name=dt,this.buffer=Ge,this.position=_e,this.line=et,this.column=Ve}Oe.prototype.getSnippet=function(Ge,_e){var et,Ve,ve,se,ue;if(!this.buffer)return null;for(Ge=Ge||4,_e=_e||75,et="",Ve=this.position;Ve>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(Ve-1));)if(this.position-(Ve-=1)>_e/2-1){et=" ... ",Ve+=5;break}for(ve="",se=this.position;se_e/2-1){ve=" ... ",se-=5;break}return ue=this.buffer.slice(Ve,se),rt.repeat(" ",Ge)+et+ue+ve+"\n"+rt.repeat(" ",Ge+this.position-Ve+et.length)+"^"},Oe.prototype.toString=function(Ge){var _e,et="";return this.name&&(et+='in "'+this.name+'" '),et+="at line "+(this.line+1)+", column "+(this.column+1),Ge||(_e=this.getSnippet())&&(et+=":\n"+_e),et},Yt.exports=Oe},372:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(314),dt=De(647);function Ge(Ve,ve,se){var ue=[];return Ve.include.forEach(function(ae){se=Ge(ae,ve,se)}),Ve[ve].forEach(function(ae){se.forEach(function(D,T){D.tag===ae.tag&&D.kind===ae.kind&&ue.push(T)}),se.push(ae)}),se.filter(function(ae,D){return-1===ue.indexOf(D)})}function et(Ve){this.include=Ve.include||[],this.implicit=Ve.implicit||[],this.explicit=Ve.explicit||[],this.implicit.forEach(function(ve){if(ve.loadKind&&"scalar"!==ve.loadKind)throw new Oe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ge(this,"implicit",[]),this.compiledExplicit=Ge(this,"explicit",[]),this.compiledTypeMap=function _e(){var ve,se,Ve={scalar:{},sequence:{},mapping:{},fallback:{}};function ue(ae){Ve[ae.kind][ae.tag]=Ve.fallback[ae.tag]=ae}for(ve=0,se=arguments.length;ve{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(147)]})},94:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=rt.DEFAULT=new rt({include:[De(31)],explicit:[De(771),De(632),De(716)]})},31:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(192)],implicit:[De(934),De(996)],explicit:[De(486),De(166),De(711),De(738)]})},746:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({explicit:[De(464),De(322),De(71)]})},147:(Yt,Tn,De)=>{"use strict";var rt=De(372);Yt.exports=new rt({include:[De(746)],implicit:[De(568),De(911),De(877),De(615)]})},647:(Yt,Tn,De)=>{"use strict";var rt=De(314),Oe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dt=["scalar","sequence","mapping"];Yt.exports=function _e(et,Ve){if(Ve=Ve||{},Object.keys(Ve).forEach(function(ve){if(-1===Oe.indexOf(ve))throw new rt('Unknown option "'+ve+'" is met in definition of "'+et+'" YAML type.')}),this.tag=et,this.kind=Ve.kind||null,this.resolve=Ve.resolve||function(){return!0},this.construct=Ve.construct||function(ve){return ve},this.instanceOf=Ve.instanceOf||null,this.predicate=Ve.predicate||null,this.represent=Ve.represent||null,this.defaultStyle=Ve.defaultStyle||null,this.styleAliases=function Ge(et){var Ve={};return null!==et&&Object.keys(et).forEach(function(ve){et[ve].forEach(function(se){Ve[String(se)]=ve})}),Ve}(Ve.styleAliases||null),-1===dt.indexOf(this.kind))throw new rt('Unknown kind "'+this.kind+'" is specified for "'+et+'" YAML type.')}},486:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(172).lW}catch{}var dt=De(647),Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new dt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function _e(se){if(null===se)return!1;var ue,ae,D=0,T=se.length,O=Ge;for(ae=0;ae64)){if(ue<0)return!1;D+=6}return D%8==0},construct:function et(se){var ue,ae,D=se.replace(/[\r\n=]/g,""),T=D.length,O=Ge,te=0,Me=[];for(ue=0;ue>16&255),Me.push(te>>8&255),Me.push(255&te)),te=te<<6|O.indexOf(D.charAt(ue));return 0==(ae=T%4*6)?(Me.push(te>>16&255),Me.push(te>>8&255),Me.push(255&te)):18===ae?(Me.push(te>>10&255),Me.push(te>>2&255)):12===ae&&Me.push(te>>4&255),rt?rt.from?rt.from(Me):new rt(Me):Me},predicate:function ve(se){return rt&&rt.isBuffer(se)},represent:function Ve(se){var D,T,ue="",ae=0,O=se.length,te=Ge;for(D=0;D>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]),ae=(ae<<8)+se[D];return 0==(T=O%3)?(ue+=te[ae>>18&63],ue+=te[ae>>12&63],ue+=te[ae>>6&63],ue+=te[63&ae]):2===T?(ue+=te[ae>>10&63],ue+=te[ae>>4&63],ue+=te[ae<<2&63],ue+=te[64]):1===T&&(ue+=te[ae>>2&63],ue+=te[ae<<4&63],ue+=te[64],ue+=te[64]),ue}})},911:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!1;var et=_e.length;return 4===et&&("true"===_e||"True"===_e||"TRUE"===_e)||5===et&&("false"===_e||"False"===_e||"FALSE"===_e)},construct:function dt(_e){return"true"===_e||"True"===_e||"TRUE"===_e},predicate:function Ge(_e){return"[object Boolean]"===Object.prototype.toString.call(_e)},represent:{lowercase:function(_e){return _e?"true":"false"},uppercase:function(_e){return _e?"TRUE":"FALSE"},camelcase:function(_e){return _e?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647),dt=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),et=/^[-+]?[0-9]+e/;Yt.exports=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:function Ge(se){return!(null===se||!dt.test(se)||"_"===se[se.length-1])},construct:function _e(se){var ue,ae,D,T;return ae="-"===(ue=se.replace(/_/g,"").toLowerCase())[0]?-1:1,T=[],"+-".indexOf(ue[0])>=0&&(ue=ue.slice(1)),".inf"===ue?1===ae?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ue?NaN:ue.indexOf(":")>=0?(ue.split(":").forEach(function(O){T.unshift(parseFloat(O,10))}),ue=0,D=1,T.forEach(function(O){ue+=O*D,D*=60}),ae*ue):ae*parseFloat(ue,10)},predicate:function ve(se){return"[object Number]"===Object.prototype.toString.call(se)&&(se%1!=0||rt.isNegativeZero(se))},represent:function Ve(se,ue){var ae;if(isNaN(se))switch(ue){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===se)switch(ue){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===se)switch(ue){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(rt.isNegativeZero(se))return"-0.0";return ae=se.toString(10),et.test(ae)?ae.replace("e",".e"):ae},defaultStyle:"lowercase"})},877:(Yt,Tn,De)=>{"use strict";var rt=De(997),Oe=De(647);function dt(se){return 48<=se&&se<=57||65<=se&&se<=70||97<=se&&se<=102}function Ge(se){return 48<=se&&se<=55}function _e(se){return 48<=se&&se<=57}Yt.exports=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:function et(se){if(null===se)return!1;var T,ue=se.length,ae=0,D=!1;if(!ue)return!1;if(("-"===(T=se[ae])||"+"===T)&&(T=se[++ae]),"0"===T){if(ae+1===ue)return!0;if("b"===(T=se[++ae])){for(ae++;ae=0?"0b"+se.toString(2):"-0b"+se.toString(2).slice(1)},octal:function(se){return se>=0?"0"+se.toString(8):"-0"+se.toString(8).slice(1)},decimal:function(se){return se.toString(10)},hexadecimal:function(se){return se>=0?"0x"+se.toString(16).toUpperCase():"-0x"+se.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Tn,De)=>{"use strict";var rt;try{rt=De(797)}catch{typeof window<"u"&&(rt=window.esprima)}var dt=De(647);Yt.exports=new dt("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function Ge(ve){if(null===ve)return!1;try{var ue=rt.parse("("+ve+")",{range:!0});return!("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)}catch{return!1}},construct:function _e(ve){var D,se="("+ve+")",ue=rt.parse(se,{range:!0}),ae=[];if("Program"!==ue.type||1!==ue.body.length||"ExpressionStatement"!==ue.body[0].type||"ArrowFunctionExpression"!==ue.body[0].expression.type&&"FunctionExpression"!==ue.body[0].expression.type)throw new Error("Failed to resolve function");return ue.body[0].expression.params.forEach(function(T){ae.push(T.name)}),D=ue.body[0].expression.body.range,new Function(ae,"BlockStatement"===ue.body[0].expression.body.type?se.slice(D[0]+1,D[1]-1):"return "+se.slice(D[0],D[1]))},predicate:function Ve(ve){return"[object Function]"===Object.prototype.toString.call(ve)},represent:function et(ve){return ve.toString()}})},632:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Oe(et){if(null===et||0===et.length)return!1;var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return!("/"===Ve[0]&&(ve&&(se=ve[1]),se.length>3||"/"!==Ve[Ve.length-se.length-1]))},construct:function dt(et){var Ve=et,ve=/\/([gim]*)$/.exec(et),se="";return"/"===Ve[0]&&(ve&&(se=ve[1]),Ve=Ve.slice(1,Ve.length-se.length-1)),new RegExp(Ve,se)},predicate:function _e(et){return"[object RegExp]"===Object.prototype.toString.call(et)},represent:function Ge(et){var Ve="/"+et.source+"/";return et.global&&(Ve+="g"),et.multiline&&(Ve+="m"),et.ignoreCase&&(Ve+="i"),Ve}})},771:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Oe(){return!0},construct:function dt(){},predicate:function _e(et){return typeof et>"u"},represent:function Ge(){return""}})},71:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Oe){return null!==Oe?Oe:{}}})},996:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Oe(dt){return"<<"===dt||null===dt}})},568:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Oe(_e){if(null===_e)return!0;var et=_e.length;return 1===et&&"~"===_e||4===et&&("null"===_e||"Null"===_e||"NULL"===_e)},construct:function dt(){return null},predicate:function Ge(_e){return null===_e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function Ge(et){if(null===et)return!0;var ve,se,ue,ae,D,Ve=[],T=et;for(ve=0,se=T.length;ve{"use strict";var rt=De(647),Oe=Object.prototype.toString;Yt.exports=new rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function dt(_e){if(null===_e)return!0;var et,Ve,ve,se,ue,ae=_e;for(ue=new Array(ae.length),et=0,Ve=ae.length;et{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Oe){return null!==Oe?Oe:[]}})},738:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=Object.prototype.hasOwnProperty;Yt.exports=new rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function dt(_e){if(null===_e)return!0;var et,Ve=_e;for(et in Ve)if(Oe.call(Ve,et)&&null!==Ve[et])return!1;return!0},construct:function Ge(_e){return null!==_e?_e:{}}})},464:(Yt,Tn,De)=>{"use strict";var rt=De(647);Yt.exports=new rt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Oe){return null!==Oe?Oe:""}})},934:(Yt,Tn,De)=>{"use strict";var rt=De(647),Oe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function Ge(Ve){return null!==Ve&&(null!==Oe.exec(Ve)||null!==dt.exec(Ve))},construct:function _e(Ve){var ve,se,ue,ae,D,T,O,jt,te=0,Me=null;if(null===(ve=Oe.exec(Ve))&&(ve=dt.exec(Ve)),null===ve)throw new Error("Date resolve error");if(se=+ve[1],ue=+ve[2]-1,ae=+ve[3],!ve[4])return new Date(Date.UTC(se,ue,ae));if(D=+ve[4],T=+ve[5],O=+ve[6],ve[7]){for(te=ve[7].slice(0,3);te.length<3;)te+="0";te=+te}return ve[9]&&(Me=6e4*(60*+ve[10]+ +(ve[11]||0)),"-"===ve[9]&&(Me=-Me)),jt=new Date(Date.UTC(se,ue,ae,D,T,O,te)),Me&&jt.setTime(jt.getTime()-Me),jt},instanceOf:Date,represent:function et(Ve){return Ve.toISOString()}})}},Yt=>{Yt(Yt.s=440)}]); \ No newline at end of file diff --git a/console/ui/src/app/app.module.ts b/console/ui/src/app/app.module.ts index dca3c2bd5d..ce0001afd0 100644 --- a/console/ui/src/app/app.module.ts +++ b/console/ui/src/app/app.module.ts @@ -50,8 +50,8 @@ import {AuthenticationComponent} from './account/authentication/authentication.c import {FriendsComponent} from './account/friends/friends.component'; import {WalletComponent} from './account/wallet/wallet.component'; import {GroupsComponent} from './account/groups/groups.component'; -import {GroupMembersComponent} from "./group/members/groupMembers.component"; -import {ChatListComponent} from "./channels/chatMessages.component"; +import {GroupMembersComponent} from './group/members/groupMembers.component'; +import {ChatListComponent} from './channels/chatMessages.component'; import {MatchesComponent} from './matches/matches.component'; import {LeaderboardsComponent} from './leaderboards/leaderboards.component'; import {LeaderboardComponent} from './leaderboard/leaderboard.component';