webpackJsonp([1],{0:function(e,t,n){e.exports=n("x35b")},"2zkT":function(e,t,n){"use strict";var r=n("WFWZ"),i=n("s+UU"),l=n("dMus"),o=n("73T8");class s extends i.a{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=l.a;break;case 1:if(!e){this.destination=l.a;break}if("object"==typeof e){if(e instanceof s||"syncErrorThrowable"in e&&e[o.a]){const t=e[o.a]();this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)}else this.syncErrorThrowable=!0,this.destination=new a(this,e);break}default:this.syncErrorThrowable=!0,this.destination=new a(this,e,t,n)}}[o.a](){return this}static create(e,t,n){const r=new s(e,t,n);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parent:e,_parents:t}=this;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this}}t.a=s;class a extends s{constructor(e,t,n,i){let o;super(),this._parentSubscriber=e;let s=this;Object(r.a)(t)?o=t:t&&(o=t.next,n=t.error,i=t.complete,t!==l.a&&(s=Object.create(t),Object(r.a)(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=n,this._complete=i}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._error)t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else{if(!t.syncErrorThrowable)throw this.unsubscribe(),e;t.syncErrorValue=e,t.syncErrorThrown=!0,this.unsubscribe()}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(e){throw this.unsubscribe(),e}}__tryOrSetError(e,t,n){try{t.call(this._context,n)}catch(t){return e.syncErrorValue=t,e.syncErrorThrown=!0,!0}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}},"3+4Y":function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.StdOut="stdout",e.Replace="replace",e.Diff="diff"}(r=t.WriteMode||(t.WriteMode={})),t.defaultOptions={sourceText:"",lineWidth:120,indentCount:4,useTabs:!1,linebreakMultipleAssignments:!1,quotemark:"double",writeMode:r.StdOut},t.getStringQuotemark=function(e){return"single"===e?"'":'"'},t.getAlternativeStringQuotemark=function(e){return"single"===e?'"':"'"}},"3IRH":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"48oy":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(function(e){n.d(t,"createPlatform",function(){return sn}),n.d(t,"assertPlatform",function(){return un}),n.d(t,"destroyPlatform",function(){return cn}),n.d(t,"getPlatform",function(){return dn}),n.d(t,"PlatformRef",function(){return hn}),n.d(t,"ApplicationRef",function(){return pn}),n.d(t,"enableProdMode",function(){return rn}),n.d(t,"isDevMode",function(){return ln}),n.d(t,"createPlatformFactory",function(){return an}),n.d(t,"NgProbeToken",function(){return on}),n.d(t,"APP_ID",function(){return ot}),n.d(t,"PACKAGE_ROOT_URL",function(){return ft}),n.d(t,"PLATFORM_INITIALIZER",function(){return ct}),n.d(t,"PLATFORM_ID",function(){return dt}),n.d(t,"APP_BOOTSTRAP_LISTENER",function(){return ht}),n.d(t,"APP_INITIALIZER",function(){return it}),n.d(t,"ApplicationInitStatus",function(){return lt}),n.d(t,"DebugElement",function(){return Wn}),n.d(t,"DebugNode",function(){return Hn}),n.d(t,"asNativeElements",function(){return Bn}),n.d(t,"getDebugNode",function(){return zn}),n.d(t,"Testability",function(){return Zt}),n.d(t,"TestabilityRegistry",function(){return Yt}),n.d(t,"setTestabilityGetter",function(){return Qt}),n.d(t,"TRANSLATIONS",function(){return mr}),n.d(t,"TRANSLATIONS_FORMAT",function(){return vr}),n.d(t,"LOCALE_ID",function(){return gr}),n.d(t,"MissingTranslationStrategy",function(){return yr}),n.d(t,"ApplicationModule",function(){return _r}),n.d(t,"wtfCreateScope",function(){return Lt}),n.d(t,"wtfLeave",function(){return Ft}),n.d(t,"wtfStartTimeRange",function(){return $t}),n.d(t,"wtfEndTimeRange",function(){return jt}),n.d(t,"Type",function(){return Pe}),n.d(t,"EventEmitter",function(){return Ht}),n.d(t,"ErrorHandler",function(){return Me}),n.d(t,"Sanitizer",function(){return Sr}),n.d(t,"SecurityContext",function(){return xr}),n.d(t,"ANALYZE_FOR_ENTRY_COMPONENTS",function(){return m}),n.d(t,"Attribute",function(){return v}),n.d(t,"ContentChild",function(){return w}),n.d(t,"ContentChildren",function(){return b}),n.d(t,"Query",function(){return y}),n.d(t,"ViewChild",function(){return _}),n.d(t,"ViewChildren",function(){return C}),n.d(t,"Component",function(){return M}),n.d(t,"Directive",function(){return T}),n.d(t,"HostBinding",function(){return D}),n.d(t,"HostListener",function(){return N}),n.d(t,"Input",function(){return k}),n.d(t,"Output",function(){return A}),n.d(t,"Pipe",function(){return O}),n.d(t,"CUSTOM_ELEMENTS_SCHEMA",function(){return R}),n.d(t,"NO_ERRORS_SCHEMA",function(){return I}),n.d(t,"NgModule",function(){return P}),n.d(t,"ViewEncapsulation",function(){return V}),n.d(t,"Version",function(){return L}),n.d(t,"VERSION",function(){return F}),n.d(t,"forwardRef",function(){return ee}),n.d(t,"resolveForwardRef",function(){return te}),n.d(t,"Injector",function(){return le}),n.d(t,"ReflectiveInjector",function(){return et}),n.d(t,"ResolvedReflectiveFactory",function(){return qe}),n.d(t,"ReflectiveKey",function(){return Re}),n.d(t,"InjectionToken",function(){return a}),n.d(t,"Inject",function(){return $}),n.d(t,"Optional",function(){return j}),n.d(t,"Injectable",function(){return H}),n.d(t,"Self",function(){return W}),n.d(t,"SkipSelf",function(){return B}),n.d(t,"Host",function(){return U}),n.d(t,"NgZone",function(){return Wt}),n.d(t,"RenderComponentType",function(){return mn}),n.d(t,"Renderer",function(){return yn}),n.d(t,"Renderer2",function(){return _n}),n.d(t,"RendererFactory2",function(){return wn}),n.d(t,"RendererStyleFlags2",function(){return Cn}),n.d(t,"RootRenderer",function(){return bn}),n.d(t,"COMPILER_OPTIONS",function(){return yt}),n.d(t,"Compiler",function(){return vt}),n.d(t,"CompilerFactory",function(){return bt}),n.d(t,"ModuleWithComponentFactories",function(){return gt}),n.d(t,"ComponentFactory",function(){return Ct}),n.d(t,"ComponentRef",function(){return wt}),n.d(t,"ComponentFactoryResolver",function(){return St}),n.d(t,"ElementRef",function(){return xn}),n.d(t,"NgModuleFactory",function(){return Ot}),n.d(t,"NgModuleRef",function(){return Mt}),n.d(t,"NgModuleFactoryLoader",function(){return Sn}),n.d(t,"getModuleFactory",function(){return Mn}),n.d(t,"QueryList",function(){return On}),n.d(t,"SystemJsNgModuleLoader",function(){return Rn}),n.d(t,"SystemJsNgModuleLoaderConfig",function(){return Dn}),n.d(t,"TemplateRef",function(){return Pn}),n.d(t,"ViewContainerRef",function(){return Vn}),n.d(t,"EmbeddedViewRef",function(){return $n}),n.d(t,"ViewRef",function(){return Fn}),n.d(t,"ChangeDetectionStrategy",function(){return x}),n.d(t,"ChangeDetectorRef",function(){return Ln}),n.d(t,"DefaultIterableDiffer",function(){return er}),n.d(t,"IterableDiffers",function(){return ar}),n.d(t,"KeyValueDiffers",function(){return ur}),n.d(t,"SimpleChange",function(){return Zn}),n.d(t,"WrappedValue",function(){return Kn}),n.d(t,"platformCore",function(){return pr}),n.d(t,"\u0275ALLOW_MULTIPLE_PLATFORMS",function(){return nn}),n.d(t,"\u0275APP_ID_RANDOM_PROVIDER",function(){return at}),n.d(t,"\u0275devModeEqual",function(){return qn}),n.d(t,"\u0275isListLikeIterable",function(){return Yn}),n.d(t,"\u0275ChangeDetectorStatus",function(){return S}),n.d(t,"\u0275isDefaultChangeDetectionStrategy",function(){return E}),n.d(t,"\u0275Console",function(){return pt}),n.d(t,"\u0275ComponentFactory",function(){return Ct}),n.d(t,"\u0275CodegenComponentFactoryResolver",function(){return Et}),n.d(t,"\u0275ReflectionCapabilities",function(){return je}),n.d(t,"\u0275RenderDebugInfo",function(){return vn}),n.d(t,"\u0275global",function(){return q}),n.d(t,"\u0275looseIdentical",function(){return X}),n.d(t,"\u0275stringify",function(){return J}),n.d(t,"\u0275makeDecorator",function(){return h}),n.d(t,"\u0275isObservable",function(){return rt}),n.d(t,"\u0275isPromise",function(){return nt}),n.d(t,"\u0275clearOverrides",function(){return es}),n.d(t,"\u0275overrideComponentView",function(){return Jo}),n.d(t,"\u0275overrideProvider",function(){return Xo}),n.d(t,"\u0275NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR",function(){return _l}),n.d(t,"\u0275defineComponent",function(){return aa}),n.d(t,"\u0275detectChanges",function(){return oa}),n.d(t,"\u0275renderComponent",function(){return la}),n.d(t,"\u0275C",function(){return Gs}),n.d(t,"\u0275D",function(){return zs}),n.d(t,"\u0275E",function(){return Ps}),n.d(t,"\u0275T",function(){return Bs}),n.d(t,"\u0275V",function(){return Ys}),n.d(t,"\u0275b",function(){return ta}),n.d(t,"\u0275b1",function(){return na}),n.d(t,"\u0275c",function(){return qs}),n.d(t,"\u0275cR",function(){return Ks}),n.d(t,"\u0275cr",function(){return Zs}),n.d(t,"\u0275e",function(){return $s}),n.d(t,"\u0275p",function(){return js}),n.d(t,"\u0275s",function(){return Ws}),n.d(t,"\u0275t",function(){return Us}),n.d(t,"\u0275v",function(){return Qs}),n.d(t,"\u0275registerModuleFactory",function(){return Tn}),n.d(t,"\u0275EMPTY_ARRAY",function(){return Ci}),n.d(t,"\u0275EMPTY_MAP",function(){return _i}),n.d(t,"\u0275and",function(){return xi}),n.d(t,"\u0275ccf",function(){return Wi}),n.d(t,"\u0275cmf",function(){return ts}),n.d(t,"\u0275crt",function(){return Br}),n.d(t,"\u0275did",function(){return hl}),n.d(t,"\u0275eld",function(){return Si}),n.d(t,"\u0275elementEventFullName",function(){return ti}),n.d(t,"\u0275getComponentViewDefinitionFactory",function(){return Bi}),n.d(t,"\u0275inlineInterpolate",function(){return bi}),n.d(t,"\u0275interpolate",function(){return yi}),n.d(t,"\u0275mod",function(){return Ri}),n.d(t,"\u0275mpd",function(){return Ni}),n.d(t,"\u0275ncd",function(){return Il}),n.d(t,"\u0275nov",function(){return el}),n.d(t,"\u0275pid",function(){return fl}),n.d(t,"\u0275prd",function(){return pl}),n.d(t,"\u0275pad",function(){return Ll}),n.d(t,"\u0275pod",function(){return Fl}),n.d(t,"\u0275ppd",function(){return Vl}),n.d(t,"\u0275qud",function(){return kl}),n.d(t,"\u0275ted",function(){return jl}),n.d(t,"\u0275unv",function(){return jr}),n.d(t,"\u0275vid",function(){return Bl}),n.d(t,"AUTO_STYLE",function(){return wa}),n.d(t,"trigger",function(){return Ca}),n.d(t,"animate",function(){return _a}),n.d(t,"group",function(){return xa}),n.d(t,"sequence",function(){return Sa}),n.d(t,"style",function(){return Ea}),n.d(t,"state",function(){return Ta}),n.d(t,"keyframes",function(){return Ma}),n.d(t,"transition",function(){return Oa}),n.d(t,"\u0275bf",function(){return fa}),n.d(t,"\u0275bg",function(){return pa}),n.d(t,"\u0275bk",function(){return ya}),n.d(t,"\u0275bh",function(){return ga}),n.d(t,"\u0275bj",function(){return va}),n.d(t,"\u0275bi",function(){return ma}),n.d(t,"\u0275bl",function(){return ba}),n.d(t,"\u0275be",function(){return ha}),n.d(t,"\u0275n",function(){return br}),n.d(t,"\u0275o",function(){return wr}),n.d(t,"\u0275q",function(){return Cr}),n.d(t,"\u0275i",function(){return st}),n.d(t,"\u0275j",function(){return hr}),n.d(t,"\u0275k",function(){return fr}),n.d(t,"\u0275l",function(){return Xn}),n.d(t,"\u0275m",function(){return lr}),n.d(t,"\u0275f",function(){return tt}),n.d(t,"\u0275g",function(){return Ue}),n.d(t,"\u0275h",function(){return Ze}),n.d(t,"\u0275r",function(){return Vt}),n.d(t,"\u0275w",function(){return Nt}),n.d(t,"\u0275u",function(){return Dt}),n.d(t,"\u0275z",function(){return Pt}),n.d(t,"\u0275x",function(){return Rt}),n.d(t,"\u0275y",function(){return It}),n.d(t,"\u0275bc",function(){return gs}),n.d(t,"\u0275a",function(){return p}),n.d(t,"\u0275d",function(){return g}),n.d(t,"\u0275ba",function(){return gl}),n.d(t,"\u0275bb",function(){return Nr});var r=n("ves3"),i=n("Qi5R"),l=n("LiEr"),o=n("W/Sc"),s=n("s+UU");class a{constructor(e){this._desc=e,this.ngMetadataName="InjectionToken"}toString(){return`InjectionToken ${this._desc}`}}const u="__annotations__",c="__paramaters__",d="__prop__metadata__";function h(e,t,n,r){const i=f(t);function l(e){if(this instanceof l)return i.call(this,e),this;const t=new l(e),n=function(e){return(e.hasOwnProperty(u)?e[u]:Object.defineProperty(e,u,{value:[]})[u]).push(t),e};return r&&r(n),n}return n&&(l.prototype=Object.create(n.prototype)),l.prototype.ngMetadataName=e,l.annotationCls=l,l}function f(e){return function(...t){if(e){const n=e(...t);for(const e in n)this[e]=n[e]}}}function p(e,t,n){const r=f(t);function i(...e){if(this instanceof i)return r.apply(this,e),this;const t=new i(...e);return n.annotation=t,n;function n(e,n,r){const i=e.hasOwnProperty(c)?e[c]:Object.defineProperty(e,c,{value:[]})[c];for(;i.length<=r;)i.push(null);return(i[r]=i[r]||[]).push(t),e}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i}function g(e,t,n){const r=f(t);function i(...e){if(this instanceof i)return r.apply(this,e),this;const t=new i(...e);return function(e,n){const r=e.constructor,i=r.hasOwnProperty(d)?r[d]:Object.defineProperty(r,d,{value:{}})[d];i[n]=i.hasOwnProperty(n)&&i[n]||[],i[n].unshift(t)}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i}const m=new a("AnalyzeForEntryComponents"),v=p("Attribute",e=>({attributeName:e}));class y{}const b=g("ContentChildren",(e,t={})=>Object.assign({selector:e,first:!1,isViewQuery:!1,descendants:!1},t),y),w=g("ContentChild",(e,t={})=>Object.assign({selector:e,first:!0,isViewQuery:!1,descendants:!0},t),y),C=g("ViewChildren",(e,t={})=>Object.assign({selector:e,first:!1,isViewQuery:!0,descendants:!0},t),y),_=g("ViewChild",(e,t)=>Object.assign({selector:e,first:!0,isViewQuery:!0,descendants:!0},t),y),x=function(){var e={OnPush:0,Default:1};return e[e.OnPush]="OnPush",e[e.Default]="Default",e}(),S=function(){var e={CheckOnce:0,Checked:1,CheckAlways:2,Detached:3,Errored:4,Destroyed:5};return e[e.CheckOnce]="CheckOnce",e[e.Checked]="Checked",e[e.CheckAlways]="CheckAlways",e[e.Detached]="Detached",e[e.Errored]="Errored",e[e.Destroyed]="Destroyed",e}();function E(e){return null==e||e===x.Default}const T=h("Directive",(e={})=>e),M=h("Component",(e={})=>Object.assign({changeDetection:x.Default},e),T),O=h("Pipe",e=>Object.assign({pure:!0},e)),k=g("Input",e=>({bindingPropertyName:e})),A=g("Output",e=>({bindingPropertyName:e})),D=g("HostBinding",e=>({hostPropertyName:e})),N=g("HostListener",(e,t)=>({eventName:e,args:t})),R={name:"custom-elements"},I={name:"no-errors-schema"},P=h("NgModule",e=>e),V=function(){var e={Emulated:0,Native:1,None:2};return e[e.Emulated]="Emulated",e[e.Native]="Native",e[e.None]="None",e}();class L{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const F=new L("5.2.11"),$=p("Inject",e=>({token:e})),j=p("Optional"),H=h("Injectable"),W=p("Self"),B=p("SkipSelf"),U=p("Host"),z="undefined"!=typeof window&&window,G="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,q=z||"undefined"!=typeof e&&e||G,K=Promise.resolve(0);let Z=null;function Y(){if(!Z){const e=q.Symbol;if(e&&e.iterator)Z=e.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function X(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function J(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(J).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function ee(e){return e.__forward_ref__=ee,e.toString=function(){return J(this())},e}function te(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===ee?e():e}const ne="__source",re=new Object,ie=re;class le{static create(e,t){return Array.isArray(e)?new ve(e,t):new ve(e.providers,e.parent,e.name||null)}}le.THROW_IF_NOT_FOUND=re,le.NULL=new class{get(e,t=re){if(t===re)throw new Error(`NullInjectorError: No provider for ${J(e)}!`);return t}};const oe=function(e){return e},se=[],ae=oe,ue=function(){return Array.prototype.slice.call(arguments)},ce={},de=function(e){for(let t in e)if(e[t]===ce)return t;throw Error("!prop")}({provide:String,useValue:ce}),he="ngTokenPath",fe="ngTempTokenPath",pe=le.NULL,ge=/\n/gm,me="\u0275";class ve{constructor(e,t=pe,n=null){this.parent=t,this.source=n;const r=this._records=new Map;r.set(le,{token:le,fn:oe,deps:se,value:this,useNew:!1}),function e(t,n){if(n)if((n=te(n))instanceof Array)for(let r=0;re.push(J(n))),`StaticInjector[${e.join(", ")}]`}}function ye(e){return we("Cannot mix multi providers and regular providers",e)}function be(e,t,n=null){e=e&&"\n"===e.charAt(0)&&e.charAt(1)==me?e.substr(2):e;let r=J(t);if(t instanceof Array)r=t.map(J).join(" -> ");else if("object"==typeof t){let e=[];for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];e.push(n+":"+("string"==typeof r?JSON.stringify(r):J(r)))}r=`{${e.join(", ")}}`}return`StaticInjectorError${n?"("+n+")":""}[${r}]: ${e.replace(ge,"\n ")}`}function we(e,t){return new Error(be(e,t))}const Ce="ngDebugContext",_e="ngOriginalError",xe="ngErrorLogger";function Se(e){return e[Ce]}function Ee(e){return e[_e]}function Te(e,...t){e.error(...t)}class Me{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),n=this._findContext(e),r=function(e){return e[xe]||Te}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),n&&r(this._console,"ERROR CONTEXT",n)}_findContext(e){return e?Se(e)?Se(e):this._findContext(Ee(e)):null}_findOriginalError(e){let t=Ee(e);for(;t&&Ee(t);)t=Ee(t);return t}}function Oe(e){return e.length>1?" ("+function(e){const t=[];for(let n=0;n-1)return t.push(e[n]),t;t.push(e[n])}return t}(e.slice().reverse()).map(e=>J(e.token)).join(" -> ")+")":""}function ke(e,t,n,r){const i=[t],l=n(i),o=r?function(e,t){const n=`${l} caused by: ${t instanceof Error?t.message:t}`,r=Error(n);return r[_e]=t,r}(0,r):Error(l);return o.addKey=Ae,o.keys=i,o.injectors=[e],o.constructResolvingMessage=n,o[_e]=r,o}function Ae(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)}function De(e,t){const n=[];for(let r=0,i=t.length;rnew e(...t)}_zipTypesAndAnnotations(e,t){let n;n="undefined"==typeof e?new Array(t.length):new Array(e.length);for(let r=0;re&&e.type),n=e.map(e=>e&&He(e.decorators));return this._zipTypesAndAnnotations(t,n)}const i=e.hasOwnProperty(c)&&e[c],l=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return l||i?this._zipTypesAndAnnotations(l,i):new Array(e.length).fill(void 0)}parameters(e){if(!Ve(e))return[];const t=We(e);let n=this._ownParameters(e,t);return n||t===Object||(n=this.parameters(t)),n||[]}_ownAnnotations(e,t){if(e.annotations&&e.annotations!==t.annotations){let t=e.annotations;return"function"==typeof t&&t.annotations&&(t=t.annotations),t}return e.decorators&&e.decorators!==t.decorators?He(e.decorators):e.hasOwnProperty(u)?e[u]:null}annotations(e){if(!Ve(e))return[];const t=We(e),n=this._ownAnnotations(e,t)||[];return(t!==Object?this.annotations(t):[]).concat(n)}_ownPropMetadata(e,t){if(e.propMetadata&&e.propMetadata!==t.propMetadata){let t=e.propMetadata;return"function"==typeof t&&t.propMetadata&&(t=t.propMetadata),t}if(e.propDecorators&&e.propDecorators!==t.propDecorators){const t=e.propDecorators,n={};return Object.keys(t).forEach(e=>{n[e]=He(t[e])}),n}return e.hasOwnProperty(d)?e[d]:null}propMetadata(e){if(!Ve(e))return{};const t=We(e),n={};if(t!==Object){const e=this.propMetadata(t);Object.keys(e).forEach(t=>{n[t]=e[t]})}const r=this._ownPropMetadata(e,t);return r&&Object.keys(r).forEach(e=>{const t=[];n.hasOwnProperty(e)&&t.push(...n[e]),t.push(...r[e]),n[e]=t}),n}hasLifecycleHook(e,t){return e instanceof Pe&&t in e.prototype}guards(e){return{}}getter(e){return new Function("o","return o."+e+";")}setter(e){return new Function("o","v","return o."+e+" = v;")}method(e){const t=`if (!o.${e}) throw new Error('"${e}" is undefined');\n return o.${e}.apply(o, args);`;return new Function("o","args",t)}importUri(e){return"object"==typeof e&&e.filePath?e.filePath:`./${J(e)}`}resourceUri(e){return`./${J(e)}`}resolveIdentifier(e,t,n,r){return r}resolveEnum(e,t){return e[t]}}function He(e){return e?e.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function We(e){const t=e.prototype?Object.getPrototypeOf(e.prototype):null;return(t?t.constructor:null)||Object}const Be=new class{constructor(e){this.reflectionCapabilities=e}updateCapabilities(e){this.reflectionCapabilities=e}factory(e){return this.reflectionCapabilities.factory(e)}parameters(e){return this.reflectionCapabilities.parameters(e)}annotations(e){return this.reflectionCapabilities.annotations(e)}propMetadata(e){return this.reflectionCapabilities.propMetadata(e)}hasLifecycleHook(e,t){return this.reflectionCapabilities.hasLifecycleHook(e,t)}getter(e){return this.reflectionCapabilities.getter(e)}setter(e){return this.reflectionCapabilities.setter(e)}method(e){return this.reflectionCapabilities.method(e)}importUri(e){return this.reflectionCapabilities.importUri(e)}resourceUri(e){return this.reflectionCapabilities.resourceUri(e)}resolveIdentifier(e,t,n,r){return this.reflectionCapabilities.resolveIdentifier(e,t,n,r)}resolveEnum(e,t){return this.reflectionCapabilities.resolveEnum(e,t)}}(new je);class Ue{constructor(e,t,n){this.key=e,this.optional=t,this.visibility=n}static fromKey(e){return new Ue(e,!1,null)}}const ze=[];class Ge{constructor(e,t,n){this.key=e,this.resolvedFactories=t,this.multiProvider=n,this.resolvedFactory=this.resolvedFactories[0]}}class qe{constructor(e,t){this.factory=e,this.dependencies=t}}function Ke(e){return new Ge(Re.get(e.provide),[function(e){let t,n;if(e.useClass){const r=te(e.useClass);t=Be.factory(r),n=Ye(r)}else e.useExisting?(t=(e=>e),n=[Ue.fromKey(Re.get(e.useExisting))]):e.useFactory?(t=e.useFactory,n=function(e,t){if(t){const n=t.map(e=>[e]);return t.map(t=>Qe(e,t,n))}return Ye(e)}(e.useFactory,e.deps)):(t=(()=>e.useValue),n=ze);return new qe(t,n)}(e)],e.multi||!1)}function Ze(e){const t=function(e,t){for(let n=0;n{if(t instanceof Pe)n.push({provide:t,useClass:t});else if(t&&"object"==typeof t&&void 0!==t.provide)n.push(t);else{if(!(t instanceof Array))throw Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`);e(t,n)}}),n}(e,[]).map(Ke),new Map);return Array.from(t.values())}function Ye(e){const t=Be.parameters(e);if(!t)return[];if(t.some(e=>null==e))throw De(e,t);return t.map(n=>Qe(e,n,t))}function Qe(e,t,n){let r=null,i=!1;if(!Array.isArray(t))return Xe(t instanceof $?t.token:t,i,null);let l=null;for(let o=0;o=this._providers.length)throw function(e){return Error(`Index ${e} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function(t,n){return ke(t,e.key,function(e){return`Cannot instantiate cyclic dependency!${Oe(e)}`})}(this);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const t=new Array(e.resolvedFactories.length);for(let n=0;nthis._getByReflectiveDependency(e))}catch(t){throw t.addKey&&t.addKey(this,e.key),t}try{i=n(...r)}catch(t){throw function(t,n,r,i){return ke(t,e.key,function(e){const t=J(e[0].token);return`${n.message}: Error during instantiation of ${t}!${Oe(e)}.`},n)}(this,t)}return i}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:ie)}_getByKey(e,t,n){return e===tt.INJECTOR_KEY?this:t instanceof W?this._getByKeySelf(e,n):this._getByKeyDefault(e,n,t)}_getObjByKeyId(e){for(let t=0;t' "'+e.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function nt(e){return!!e&&"function"==typeof e.then}function rt(e){return!!e&&"function"==typeof e.subscribe}tt.INJECTOR_KEY=Re.get(le);const it=new a("Application Initializer");class lt{constructor(e){this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}runInitializers(){if(this.initialized)return;const e=[],t=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{t()}).catch(e=>{this.reject(e)}),0===e.length&&t(),this.initialized=!0}}const ot=new a("AppId");function st(){return`${ut()}${ut()}${ut()}`}const at={provide:ot,useFactory:st,deps:[]};function ut(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ct=new a("Platform Initializer"),dt=new a("Platform ID"),ht=new a("appBootstrapListener"),ft=new a("Application Packages Root URL");class pt{log(e){console.log(e)}warn(e){console.warn(e)}}pt.ctorParameters=(()=>[]);class gt{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}function mt(){throw new Error("Runtime compiler is not loaded")}class vt{compileModuleSync(e){throw mt()}compileModuleAsync(e){throw mt()}compileModuleAndAllComponentsSync(e){throw mt()}compileModuleAndAllComponentsAsync(e){throw mt()}clearCache(){}clearCacheFor(e){}}const yt=new a("compilerOptions");class bt{}class wt{}class Ct{}function _t(e){const t=Error(`No component factory found for ${J(e)}. Did you add it to @NgModule.entryComponents?`);return t[xt]=e,t}const xt="ngComponent";class St{}St.NULL=new class{resolveComponentFactory(e){throw _t(e)}};class Et{constructor(e,t,n){this._parent=t,this._ngModule=n,this._factories=new Map;for(let r=0;r(function(e,t){return null}),Ft=Vt?Rt:(e,t)=>t,$t=Vt?It:(e,t)=>null,jt=Vt?Pt:e=>null;class Ht extends o.a{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,n){let r,i=e=>null,l=()=>null;e&&"object"==typeof e?(r=this.__isAsync?t=>{setTimeout(()=>e.next(t))}:t=>{e.next(t)},e.error&&(i=this.__isAsync?t=>{setTimeout(()=>e.error(t))}:t=>{e.error(t)}),e.complete&&(l=this.__isAsync?()=>{setTimeout(()=>e.complete())}:()=>{e.complete()})):(r=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)},t&&(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)}),n&&(l=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(r,i,l);return e instanceof s.a&&e.add(o),o}}class Wt{constructor({enableLongStackTrace:e=!1}){if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ht(!1),this.onMicrotaskEmpty=new Ht(!1),this.onStable=new Ht(!1),this.onError=new Ht(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),function(e){e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,i,l,o)=>{try{return Gt(e),t.invokeTask(r,i,l,o)}finally{qt(e)}},onInvoke:(t,n,r,i,l,o,s)=>{try{return Gt(e),t.invoke(r,i,l,o,s)}finally{qt(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&("microTask"==i.change?(e.hasPendingMicrotasks=i.microTask,zt(e)):"macroTask"==i.change&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Wt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Wt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){const i=this._inner,l=i.scheduleEventTask("NgZoneEvent: "+r,e,Ut,Bt,Bt);try{return i.runTask(l,t,n)}finally{i.cancelTask(l)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}}function Bt(){}const Ut={};function zt(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Gt(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function qt(e){e._nesting--,zt(e)}class Kt{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ht,this.onMicrotaskEmpty=new Ht,this.onStable=new Ht,this.onError=new Ht}run(e){return e()}runGuarded(e){return e()}runOutsideAngular(e){return e()}runTask(e){return e()}}class Zt{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Wt.assertNotInAngularZone(),Q(()=>{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(){this.isStable()?Q(()=>{for(;0!==this._callbacks.length;)this._callbacks.pop()(this._didWork);this._didWork=!1}):this._didWork=!0}whenStable(e){this._callbacks.push(e),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,t,n){return[]}}class Yt{constructor(){this._applications=new Map,Jt.addToWindow(this)}registerApplication(e,t){this._applications.set(e,t)}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,t=!0){return Jt.findTestabilityInTree(this,e,t)}}function Qt(e){Jt=e}Yt.ctorParameters=(()=>[]);let Xt,Jt=new class{addToWindow(e){}findTestabilityInTree(e,t,n){return null}},en=!0,tn=!1;const nn=new a("AllowMultipleToken");function rn(){if(tn)throw new Error("Cannot enable prod mode after platform setup.");en=!1}function ln(){return tn=!0,en}class on{constructor(e,t){this.name=e,this.token=t}}function sn(e){if(Xt&&!Xt.destroyed&&!Xt.injector.get(nn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Xt=e.get(hn);const t=e.get(ct,null);return t&&t.forEach(e=>e()),Xt}function an(e,t,n=[]){const r=`Platform: ${t}`,i=new a(r);return(t=[])=>{let l=dn();if(!l||l.injector.get(nn,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{const e=n.concat(t).concat({provide:i,useValue:!0});sn(le.create({providers:e,name:r}))}return un(i)}}function un(e){const t=dn();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}function cn(){Xt&&!Xt.destroyed&&Xt.destroy()}function dn(){return Xt&&!Xt.destroyed?Xt:null}class hn{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,t){const n=function(e){return"noop"===e?new Kt:("zone.js"===e?void 0:e)||new Wt({enableLongStackTrace:ln()})}(t?t.ngZone:void 0),r=[{provide:Wt,useValue:n}];return n.run(()=>{const t=le.create({providers:r,parent:this.injector,name:e.moduleType.name}),i=e.create(t),l=i.injector.get(Me,null);if(!l)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return i.onDestroy(()=>gn(this._modules,i)),n.runOutsideAngular(()=>n.onError.subscribe({next:e=>{l.handleError(e)}})),function(e,t,n){try{const r=n();return nt(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e.handleError(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e.handleError(n)),n}}(l,n,()=>{const e=i.injector.get(lt);return e.runInitializers(),e.donePromise.then(()=>(this._moduleDoBootstrap(i),i))})})}bootstrapModule(e,t=[]){const n=this.injector.get(bt),r=fn({},t);return n.createCompiler([r]).compileModuleAsync(e).then(e=>this.bootstrapModuleFactory(e,r))}_moduleDoBootstrap(e){const t=e.injector.get(pn);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(e=>t.bootstrap(e));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${J(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. `+"Please define one of these.");e.instance.ngDoBootstrap(t)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}function fn(e,t){return Array.isArray(t)?t.reduce(fn,e):Object.assign({},e,t)}class pn{constructor(e,t,n,o,s,a){this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=o,this._componentFactoryResolver=s,this._initStatus=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=ln(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const u=new r.a(e=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{e.next(this._stable),e.complete()})}),c=new r.a(e=>{let t;this._zone.runOutsideAngular(()=>{t=this._zone.onStable.subscribe(()=>{Wt.assertNotInAngularZone(),Q(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,e.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{Wt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{e.next(!1)}))});return()=>{t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(i.a)(u,l.a.call(c))}bootstrap(e,t){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=e instanceof Ct?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);const r=n instanceof Tt?null:this._injector.get(Mt),i=n.create(le.NULL,[],t||n.selector,r);i.onDestroy(()=>{this._unloadComponent(i)});const l=i.injector.get(Zt,null);return l&&i.injector.get(Yt).registerApplication(i.location.nativeElement,l),this._loadComponent(i),ln()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),i}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");const e=pn._tickScope();try{this._runningTick=!0,this._views.forEach(e=>e.detectChanges()),this._enforceNoNewChanges&&this._views.forEach(e=>e.checkNoChanges())}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1,Ft(e)}}attachView(e){const t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){const t=e;gn(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(ht,[]).concat(this._bootstrapListeners).forEach(t=>t(e))}_unloadComponent(e){this.detachView(e.hostView),gn(this.components,e)}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy())}get viewCount(){return this._views.length}}function gn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}pn._tickScope=Lt("ApplicationRef#tick()");class mn{constructor(e,t,n,r,i,l){this.id=e,this.templateUrl=t,this.slotCount=n,this.encapsulation=r,this.styles=i,this.animations=l}}class vn{}class yn{}new a("Renderer2Interceptor");class bn{}class wn{}const Cn=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}();class _n{}class xn{constructor(e){this.nativeElement=e}}class Sn{}let En=new Map;function Tn(e,t){const n=En.get(e);if(n)throw new Error(`Duplicate module registered for ${e} - ${n.moduleType.name} vs ${t.moduleType.name}`);En.set(e,t)}function Mn(e){const t=En.get(e);if(!t)throw new Error(`No module with ID ${e} loaded`);return t}class On{constructor(){this.dirty=!0,this._results=[],this.changes=new Ht,this.length=0}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}[Y()](){return this._results[Y()]()}toString(){return this._results.toString()}reset(e){this._results=function e(t){return t.reduce((t,n)=>{const r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}const kn="#",An="NgFactory";class Dn{}const Nn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};class Rn{constructor(e,t){this._compiler=e,this._config=t||Nn}load(e){return this._compiler instanceof vt?this.loadFactory(e):this.loadAndCompile(e)}loadAndCompile(e){let[t,r]=e.split(kn);return void 0===r&&(r="default"),n("Jnfr")(t).then(e=>e[r]).then(e=>In(e,t,r)).then(e=>this._compiler.compileModuleAsync(e))}loadFactory(e){let[t,r]=e.split(kn),i=An;return void 0===r&&(r="default",i=""),n("Jnfr")(this._config.factoryPathPrefix+t+this._config.factoryPathSuffix).then(e=>e[r+i]).then(e=>In(e,t,r))}}function In(e,t,n){if(!e)throw new Error(`Cannot find '${n}' in '${t}'`);return e}class Pn{}class Vn{}class Ln{}class Fn extends Ln{}class $n extends Fn{}class jn{constructor(e,t){this.name=e,this.callback=t}}class Hn{constructor(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof Wn?t.addChild(this):this.parent=null,this.listeners=[]}get injector(){return this._debugContext.injector}get componentInstance(){return this._debugContext.component}get context(){return this._debugContext.context}get references(){return this._debugContext.references}get providerTokens(){return this._debugContext.providerTokens}}class Wn extends Hn{constructor(e,t,n){super(e,t,n),this.properties={},this.attributes={},this.classes={},this.styles={},this.childNodes=[],this.nativeElement=e}addChild(e){e&&(this.childNodes.push(e),e.parent=this)}removeChild(e){const t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))}insertChildrenAfter(e,t){const n=this.childNodes.indexOf(e);-1!==n&&(this.childNodes.splice(n+1,0,...t),t.forEach(e=>{e.parent&&e.parent.removeChild(e),e.parent=this}))}insertBefore(e,t){const n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))}query(e){return this.queryAll(e)[0]||null}queryAll(e){const t=[];return function e(t,n,r){t.childNodes.forEach(t=>{t instanceof Wn&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t}queryAllNodes(e){const t=[];return function e(t,n,r){t instanceof Wn&&t.childNodes.forEach(t=>{n(t)&&r.push(t),t instanceof Wn&&e(t,n,r)})}(this,e,t),t}get children(){return this.childNodes.filter(e=>e instanceof Wn)}triggerEventHandler(e,t){this.listeners.forEach(n=>{n.name==e&&n.callback(t)})}}function Bn(e){return e.map(e=>e.nativeElement)}const Un=new Map;function zn(e){return Un.get(e)||null}function Gn(e){Un.set(e.nativeNode,e)}function qn(e,t){const n=Yn(e),r=Yn(t);return n&&r?function(e,t,n){const r=e[Y()](),i=t[Y()]();for(;;){const e=r.next(),t=i.next();if(e.done&&t.done)return!0;if(e.done||t.done)return!1;if(!n(e.value,t.value))return!1}}(e,t,qn):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||X(e,t)}class Kn{constructor(e){this.wrapped=e}static wrap(e){return new Kn(e)}static unwrap(e){return Kn.isWrapped(e)?e.wrapped:e}static isWrapped(e){return e instanceof Kn}}class Zn{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function Yn(e){return!!Qn(e)&&(Array.isArray(e)||!(e instanceof Map)&&Y()in e)}function Qn(e){return null!==e&&("function"==typeof e||"object"==typeof e)}class Xn{constructor(){}supports(e){return Yn(e)}create(e){return new er(e)}}const Jn=(e,t)=>t;class er{constructor(e){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=e||Jn}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,i=null;for(;t||n;){const l=!n||t&&t.currentIndex{r=this._trackByFn(t,e),null!==i&&X(i.trackById,r)?(l&&(i=this._verifyReinsertion(i,e,r,t)),X(i.item,e)||this._addIdentityChange(i,e)):(i=this._mismatch(i,e,r,t),l=!0),i=i._next,t++}),this.length=t;return this._truncate(i),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,r){let i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(X(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(X(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new tr(t,n),i,r),e}_verifyReinsertion(e,t,n,r){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}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(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new rr),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new rr),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class tr{constructor(e,t){this.item=e,this.trackById=t,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 nr{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&X(n.trackById,e))return n;return null}remove(e){const t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class rr{constructor(){this.map=new Map}put(e){const t=e.trackById;let n=this.map.get(t);n||(n=new nr,this.map.set(t,n)),n.add(e)}get(e,t){const n=this.map.get(e);return n?n.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ir(e,t,n){const r=e.previousIndex;if(null===r)return r;let i=0;return n&&r{if(t&&t.key===n)this._maybeAddToChanges(t,e),this._appendAfter=t,t=t._next;else{const r=this._getOrCreateRecordForKey(n,e);t=this._insertBeforeOrAppend(t,r)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let e=t;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const n=this._records.get(e);this._maybeAddToChanges(n,t);const r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}const n=new sr(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){X(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}}class sr{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}class ar{constructor(e){this.factories=e}static create(e,t){if(null!=t){const n=t.factories.slice();return e=e.concat(n),new ar(e)}return new ar(e)}static extend(e){return{provide:ar,useFactory:t=>{if(!t)throw new Error("Cannot extend IterableDiffers without a parent injector");return ar.create(e,t)},deps:[[ar,new B,new j]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(null!=t)return t;throw new Error(`Cannot find a differ supporting object '${e}' of type '${e.name||typeof e}'`)}}class ur{constructor(e){this.factories=e}static create(e,t){if(t){const n=t.factories.slice();e=e.concat(n)}return new ur(e)}static extend(e){return{provide:ur,useFactory:t=>{if(!t)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return ur.create(e,t)},deps:[[ur,new B,new j]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(t)return t;throw new Error(`Cannot find a differ supporting object '${e}'`)}}const cr=[new lr],dr=[new Xn],hr=new ar(dr),fr=new ur(cr),pr=an(null,"core",[{provide:dt,useValue:"unknown"},{provide:hn,deps:[le]},{provide:Yt,deps:[]},{provide:pt,deps:[]}]),gr=new a("LocaleId"),mr=new a("Translations"),vr=new a("TranslationsFormat"),yr=function(){var e={Error:0,Warning:1,Ignore:2};return e[e.Error]="Error",e[e.Warning]="Warning",e[e.Ignore]="Ignore",e}();function br(){return hr}function wr(){return fr}function Cr(e){return e||"en-US"}class _r{constructor(e){}}const xr=function(){var e={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return e[e.NONE]="NONE",e[e.HTML]="HTML",e[e.STYLE]="STYLE",e[e.SCRIPT]="SCRIPT",e[e.URL]="URL",e[e.RESOURCE_URL]="RESOURCE_URL",e}();class Sr{}function Er(e,t,n){const r=e.state,i=1792&r;return i===t?(e.state=-1793&r|n,e.initIndex=-1,!0):i===n}function Tr(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function Mr(e,t){return e.nodes[t]}function Or(e,t){return e.nodes[t]}function kr(e,t){return e.nodes[t]}function Ar(e,t){return e.nodes[t]}function Dr(e,t){return e.nodes[t]}class Nr{}const Rr={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Ir(e,t,n,r){let i=`ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${t}'. Current value: '${n}'.`;return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(e,t){const n=new Error(e);return Pr(n,t),n}(i,e)}function Pr(e,t){e[Ce]=t,e[xe]=t.logError.bind(t)}function Vr(e){return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${e}`)}const Lr=()=>{},Fr=new Map;function $r(e){let t=Fr.get(e);return t||(t=J(e)+"_"+Fr.size,Fr.set(e,t)),t}function jr(e,t,n,r){if(Kn.isWrapped(r)){r=Kn.unwrap(r);const i=e.def.nodes[t].bindingIndex+n,l=Kn.unwrap(e.oldValues[i]);e.oldValues[i]=new Kn(l)}return r}const Hr="$$undefined",Wr="$$empty";function Br(e){return{id:Hr,styles:e.styles,encapsulation:e.encapsulation,data:e.data}}let Ur=0;function zr(e){if(e&&e.id===Hr){const t=null!=e.encapsulation&&e.encapsulation!==V.None||e.styles.length||Object.keys(e.data).length;e.id=t?`c${Ur++}`:Wr}return e&&e.id===Wr&&(e=null),e||null}function Gr(e,t,n,r){return!(!(2&e.state)&&X(e.oldValues[t.bindingIndex+n],r))}function qr(e,t,n,r){return!!Gr(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function Kr(e,t,n,r){const i=e.oldValues[t.bindingIndex+n];if(1&e.state||!qn(i,r)){const l=t.bindings[n].name;throw Ir(Rr.createDebugContext(e,t.nodeIndex),`${l}: ${i}`,`${l}: ${r}`,0!=(1&e.state))}}function Zr(e){let t=e;for(;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function Yr(e,t){let n=e;for(;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function Qr(e,t,n,r){try{return Zr(33554432&e.def.nodes[t].flags?Or(e,t).componentView:e),Rr.handleEvent(e,t,n,r)}catch(t){e.root.errorHandler.handleError(t)}}function Xr(e){return e.parent?Or(e.parent,e.parentNodeDef.nodeIndex):null}function Jr(e){return e.parent?e.parentNodeDef.parent:null}function ei(e,t){switch(201347067&t.flags){case 1:return Or(e,t.nodeIndex).renderElement;case 2:return Mr(e,t.nodeIndex).renderText}}function ti(e,t){return e?`${e}:${t}`:t}function ni(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function ri(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function ii(e){return 1<{"number"==typeof e?(t[e]=i,n|=ii(e)):r[e]=i}),{matchedQueries:t,references:r,matchedQueryIds:n}}function oi(e,t){return e.map(e=>{let n,r;return Array.isArray(e)?[r,n]=e:(r=0,n=e),n&&("function"==typeof n||"object"==typeof n)&&t&&Object.defineProperty(n,ne,{value:t,configurable:!0}),{flags:r,token:n,tokenKey:$r(n)}})}function si(e,t,n){let r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===V.Native?Or(e,n.renderParent.nodeIndex).renderElement:void 0:t}const ai=new WeakMap;function ui(e){let t=ai.get(e);return t||((t=e(()=>Lr)).factory=e,ai.set(e,t)),t}function ci(e,t,n,r,i){3===t&&(n=e.renderer.parentNode(ei(e,e.def.lastRenderRootNode))),di(e,t,0,e.def.nodes.length-1,n,r,i)}function di(e,t,n,r,i,l,o){for(let s=n;s<=r;s++){const n=e.def.nodes[s];11&n.flags&&fi(e,n,t,i,l,o),s+=n.childCount}}function hi(e,t,n,r,i,l){let o=e;for(;o&&!ni(o);)o=o.parent;const s=o.parent,a=Jr(o),u=a.nodeIndex+a.childCount;for(let c=a.nodeIndex+1;c<=u;c++){const e=s.def.nodes[c];e.ngContentIndex===t&&fi(s,e,n,r,i,l),c+=e.childCount}if(!s.parent){const o=e.root.projectableNodes[t];if(o)for(let t=0;t{const[n,r]=mi(e);return[n,r,t]});return d=zr(d),c&&(t|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:h,matchedQueryIds:p,references:f,ngContentIndex:r,childCount:i,bindings:v,bindingFlags:vi(v),outputs:y,element:{ns:g,name:m,attrs:b,template:null,componentProvider:null,componentView:c||null,componentRendererType:d,publicProviders:null,allProviders:null,handleEvent:u||Lr},provider:null,text:null,query:null,ngContent:null}}function Ei(e,t,n){const r=n.element,i=e.root.selectorOrNode,l=e.renderer;let o;if(e.parent||!i){o=r.name?l.createElement(r.name,r.ns):l.createComment("");const i=si(e,t,n);i&&l.appendChild(i,o)}else o=l.selectRootElement(i);if(r.attrs)for(let s=0;sQr(e,t,n,r)}function Oi(e,t,n,r){if(!qr(e,t,n,r))return!1;const i=t.bindings[n],l=Or(e,t.nodeIndex),o=l.renderElement,s=i.name;switch(15&i.flags){case 1:!function(e,t,n,r,i,l){const o=t.securityContext;let s=o?e.root.sanitizer.sanitize(o,l):l;s=null!=s?s.toString():null;const a=e.renderer;null!=l?a.setAttribute(n,i,s,r):a.removeAttribute(n,i,r)}(e,i,o,i.ns,s,r);break;case 2:!function(e,t,n,r){const i=e.renderer;r?i.addClass(t,n):i.removeClass(t,n)}(e,o,s,r);break;case 4:!function(e,t,n,r,i){let l=e.root.sanitizer.sanitize(xr.STYLE,i);if(null!=l){l=l.toString();const e=t.suffix;null!=e&&(l+=e)}else l=null;const o=e.renderer;null!=l?o.setStyle(n,r,l):o.removeStyle(n,r)}(e,i,o,s,r);break;case 8:!function(e,t,n,r,i){const l=t.securityContext;let o=l?e.root.sanitizer.sanitize(l,i):i;e.renderer.setProperty(n,r,o)}(33554432&t.flags&&32&i.flags?l.componentView:e,i,o,s,r)}return!0}const ki=new Object,Ai=$r(le),Di=$r(Mt);function Ni(e,t,n,r){return n=te(n),{index:-1,deps:oi(r,J(t)),flags:e,token:t,value:n}}function Ri(e){const t={};for(let n=0;n=n.length)&&(t=n.length-1),t<0)return null;const r=n[t];return r.viewContainerParent=null,ji(n,t),Rr.dirtyParentQueries(r),Fi(r),r}function Li(e,t,n){const r=t?ei(t,t.def.lastRenderRootNode):e.renderElement;ci(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function Fi(e){ci(e,3,null,null,void 0)}function $i(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ji(e,t){t>=e.length-1?e.pop():e.splice(t,1)}const Hi=new Object;function Wi(e,t,n,r,i,l){return new Ui(e,t,n,r,i,l)}function Bi(e){return e.viewDefFactory}class Ui extends Ct{constructor(e,t,n,r,i,l){super(),this.selector=e,this.componentType=t,this._inputs=r,this._outputs=i,this.ngContentSelectors=l,this.viewDefFactory=n}get inputs(){const e=[],t=this._inputs;for(let n in t)e.push({propName:n,templateName:t[n]});return e}get outputs(){const e=[];for(let t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e}create(e,t,n,r){if(!r)throw new Error("ngModule should be provided");const i=ui(this.viewDefFactory),l=i.nodes[0].element.componentProvider.nodeIndex,o=Rr.createRootView(e,t||[],n,i,r,Hi),s=kr(o,l).instance;return n&&o.renderer.setAttribute(Or(o,0).renderElement,"ng-version",F.full),new zi(o,new Zi(o),s)}}class zi extends wt{constructor(e,t,n){super(),this._view=e,this._viewRef=t,this._component=n,this._elDef=this._view.def.nodes[0],this.hostView=t,this.changeDetectorRef=t,this.instance=n}get location(){return new xn(Or(this._view,this._elDef.nodeIndex).renderElement)}get injector(){return new Ji(this._view,this._elDef)}get componentType(){return this._component.constructor}destroy(){this._viewRef.destroy()}onDestroy(e){this._viewRef.onDestroy(e)}}function Gi(e,t,n){return new qi(e,t,n)}class qi{constructor(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}get element(){return new xn(this._data.renderElement)}get injector(){return new Ji(this._view,this._elDef)}get parentInjector(){let e=this._view,t=this._elDef.parent;for(;!t&&e;)t=Jr(e),e=e.parent;return e?new Ji(e,t):new Ji(this._view,null)}clear(){for(let e=this._embeddedViews.length-1;e>=0;e--){const t=Vi(this._data,e);Rr.destroyView(t)}}get(e){const t=this._embeddedViews[e];if(t){const e=new Zi(t);return e.attachToViewContainerRef(this),e}return null}get length(){return this._embeddedViews.length}createEmbeddedView(e,t,n){const r=e.createEmbeddedView(t||{});return this.insert(r,n),r}createComponent(e,t,n,r,i){const l=n||this.parentInjector;i||e instanceof Tt||(i=l.get(Mt));const o=e.create(l,r,void 0,i);return this.insert(o.hostView,t),o}insert(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");const n=e;return function(e,t,n,r){let i=t.viewContainer._embeddedViews;null!==n&&void 0!==n||(n=i.length),r.viewContainerParent=e,$i(i,n,r),function(e,t){const n=Xr(t);if(!n||n===e||16&t.state)return;t.state|=16;let r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,t){if(4&t.flags)return;e.nodeFlags|=4,t.flags|=4;let n=t.parent;for(;n;)n.childFlags|=4,n=n.parent}(t.parent.def,t.parentNodeDef)}(t,r),Rr.dirtyParentQueries(r),Li(t,n>0?i[n-1]:null,r)}(this._view,this._data,t,n._view),n.attachToViewContainerRef(this),e}move(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");const n=this._embeddedViews.indexOf(e._view);return function(e,t,r){const i=e.viewContainer._embeddedViews,l=i[n];ji(i,n),null==r&&(r=i.length),$i(i,r,l),Rr.dirtyParentQueries(l),Fi(l),Li(e,r>0?i[r-1]:null,l)}(this._data,0,t),e}indexOf(e){return this._embeddedViews.indexOf(e._view)}remove(e){const t=Vi(this._data,e);t&&Rr.destroyView(t)}detach(e){const t=Vi(this._data,e);return t?new Zi(t):null}}function Ki(e){return new Zi(e)}class Zi{constructor(e){this._view=e,this._viewContainerRef=null,this._appRef=null}get rootNodes(){return function(e){const t=[];return ci(e,0,void 0,void 0,t),t}(this._view)}get context(){return this._view.context}get destroyed(){return 0!=(128&this._view.state)}markForCheck(){Zr(this._view)}detach(){this._view.state&=-5}detectChanges(){const e=this._view.root.rendererFactory;e.begin&&e.begin();try{Rr.checkAndUpdateView(this._view)}finally{e.end&&e.end()}}checkNoChanges(){Rr.checkNoChangesView(this._view)}reattach(){this._view.state|=4}onDestroy(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)}destroy(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Rr.destroyView(this._view)}detachFromAppRef(){this._appRef=null,Fi(this._view),Rr.dirtyParentQueries(this._view)}attachToAppRef(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}attachToViewContainerRef(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}}function Yi(e,t){return new Qi(e,t)}class Qi extends Pn{constructor(e,t){super(),this._parentView=e,this._def=t}createEmbeddedView(e){return new Zi(Rr.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))}get elementRef(){return new xn(Or(this._parentView,this._def.nodeIndex).renderElement)}}function Xi(e,t){return new Ji(e,t)}class Ji{constructor(e,t){this.view=e,this.elDef=t}get(e,t=le.THROW_IF_NOT_FOUND){return Rr.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:$r(e)},t)}}function el(e,t){const n=e.def.nodes[t];if(1&n.flags){const t=Or(e,n.nodeIndex);return n.element.template?t.template:t.renderElement}if(2&n.flags)return Mr(e,n.nodeIndex).renderText;if(20240&n.flags)return kr(e,n.nodeIndex).instance;throw new Error(`Illegal state: read nodeValue for node index ${t}`)}function tl(e){return new nl(e.renderer)}class nl{constructor(e){this.delegate=e}selectRootElement(e){return this.delegate.selectRootElement(e)}createElement(e,t){const[n,r]=mi(t),i=this.delegate.createElement(r,n);return e&&this.delegate.appendChild(e,i),i}createViewRoot(e){return e}createTemplateAnchor(e){const t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t}createText(e,t){const n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n}projectNodes(e,t){for(let n=0;ne())}onDestroy(e){this._destroyListeners.push(e)}}const ll=$r(yn),ol=$r(_n),sl=$r(xn),al=$r(Vn),ul=$r(Pn),cl=$r(Ln),dl=$r(le);function hl(e,t,n,r,i,l,o,s){const a=[];if(o)for(let c in o){const[e,t]=o[c];a[e]={flags:8,name:c,nonMinifiedName:t,ns:null,securityContext:null,suffix:null}}const u=[];if(s)for(let c in s)u.push({type:1,propName:c,target:null,eventName:s[c]});return gl(e,t|=16384,n,r,i,i,l,a,u)}function fl(e,t,n){return gl(-1,e|=16,null,0,t,t,n)}function pl(e,t,n,r,i){return gl(-1,e,t,0,n,r,i)}function gl(e,t,n,r,i,l,o,s,a){const{matchedQueries:u,references:c,matchedQueryIds:d}=li(n);a||(a=[]),s||(s=[]),l=te(l);const h=oi(o,J(i));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:u,matchedQueryIds:d,references:c,ngContentIndex:-1,childCount:r,bindings:s,bindingFlags:vi(s),outputs:a,element:null,provider:{token:i,value:l,deps:h},text:null,query:null,ngContent:null}}function ml(e,t){return wl(e,t)}function vl(e,t){let n=e;for(;n.parent&&!ni(n);)n=n.parent;return Cl(n.parent,Jr(n),!0,t.provider.value,t.provider.deps)}function yl(e,t){const n=Cl(e,t.parent,(32768&t.flags)>0,t.provider.value,t.provider.deps);if(t.outputs.length)for(let r=0;rQr(e,t,n,r)}function wl(e,t){const n=(8192&t.flags)>0,r=t.provider;switch(201347067&t.flags){case 512:return Cl(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,i){const l=i.length;switch(l){case 0:return r();case 1:return r(xl(e,t,n,i[0]));case 2:return r(xl(e,t,n,i[0]),xl(e,t,n,i[1]));case 3:return r(xl(e,t,n,i[0]),xl(e,t,n,i[1]),xl(e,t,n,i[2]));default:const o=Array(l);for(let r=0;r0)u=e,Ul(e)||(c=e);else for(;u&&p===u.nodeIndex+u.childCount;){const e=u.parent;e&&(e.childFlags|=u.childFlags,e.childMatchedQueries|=u.childMatchedQueries),c=(u=e)&&Ul(u)?u.renderParent:u}}return{factory:null,nodeFlags:o,rootNodeFlags:s,nodeMatchedQueries:a,flags:e,nodes:t,updateDirectives:n||Lr,updateRenderer:r||Lr,handleEvent:(e,n,r,i)=>t[n].element.handleEvent(e,r,i),bindingCount:i,outputCount:l,lastRenderRootNode:f}}function Ul(e){return 0!=(1&e.flags)&&null===e.element.name}function zl(e,t,n){const r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${t.nodeIndex}!`)}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${t.nodeIndex}!`);if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${t.nodeIndex}!`);if(134217728&t.flags&&e)throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${t.nodeIndex}!`)}if(t.childCount){const r=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=r&&t.nodeIndex+t.childCount>r)throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${t.nodeIndex}!`)}}function Gl(e,t,n,r){const i=Zl(e.root,e.renderer,e,t,n);return Yl(i,e.component,r),Ql(i),i}function ql(e,t,n){const r=Zl(e,e.renderer,null,null,t);return Yl(r,n,n),Ql(r),r}function Kl(e,t,n,r){const i=t.element.componentRendererType;let l;return l=i?e.root.rendererFactory.createRenderer(r,i):e.root.renderer,Zl(e.root,l,e,t.element.componentProvider,n)}function Zl(e,t,n,r,i){const l=new Array(i.nodes.length),o=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:l,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:o,initIndex:-1}}function Yl(e,t,n){e.component=t,e.context=n}function Ql(e){let t;ni(e)&&(t=Or(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);const n=e.def,r=e.nodes;for(let i=0;i0&&Oi(e,t,0,n)&&(f=!0),h>1&&Oi(e,t,1,r)&&(f=!0),h>2&&Oi(e,t,2,i)&&(f=!0),h>3&&Oi(e,t,3,l)&&(f=!0),h>4&&Oi(e,t,4,o)&&(f=!0),h>5&&Oi(e,t,5,s)&&(f=!0),h>6&&Oi(e,t,6,a)&&(f=!0),h>7&&Oi(e,t,7,u)&&(f=!0),h>8&&Oi(e,t,8,c)&&(f=!0),h>9&&Oi(e,t,9,d)&&(f=!0),f}(e,t,n,r,i,l,o,s,a,u,c,d);case 2:return function(e,t,n,r,i,l,o,s,a,u,c,d){let h=!1;const f=t.bindings,p=f.length;if(p>0&&qr(e,t,0,n)&&(h=!0),p>1&&qr(e,t,1,r)&&(h=!0),p>2&&qr(e,t,2,i)&&(h=!0),p>3&&qr(e,t,3,l)&&(h=!0),p>4&&qr(e,t,4,o)&&(h=!0),p>5&&qr(e,t,5,s)&&(h=!0),p>6&&qr(e,t,6,a)&&(h=!0),p>7&&qr(e,t,7,u)&&(h=!0),p>8&&qr(e,t,8,c)&&(h=!0),p>9&&qr(e,t,9,d)&&(h=!0),h){let h=t.text.prefix;p>0&&(h+=Wl(n,f[0])),p>1&&(h+=Wl(r,f[1])),p>2&&(h+=Wl(i,f[2])),p>3&&(h+=Wl(l,f[3])),p>4&&(h+=Wl(o,f[4])),p>5&&(h+=Wl(s,f[5])),p>6&&(h+=Wl(a,f[6])),p>7&&(h+=Wl(u,f[7])),p>8&&(h+=Wl(c,f[8])),p>9&&(h+=Wl(d,f[9]));const g=Mr(e,t.nodeIndex).renderText;e.renderer.setValue(g,h)}return h}(e,t,n,r,i,l,o,s,a,u,c,d);case 16384:return function(e,t,n,r,i,l,o,s,a,u,c,d){const h=kr(e,t.nodeIndex),f=h.instance;let p=!1,g=void 0;const m=t.bindings.length;return m>0&&Gr(e,t,0,n)&&(p=!0,g=El(e,h,t,0,n,g)),m>1&&Gr(e,t,1,r)&&(p=!0,g=El(e,h,t,1,r,g)),m>2&&Gr(e,t,2,i)&&(p=!0,g=El(e,h,t,2,i,g)),m>3&&Gr(e,t,3,l)&&(p=!0,g=El(e,h,t,3,l,g)),m>4&&Gr(e,t,4,o)&&(p=!0,g=El(e,h,t,4,o,g)),m>5&&Gr(e,t,5,s)&&(p=!0,g=El(e,h,t,5,s,g)),m>6&&Gr(e,t,6,a)&&(p=!0,g=El(e,h,t,6,a,g)),m>7&&Gr(e,t,7,u)&&(p=!0,g=El(e,h,t,7,u,g)),m>8&&Gr(e,t,8,c)&&(p=!0,g=El(e,h,t,8,c,g)),m>9&&Gr(e,t,9,d)&&(p=!0,g=El(e,h,t,9,d,g)),g&&f.ngOnChanges(g),65536&t.flags&&Tr(e,256,t.nodeIndex)&&f.ngOnInit(),262144&t.flags&&f.ngDoCheck(),p}(e,t,n,r,i,l,o,s,a,u,c,d);case 32:case 64:case 128:return function(e,t,n,r,i,l,o,s,a,u,c,d){const h=t.bindings;let f=!1;const p=h.length;if(p>0&&qr(e,t,0,n)&&(f=!0),p>1&&qr(e,t,1,r)&&(f=!0),p>2&&qr(e,t,2,i)&&(f=!0),p>3&&qr(e,t,3,l)&&(f=!0),p>4&&qr(e,t,4,o)&&(f=!0),p>5&&qr(e,t,5,s)&&(f=!0),p>6&&qr(e,t,6,a)&&(f=!0),p>7&&qr(e,t,7,u)&&(f=!0),p>8&&qr(e,t,8,c)&&(f=!0),p>9&&qr(e,t,9,d)&&(f=!0),f){const f=Ar(e,t.nodeIndex);let g;switch(201347067&t.flags){case 32:g=new Array(h.length),p>0&&(g[0]=n),p>1&&(g[1]=r),p>2&&(g[2]=i),p>3&&(g[3]=l),p>4&&(g[4]=o),p>5&&(g[5]=s),p>6&&(g[6]=a),p>7&&(g[7]=u),p>8&&(g[8]=c),p>9&&(g[9]=d);break;case 64:g={},p>0&&(g[h[0].name]=n),p>1&&(g[h[1].name]=r),p>2&&(g[h[2].name]=i),p>3&&(g[h[3].name]=l),p>4&&(g[h[4].name]=o),p>5&&(g[h[5].name]=s),p>6&&(g[h[6].name]=a),p>7&&(g[h[7].name]=u),p>8&&(g[h[8].name]=c),p>9&&(g[h[9].name]=d);break;case 128:const e=n;switch(p){case 1:g=e.transform(n);break;case 2:g=e.transform(r);break;case 3:g=e.transform(r,i);break;case 4:g=e.transform(r,i,l);break;case 5:g=e.transform(r,i,l,o);break;case 6:g=e.transform(r,i,l,o,s);break;case 7:g=e.transform(r,i,l,o,s,a);break;case 8:g=e.transform(r,i,l,o,s,a,u);break;case 9:g=e.transform(r,i,l,o,s,a,u,c);break;case 10:g=e.transform(r,i,l,o,s,a,u,c,d)}}f.value=g}return f}(e,t,n,r,i,l,o,s,a,u,c,d);default:throw"unreachable"}}(e,t,r,i,l,o,s,a,u,c,d,h):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){let r=!1;for(let i=0;i0&&Kr(e,t,0,n),h>1&&Kr(e,t,1,r),h>2&&Kr(e,t,2,i),h>3&&Kr(e,t,3,l),h>4&&Kr(e,t,4,o),h>5&&Kr(e,t,5,s),h>6&&Kr(e,t,6,a),h>7&&Kr(e,t,7,u),h>8&&Kr(e,t,8,c),h>9&&Kr(e,t,9,d)}(e,t,r,i,l,o,s,a,u,c,d,h):function(e,t,n){for(let r=0;rnew Go(e,t),handleEvent:Vo,updateDirectives:Lo,updateRenderer:Fo}:{setCurrentNode:()=>{},createRootView:po,createEmbeddedView:Gl,createComponentView:Kl,createNgModuleRef:rl,overrideProvider:Lr,overrideComponentView:Lr,clearOverrides:Lr,checkAndUpdateView:Jl,checkNoChangesView:Xl,destroyView:io,createDebugContext:(e,t)=>new Go(e,t),handleEvent:(e,t,n,r)=>e.def.handleEvent(e,t,n,r),updateDirectives:(e,t)=>e.def.updateDirectives(0===t?To:Mo,e),updateRenderer:(e,t)=>e.def.updateRenderer(0===t?To:Mo,e)};Rr.setCurrentNode=e.setCurrentNode,Rr.createRootView=e.createRootView,Rr.createEmbeddedView=e.createEmbeddedView,Rr.createComponentView=e.createComponentView,Rr.createNgModuleRef=e.createNgModuleRef,Rr.overrideProvider=e.overrideProvider,Rr.overrideComponentView=e.overrideComponentView,Rr.clearOverrides=e.clearOverrides,Rr.checkAndUpdateView=e.checkAndUpdateView,Rr.checkNoChangesView=e.checkNoChangesView,Rr.destroyView=e.destroyView,Rr.resolveDep=xl,Rr.createDebugContext=e.createDebugContext,Rr.handleEvent=e.handleEvent,Rr.updateDirectives=e.updateDirectives,Rr.updateRenderer=e.updateRenderer,Rr.dirtyParentQueries=Al}function po(e,t,n,r,i,l){return ql(mo(e,i,i.injector.get(wn),t,n),r,l)}function go(e,t,n,r,i,l){const o=i.injector.get(wn),s=mo(e,i,new Yo(o),t,n),a=Eo(r);return Ko(Do.create,ql,null,[s,a,l])}function mo(e,t,n,r,i){const l=t.injector.get(Sr),o=t.injector.get(Me);return{ngModule:t,injector:e,projectableNodes:r,selectorOrNode:i,sanitizer:l,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:o}}function vo(e,t,n,r){const i=Eo(n);return Ko(Do.create,Gl,null,[e,t,i,r])}function yo(e,t,n,r){return n=Co.get(t.element.componentProvider.provider.token)||Eo(n),Ko(Do.create,Kl,null,[e,t,n,r])}function bo(e,t,n,r){return rl(e,t,n,function(e){const{hasOverrides:t,hasDeprecatedOverrides:n}=function(e){let t=!1,n=!1;return 0===wo.size?{hasOverrides:t,hasDeprecatedOverrides:n}:(e.providers.forEach(e=>{const r=wo.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),{hasOverrides:t,hasDeprecatedOverrides:n})}(e);return t?(function(e){for(let t=0;tLr)),e):e}(r))}const wo=new Map,Co=new Map;function _o(e){wo.set(e.token,e)}function xo(e,t){const n=ui(ui(Bi(t)).nodes[0].element.componentView);Co.set(e,n)}function So(){wo.clear(),Co.clear()}function Eo(e){if(0===wo.size)return e;const t=function(e){const t=[];let n=null;for(let r=0;rLr);for(let r=0;r"-"+e[1].toLowerCase())}`}const Wo=/([A-Z])/g;function Bo(e){try{return null!=e?e.toString().slice(0,30):e}catch(e){return"[ERROR] Exception while trying to serialize the value"}}function Uo(e,t){for(let n=t;n++l===i?e.error.bind(e,...t):Lr),l0&&ds(n[t-1],r.next),n.splice(t,1),function(e){let t=e;for(;t;){let n=null;if(t.views&&t.views.length?n=t.views[0].data:t.child?n=t.child:t.next&&(fs(t),n=t.next),null==n){for(;t&&!t.next;)fs(t),t=hs(t,e);fs(t||e),n=t&&t.next}t=n}}(r.data),us(e,r,!1),e.query&&e.query.removeView(e,r,t),r}function ds(e,t){e.next=t,e.data.next=t?t.data:null}function hs(e,t){let n;return(n=e.node)&&2==(3&n.flags)?n.parent.data:e.parent===t?null:e.parent}function fs(e){if(!e.cleanup)return;const t=e.cleanup;for(let n=0;ndocument},ys="__ngHostLNode__";let bs,ws,Cs,_s,xs,Ss,Es,Ts,Ms,Os,ks,As;function Ds(e,t){const n=Ss;return Ms=e.data,Os=e.bindingStartIndex||0,xs=e.ngStaticData,Ts=e.creationMode,As=e.viewHookStartIndex,ks=e.cleanup,bs=e.renderer,null!=t&&(Cs=t,_s=!0),Ss=e,n}function Ns(e){!function(){if(null==As)return;let e=As,t=e;for(;e=xs.length?xs[e]=null:s.staticData=xs[e],_s?(Es=null,Cs.view!==Ss&&2!=(3&Cs.flags)||(ngDevMode&&rs(Cs.child,null,"previousNode.child"),Cs.child=s)):Cs&&(ngDevMode&&rs(Cs.next,null,"previousNode.next"),Cs.next=s)),Cs=s,_s=!0,s}function Ps(e,t,n,r){let i,l;if(null==t){const t=Ms[e];l=t&&t.native}else{ngDevMode&&rs(Ss.bindingStartIndex,null,"bindingStartIndex");const o="string"!=typeof t,s=o?t.tag:t;if(null===s)throw"for now name is required";{l=bs.createElement(s);let a=null;if(o){const e=Vs(t.template);a=Js(Rs(-1,ws.createRenderer(l,t.rendererType),e))}null==(i=Is(e,3,l,a)).staticData&&(ngDevMode&&ia(e-1),i.staticData=xs[e]=Hs(s,n||null,null,r||null)),n&&function(e,t){ngDevMode&&rs(t.length%2,0,"attrs.length % 2");const n=bs.setAttribute;for(let r=0;r>12;for(let i=r,l=r+((4092&e)>>2);i=xs.length&&(xs[e]=n,r)){ngDevMode&&is(Cs.staticData,"previousOrParentNode.staticData");const t=Cs.staticData;(t.localNames||(t.localNames=[])).push(r,e)}const o=n.diPublic;o&&o(n);const s=Cs.staticData;s&&s.attrs&&function(e,t,r){const i=((4092&Cs.flags)>>2)-1;let l=r.initialInputs;(void 0===l||i>=l.length)&&(l=function(e,t,n){const r=n.initialInputs||(n.initialInputs=[]);r[e]=null;const i=n.attrs;for(let l=0;l=n.length||null==n[e])&&(n[e]=[]),n[e]}(e,t));Ds(r,Is(null,2,null,r)),n.nextIndex++}return!l}function Qs(){_s=!1;const e=Cs=Ss.node,t=Cs.parent;ngDevMode&&ss(e,2),ngDevMode&&ss(t,0);const n=t.data,r=n.nextIndex<=n.views.length?n.views[n.nextIndex-1]:null;(null==r||r.data.id!==e.data.id)&&(function(e,t,n){const r=e.data,i=r.views;n>0&&ds(i[n-1],t),n=i.length&&i.push(t),r.nextIndex<=n&&r.nextIndex++,null!==e.data.renderParent&&us(e,t,!0,function(t,n,r){const i=n.views;return t+1")}(t?t.length:0)}function la(e,t={}){const n=t.rendererFactory||vs,r=e.ngComponentDef;let i;const l=Fs(n,t.host||r.tag),o=Ds(Rs(-1,n.createRenderer(l,r.rendererType),[]),null);try{_s=!1,Cs=null,Is(0,3,l,Rs(-1,bs,Vs(r.template))),i=zs(1,r.n(),r)}finally{Ns(o)}return t.features&&t.features.forEach(e=>e(i,r)),oa(i),i}function oa(e){ngDevMode&&is(e,"component");const t=e[ys];ngDevMode&&!t&&Ls("Not a directive instance",e),ngDevMode&&is(t.data,"hostNode.data"),function(e,n,r,i){const l=Ds(n,t);try{ws.begin&&ws.begin(),r.constructor.ngComponentDef.r(1,0)}finally{ws.end&&ws.end(),n.creationMode=!1,Ns(l)}}(0,t.view,e),sa=!1}let sa=!1;function aa(e){const t={type:e.type,diPublic:null,n:e.factory,tag:e.tag||null,template:e.template||null,r:e.refresh||function(t,n){Xs(t,n,e.template)},h:e.hostBindings||ca,inputs:da(e.inputs),outputs:da(e.outputs),methods:da(e.methods),rendererType:zr(e.rendererType)||null},n=e.features;return n&&n.forEach(e=>e(t)),t}const ua={};function ca(){}function da(e){if(null==e)return ua;const t={};for(let n in e)t[e[n]]=n;return t}function ha(e,t){return{type:7,name:e,definitions:t,options:{}}}function fa(e,t=null){return{type:4,styles:t,timings:e}}function pa(e,t=null){return{type:3,steps:e,options:t}}function ga(e,t=null){return{type:2,steps:e,options:t}}function ma(e){return{type:6,styles:e,offset:null}}function va(e,t,n){return{type:0,name:e,styles:t,options:n}}function ya(e){return{type:5,steps:e}}function ba(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}const wa="*";function Ca(e,t){return ha(e,t)}function _a(e,t){return fa(e,t)}function xa(e){return pa(e)}function Sa(e){return ga(e)}function Ea(e){return ma(e)}function Ta(e,t){return va(e,t)}function Ma(e){return ya(e)}function Oa(e,t){return ba(e,t)}}).call(t,n("DuR2"))},"6MRC":function(e,t,n){"use strict";const r=Array.isArray||(e=>e&&"number"==typeof e.length);t.a=r},"73El":function(e,t,n){"use strict";var r=n("bbL7"),i=n("FvzS"),l=n("ves3");const o=function(e){const t=e.Symbol;if("function"==typeof t)return t.iterator||(t.iterator=t("iterator polyfill")),t.iterator;{const{Set:t}=e;if(t&&"function"==typeof(new t)["@@iterator"])return"@@iterator";const{Map:n}=e;if(n){let e=Object.getOwnPropertyNames(n.prototype);for(let t=0;te&&"number"==typeof e.length)(t)){for(let e=0,n=t.length;e{c.closed||(c.next(e),c.complete())},e=>c.error(e)).then(null,e=>{r.a.setTimeout(()=>{throw e})}),c;if(t&&"function"==typeof t[o]){const e=t[o]();for(;;){let t=e.next();if(t.done){c.complete();break}if(c.next(t.value),c.closed)break}}else if(t&&"function"==typeof t[u.a]){const r=t[u.a]();if("function"==typeof r.subscribe)return r.subscribe(new a(e,n,s));c.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{const e=`You provided ${Object(i.a)(t)?"an invalid object":`'${t}'`} where a stream was expected.`+" You can provide an Observable, Promise, Array, or Iterable.";c.error(new TypeError(e))}}return null}},"73T8":function(e,t,n){"use strict";const r=n("bbL7").a.Symbol,i="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber";t.a=i},"7nan":function(e,t,n){"use strict";t.a=class extends Error{constructor(){const e=super("object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}}},"8U58":function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),l=/Edge\/(\d+)/.exec(e),o=r||i||l,s=o&&(r?document.documentMode||6:+(l||i)[1]),a=!l&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!l&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!l&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),C=d&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(d=!1,a=!0);var _=y&&(u||d&&(null==C||C<12.11)),x=n||o&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,T=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return M(e).appendChild(t)}function k(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return o+(t-l);o+=s-l,o+=n-o%n,l=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(P=function(e){try{e.select()}catch(e){}});var $=function(){this.id=null};function j(e,t){for(var n=0;n=t)return r+Math.min(o,t-i);if(i+=l-r,r=l+1,(i+=n-i%n)>=t)return r}}var q=[""];function K(e){for(;q.length<=e;)q.push(Z(q)+" ");return q[e]}function Z(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function le(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,l=r<0?Math.ceil(i):Math.floor(i);if(l==t)return e(l)?t:n;e(l)?n=l:t=l+r}}var se=null;function ae(e,t,n){var r;se=null;for(var i=0;it)return i;l.to==t&&(l.from!=l.to&&"before"==n?r=i:se=i),l.from==t&&(l.from!=l.to&&"before"!=n?r=i:se=i)}return null!=r?r:se}var ue=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,l=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,d=[],h=0;h-1&&(r[t]=i.slice(0,l).concat(i.slice(l+1)))}}}function ge(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){we(e),Ce(e)}function Se(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Me,Oe=function(){if(o&&s<9)return!1;var e=k("div");return"draggable"in e||"dragDrop"in e}();function ke(e){if(null==Te){var t=k("span","\u200b");O(e,k("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Te?k("span","\u200b"):k("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Me)return Me;var t=O(e,document.createTextNode("A\u062eA")),n=E(t,0,1).getBoundingClientRect(),r=E(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Me=r.right-n.right<3)}var De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var l=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=l.indexOf("\r");-1!=o?(n.push(l.slice(0,o)),t+=o+1):(n.push(l),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re=function(){var e=k("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ie=null,Pe={},Ve={};function Le(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Le("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Le("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Le(t);var n=Pe[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var l in i)i.hasOwnProperty(l)&&(r.hasOwnProperty(l)&&(r["_"+l]=r[l]),r[l]=i[l])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var $e={};function je(e,t){L(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function He(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Be(e,t,n){return!e.startState||e.startState(t,n)}var Ue=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],l=i.chunkSize();if(t=e.first&&tn?Je(n,ze(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?Je(e.line,t):n<0?Je(e.line,0):e}(t,ze(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r=this.string.length},Ue.prototype.sol=function(){return this.pos==this.lineStart},Ue.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ue.prototype.next=function(){if(this.post},Ue.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ue.prototype.skipToEnd=function(){this.pos=this.string.length},Ue.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ue.prototype.backUp=function(e){this.pos-=e},Ue.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ue.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ue.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ue.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ue.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var at=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ct(e,t,n,r){var i=[e.state.modeGen],l={};bt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},l,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],a=1,u=0;n.state=!0,bt(e,t.text,s.mode,n,function(e,t){for(var n=a;ue&&i.splice(a,1,e,i[a+1],r),a+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;ne.options.maxHighlightLength&&He(e.doc.mode,r.state),l=ct(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=l.styles,l.classes?t.styleClasses=l.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var l=function(e,t,n){for(var r,i,l=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=l.first)return l.first;var a=ze(l,s-1),u=a.stateAfter;if(u&&(!n||s+(u instanceof at?u.lookAhead:0)<=l.modeFrontier))return s;var c=F(a.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),o=l>r.first&&ze(r,l-1).stateAfter,s=o?ut.fromSaved(r,o,l):new ut(r,Be(r.mode),l);return r.iter(l,t,function(n){ft(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return l}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof at?new ut(e,He(e.mode,t.state),n,t.lookAhead):new ut(e,He(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new at(t,this.maxLookAhead):t};var mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function vt(e,t,n,r){var i,l,o=e.doc,s=o.mode,a=ze(o,(t=ot(o,t)).line),u=ht(e,t.line,n),c=new Ue(a.text,e.options.tabSize,u);for(r&&(l=[]);(r||c.pose.options.maxHighlightLength?(s=!1,o&&ft(e,t,r,d.pos),d.pos=t.length,a=null):a=yt(gt(n,d,r.state,h),l),h){var f=h[0].name;f&&(a="m-"+(a?f+" "+a:f))}if(!s||c!=a){for(;u=t:l.to>t)?null:l.to))}return r}(n,i,o),a=function(e,t,n){var r;if(e)for(var i=0;i=t:l.to>t)||l.from==t&&"bookmark"==o.type&&(!n||l.marker.insertLeft))&&(r||(r=[])).push(new _t(o,null==l.from||(o.inclusiveLeft?l.from<=t:l.from0&&s)for(var b=0;bt)&&(!n||Dt(n,l.marker)<0)&&(n=l.marker)}return n}function Vt(e,t,n,r,i){var l=ze(e,t),o=Ct&&l.markedSpans;if(o)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?et(u.to,n)>=0:et(u.to,n)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?et(u.from,r)<=0:et(u.from,r)<0)))return!0}}}function Lt(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=ze(e,t),r=Lt(n);return n==r?t:Ze(r)}function $t(e,t){if(t>e.lastLine())return t;var n,r=ze(e,t);if(!jt(e,r))return t;for(;n=It(r);)r=n.find(1,!0).line;return Ze(r)+1}function jt(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var zt=function(e,t,n){this.text=e,Ot(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Mt(e)}zt.prototype.lineNo=function(){return Ze(this)},be(zt);var qt={},Kt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Kt:qt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var n=A("span",null,null,a?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var l=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Xt,Ae(e.display.measure)&&(o=ce(l,e.doc.direction))&&(r.addToken=Jt(r.addToken,o)),r.map=[],tn(l,r,dt(e,l,t!=e.display.externalMeasured&&Ze(l))),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=I(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=I(l.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(ke(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Qt(e){var t=k("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Xt(e,t,n,r,i,l,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);h++);if(d.to>=c)return e(n,r,i,l,o,s,a);e(n,r.slice(0,d.to-u),i,l,null,s,a),l=null,r=r.slice(d.to-u),u=d.to}}}function en(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tn(e,t,n){var r=e.markedSpans,i=e.text,l=0;if(r)for(var o,s,a,u,c,d,h,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){a=u=c=s="",h=null,d=null,v=1/0;for(var y=[],b=void 0,w=0;wp||_.collapsed&&C.to==p&&C.from==p)){if(null!=C.to&&C.to!=p&&v>C.to&&(v=C.to,u=""),_.className&&(a+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&C.from==p&&(c+=" "+_.startStyle),_.endStyle&&C.to==v&&(b||(b=[])).push(_.endStyle,C.to),_.title&&((h||(h={})).title=_.title),_.attributes)for(var x in _.attributes)(h||(h={}))[x]=_.attributes[x];_.collapsed&&(!d||Dt(d.marker,_)<0)&&(d=C)}else C.from>p&&v>C.from&&(v=C.from)}if(b)for(var S=0;S=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var O=M>T?m.slice(0,T-p):m;t.addToken(t,O,o?o+a:a,c,p+O.length==v?u:"",s,h)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,c=""}m=i.slice(l,l=n[g++]),o=Zt(n[g++],t.cm.options)}}else for(var k=1;kn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function kn(e,t,n,r){return Nn(e,Dn(e,t),n,r)}function An(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&l.push((a.bottom+u.top)/2-n.top)}}l.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,n,r){var i,l=Pn(t.map,n,r),a=l.node,u=l.start,c=l.end,d=l.collapse;if(3==a.nodeType){for(var h=0;h<4;h++){for(;u&&ie(t.line.text.charAt(l.coverStart+u));)--u;for(;l.coverStart+c1}(e.display.measure))return n;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*r,right:n.right*r,top:n.top*i,bottom:n.bottom*i}}(0,i))}else{var f;u>0&&(d=r="right"),i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(o&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tr(e.display),top:p.top,bottom:p.bottom}:In}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;bt)&&(i=(l=a-s)-1,t>=a&&(o="right")),null!=i){if(r=e[u+2],s==a&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],o="left";if("right"==n&&i==a-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function Ln(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(a=r.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return o("before"==u?a-1:a,"before"==u);function c(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var d=ae(s,a,u),h=se,f=c(a,d,"before"==u);return null!=h&&(f.other=c(a,h,"before"!=u)),f}function qn(e,t){var n=0;t=ot(e.doc,t),e.options.lineWrapping||(n=tr(e.display)*t.ch);var r=ze(e.doc,t.line),i=Wt(r)+_n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Kn(e,t,n,r,i){var l=Je(e,t,n);return l.xRel=i,r&&(l.outside=!0),l}function Zn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Kn(r.first,0,null,!0,-1);var i=Ye(r,n),l=r.first+r.size-1;if(i>l)return Kn(r.first+r.size-1,ze(r,l).text.length,null,!0,1);t<0&&(t=0);for(var o=ze(r,i);;){var s=Jn(e,o,i,t,n),a=Pt(o,s.ch+(s.xRel>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;o=ze(r,i=u.line)}}function Yn(e,t,n,r){r-=Wn(t);var i=t.text.length,l=oe(function(t){return Nn(e,n,t-1).bottom<=r},i,0);return{begin:l,end:i=oe(function(t){return Nn(e,n,t).top>r},l,i)}}function Qn(e,t,n,r){return n||(n=Dn(e,t)),Yn(e,t,n,Bn(e,t,Nn(e,n,r),"line").top)}function Xn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Jn(e,t,n,r,i){i-=Wt(t);var l=Dn(e,t),o=Wn(t),s=0,a=t.text.length,u=!0,c=ce(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?function(e,t,n,r,i,l,o){var s=Yn(e,t,r,o),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h=u||f.to<=a)){var p=Nn(e,r,1!=f.level?Math.min(u,f.to)-1:Math.max(a,f.from)).right,g=pg)&&(c=f,d=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}:function(e,t,n,r,i,l,o){var s=oe(function(s){var a=i[s],u=1!=a.level;return Xn(Gn(e,Je(n,u?a.to:a.from,u?"before":"after"),"line",t,r),l,o,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Gn(e,Je(n,u?a.from:a.to,u?"after":"before"),"line",t,r);Xn(c,l,o,!0)&&c.top>o&&(a=i[s-1])}return a})(e,t,n,l,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,a=u?d.to:d.from-1}var h,f,p=null,g=null,m=oe(function(t){var n=Nn(e,l,t);return n.top+=o,n.bottom+=o,!!Xn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)},s,a),v=!1;if(g){var y=r-g.left=w.bottom}return Kn(n,m=le(t.text,m,1),f,v,r-h)}function er(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rn){Rn=k("pre");for(var t=0;t<49;++t)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(k("br"));Rn.appendChild(document.createTextNode("x"))}O(e.measure,Rn);var n=Rn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function tr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=k("span","xxxxxxxxxx"),n=k("pre",[t]);O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function nr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,l=t.gutters.firstChild,o=0;l;l=l.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=l.offsetLeft+l.clientLeft+i,r[s]=l.clientWidth}return{fixedPos:rr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function rr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ir(e){var t=er(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/tr(e.display)-3);return function(i){if(jt(e.doc,i))return 0;var l=0;if(i.widgets)for(var o=0;o=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Ft(e.doc,t)i.viewFrom?cr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)cr(e);else if(t<=i.viewFrom){var l=dr(e,n,n+r,1);l?(i.view=i.view.slice(l.index),i.viewFrom=l.lineN,i.viewTo+=r):cr(e)}else if(n>=i.viewTo){var o=dr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):cr(e)}else{var s=dr(e,t,t,-1),a=dr(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(rn(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):cr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var l=r.view[sr(e,t)];if(null!=l.node){var o=l.changes||(l.changes=[]);-1==j(o,n)&&o.push(n)}}}function cr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function dr(e,t,n,r){var i,l=sr(e,t),o=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:l,lineN:n};for(var s=e.display.viewFrom,a=0;a0){if(l==o.length-1)return null;i=s+o[l].size-t,l++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(l==(r<0?0:o.length-1))return null;n+=r*o[l-(r<0?1:0)].size,l+=r}return{index:l,lineN:n}}function hr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",l),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?h:r,function(e,t,i,d){var m="ltr"==i,v=f(e,m?"left":"right"),y=f(t-1,m?"right":"left"),b=null==n&&0==e,w=null==r&&t==h,C=0==d,_=!g||d==g.length-1;if(y.top-v.top<=3){var x=(u?b:w)&&C?s:(m?v:y).left;c(x,v.top,((u?w:b)&&_?a:(m?y:v).right)-x,v.bottom)}else{var S,E,T,M;m?(S=u&&b&&C?s:v.left,E=u?a:p(e,i,"before"),T=u?s:p(t,i,"after"),M=u&&w&&_?a:y.right):(S=u?p(e,i,"before"):s,E=!u&&b&&C?a:v.right,T=!u&&w&&_?s:y.left,M=u?p(t,i,"after"):a),c(S,v.top,E-S,v.bottom),v.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function br(e){e.state.focused||(e.display.input.focus(),Cr(e))}function wr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,_r(e))},100)}function Cr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),yr(e))}function _r(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function xr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Ke(i.line,a),Sr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(u/tr(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Sr(e){if(e.widgets)for(var t=0;t=o&&(l=Ye(t,Wt(ze(t,a))-e.wrapper.clientHeight),o=a)}return{from:l,to:Math.max(o,l+1)}}function Tr(e,t){var n=e.display,r=er(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,l=Mn(e),o={};t.bottom-t.top>l&&(t.bottom=t.top+l);var s=e.doc.height+xn(n),a=t.bottom>s-r;if(t.topi+l){var u=Math.min(t.top,(a?s:t.bottom)-l);u!=i&&(o.scrollTop=u)}var c=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,d=Tn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?o.scrollLeft=0:t.leftd+c-3&&(o.scrollLeft=t.right+(h?0:10)-d),o}function Mr(e,t){null!=t&&(Ar(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Or(e){Ar(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function kr(e,t,n){null==t&&null==n||Ar(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ar(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Dr(e,qn(e,t.from),qn(e,t.to),t.margin))}function Dr(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});kr(e,i.scrollLeft,i.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Rr(e,t,!0),n&&li(e),ei(e,100))}function Rr(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Ir(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,ai(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Pr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+xn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Vr=function(e,t,n){this.cm=n;var r=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),he(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;return n?(this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0",this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+(e.viewHeight-(t?r:0)))+"px"):(this.vert.style.display="",this.vert.firstChild.style.height="0"),t?(this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px",this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+(e.viewWidth-e.barLeft-(n?r:0)))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0"),!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vr.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=y&&!f?"12px":"18px",this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},Vr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)})},Vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Lr=function(){};function Fr(e,t){t||(t=Pr(e));var n=e.display.barWidth,r=e.display.barHeight;$r(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&xr(e),$r(e,Pr(e)),n=e.display.barWidth,r=e.display.barHeight}function $r(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Lr.prototype.update=function(){return{bottom:0,right:0}},Lr.prototype.setScrollLeft=function(){},Lr.prototype.setScrollTop=function(){},Lr.prototype.clear=function(){};var jr={native:Vr,null:Lr};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new jr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?Ir(e,t):Nr(e,t)},e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Br(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},function(e){ln?ln.ops.push(e):e.ownsGroup=ln={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Ur(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Gr(e){e.updatedDisplay=e.mustUpdate&&ri(e.cm,e.update)}function qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&xr(t),e.barMeasure=Pr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=kn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var l=k("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-_n(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?Je(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?Je(t.line,t.ch+1,"before"):t);for(var l=0;l<5;l++){var o=!1,s=Gn(e,t),a=n&&n!=t?Gn(e,n):s,u=Tr(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-r,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Nr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=u.scrollLeft&&(Ir(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}(t,ot(r,e.scrollToPos.from),ot(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(i)for(var o=0;o=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ht(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(l){if(r.line>=e.display.viewFrom){var o=l.styles,s=l.text.length>e.options.maxHighlightLength?He(t.mode,r.state):null,a=ct(e,l,r,!0);s&&(r.state=s),l.styles=a.styles;var u=l.styleClasses,c=a.classes;c?l.styleClasses=c:u&&(l.styleClasses=null);for(var d=!o||o.length!=l.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&hn)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Yr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==hr(e))return!1;ui(e)&&(cr(e),t.dims=nr(e));var i=r.first+r.size,l=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Ct&&(l=Ft(e.doc,l),o=$t(e.doc,o));var s=l!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=rn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=rn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,sr(e,n)))),r.viewTo=n}(e,l,o),n.viewOffset=Wt(ze(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=hr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=N();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,l=r.lineDiv,o=l.firstChild;function s(t){var n=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(f=!1),un(e,h,c,n)),f&&(M(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Xe(e.options,c)))),o=h.node.nextSibling}else{var p=mn(e,h,c,n);l.insertBefore(p,o)}c+=h.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ei(e,400)),n.updateLineNumbers=null,!0}function ii(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+xn(e.display)-Mn(e),n.top)}),t.visible=Er(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ri(e,t);r=!1){xr(e);var i=Pr(e);fr(e),Fr(e,i),si(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ni(e,t);if(ri(e,n)){xr(e),ii(e,n);var r=Pr(e);fr(e),Fr(e,r),si(e,r),n.finish()}}function oi(e){e.sizer.style.marginLeft=e.gutters.offsetWidth+"px"}function si(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function ai(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=rr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,l=r+"px",o=0;os.clientHeight;if(i&&s.scrollWidth>s.clientWidth||l&&u){if(l&&y&&a)e:for(var c=t.target,h=o.view;c!=s;c=c.parentNode)for(var f=0;f=0&&et(e,r.to())<=0)return n}return-1};var bi=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return et(e.from(),t.from())}),n=j(t,i);for(var l=1;l0:a>=0){var u=it(s.from(),o.from()),c=rt(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;l<=n&&--n,t.splice(--l,2,new bi(d?c:u,d?u:c))}}return new yi(t,n)}function Ci(e,t){return new yi([new bi(e,t||e)],0)}function _i(e){return e.text?Je(e.from.line+e.text.length-1,Z(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function xi(e,t){if(et(e,t.from)<0)return e;if(et(e,t.to)<=0)return _i(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=_i(t).ch-t.to.ch),Je(n,r)}function Si(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}sn(e,"change",e,t)}function Ai(e,t,n){!function e(r,i,l){if(r.linked)for(var o=0;os-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(l=function(e,t){return t?(Pi(e.done),Z(e.done)):e.done.length&&!Z(e.done).ranges?Z(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Z(e.done)):void 0}(i,i.lastOp==r)))o=Z(l.changes),0==et(t.from,t.to)&&0==et(t.from,o.to)?o.to=_i(t):l.changes.push(Ii(e,t));else{var a=Z(i.done);for(a&&a.ranges||Li(e.sel,i.done),l={changes:[Ii(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||ge(e,"historyAdded")}function Li(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fi(e,t,n,r){var i=t["spans_"+e.id],l=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[l]=n.markedSpans),++l})}function $i(e){if(!e)return null;for(var t,n=0;n-1&&(Z(s)[d]=u[d],delete u[d])}}}return r}function Wi(e,t,n,r){if(r){var i=e.anchor;if(n){var l=et(t,i)<0;l!=et(n,i)<0?(i=t,t=n):l!=et(t,n)<0&&(t=n)}return new bi(i,t)}return new bi(n||t,t)}function Bi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ki(e,new yi([Wi(e.sel.primary(),t,n,i)],0),r)}function Ui(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),l=0;l=t.ch:s.to>t.ch))){if(i&&(ge(a,"beforeCursorEnter"),a.explicitlyCleared)){if(l.markedSpans){--o;continue}break}if(!a.atomic)continue;if(n){var d=a.find(r<0?1:-1),h=void 0;if((r<0?c:u)&&(d=tl(e,d,-r,d&&d.line==t.line?l:null)),d&&d.line==t.line&&(h=et(d,n))&&(r<0?h<0:h>0))return Ji(e,d,t,r,i)}var f=a.find(r<0?-1:1);return(r<0?u:c)&&(f=tl(e,f,r,f.line==t.line?l:null)),f?Ji(e,f,t,r,i):null}}return t}function el(e,t,n,r,i){var l=r||1;return Ji(e,t,n,l,i)||!i&&Ji(e,t,n,l,!0)||Ji(e,t,n,-l,i)||!i&&Ji(e,t,n,-l,!0)||(e.cantEdit=!0,Je(e.first,0))}function tl(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ot(e,Je(t.line-1)):null:n>0&&t.ch==(r||ze(e,t.line)).text.length?t.line0)){var c=[a,1],d=et(u.from,s.from),h=et(u.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(h>0||!o.inclusiveRight&&!h)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ll(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ll(e,t)}}function ll(e,t){if(1!=t.text.length||""!=t.text[0]||0!=et(t.from,t.to)){var n=Si(e,t);Vi(e,t,n,e.cm?e.cm.curOp.id:NaN),al(e,t,n,Et(e,t));var r=[];Ai(e,function(e,n){n||-1!=j(r,e.history)||(hl(e.history,t),r.push(e.history)),al(e,t,null,Et(e,t))})}}function ol(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,l=e.history,o=e.sel,s="undo"==t?l.done:l.undone,a="undo"==t?l.undone:l.done,u=0;u=0;--f){var p=h(f);if(p)return p.v}}}}function sl(e,t){if(0!=t&&(e.first+=t,e.sel=new yi(Y(e.sel.ranges,function(e){return new bi(Je(e.anchor.line+t,e.anchor.ch),Je(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){ar(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linel&&(t={from:t.from,to:Je(l,ze(e,l).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Si(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,l=t.from,o=t.to,s=!1,a=l.line;e.options.lineWrapping||(a=Ze(Lt(ze(r,l.line))),r.iter(a,o.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ve(e),ki(r,t,n,ir(e)),e.options.lineWrapping||(r.iter(a,l.line+t.text.length,function(e){var t=Bt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ze(e,r).stateAfter;if(i&&(!(i instanceof at)||r+i.lookAhead1||!(this.children[0]instanceof pl))){var s=[];this.collapse(s),this.children=[new pl(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=i.lines.length%25+25,s=o;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==o&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=A("span",[l.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(Vt(e,t.line,t,n,l)||t.line!=n.line&&Vt(e,n.line,t,n,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}l.addToHistory&&Vi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,n.line+1,function(e){u&&l.collapsed&&!u.options.lineWrapping&&Lt(e)==u.display.maxLine&&(s=!0),l.collapsed&&a!=t.line&&Ke(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new _t(l,a==t.line?t.ch:null,a==n.line?n.ch:null)),++a}),l.collapsed&&e.iter(t.line,n.line+1,function(t){jt(e,t)&&Ke(t,0)}),l.clearOnEnter&&he(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++yl,l.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),l.collapsed)ar(u,t.line,n.line+1);else if(l.className||l.startStyle||l.endStyle||l.css||l.attributes||l.title)for(var c=t.line;c<=n.line;c++)ur(u,c,"text");l.atomic&&Qi(u.doc),sn(u,"markerAdded",u,l)}return l}bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Br(e),ye(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,i=null,l=0;le.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&ar(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qi(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),t&&Ur(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)il(this,r[a]);s?qi(this,s):this.cm&&Or(this.cm)}),undo:Jr(function(){ol(this,"undo")}),redo:Jr(function(){ol(this,"redo")}),undoSelection:Jr(function(){ol(this,"undo",!0)}),redoSelection:Jr(function(){ol(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ot(this,e),t=ot(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(l){var o=l.markedSpans;if(o)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||n&&!n(a.marker)||r.push(a.marker.parent||a.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=l,++n}),ot(this,Je(n,t))},indexFromPos:function(e){var t=(e=ot(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Zi(t.doc,Ci(n,n)),d)for(var h=0;h=0;t--)ul(e.doc,"",r[t].from,r[t].to,"+delete");Or(e)})}function zl(e,t,n){var r=le(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Gl(e,t,n){var r=zl(e,t.ch,n);return null==r?null:new Je(t.line,r,n<0?"after":"before")}function ql(e,t,n,r,i){if(e){var l=ce(n,t.doc.direction);if(l){var o,s=i<0?Z(l):l[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Dn(t,n),c=Nn(t,u,o=i<0?n.text.length-1:0).top;o=oe(function(e){return Nn(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,o),"before"==a&&(o=zl(n,o,1))}else o=i<0?s.to:s.from;return new Je(r,o,a)}}return new Je(r,i<0?n.text.length:0,i<0?"before":"after")}Vl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vl.default=y?Vl.macDefault:Vl.pcDefault;var Kl={selectAll:nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),B)},killLine:function(e){return Ul(e,function(t){if(t.empty()){var n=ze(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Je(i.line,i.ch+1),e.replaceRange(l.charAt(i.ch-1)+l.charAt(i.ch-2),Je(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=ze(e.doc,i.line-1).text;o&&(i=new Je(i.line,1),e.replaceRange(l.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Je(i.line-1,o.length-1),i,"+transpose"))}n.push(new bi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Yr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(et((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(et(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,l=!1,u=Qr(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",u),l||(we(t),r.addNew||Bi(e.doc,n,null,null,r.extend),a||o&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){l=l||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return l=!0};a&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",u),he(i.wrapper.ownerDocument,"mousemove",c),he(i.scroller,"dragstart",d),he(i.scroller,"drop",u),wr(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,l):function(e,t,n,r){var i=e.display,l=e.doc;we(t);var o,s,a=l.sel,u=a.ranges;if(r.addNew&&!r.extend?(s=l.sel.contains(n),o=s>-1?u[s]:new bi(n,n)):(o=l.sel.primary(),s=l.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new bi(n,n)),n=or(e,t,!0,!0),s=-1;else{var c=co(e,n,r.unit);o=r.extend?Wi(o,c.anchor,c.head,r.extend):c}r.addNew?-1==s?(s=u.length,Ki(l,wi(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(Ki(l,wi(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=l.sel):zi(l,s,o,U):(s=0,Ki(l,new yi([o],0),U),a=l.sel);var d=n,h=i.wrapper.getBoundingClientRect(),f=0;function p(t){e.state.selectingText=!1,f=1/0,t&&(we(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",m),l.history.lastSelOrigin=null}var g=Qr(e,function(t){0!==t.buttons&&Ee(t)?function t(u){var c=++f,p=or(e,u,!0,"rectangle"==r.unit);if(p)if(0!=et(p,d)){e.curOp.focus=N(),function(t){if(0!=et(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],u=e.options.tabSize,c=F(ze(l,n.line).text,n.ch,u),h=F(ze(l,t.line).text,t.ch,u),f=Math.min(c,h),p=Math.max(c,h),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=ze(l,g).text,y=G(v,f,u);f==p?i.push(new bi(Je(g,y),Je(g,y))):v.length>y&&i.push(new bi(Je(g,y),Je(g,G(v,p,u))))}i.length||i.push(new bi(n,n)),Ki(l,wi(e,a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=o,C=co(e,t,r.unit),_=w.anchor;et(C.anchor,_)>0?(b=C.head,_=it(w.from(),C.anchor)):(b=C.anchor,_=rt(w.to(),C.head));var x=a.ranges.slice(0);x[s]=function(e,t){var n=t.anchor,r=t.head,i=ze(e.doc,n.line);if(0==et(n,r)&&n.sticky==r.sticky)return t;var l=ce(i);if(!l)return t;var o=ae(l,n.ch,n.sticky),s=l[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var a,u=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==l.length)return t;if(r.line!=n.line)a=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ae(l,r.ch,r.sticky),d=c-o||(r.ch-n.ch)*(1==s.level?-1:1);a=c==u-1||c==u?d<0:d>0}var h=l[u+(a?-1:0)],f=a==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?t:new bi(new Je(n.line,p,g),r)}(e,new bi(ot(l,_),b)),Ki(l,wi(e,x,s),U)}}(p);var g=Er(i,l);(p.line>=g.to||p.lineh.bottom?20:0;m&&setTimeout(Qr(e,function(){f==c&&(i.scroller.scrollTop+=m,t(u))}),50)}}(t):p(t)}),m=Qr(e,p);e.state.selectingText=m,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",m)}(e,r,t,l)}(t,r,l,e):Se(e)==n.scroller&&we(e):2==i?(r&&Bi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(x?t.display.input.onContextMenu(e):wr(t)))}}function co(e,t,n){if("char"==n)return new bi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new bi(Je(t.line,0),ot(e.doc,Je(t.line+1,0)));var r=n(e,t);return new bi(r.from,r.to)}function ho(e,t,n,r){var i,l;if(t.touches)i=t.touches[0].clientX,l=t.touches[0].clientY;else try{i=t.clientX,l=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(l>s.bottom||!ye(e,n))return _e(t);l-=s.top-o.viewOffset;for(var a=0;a=i)return ge(e,n,e,Ye(e.doc,l),e.display.gutterSpecs[a].className,t),_e(t)}}function fo(e,t){return ho(e,t,"gutterClick",!0)}function po(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$n(e)}ao.prototype.compare=function(e,t,n){return this.time+400>e&&0==et(t,this.pos)&&n==this.button};var go={toString:function(){return"CodeMirror.Init"}},mo={},vo={};function yo(e,t,n){if(!t!=!(n&&n!=go)){var r=e.display.dragFunctions,i=t?he:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function bo(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Ut(e)),lr(e),ar(e),$n(e),setTimeout(function(){return Fr(e)},100)}function wo(e,t){var r=this;if(!(this instanceof wo))return new wo(e,t);this.options=t=t?L(t):{},L(mo,t,!1);var i=t.value;"string"==typeof i?i=new El(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var l=new wo.inputStyles[t.inputStyle](this),u=this.display=new function(e,t,r,i){var l=this;this.input=r,l.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),l.scrollbarFiller.setAttribute("cm-not-content","true"),l.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),l.gutterFiller.setAttribute("cm-not-content","true"),l.lineDiv=A("div",null,"CodeMirror-code"),l.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),l.cursorDiv=k("div",null,"CodeMirror-cursors"),l.measure=k("div",null,"CodeMirror-measure"),l.lineMeasure=k("div",null,"CodeMirror-measure"),l.lineSpace=A("div",[l.measure,l.lineMeasure,l.selectionDiv,l.cursorDiv,l.lineDiv],null,"position: relative; outline: none");var u=A("div",[l.lineSpace],"CodeMirror-lines");l.mover=k("div",[u],null,"position: relative"),l.sizer=k("div",[l.mover],"CodeMirror-sizer"),l.sizerWidth=null,l.heightForcer=k("div",null,null,"position: absolute; height: "+H+"px; width: 1px;"),l.gutters=k("div",null,"CodeMirror-gutters"),l.lineGutter=null,l.scroller=k("div",[l.sizer,l.heightForcer,l.gutters],"CodeMirror-scroll"),l.scroller.setAttribute("tabIndex","-1"),l.wrapper=k("div",[l.scrollbarFiller,l.gutterFiller,l.scroller],"CodeMirror"),o&&s<8&&(l.gutters.style.zIndex=-1,l.scroller.style.paddingRight=0),a||n&&v||(l.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(l.wrapper):e(l.wrapper)),l.viewFrom=l.viewTo=t.first,l.reportedViewFrom=l.reportedViewTo=t.first,l.view=[],l.renderedView=null,l.externalMeasured=null,l.viewOffset=0,l.lastWrapHeight=l.lastWrapWidth=0,l.updateLineNumbers=null,l.nativeBarWidth=l.barHeight=l.barWidth=0,l.scrollbarsClipped=!1,l.lineNumWidth=l.lineNumInnerWidth=l.lineNumChars=null,l.alignWidgets=!1,l.cachedCharWidth=l.cachedTextHeight=l.cachedPaddingH=null,l.maxLine=null,l.maxLineLength=0,l.maxLineChanged=!1,l.wheelDX=l.wheelDY=l.wheelStartX=l.wheelStartY=null,l.shift=!1,l.selForContextMenu=null,l.activeTouch=null,l.gutterSpecs=ci(i.gutters,i.lineNumbers),di(l),r.init(l)}(e,i,l,t);for(var c in u.wrapper.CodeMirror=this,po(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new $,keySeq:null,specialChars:null},t.autofocus&&!v&&u.input.focus(),o&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;he(t.scroller,"mousedown",Qr(e,uo)),he(t.scroller,"dblclick",o&&s<11?Qr(e,function(t){if(!me(e,t)){var n=or(e,t);if(n&&!fo(e,t)&&!Cn(e.display,t)){we(t);var r=e.findWordAt(n);Bi(e.doc,r.anchor,r.head)}}}):function(t){return me(e,t)||we(t)}),he(t.scroller,"contextmenu",function(t){return function(e,t){Cn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ho(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!fo(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),he(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),he(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new bi(s,s):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(s):new bi(Je(s.line,0),ot(e.doc,Je(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),we(n)}i()}),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),Ir(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))}),he(t.scroller,"mousewheel",function(t){return vi(e,t)}),he(t.scroller,"DOMMouseScroll",function(t){return vi(e,t)}),he(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){me(e,t)||xe(t)},over:function(t){me(e,t)||(function(e,t){var n=or(e,t);if(n){var r=document.createDocumentFragment();gr(e,n,r),e.display.dragCursor||(e.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}(e,t),xe(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Tl<100))xe(t);else if(!me(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=k("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:Qr(e,Ml),leave:function(t){me(e,t)||Ol(e)}};var a=t.input.getField();he(a,"keyup",function(t){return io.call(e,t)}),he(a,"keydown",Qr(e,ro)),he(a,"keypress",Qr(e,lo)),he(a,"focus",function(t){return Cr(e,t)}),he(a,"blur",function(t){return _r(e,t)})}(this),Al||(function(){var e;he(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,kl(Dl)},100))}),he(window,"blur",function(){return kl(_r)})}(),Al=!0),Br(this),this.curOp.forceUpdate=!0,Di(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout(V(Cr,this),20):_r(this),vo)vo.hasOwnProperty(c)&&vo[c](r,t[c],go);ui(this),t.finishInit&&t.finishInit(this);for(var f=0;f150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>l.first?F(ze(l,t-1).text,null,o):0:"add"==n?u=a+e.options.indentUnit:"subtract"==n?u=a-e.options.indentUnit:"number"==typeof n&&(u=a+n),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/o);f;--f)h+=o,d+="\t";if(ho,a=De(t),u=null;if(s&&r.ranges.length>1)if(xo&&xo.text.join("\n")==t){if(r.ranges.length%xo.text.length==0){u=[];for(var c=0;c=0;h--){var f=r.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=Je(p.line,p.ch-n):e.state.overwrite&&!s?g=Je(g.line,Math.min(ze(l,g.line).text.length,g.ch+Z(a).length)):s&&xo&&xo.lineWise&&xo.text.join("\n")==t&&(p=g=Je(p.line,0)));var m={from:p,to:g,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};il(e.doc,m),sn(e,"inputRead",e,m)}t&&!s&&Mo(e,t),Or(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function To(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Yr(t,function(){return Eo(t,n,0,null,"paste")}),!0}function Mo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var l=e.getModeAt(i.head),o=!1;if(l.electricChars){for(var s=0;s-1){o=_o(e,i.head.line,"smart");break}}else l.electricInput&&l.electricInput.test(ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=_o(e,i.head.line,"smart"));o&&sn(e,"electricInput",e,i.head.line)}}}function Oo(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var l=ae(i,n.ch,n.sticky),o=i[l];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&h>=c.begin))return new Je(n.line,h,d?"before":"after")}var f=function(e,t,r){for(var l=function(e,t){return t?new Je(n.line,a(e,1),"before"):new Je(n.line,e,"after")};e>=0&&e0==(1!=o.level),u=s?r.begin:a(r.end,-1);if(o.from<=u&&u0?c.end:a(c.begin,-1);return null==g||r>0&&g==t.text.length||!(p=f(r>0?0:i.length-1,r,u(g)))?null:p}(e.cm,s,t,n):Gl(s,t,n))){if(r||!function(){var r=t.line+n;return!(r=e.first+e.size)&&(t=new Je(r,t.ch,t.sticky),s=ze(e,r))}())return!1;t=ql(i,e.cm,s,t.line,n)}else t=l;return!0}if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var u=null,c="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var f=s.text.charAt(t.ch)||"\n",p=te(f,d)?"w":c&&"\n"==f?"n":!c||/\s/.test(f)?null:"p";if(!c||h||p||(p="s"),u&&u!=p){n<0&&(n=1,a(),t.sticky="after");break}if(p&&(u=p),n>0&&!a(!h))break}var g=el(e,t,l,o,!0);return tt(l,g)&&(g.hitSide=!0),g}function No(e,t,n,r){var i,l,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*er(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(l=Zn(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}var Ro=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Io(e,t){var n=An(e,t.line);if(!n||n.hidden)return null;var r=ze(e.doc,t.line),i=On(n,r,t.line),l=ce(r,e.doc.direction),o="left";l&&(o=ae(l,t.ch)%2?"right":"left");var s=Pn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function Po(e,t){return t&&(e.bad=!0),e}function Vo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Po(e.clipPos(Je(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||l.line=t.display.viewFrom&&Io(t,i)||{node:a[0].measure.map[2],offset:0},c=l.liner.firstLine()&&(o=Je(o.line-1,ze(r.doc,o.line-1).length)),s.ch==ze(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(e=sr(r,o.line))?(t=Ze(i.view[0].line),n=i.view[0].node):(t=Ze(i.view[e].line),n=i.view[e-1].node.nextSibling);var a,u,c=sr(r,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=Ze(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var l="",o=!1,s=e.doc.lineSeparator(),a=!1;function u(){o&&(l+=s,a&&(l+=s),o=a=!1)}function c(e){e&&(u(),l+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var l,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(Je(r,0),Je(i+1,0),function(e){return function(t){return t.id==e}}(+h));return void(f.length&&(l=f[0].find(0))&&c(Ge(e.doc,l.from,l.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var g=0;g1&&h.length>1;)if(Z(d)==Z(h))d.pop(),h.pop(),a--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);fo.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var C=Je(t,f),_=Je(a,h.length?Z(h).length-p:0);return d.length>1||d[0]||et(C,_)?(ul(r.doc,d,C,_,"+input"),!0):void 0},Ro.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ro.prototype.reset=function(){this.forceCompositionEnd()},Ro.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ro.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ro.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Yr(this.cm,function(){return ar(e.cm)})},Ro.prototype.setUneditable=function(e){e.contentEditable="false"},Ro.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Qr(this.cm,Eo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ro.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ro.prototype.onContextMenu=function(){},Ro.prototype.resetPosition=function(){},Ro.prototype.needsContentAttribute=!0;var Fo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};Fo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function l(e){if(!me(r,e)){if(r.somethingSelected())So({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Oo(r);So({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,B):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),he(i,"input",function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),he(i,"paste",function(e){me(r,e)||To(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),he(i,"cut",l),he(i,"copy",l),he(e.scroller,"paste",function(t){if(!Cn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var l=new Event("paste");l.clipboardData=t.clipboardData,i.dispatchEvent(l)}}),he(e.lineSpace,"selectstart",function(t){Cn(e,t)||we(t)}),he(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),he(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Fo.prototype.createField=function(e){this.wrapper=Ao(),this.textarea=this.wrapper.firstChild},Fo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=pr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),l=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-l.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-l.left))}return r},Fo.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Fo.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Fo.prototype.getField=function(){return this.textarea},Fo.prototype.supportsTouch=function(){return!1},Fo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Fo.prototype.blur=function(){this.textarea.blur()},Fo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fo.prototype.receivedFocus=function(){this.slowPoll()},Fo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Fo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Fo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var l=i.charCodeAt(0);if(8203!=l||r||(r="\u200b"),8666==l)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Fo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Fo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var l=or(n,e),u=r.scroller.scrollTop;if(l&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(l)&&Qr(n,Ki)(n.doc,Ci(l),B);var c,h=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(c=window.scrollY),r.input.focus(),a&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&m(),x){xe(e);var g=function(){pe(window,"mouseup",g),setTimeout(v,20)};he(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),l="\u200b"+(e?i.value:"");i.value="\u21da",i.value=l,t.prevInput=e?"":"\u200b",i.selectionStart=1,i.selectionEnd=l.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!o||o&&s<9)&&m();var e=0,l=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==t.prevInput?Qr(n,nl)(n):e++<10?r.detectingSelectAll=setTimeout(l,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(l,200)}}},Fo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Fo.prototype.setUneditable=function(){},Fo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,l){e.defaults[n]=r,i&&(t[n]=l?function(e,t,n){n!=go&&i(e,t,n)}:i)}e.defineOption=n,e.Init=go,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,Ti(e)},!0),n("indentUnit",2,Ti,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){Mi(e),$n(e),ar(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var l=e.text.indexOf(t,i);if(-1==l)break;i=l+t.length,n.push(Je(r,l))}r++});for(var i=n.length-1;i>=0;i--)ul(e.doc,t,n[i],Je(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=go&&e.refresh()}),n("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){po(e),hi(e)},!0),n("keyMap","default",function(e,t,n){var r=Bl(t),i=n!=go&&Bl(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,bo,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=ci(t,e.options.lineNumbers),hi(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?rr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Fr(e)},!0),n("scrollbarStyle","native",function(e){Hr(e),Fr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ci(e.options.gutters,t),hi(e)},!0),n("firstLineNumber",1,hi,!0),n("lineNumberFormatter",function(e){return e},hi,!0),n("showCursorWhenSelecting",!1,fr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(_r(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,yo),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,fr,!0),n("singleCursorHeightPerLine",!0,fr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Mi,!0),n("addModeClass",!1,Mi,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,Mi,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}(wo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Qr(this,t[e])(this,n,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Bl(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(_o(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Or(this));else{var l=i.from(),o=i.to(),s=Math.max(n,l.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var a=s;a0&&zi(this.doc,r,new bi(l,u[r].to()),B)}}}),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,Je(e),t,!0)},getTokenTypeAt:function(e){e=ot(this.doc,e);var t,n=dt(this,ze(this.doc,e.line)),r=0,i=(n.length-1)/2,l=e.ch;if(0==l)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=l)i=o;else{if(!(n[2*o+1]l&&(e=l,i=!0),r=ze(this.doc,e)}else r=e;return Bn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return er(this.display)},defaultCharWidth:function(){return tr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var l=this.display,o=(e=Gn(this,ot(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)o=e.top;else if("above"==r||"near"==r){var a=Math.max(l.wrapper.clientHeight,this.doc.height),u=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(o=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="","right"==i?(s=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&function(e,n){var r=Tr(e,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight});null!=r.scrollTop&&Nr(e,r.scrollTop),null!=r.scrollLeft&&Ir(e,r.scrollLeft)}(this)},triggerOnKeyDown:Xr(ro),triggerOnKeyPress:Xr(lo),triggerOnKeyUp:io,triggerOnMouseDown:Xr(uo),execCommand:function(e){if(Kl.hasOwnProperty(e))return Kl[e].call(null,this)},triggerElectric:Xr(function(e){Mo(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var l=ot(this.doc,e),o=0;o0&&o(t.charAt(n-1));)--n;for(;r.5)&&lr(this),ge(this,"refresh",this)}),swapDoc:Xr(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Di(this,e),$n(this),this.display.input.reset(),kr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,l){e.registerHelper(t,r,l),n[t]._global.push({pred:i,val:l})}}(wo);var $o="iter insert remove copy getEditor constructor".split(" ");for(var jo in El.prototype)El.prototype.hasOwnProperty(jo)&&j($o,jo)<0&&(wo.prototype[jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(El.prototype[jo]));return be(El),wo.inputStyles={textarea:Fo,contenteditable:Ro},wo.defineMode=function(e){wo.defaults.mode||"null"==e||(wo.defaults.mode=e),(function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pe[e]=t}).apply(this,arguments)},wo.defineMIME=function(e,t){Ve[e]=t},wo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wo.defineMIME("text/plain","null"),wo.defineExtension=function(e,t){wo.prototype[e]=t},wo.defineDocExtension=function(e,t){El.prototype[e]=t},wo.fromTextArea=function(e,t){if((t=t?L(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var l=e.form;i=l.submit;try{var o=l.submit=function(){r(),l.submit=i,l.submit(),l.submit=o}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=wo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=pe,e.on=he,e.wheelEventPixels=mi,e.Doc=El,e.splitLines=De,e.countColumn=F,e.findColumn=G,e.isWordChar=ee,e.Pass=W,e.signal=ge,e.Line=zt,e.changeEnd=_i,e.scrollbarModel=jr,e.Pos=Je,e.cmpPos=et,e.modes=Pe,e.mimeModes=Ve,e.resolveMode=Le,e.getMode=Fe,e.modeExtensions=$e,e.extendMode=je,e.copyState=He,e.startState=Be,e.innerMode=We,e.commands=Kl,e.keyMap=Vl,e.keyName=Wl,e.isModifierKey=jl,e.lookupKey=$l,e.normalizeKeyMap=Fl,e.StringStream=Ue,e.SharedTextMarker=Cl,e.TextMarker=bl,e.LineWidget=ml,e.e_preventDefault=we,e.e_stopPropagation=Ce,e.e_stop=xe,e.addClass=R,e.contains=D,e.rmClass=T,e.keyNames=Nl}(wo),wo.version="5.48.0",wo}()},DuR2:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},Fl7v:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n("iaYM"),i=n("svqJ");var l=function(e){return e[e.Leading=0]="Leading",e[e.Trailing=1]="Trailing",e[e.Dangling=2]="Dangling",e[e.DanglingStatement=3]="DanglingStatement",e}({});function o(e,t){const n=function(e){const t=Object.keys(e),n=[];function r(t){if(t&&"string"==typeof t.type&&"Comment"!==t.type){let r;for(r=n.length-1;r>=0&&!(i.locStart(n[r])<=i.locStart(t)&&i.locEnd(n[r])<=i.locEnd(e));--r);n.splice(r+1,0,t)}}for(const i of t){const t=e[i];Array.isArray(t)?t.forEach(r):t&&r(t)}return n}(e);let r=null,l=null,s=0,a=n.length;for(;s0||(t.parameters.length>0&&t.parameters[t.parameters.length-1]===e?(u(t,n),0):!e||"Identifier"!==e.type||(u(t,n),0)))}function p(e,t,n,r){return!(!t||"IfStatement"!==t.type||(!n||"ElseifClause"!==n.type&&"ElseClause"!==n.type)&&(!e||"ElseClause"!==e.type)||(u(e,r),0))}function g(e,t,n){if(n.raw.startsWith("--[["))return!1;if(!t)return!1;switch(t.type){case"WhileStatement":if(e===t.condition)return c(t,n),!0;break;case"DoStatement":case"RepeatStatement":if(null==e)return c(t,n),!0;break;case"FunctionDeclaration":if(t.parameters.length&&e===t.parameters[t.parameters.length-1]||e===t.identifier)return c(t,n),!0;break;case"ForNumericStatement":if(e===t.end||e===t.step)return c(t,n),!0;break;case"ForGenericStatement":if(e===t.iterators[t.iterators.length-1])return c(t,n),!0;break;case"IfClause":case"ElseifClause":if(e===t.condition&&n.loc.start.column>e.loc.start.column)return c(t,n),!0;break;case"ElseClause":if(null==e)return c(t,n),!0}return!1}function m(e,t,n){if(!e||!t)return!1;if("IfStatement"!==t.type)return!1;switch(e.type){case"IfClause":case"ElseifClause":case"ElseClause":if(0===e.body.length)return c(e,n),!0}return!1}t.attachComments=function(e,t){for(const n of e.comments){o(e,n);const r=n.precedingNode,l=n.enclosingNode,s=n.followingNode;i.hasNewLine(t.sourceText,i.locStart(n),{searchBackwards:!0})?h(l,n)||f(r,l,n)||p(r,l,s,n)||(s?a(s,n):r?d(r,n):u(l||e,n)):g(r,l,n)||m(r,l,n)||(r?d(r,n):s?a(s,n):u(l||e,n))}},t.injectShebang=function(e,t){if(!t.sourceText.startsWith("#!"))return;const n=t.sourceText.indexOf("\n"),r=t.sourceText.slice(0,n),i=t.sourceText.slice(2,n);e.comments.push({type:"Comment",loc:{start:{line:1,column:0},end:{line:1,column:n}},range:[0,n],raw:r,value:i})},t.printDanglingComments=function(e,t=!1){const n=e.getValue();if(!n||!n.attachedComments)return"";const i=[];return e.forEach(e=>{const t=e.getValue();t.commentType===l.Dangling&&i.push(t.raw)},"attachedComments"),0===i.length?"":t?r.join(r.hardline,i):r.indent(r.concat([r.hardline,r.join(r.hardline,i)]))},t.printDanglingStatementComments=function(e){const t=e.getValue();if(!t||!t.attachedComments)return"";const n=[];return e.forEach(e=>{const t=e.getValue();t.commentType===l.DanglingStatement&&(n.push(" "),n.push(t.raw))},"attachedComments"),0===n.length?"":r.concat(n)},t.printComments=function(e,t,n){const o=e.getValue(),s=n(e),a=o.attachedComments;if(!a||0===a.length)return s;const u=[],c=[s];return e.forEach(n=>{switch(n.getValue().commentType){case l.Leading:u.push(function(e,t){const n=e.getValue();if(n.raw.startsWith("--[["))return r.concat([n.raw,i.hasNewLine(t.sourceText,i.locEnd(n))?r.hardline:" "]);const l=[];return l.push(n.raw),l.push(r.hardline),i.isNextLineEmpty(t.sourceText,i.locEnd(n))&&l.push(r.hardline),r.concat(l)}(e,t));break;case l.Trailing:c.push(function(e,t){const n=e.getValue();if(i.hasNewLine(t.sourceText,i.locStart(n),{searchBackwards:!0})){const e=i.isPreviousLineEmpty(t.sourceText,i.locStart(n));return r.concat([r.hardline,e?r.hardline:"",n.raw])}if(n.raw.startsWith("--[["))return r.concat([" ",n.raw]);const l=[];return i.isNextLineEmpty(t.sourceText,i.locStart(n),{searchBackwards:!0})&&l.push(r.hardline),l.push(" "),l.push(n.raw),l.push(r.breakParent),r.lineSuffix(r.concat(l))}(e,t))}},"attachedComments"),r.concat(u.concat(c))}},FvzS:function(e,t,n){"use strict";t.a=function(e){return null!=e&&"object"==typeof e}},GW10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("48oy"),i=n("Hp+N"),l=n("zK+N");t.CodemirrorModule=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[i.CommonModule],declarations:[l.CodemirrorComponent],exports:[l.CodemirrorComponent]}]}],e}()},"Hp+N":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"\u0275registerLocaleData",function(){return g}),n.d(t,"NgLocaleLocalization",function(){return K}),n.d(t,"NgLocalization",function(){return G}),n.d(t,"registerLocaleData",function(){return g}),n.d(t,"Plural",function(){return v}),n.d(t,"NumberFormatStyle",function(){return m}),n.d(t,"FormStyle",function(){return y}),n.d(t,"TranslationWidth",function(){return b}),n.d(t,"FormatWidth",function(){return w}),n.d(t,"NumberSymbol",function(){return C}),n.d(t,"WeekDay",function(){return _}),n.d(t,"getCurrencySymbol",function(){return U}),n.d(t,"getLocaleDayPeriods",function(){return S}),n.d(t,"getLocaleDayNames",function(){return E}),n.d(t,"getLocaleMonthNames",function(){return T}),n.d(t,"getLocaleId",function(){return x}),n.d(t,"getLocaleEraNames",function(){return M}),n.d(t,"getLocaleWeekEndRange",function(){return k}),n.d(t,"getLocaleFirstDayOfWeek",function(){return O}),n.d(t,"getLocaleDateFormat",function(){return A}),n.d(t,"getLocaleDateTimeFormat",function(){return N}),n.d(t,"getLocaleExtraDayPeriodRules",function(){return $}),n.d(t,"getLocaleExtraDayPeriods",function(){return j}),n.d(t,"getLocalePluralCase",function(){return L}),n.d(t,"getLocaleTimeFormat",function(){return D}),n.d(t,"getLocaleNumberSymbol",function(){return R}),n.d(t,"getLocaleNumberFormat",function(){return I}),n.d(t,"getLocaleCurrencyName",function(){return V}),n.d(t,"getLocaleCurrencySymbol",function(){return P}),n.d(t,"\u0275parseCookieValue",function(){return Y}),n.d(t,"CommonModule",function(){return Ot}),n.d(t,"DeprecatedI18NPipesModule",function(){return kt}),n.d(t,"NgClass",function(){return Q}),n.d(t,"NgForOf",function(){return ee}),n.d(t,"NgForOfContext",function(){return J}),n.d(t,"NgIf",function(){return ne}),n.d(t,"NgIfContext",function(){return re}),n.d(t,"NgPlural",function(){return ae}),n.d(t,"NgPluralCase",function(){return ue}),n.d(t,"NgStyle",function(){return ce}),n.d(t,"NgSwitch",function(){return le}),n.d(t,"NgSwitchCase",function(){return oe}),n.d(t,"NgSwitchDefault",function(){return se}),n.d(t,"NgTemplateOutlet",function(){return de}),n.d(t,"NgComponentOutlet",function(){return X}),n.d(t,"DOCUMENT",function(){return At}),n.d(t,"AsyncPipe",function(){return pt}),n.d(t,"DatePipe",function(){return Ae}),n.d(t,"I18nPluralPipe",function(){return bt}),n.d(t,"I18nSelectPipe",function(){return wt}),n.d(t,"JsonPipe",function(){return Ct}),n.d(t,"LowerCasePipe",function(){return gt}),n.d(t,"CurrencyPipe",function(){return St}),n.d(t,"DecimalPipe",function(){return _t}),n.d(t,"PercentPipe",function(){return xt}),n.d(t,"SlicePipe",function(){return Tt}),n.d(t,"UpperCasePipe",function(){return vt}),n.d(t,"TitleCasePipe",function(){return mt}),n.d(t,"DeprecatedDatePipe",function(){return Ke}),n.d(t,"DeprecatedCurrencyPipe",function(){return ct}),n.d(t,"DeprecatedDecimalPipe",function(){return at}),n.d(t,"DeprecatedPercentPipe",function(){return ut}),n.d(t,"\u0275PLATFORM_BROWSER_ID",function(){return Dt}),n.d(t,"\u0275PLATFORM_SERVER_ID",function(){return Nt}),n.d(t,"\u0275PLATFORM_WORKER_APP_ID",function(){return Rt}),n.d(t,"\u0275PLATFORM_WORKER_UI_ID",function(){return It}),n.d(t,"isPlatformBrowser",function(){return Pt}),n.d(t,"isPlatformServer",function(){return Vt}),n.d(t,"isPlatformWorkerApp",function(){return Lt}),n.d(t,"isPlatformWorkerUi",function(){return Ft}),n.d(t,"VERSION",function(){return $t}),n.d(t,"PlatformLocation",function(){return i}),n.d(t,"LOCATION_INITIALIZED",function(){return l}),n.d(t,"LocationStrategy",function(){return o}),n.d(t,"APP_BASE_HREF",function(){return s}),n.d(t,"HashLocationStrategy",function(){return c}),n.d(t,"PathLocationStrategy",function(){return d}),n.d(t,"Location",function(){return a}),n.d(t,"\u0275e",function(){return he}),n.d(t,"\u0275d",function(){return B}),n.d(t,"\u0275a",function(){return z}),n.d(t,"\u0275b",function(){return Z}),n.d(t,"\u0275g",function(){return dt}),n.d(t,"\u0275f",function(){return Mt});var r=n("48oy");class i{}const l=new r.InjectionToken("Location Initialized");class o{}const s=new r.InjectionToken("appBaseHref");class a{constructor(e){this._subject=new r.EventEmitter,this._platformStrategy=e;const t=this._platformStrategy.getBaseHref();this._baseHref=a.stripTrailingSlash(u(t)),this._platformStrategy.onPopState(e=>{this._subject.emit({url:this.path(!0),pop:!0,type:e.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+a.normalizeQueryParams(t))}normalize(e){return a.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,u(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,t=""){this._platformStrategy.pushState(null,"",e,t)}replaceState(e,t=""){this._platformStrategy.replaceState(null,"",e,t)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}static normalizeQueryParams(e){return e&&"?"!==e[0]?"?"+e:e}static joinWithSlash(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}static stripTrailingSlash(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}}function u(e){return e.replace(/\/index.html$/,"")}class c extends o{constructor(e,t){super(),this._platformLocation=e,this._baseHref="",null!=t&&(this._baseHref=t)}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}path(e=!1){let t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}prepareExternalUrl(e){const t=a.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t}pushState(e,t,n,r){let i=this.prepareExternalUrl(n+a.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)}replaceState(e,t,n,r){let i=this.prepareExternalUrl(n+a.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}class d extends o{constructor(e,t){if(super(),this._platformLocation=e,null==t&&(t=this._platformLocation.getBaseHrefFromDOM()),null==t)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=t}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return a.joinWithSlash(this._baseHref,e)}path(e=!1){const t=this._platformLocation.pathname+a.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,r){const i=this.prepareExternalUrl(n+a.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)}replaceState(e,t,n,r){const i=this.prepareExternalUrl(n+a.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}const h={AOA:[,"Kz"],ARS:[,"$"],AUD:["A$","$"],BAM:[,"KM"],BBD:[,"$"],BDT:[,"\u09f3"],BMD:[,"$"],BND:[,"$"],BOB:[,"Bs"],BRL:["R$"],BSD:[,"$"],BWP:[,"P"],BYN:[,"\u0440."],BZD:[,"$"],CAD:["CA$","$"],CLP:[,"$"],CNY:["CN\xa5","\xa5"],COP:[,"$"],CRC:[,"\u20a1"],CUC:[,"$"],CUP:[,"$"],CZK:[,"K\u010d"],DKK:[,"kr"],DOP:[,"$"],EGP:[,"E\xa3"],ESP:[,"\u20a7"],EUR:["\u20ac"],FJD:[,"$"],FKP:[,"\xa3"],GBP:["\xa3"],GEL:[,"\u20be"],GIP:[,"\xa3"],GNF:[,"FG"],GTQ:[,"Q"],GYD:[,"$"],HKD:["HK$","$"],HNL:[,"L"],HRK:[,"kn"],HUF:[,"Ft"],IDR:[,"Rp"],ILS:["\u20aa"],INR:["\u20b9"],ISK:[,"kr"],JMD:[,"$"],JPY:["\xa5"],KHR:[,"\u17db"],KMF:[,"CF"],KPW:[,"\u20a9"],KRW:["\u20a9"],KYD:[,"$"],KZT:[,"\u20b8"],LAK:[,"\u20ad"],LBP:[,"L\xa3"],LKR:[,"Rs"],LRD:[,"$"],LTL:[,"Lt"],LVL:[,"Ls"],MGA:[,"Ar"],MMK:[,"K"],MNT:[,"\u20ae"],MUR:[,"Rs"],MXN:["MX$","$"],MYR:[,"RM"],NAD:[,"$"],NGN:[,"\u20a6"],NIO:[,"C$"],NOK:[,"kr"],NPR:[,"Rs"],NZD:["NZ$","$"],PHP:[,"\u20b1"],PKR:[,"Rs"],PLN:[,"z\u0142"],PYG:[,"\u20b2"],RON:[,"lei"],RUB:[,"\u20bd"],RUR:[,"\u0440."],RWF:[,"RF"],SBD:[,"$"],SEK:[,"kr"],SGD:[,"$"],SHP:[,"\xa3"],SRD:[,"$"],SSP:[,"\xa3"],STD:[,"Db"],SYP:[,"\xa3"],THB:[,"\u0e3f"],TOP:[,"T$"],TRY:[,"\u20ba"],TTD:[,"$"],TWD:["NT$","$"],UAH:[,"\u20b4"],USD:["$"],UYU:[,"$"],VEF:[,"Bs"],VND:["\u20ab"],XAF:["FCFA"],XCD:["EC$","$"],XOF:["CFA"],XPF:["CFPF"],ZAR:[,"R"],ZMW:[,"ZK"]};var f=["en",[["a","p"],["AM","PM"]],[["AM","PM"],,],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",,"{1} 'at' {0}"],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",function(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];const p={};function g(e,t,n){"string"!=typeof t&&(n=t,t=e[0]),t=t.toLowerCase().replace(/_/g,"-"),p[t]=e,n&&(p[t][18]=n)}const m=function(){var e={Decimal:0,Percent:1,Currency:2,Scientific:3};return e[e.Decimal]="Decimal",e[e.Percent]="Percent",e[e.Currency]="Currency",e[e.Scientific]="Scientific",e}(),v=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),y=function(){var e={Format:0,Standalone:1};return e[e.Format]="Format",e[e.Standalone]="Standalone",e}(),b=function(){var e={Narrow:0,Abbreviated:1,Wide:2,Short:3};return e[e.Narrow]="Narrow",e[e.Abbreviated]="Abbreviated",e[e.Wide]="Wide",e[e.Short]="Short",e}(),w=function(){var e={Short:0,Medium:1,Long:2,Full:3};return e[e.Short]="Short",e[e.Medium]="Medium",e[e.Long]="Long",e[e.Full]="Full",e}(),C=function(){var e={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};return e[e.Decimal]="Decimal",e[e.Group]="Group",e[e.List]="List",e[e.PercentSign]="PercentSign",e[e.PlusSign]="PlusSign",e[e.MinusSign]="MinusSign",e[e.Exponential]="Exponential",e[e.SuperscriptingExponent]="SuperscriptingExponent",e[e.PerMille]="PerMille",e[e.Infinity]="Infinity",e[e.NaN]="NaN",e[e.TimeSeparator]="TimeSeparator",e[e.CurrencyDecimal]="CurrencyDecimal",e[e.CurrencyGroup]="CurrencyGroup",e}(),_=function(){var e={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};return e[e.Sunday]="Sunday",e[e.Monday]="Monday",e[e.Tuesday]="Tuesday",e[e.Wednesday]="Wednesday",e[e.Thursday]="Thursday",e[e.Friday]="Friday",e[e.Saturday]="Saturday",e}();function x(e){return B(e)[0]}function S(e,t,n){const r=B(e);return H(H([r[1],r[2]],t),n)}function E(e,t,n){const r=B(e);return H(H([r[3],r[4]],t),n)}function T(e,t,n){const r=B(e);return H(H([r[5],r[6]],t),n)}function M(e,t){return H(B(e)[7],t)}function O(e){return B(e)[8]}function k(e){return B(e)[9]}function A(e,t){return H(B(e)[10],t)}function D(e,t){return H(B(e)[11],t)}function N(e,t){return H(B(e)[12],t)}function R(e,t){const n=B(e),r=n[13][t];if("undefined"==typeof r){if(t===C.CurrencyDecimal)return n[13][C.Decimal];if(t===C.CurrencyGroup)return n[13][C.Group]}return r}function I(e,t){return B(e)[14][t]}function P(e){return B(e)[15]||null}function V(e){return B(e)[16]||null}function L(e){return B(e)[17]}function F(e){if(!e[18])throw new Error(`Missing extra locale data for the locale "${e[0]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function $(e){const t=B(e);return F(t),(t[18][2]||[]).map(e=>"string"==typeof e?W(e):[W(e[0]),W(e[1])])}function j(e,t,n){const r=B(e);return F(r),H(H([r[18][0],r[18][1]],t)||[],n)||[]}function H(e,t){for(let n=t;n>-1;n--)if("undefined"!=typeof e[n])return e[n];throw new Error("Locale data API: locale data undefined")}function W(e){const[t,n]=e.split(":");return{hours:+t,minutes:+n}}function B(e){const t=e.toLowerCase().replace(/_/g,"-");let n=p[t];if(n)return n;const r=t.split("-")[0];if(n=p[r])return n;if("en"===r)return f;throw new Error(`Missing locale data for the locale "${e}".`)}function U(e,t){const n=h[e]||[],r=n[1];return"narrow"===t&&"string"==typeof r?r:n[0]||e}const z=new r.InjectionToken("UseV4Plurals");class G{}function q(e,t,n,r){let i=`=${e}`;if(t.indexOf(i)>-1)return i;if(i=n.getPluralCategory(e,r),t.indexOf(i)>-1)return i;if(t.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${e}"`)}class K extends G{constructor(e,t){super(),this.locale=e,this.deprecatedPluralFn=t}getPluralCategory(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):L(t||this.locale)(e)){case v.Zero:return"zero";case v.One:return"one";case v.Two:return"two";case v.Few:return"few";case v.Many:return"many";default:return"other"}}}function Z(e,t){"string"==typeof t&&(t=parseInt(t,10));const n=t,r=n.toString().replace(/^[^.]*\.?/,""),i=Math.floor(Math.abs(n)),l=r.length,o=parseInt(r,10),s=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(e.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?v.One:v.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?v.One:v.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===i||1===n?v.One:v.Other;case"ar":return 0===n?v.Zero:1===n?v.One:2===n?v.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?v.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?v.Many:v.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===i&&0===l?v.One:v.Other;case"be":return n%10==1&&n%100!=11?v.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?v.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?v.Many:v.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?v.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?v.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?v.Few:0!==n&&n%1e6==0?v.Many:v.Other;case"bs":case"hr":case"sr":return 0===l&&i%10==1&&i%100!=11||o%10==1&&o%100!=11?v.One:0===l&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)||o%10===Math.floor(o%10)&&o%10>=2&&o%10<=4&&!(o%100>=12&&o%100<=14)?v.Few:v.Other;case"cs":case"sk":return 1===i&&0===l?v.One:i===Math.floor(i)&&i>=2&&i<=4&&0===l?v.Few:0!==l?v.Many:v.Other;case"cy":return 0===n?v.Zero:1===n?v.One:2===n?v.Two:3===n?v.Few:6===n?v.Many:v.Other;case"da":return 1===n||0!==s&&(0===i||1===i)?v.One:v.Other;case"dsb":case"hsb":return 0===l&&i%100==1||o%100==1?v.One:0===l&&i%100==2||o%100==2?v.Two:0===l&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||o%100===Math.floor(o%100)&&o%100>=3&&o%100<=4?v.Few:v.Other;case"ff":case"fr":case"hy":case"kab":return 0===i||1===i?v.One:v.Other;case"fil":return 0===l&&(1===i||2===i||3===i)||0===l&&i%10!=4&&i%10!=6&&i%10!=9||0!==l&&o%10!=4&&o%10!=6&&o%10!=9?v.One:v.Other;case"ga":return 1===n?v.One:2===n?v.Two:n===Math.floor(n)&&n>=3&&n<=6?v.Few:n===Math.floor(n)&&n>=7&&n<=10?v.Many:v.Other;case"gd":return 1===n||11===n?v.One:2===n||12===n?v.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?v.Few:v.Other;case"gv":return 0===l&&i%10==1?v.One:0===l&&i%10==2?v.Two:0!==l||i%100!=0&&i%100!=20&&i%100!=40&&i%100!=60&&i%100!=80?0!==l?v.Many:v.Other:v.Few;case"he":return 1===i&&0===l?v.One:2===i&&0===l?v.Two:0!==l||n>=0&&n<=10||n%10!=0?v.Other:v.Many;case"is":return 0===s&&i%10==1&&i%100!=11||0!==s?v.One:v.Other;case"ksh":return 0===n?v.Zero:1===n?v.One:v.Other;case"kw":case"naq":case"se":case"smn":return 1===n?v.One:2===n?v.Two:v.Other;case"lag":return 0===n?v.Zero:0!==i&&1!==i||0===n?v.Other:v.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?v.Few:0!==o?v.Many:v.Other:v.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===l&&o%100===Math.floor(o%100)&&o%100>=11&&o%100<=19?v.Zero:n%10==1&&n%100!=11||2===l&&o%10==1&&o%100!=11||2!==l&&o%10==1?v.One:v.Other;case"mk":return 0===l&&i%10==1||o%10==1?v.One:v.Other;case"mt":return 1===n?v.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?v.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?v.Many:v.Other;case"pl":return 1===i&&0===l?v.One:0===l&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?v.Few:0===l&&1!==i&&i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||0===l&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===l&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14?v.Many:v.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?v.One:v.Other;case"ro":return 1===i&&0===l?v.One:0!==l||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?v.Few:v.Other;case"ru":case"uk":return 0===l&&i%10==1&&i%100!=11?v.One:0===l&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14)?v.Few:0===l&&i%10==0||0===l&&i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||0===l&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14?v.Many:v.Other;case"shi":return 0===i||1===n?v.One:n===Math.floor(n)&&n>=2&&n<=10?v.Few:v.Other;case"si":return 0===n||1===n||0===i&&1===o?v.One:v.Other;case"sl":return 0===l&&i%100==1?v.One:0===l&&i%100==2?v.Two:0===l&&i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||0!==l?v.Few:v.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?v.One:v.Other;default:return v.Other}}function Y(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const e=n.indexOf("="),[r,i]=-1==e?[n,""]:[n.slice(0,e),n.slice(e+1)];if(r.trim()===t)return decodeURIComponent(i)}return null}class Q{constructor(e,t,n,r){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=r,this._initialClasses=[]}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Object(r["\u0275isListLikeIterable"])(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachChangedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachRemovedItem(e=>{e.previousValue&&this._toggleClass(e.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(e=>{if("string"!=typeof e.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Object(r["\u0275stringify"])(e.item)}`);this._toggleClass(e.item,!0)}),e.forEachRemovedItem(e=>this._toggleClass(e.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!0)):Object.keys(e).forEach(t=>this._toggleClass(t,!!e[t])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!1)):Object.keys(e).forEach(e=>this._toggleClass(e,!1)))}_toggleClass(e,t){(e=e.trim())&&e.split(/\s+/g).forEach(e=>{t?this._renderer.addClass(this._ngEl.nativeElement,e):this._renderer.removeClass(this._ngEl.nativeElement,e)})}}class X{constructor(e){this._viewContainerRef=e,this._componentRef=null,this._moduleRef=null}ngOnChanges(e){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){const t=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(e.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){const e=t.get(r.NgModuleRef);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(e.injector)}else this._moduleRef=null;const n=(this._moduleRef?this._moduleRef.componentFactoryResolver:t.get(r.ComponentFactoryResolver)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(n,this._viewContainerRef.length,t,this.ngComponentOutletContent)}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}class J{constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,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}}class ee{constructor(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._differ=null}set ngForTrackBy(e){Object(r.isDevMode)()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(e)}. `+"See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngOnChanges(e){if("ngForOf"in e){const t=e.ngForOf.currentValue;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${t}' of type '${t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}}ngDoCheck(){if(this._differ){const e=this._differ.diff(this.ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const t=[];e.forEachOperation((e,n,r)=>{if(null==e.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new J(null,this.ngForOf,-1,-1),r),i=new te(e,n);t.push(i)}else if(null==r)this._viewContainer.remove(n);else{const i=this._viewContainer.get(n);this._viewContainer.move(i,r);const l=new te(e,i);t.push(l)}});for(let n=0;n{this._viewContainer.get(e.currentIndex).context.$implicit=e.item})}_perViewChange(e,t){e.context.$implicit=t.item}}class te{constructor(e,t){this.record=e,this.view=t}}class ne{constructor(e,t){this._viewContainer=e,this._context=new re,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set 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)))}}class re{constructor(){this.$implicit=null,this.ngIf=null}}class ie{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class le{constructor(){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||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const t=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||t,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),t}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let t=0;tthis._setStyle(e.key,null)),e.forEachAddedItem(e=>this._setStyle(e.key,e.currentValue)),e.forEachChangedItem(e=>this._setStyle(e.key,e.currentValue))}_setStyle(e,t){const[n,r]=e.split(".");null!=(t=null!=t&&r?`${t}${r}`:t)?this._renderer.setStyle(this._ngEl.nativeElement,n,t):this._renderer.removeStyle(this._ngEl.nativeElement,n)}}class de{constructor(e){this._viewContainerRef=e}ngOnChanges(e){this._shouldRecreateView(e)?(this._viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef)),this.ngTemplateOutlet&&(this._viewRef=this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext))):this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(e){const t=e.ngTemplateOutletContext;return!!e.ngTemplateOutlet||t&&this._hasContextShapeChanged(t)}_hasContextShapeChanged(e){const t=Object.keys(e.previousValue||{}),n=Object.keys(e.currentValue||{});if(t.length===n.length){for(let e of n)if(-1===t.indexOf(e))return!0;return!1}return!0}_updateExistingContext(e){for(let t of Object.keys(e))this._viewRef.context[t]=this.ngTemplateOutletContext[t]}}const he=[Q,X,ee,ne,de,ce,le,oe,se,ae,ue],fe={},pe=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,ge=function(){var e={Short:0,ShortGMT:1,Long:2,Extended:3};return e[e.Short]="Short",e[e.ShortGMT]="ShortGMT",e[e.Long]="Long",e[e.Extended]="Extended",e}(),me=function(){var e={FullYear:0,Month:1,Date:2,Hours:3,Minutes:4,Seconds:5,Milliseconds:6,Day:7};return e[e.FullYear]="FullYear",e[e.Month]="Month",e[e.Date]="Date",e[e.Hours]="Hours",e[e.Minutes]="Minutes",e[e.Seconds]="Seconds",e[e.Milliseconds]="Milliseconds",e[e.Day]="Day",e}(),ve=function(){var e={DayPeriods:0,Days:1,Months:2,Eras:3};return e[e.DayPeriods]="DayPeriods",e[e.Days]="Days",e[e.Months]="Months",e[e.Eras]="Eras",e}();function ye(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(e,n){return null!=t&&n in t?t[n]:e})),e}function be(e,t,n="-",r,i){let l="";(e<0||i&&e<=0)&&(i?e=1-e:(e=-e,l=n));let o=""+e;for(;o.length0||s>-n)&&(s+=n),e===me.Hours&&0===s&&-12===n&&(s=12),be(s,t,R(o,C.MinusSign),r,i)}}function Ce(e,t,n=y.Format,r=!1){return function(i,l){return function(e,t,n,r,i,l){switch(n){case ve.Months:return T(t,i,r)[e.getMonth()];case ve.Days:return E(t,i,r)[e.getDay()];case ve.DayPeriods:const o=e.getHours(),s=e.getMinutes();if(l){const e=$(t),n=j(t,i,r);let l;if(e.forEach((e,t)=>{if(Array.isArray(e)){const{hours:r,minutes:i}=e[0],{hours:a,minutes:u}=e[1];o>=r&&s>=i&&(o0?Math.floor(i/60):Math.ceil(i/60);switch(e){case ge.Short:return(i>=0?"+":"")+be(o,2,l)+be(Math.abs(i%60),2,l);case ge.ShortGMT:return"GMT"+(i>=0?"+":"")+be(o,1,l);case ge.Long:return"GMT"+(i>=0?"+":"")+be(o,2,l)+":"+be(Math.abs(i%60),2,l);case ge.Extended:return 0===r?"Z":(i>=0?"+":"")+be(o,2,l)+":"+be(Math.abs(i%60),2,l);default:throw new Error(`Unknown zone width "${e}"`)}}}const xe=0,Se=4;function Ee(e,t=!1){return function(n,r){let i;if(t){const e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();i=1+Math.floor((t+e)/7)}else{const e=function(e){const t=new Date(e,xe,1).getDay();return new Date(e,0,1+(t<=Se?Se:Se+7)-t)}(n.getFullYear()),t=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(Se-e.getDay()))}(n).getTime()-e.getTime();i=1+Math.round(t/6048e5)}return be(i,e,R(r,C.MinusSign))}}const Te={};function Me(e,t){e=e.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function Oe(e,t){return Error(`InvalidPipeArgument: '${t}' for pipe '${Object(r["\u0275stringify"])(e)}'`)}const ke=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;class Ae{constructor(e){this.locale=e}transform(e,t="mediumDate",n,r){if(null==e||""===e||e!=e)return null;let i,l;if("string"==typeof e&&(e=e.trim()),Ne(e))i=e;else if(isNaN(e-parseFloat(e)))if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[t,n,r]=e.split("-").map(e=>+e);i=new Date(t,n-1,r)}else i="string"==typeof e&&(l=e.match(ke))?De(l):new Date(e);else i=new Date(parseFloat(e));if(!Ne(i))throw Oe(Ae,e);return function(e,t,n,r){t=function e(t,n){const r=x(t);if(fe[r]=fe[r]||{},fe[r][n])return fe[r][n];let i="";switch(n){case"shortDate":i=A(t,w.Short);break;case"mediumDate":i=A(t,w.Medium);break;case"longDate":i=A(t,w.Long);break;case"fullDate":i=A(t,w.Full);break;case"shortTime":i=D(t,w.Short);break;case"mediumTime":i=D(t,w.Medium);break;case"longTime":i=D(t,w.Long);break;case"fullTime":i=D(t,w.Full);break;case"short":const r=e(t,"shortTime"),l=e(t,"shortDate");i=ye(N(t,w.Short),[r,l]);break;case"medium":const o=e(t,"mediumTime"),s=e(t,"mediumDate");i=ye(N(t,w.Medium),[o,s]);break;case"long":const a=e(t,"longTime"),u=e(t,"longDate");i=ye(N(t,w.Long),[a,u]);break;case"full":const c=e(t,"fullTime"),d=e(t,"fullDate");i=ye(N(t,w.Full),[c,d])}return i&&(fe[r][n]=i),i}(n,t)||t;let i,l=[];for(;t;){if(!(i=pe.exec(t))){l.push(t);break}{const e=(l=l.concat(i.slice(1))).pop();if(!e)break;t=e}}let o=e.getTimezoneOffset();r&&(o=Me(r,o),e=function(e,t,n){const r=e.getTimezoneOffset();return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,-1*(Me(t,r)-r))}(e,r));let s="";return l.forEach(t=>{const r=function(e){if(Te[e])return Te[e];let t;switch(e){case"G":case"GG":case"GGG":t=Ce(ve.Eras,b.Abbreviated);break;case"GGGG":t=Ce(ve.Eras,b.Wide);break;case"GGGGG":t=Ce(ve.Eras,b.Narrow);break;case"y":t=we(me.FullYear,1,0,!1,!0);break;case"yy":t=we(me.FullYear,2,0,!0,!0);break;case"yyy":t=we(me.FullYear,3,0,!1,!0);break;case"yyyy":t=we(me.FullYear,4,0,!1,!0);break;case"M":case"L":t=we(me.Month,1,1);break;case"MM":case"LL":t=we(me.Month,2,1);break;case"MMM":t=Ce(ve.Months,b.Abbreviated);break;case"MMMM":t=Ce(ve.Months,b.Wide);break;case"MMMMM":t=Ce(ve.Months,b.Narrow);break;case"LLL":t=Ce(ve.Months,b.Abbreviated,y.Standalone);break;case"LLLL":t=Ce(ve.Months,b.Wide,y.Standalone);break;case"LLLLL":t=Ce(ve.Months,b.Narrow,y.Standalone);break;case"w":t=Ee(1);break;case"ww":t=Ee(2);break;case"W":t=Ee(1,!0);break;case"d":t=we(me.Date,1);break;case"dd":t=we(me.Date,2);break;case"E":case"EE":case"EEE":t=Ce(ve.Days,b.Abbreviated);break;case"EEEE":t=Ce(ve.Days,b.Wide);break;case"EEEEE":t=Ce(ve.Days,b.Narrow);break;case"EEEEEE":t=Ce(ve.Days,b.Short);break;case"a":case"aa":case"aaa":t=Ce(ve.DayPeriods,b.Abbreviated);break;case"aaaa":t=Ce(ve.DayPeriods,b.Wide);break;case"aaaaa":t=Ce(ve.DayPeriods,b.Narrow);break;case"b":case"bb":case"bbb":t=Ce(ve.DayPeriods,b.Abbreviated,y.Standalone,!0);break;case"bbbb":t=Ce(ve.DayPeriods,b.Wide,y.Standalone,!0);break;case"bbbbb":t=Ce(ve.DayPeriods,b.Narrow,y.Standalone,!0);break;case"B":case"BB":case"BBB":t=Ce(ve.DayPeriods,b.Abbreviated,y.Format,!0);break;case"BBBB":t=Ce(ve.DayPeriods,b.Wide,y.Format,!0);break;case"BBBBB":t=Ce(ve.DayPeriods,b.Narrow,y.Format,!0);break;case"h":t=we(me.Hours,1,-12);break;case"hh":t=we(me.Hours,2,-12);break;case"H":t=we(me.Hours,1);break;case"HH":t=we(me.Hours,2);break;case"m":t=we(me.Minutes,1);break;case"mm":t=we(me.Minutes,2);break;case"s":t=we(me.Seconds,1);break;case"ss":t=we(me.Seconds,2);break;case"S":t=we(me.Milliseconds,1);break;case"SS":t=we(me.Milliseconds,2);break;case"SSS":t=we(me.Milliseconds,3);break;case"Z":case"ZZ":case"ZZZ":t=_e(ge.Short);break;case"ZZZZZ":t=_e(ge.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=_e(ge.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=_e(ge.Long);break;default:return null}return Te[e]=t,t}(t);s+=r?r(e,n,o):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}(i,t,r||this.locale,n)}}function De(e){const t=new Date(0);let n=0,r=0;const i=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=+(e[9]+e[10]),r=+(e[9]+e[11])),(e[8]?t.setUTCFullYear:t.setFullYear).call(t,+e[1],+e[2]-1,+e[3]);const l=+(e[4]||"0")-n,o=+(e[5]||"0")-r,s=+(e[6]||"0"),a=Math.round(1e3*parseFloat("0."+(e[7]||0)));return i.call(t,l,o,s,a),t}function Ne(e){return e instanceof Date&&!isNaN(e.valueOf())}class Re{static format(e,t,n,r={}){const{minimumIntegerDigits:i,minimumFractionDigits:l,maximumFractionDigits:o,currency:s,currencyAsSymbol:a=!1}=r,u={minimumIntegerDigits:i,minimumFractionDigits:l,maximumFractionDigits:o,style:m[n].toLowerCase()};return n==m.Currency&&(u.currency="string"==typeof s?s:void 0,u.currencyDisplay=a?"symbol":"code"),new Intl.NumberFormat(t,u).format(e)}}const Ie=/((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/,Pe={yMMMdjms:ze(Ue([We("year",1),Be("month",3),We("day",1),We("hour",1),We("minute",1),We("second",1)])),yMdjm:ze(Ue([We("year",1),We("month",1),We("day",1),We("hour",1),We("minute",1)])),yMMMMEEEEd:ze(Ue([We("year",1),Be("month",4),Be("weekday",4),We("day",1)])),yMMMMd:ze(Ue([We("year",1),Be("month",4),We("day",1)])),yMMMd:ze(Ue([We("year",1),Be("month",3),We("day",1)])),yMd:ze(Ue([We("year",1),We("month",1),We("day",1)])),jms:ze(Ue([We("hour",1),We("second",1),We("minute",1)])),jm:ze(Ue([We("hour",1),We("minute",1)]))},Ve={yyyy:ze(We("year",4)),yy:ze(We("year",2)),y:ze(We("year",1)),MMMM:ze(Be("month",4)),MMM:ze(Be("month",3)),MM:ze(We("month",2)),M:ze(We("month",1)),LLLL:ze(Be("month",4)),L:ze(Be("month",1)),dd:ze(We("day",2)),d:ze(We("day",1)),HH:Le(Fe(ze(He(We("hour",2),!1)))),H:Fe(ze(He(We("hour",1),!1))),hh:Le(Fe(ze(He(We("hour",2),!0)))),h:Fe(ze(He(We("hour",1),!0))),jj:ze(We("hour",2)),j:ze(We("hour",1)),mm:Le(ze(We("minute",2))),m:ze(We("minute",1)),ss:Le(ze(We("second",2))),s:ze(We("second",1)),sss:ze(We("second",3)),EEEE:ze(Be("weekday",4)),EEE:ze(Be("weekday",3)),EE:ze(Be("weekday",2)),E:ze(Be("weekday",1)),a:function(e){return function(t,n){return e(t,n).split(" ")[1]}}(ze(He(We("hour",1),!0))),Z:je("short"),z:je("long"),ww:ze({}),w:ze({}),G:ze(Be("era",1)),GG:ze(Be("era",2)),GGG:ze(Be("era",3)),GGGG:ze(Be("era",4))};function Le(e){return function(t,n){const r=e(t,n);return 1==r.length?"0"+r:r}}function Fe(e){return function(t,n){return e(t,n).split(" ")[0]}}function $e(e,t,n){return new Intl.DateTimeFormat(t,n).format(e).replace(/[\u200e\u200f]/g,"")}function je(e){const t={hour:"2-digit",hour12:!1,timeZoneName:e};return function(e,n){const r=$e(e,n,t);return r?r.substring(3):""}}function He(e,t){return e.hour12=t,e}function We(e,t){return function(){var n={};return n[e]=2===t?"2-digit":"numeric",n}()}function Be(e,t){const n={};return n[e]=t<4?t>1?"short":"narrow":"long",n}function Ue(e){return e.reduce((e,t)=>Object.assign({},e,t),{})}function ze(e){return(t,n)=>$e(t,n,e)}const Ge=new Map;class qe{static format(e,t,n){return function(e,t,n){const r=Pe[e];if(r)return r(t,n);const i=e;let l=Ge.get(i);if(!l){let t;l=[],Ie.exec(e);let n=e;for(;n;)(t=Ie.exec(n))?n=(l=l.concat(t.slice(1))).pop():(l.push(n),n=null);Ge.set(i,l)}return l.reduce((e,r)=>{const i=Ve[r];return e+(i?i(t,n):function(e){return"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}(r))},"")}(n,e,t)}}class Ke{constructor(e){this._locale=e}transform(e,t="mediumDate"){if(null==e||""===e||e!=e)return null;let n;if("string"==typeof e&&(e=e.trim()),Ze(e))n=e;else if(isNaN(e-parseFloat(e)))if("string"==typeof e&&/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[t,r,i]=e.split("-").map(e=>parseInt(e,10));n=new Date(t,r-1,i)}else n=new Date(e);else n=new Date(parseFloat(e));if(!Ze(n)){let t;if("string"!=typeof e||!(t=e.match(ke)))throw Oe(Ke,e);n=De(t)}return qe.format(n,this._locale,Ke._ALIASES[t]||t)}}function Ze(e){return e instanceof Date&&!isNaN(e.valueOf())}Ke._ALIASES={medium:"yMMMdjms",short:"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"};const Ye=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Qe=22,Xe=".",Je="0",et=";",tt=",",nt="#",rt="\xa4",it="%";function lt(e,t,n,r,i=null){const l={str:null},o=I(t,n);let s;if("string"!=typeof e||isNaN(+e-parseFloat(e))){if("number"!=typeof e)return l.error=`${e} is not a number`,l;s=e}else s=+e;const a=function(e,t="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(et),i=r[0],l=r[1],o=-1!==i.indexOf(Xe)?i.split(Xe):[i.substring(0,i.lastIndexOf(Je)+1),i.substring(i.lastIndexOf(Je)+1)],s=o[0],a=o[1]||"";n.posPre=s.substr(0,s.indexOf(nt));for(let c=0;c-1&&(o=o.replace(Xe,"")),(r=o.search(/e/i))>0?(n<0&&(n=r),n+=+o.slice(r+1),o=o.substring(0,r)):n<0&&(n=o.length),r=0;o.charAt(r)===Je;r++);if(r===(l=o.length))t=[0],n=1;else{for(l--;o.charAt(l)===Je;)l--;for(n-=r,t=[],i=0;r<=l;r++,i++)t[i]=+o.charAt(r)}return n>Qe&&(t=t.splice(0,Qe-1),s=n-1,n=1),{digits:t,exponent:s,integerLen:n}}(s);n===m.Percent&&(e=function(e){if(0===e.digits[0])return e;const t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===t?e.digits.push(0,0):1===t&&e.digits.push(0),e.integerLen+=2),e}(e));let o=a.minInt,d=a.minFrac,h=a.maxFrac;if(r){const e=r.match(Ye);if(null===e)return l.error=`${r} is not a valid digit info`,l;const t=e[1],n=e[3],i=e[5];null!=t&&(o=ot(t)),null!=n&&(d=ot(n)),null!=i?h=ot(i):null!=n&&d>h&&(h=d)}!function(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let r=e.digits,i=r.length-e.integerLen;const l=Math.min(Math.max(t,i),n);let o=l+e.integerLen,s=r[o];if(o>0){r.splice(Math.max(e.integerLen,o));for(let e=o;e=5)if(o-1<0){for(let t=0;t>o;t--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[o-1]++;for(;i=u?r.pop():a=!1),t>=10?1:0},0);c&&(r.unshift(c),e.integerLen++)}(e,d,h);let f=e.digits,p=e.integerLen;const g=e.exponent;let v=[];for(c=f.every(e=>!e);p0?v=f.splice(p,f.length):(v=f,f=[0]);const y=[];for(f.length>=a.lgSize&&y.unshift(f.splice(-a.lgSize,f.length).join(""));f.length>a.gSize;)y.unshift(f.splice(-a.gSize,f.length).join(""));f.length&&y.unshift(f.join("")),u=y.join(R(t,i?C.CurrencyGroup:C.Group)),v.length&&(u+=R(t,i?C.CurrencyDecimal:C.Decimal)+v.join("")),g&&(u+=R(t,C.Exponential)+"+"+g)}else u=R(t,C.Infinity);return u=s<0&&!c?a.negPre+u+a.negSuf:a.posPre+u+a.posSuf,n===m.Currency&&null!==i?(l.str=u.replace(rt,i).replace(rt,""),l):n===m.Percent?(l.str=u.replace(new RegExp(it,"g"),R(t,C.PercentSign)),l):(l.str=u,l)}function ot(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function st(e,t,n,r,i,l=null,o=!1){if(null==n)return null;if("number"!=typeof(n="string"!=typeof n||isNaN(+n-parseFloat(n))?n:+n))throw Oe(e,n);let s,a,u;if(r!==m.Currency&&(s=1,a=0,u=3),i){const e=i.match(Ye);if(null===e)throw new Error(`${i} is not a valid digit info for number pipes`);null!=e[1]&&(s=ot(e[1])),null!=e[3]&&(a=ot(e[3])),null!=e[5]&&(u=ot(e[5]))}return Re.format(n,t,r,{minimumIntegerDigits:s,minimumFractionDigits:a,maximumFractionDigits:u,currency:l,currencyAsSymbol:o})}class at{constructor(e){this._locale=e}transform(e,t){return st(at,this._locale,e,m.Decimal,t)}}class ut{constructor(e){this._locale=e}transform(e,t){return st(ut,this._locale,e,m.Percent,t)}}class ct{constructor(e){this._locale=e}transform(e,t="USD",n=!1,r){return st(ct,this._locale,e,m.Currency,r,t,n)}}const dt=[at,ut,ct,Ke],ht=new class{createSubscription(e,t){return e.then(t,e=>{throw e})}dispose(e){}onDestroy(e){}},ft=new class{createSubscription(e,t){return e.subscribe({next:t,error:e=>{throw e}})}dispose(e){e.unsubscribe()}onDestroy(e){e.unsubscribe()}};class pt{constructor(e){this._ref=e,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,r.WrappedValue.wrap(this._latestValue)):(e&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,t=>this._updateLatestValue(e,t))}_selectStrategy(e){if(Object(r["\u0275isPromise"])(e))return ht;if(Object(r["\u0275isObservable"])(e))return ft;throw Oe(pt,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}class gt{transform(e){if(!e)return e;if("string"!=typeof e)throw Oe(gt,e);return e.toLowerCase()}}class mt{transform(e){if(!e)return e;if("string"!=typeof e)throw Oe(mt,e);return e.split(/\b/g).map(e=>(function(e){return e?e[0].toUpperCase()+e.substr(1).toLowerCase():e})(e)).join("")}}class vt{transform(e){if(!e)return e;if("string"!=typeof e)throw Oe(vt,e);return e.toUpperCase()}}const yt=/#/g;class bt{constructor(e){this._localization=e}transform(e,t,n){if(null==e)return"";if("object"!=typeof t||null===t)throw Oe(bt,t);return t[q(e,Object.keys(t),this._localization,n)].replace(yt,e.toString())}}class wt{transform(e,t){if(null==e)return"";if("object"!=typeof t||"string"!=typeof e)throw Oe(wt,t);return t.hasOwnProperty(e)?t[e]:t.hasOwnProperty("other")?t.other:""}}class Ct{transform(e){return JSON.stringify(e,null,2)}}class _t{constructor(e){this._locale=e}transform(e,t,n){if(Et(e))return null;n=n||this._locale;const{str:r,error:i}=lt(e,n,m.Decimal,t);if(i)throw Oe(_t,i);return r}}class xt{constructor(e){this._locale=e}transform(e,t,n){if(Et(e))return null;n=n||this._locale;const{str:r,error:i}=lt(e,n,m.Percent,t);if(i)throw Oe(xt,i);return r}}class St{constructor(e){this._locale=e}transform(e,t,n="symbol",r,i){if(Et(e))return null;i=i||this._locale,"boolean"==typeof n&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),n=n?"symbol":"code");let l=t||"USD";"code"!==n&&(l=U(l,"symbol"===n?"wide":"narrow"));const{str:o,error:s}=lt(e,i,m.Currency,r,l);if(s)throw Oe(St,s);return o}}function Et(e){return null==e||""===e||e!=e}class Tt{transform(e,t,n){if(null==e)return e;if(!this.supports(e))throw Oe(Tt,e);return e.slice(t,n)}supports(e){return"string"==typeof e||Array.isArray(e)}}const Mt=[pt,vt,gt,Ct,Tt,_t,xt,mt,St,Ae,bt,wt];class Ot{}class kt{}const At=new r.InjectionToken("DocumentToken"),Dt="browser",Nt="server",Rt="browserWorkerApp",It="browserWorkerUi";function Pt(e){return e===Dt}function Vt(e){return e===Nt}function Lt(e){return e===Rt}function Ft(e){return e===It}const $t=new r.Version("5.2.11")},JEOp:function(e,t,n){"use strict";var r=n("2zkT");t.a=class extends r.a{notifyNext(e,t,n,r,i){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}},Jnfr:function(e,t){function n(e){return Promise.resolve().then(function(){throw new Error("Cannot find module '"+e+"'.")})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="Jnfr"},LGuY:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},LiEr:function(e,t,n){"use strict";var r=n("W/Sc"),i=n("ves3"),l=n("2zkT"),o=n("s+UU");function s(){return function(e){return e.lift(new a(e))}}class a{constructor(e){this.connectable=e}call(e,t){const{connectable:n}=this;n._refCount++;const r=new u(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i}}class u extends l.a{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:n}=this,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}const c=class extends i.a{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new o.a).add(this.source.subscribe(new class extends r.b{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}(this.getSubject(),this))),e.closed?(this._connection=null,e=o.a.EMPTY):this._connection=e),e}refCount(){return s()(this)}}.prototype,d={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:c._subscribe},_isComplete:{value:c._isComplete,writable:!0},getSubject:{value:c.getSubject},connect:{value:c.connect},refCount:{value:c.refCount}};function h(){return new r.a}t.a=function(){return(e=>s()(function(e,t){return function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,d);return r.source=t,r.subjectFactory=n,r}}(h)(e)))(this)}},MEA4:function(e,t,n){"use strict";function r(e,t,n){let r=!1;const i=e=>{if(t(e))r=!0;else if(!r&&"string"!=typeof e){switch(e.type){case"concat":e.parts.forEach(i);break;case"indent":case"group":case"lineSuffix":i(e.content)}n&&n(e)}};i(e)}function i(e){e.length>0&&(e[e.length-1].willBreak=!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.willBreak=function(e){return function(e,t){let n=!1;return r(e,e=>!!(e=>{if("string"==typeof e)return!1;switch(e.type){case"line":if(e.hard)return!0;break;case"group":if(e.willBreak)return!0}return!1})(e)&&(n=!0,!0)),n}(e)},t.propagateBreaks=function(e){const t=[];r(e,e=>{if("string"==typeof e)return!1;switch(e.type){case"breakParent":i(t);break;case"group":t.push(e)}return!1},e=>{if("string"==typeof e)return!1;if("group"===e.type){const e=t.pop();e&&e.willBreak&&i(t)}return!1})}},Qi5R:function(e,t,n){"use strict";var r=n("ves3");class i extends r.a{constructor(e,t){super(),this.value=e,this.scheduler=t,this._isScalar=!0,t&&(this._isScalar=!1)}static create(e,t){return new i(e,t)}static dispatch(e){const{done:t,value:n,subscriber:r}=e;t?r.complete():(r.next(n),r.closed||(e.done=!0,this.schedule(e)))}_subscribe(e){const t=this.value,n=this.scheduler;if(n)return n.schedule(i.dispatch,0,{done:!1,value:t,subscriber:e});e.next(t),e.closed||e.complete()}}var l=n("XVqe");function o(e){return e&&"function"==typeof e.schedule}class s extends r.a{constructor(e,t){super(),this.array=e,this.scheduler=t,t||1!==e.length||(this._isScalar=!0,this.value=e[0])}static create(e,t){return new s(e,t)}static of(...e){let t=e[e.length-1];o(t)?e.pop():t=null;const n=e.length;return n>1?new s(e,t):1===n?new i(e[0],t):new l.a(t)}static dispatch(e){const{array:t,index:n,count:r,subscriber:i}=e;n>=r?i.complete():(i.next(t[n]),i.closed||(e.index=n+1,this.schedule(e)))}_subscribe(e){const t=this.array,n=t.length,r=this.scheduler;if(r)return r.schedule(s.dispatch,0,{array:t,index:0,count:n,subscriber:e});for(let i=0;i0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function d(e){return e}t.a=function(...e){let t=Number.POSITIVE_INFINITY,n=null,i=e[e.length-1];return o(i)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof i&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof r.a?e[0]:function(e=Number.POSITIVE_INFINITY){return function(e,t,n=Number.POSITIVE_INFINITY){return function(r){return"number"==typeof t&&(n=t,t=null),r.lift(new class{constructor(e,t,n=Number.POSITIVE_INFINITY){this.project=e,this.resultSelector=t,this.concurrent=n}call(e,t){return t.subscribe(new c(e,this.project,this.resultSelector,this.concurrent))}}(e,t,n))}}(d,null,e)}(t)(new s(e,n))}},SN96:function(e,t,n){!function(e){"use strict";e.defineMode("lua",function(e,t){var n=e.indentUnit;function r(e){return new RegExp("^(?:"+e.join("|")+")$","i")}var i=r(t.specials||[]),l=r(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),o=r(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),s=r(["function","if","repeat","do","\\(","{"]),a=r(["end","until","\\)","}"]),u=new RegExp("^(?:"+["end","until","\\)","}","else","elseif"].join("|")+")","i");function c(e){for(var t=0;e.eat("=");)++t;return e.eat("["),t}function d(e,t){var n=e.next();return"-"==n&&e.eat("-")?e.eat("[")&&e.eat("[")?(t.cur=h(c(e),"comment"))(e,t):(e.skipToEnd(),"comment"):'"'==n||"'"==n?(t.cur=function(e){return function(t,n){for(var r,i=!1;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.cur=d),"string"}}(n))(e,t):"["==n&&/[\[=]/.test(e.peek())?(t.cur=h(c(e),"string"))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function h(e,t){return function(n,r){for(var i,l=null;null!=(i=n.next());)if(null==l)"]"==i&&(l=0);else if("="==i)++l;else{if("]"==i&&l==e){r.cur=d;break}l=null}return t}}return{startState:function(e){return{basecol:e||0,indentDepth:0,cur:d}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),r=e.current();return"variable"==n&&(o.test(r)?n="keyword":l.test(r)?n="builtin":i.test(r)&&(n="variable-2")),"comment"!=n&&"string"!=n&&(s.test(r)?++t.indentDepth:a.test(r)&&--t.indentDepth),n},indent:function(e,t){var r=u.test(t);return e.basecol+n*(e.indentDepth-(r?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),e.defineMIME("text/x-lua","lua")}(n("8U58"))},UEsV:function(e,t,n){"use strict";t.a=function(e){return i=e,l};var r=n("hfO1");let i;function l(){try{return i.apply(this,arguments)}catch(e){return r.a.e=e,r.a}}},"W/Sc":function(e,t,n){"use strict";var r=n("ves3"),i=n("2zkT"),l=n("s+UU"),o=n("7nan");class s extends l.a{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}var a=n("73T8");class u extends i.a{constructor(e){super(e),this.destination=e}}t.b=u;class c extends r.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[a.a](){return new u(this)}lift(e){const t=new d(this,this);return t.operator=e,t}next(e){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:t}=this,n=t.length,r=t.slice();for(let i=0;inew d(e,t));class d extends c{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):l.a.EMPTY}}},WFWZ:function(e,t,n){"use strict";t.a=function(e){return"function"==typeof e}},WIdU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n("rSMe"),i=n("iaYM"),l=n("MEA4"),o=n("Fl7v"),s=n("svqJ"),a=n("3+4Y");function u(e,t,n){const r=[];return e.forEach(l=>{const o=[n(l)];s.isNextLineEmpty(t.sourceText,s.locEnd(l.getValue()))&&!function(e){const t=e.getParent(),n=e.getValue(),r=t.body;return r&&r[r.length-1]===n}(e)&&o.push(i.hardline),r.push(i.concat(o))}),i.join(i.hardline,r)}function c(e,t,n,r){const l=e.call(e=>u(e,t,n),r);return i.indent(i.concat([i.hardline,l]))}function d(e){return e.getValue().attachedComments?i.concat([o.printDanglingStatementComments(e),o.printDanglingComments(e)]):""}t.buildDocFromAst=function(e,t){const n=e=>o.printComments(e,t,e=>(function(e,t,n){const r=function(e,t,n){const r=e.getValue();if(!r)return"";const h=[],f=r;switch(f.type){case"Chunk":return h.push(e.call(e=>u(e,t,n),"body")),h.push(o.printDanglingComments(e,!0)),(f.body.length||f.attachedComments)&&h.push(i.hardline),i.concat(h);case"LabelStatement":return i.concat(["::",e.call(n,"label"),"::"]);case"GotoStatement":return i.concat(["goto ",e.call(n,"label")]);case"BreakStatement":return"break";case"ReturnStatement":return h.push("return"),f.arguments.length>0&&(h.push(" "),h.push(i.join(", ",e.map(n,"arguments")))),i.concat(h);case"WhileStatement":return h.push("while "),h.push(e.call(n,"condition")),h.push(" do"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.concat([i.hardline,"end"])),i.concat(h);case"DoStatement":return h.push("do"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.concat([i.hardline,"end"])),i.concat(h);case"RepeatStatement":return h.push("repeat"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.concat([i.hardline,"until "])),h.push(e.call(n,"condition")),i.concat(h);case"LocalStatement":case"AssignmentStatement":{const r=[];"LocalStatement"===f.type&&r.push("local "),r.push(i.indent(i.join(i.concat([",",t.linebreakMultipleAssignments?i.hardline:i.line]),e.map(n,"variables"))));let l="";const o=[];f.init.length&&(l=" =",o.push(f.init.length>1?i.indent(i.join(i.concat([",",i.line]),e.map(n,"init"))):i.join(i.concat([",",i.line]),e.map(n,"init"))));const s=f.init.some(e=>null!=e&&"TableConstructorExpression"!==e.type&&"FunctionDeclaration"!==e.type);return i.group(i.concat([i.group(i.concat(r)),i.group(i.concat([l,s?i.indent(i.line):" ",i.concat(o)]))]))}case"CallStatement":return e.call(n,"expression");case"FunctionDeclaration":return f.isLocal&&h.push("local "),h.push("function"),f.identifier&&h.push(" ",e.call(n,"identifier")),h.push(i.concat(["(",i.group(i.indent(i.concat([i.softline,i.join(i.concat([",",i.line]),e.map(n,"parameters"))]))),")"])),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.hardline,"end"),i.concat(h);case"ForNumericStatement":return h.push("for "),h.push(e.call(n,"variable")),h.push(" = "),h.push(e.call(n,"start")),h.push(", "),h.push(e.call(n,"end")),f.step&&(h.push(", "),h.push(e.call(n,"step"))),h.push(" do"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.concat([i.hardline,"end"])),i.concat(h);case"ForGenericStatement":return h.push("for "),h.push(i.join(", ",e.map(n,"variables"))),h.push(" in "),h.push(i.join(", ",e.map(n,"iterators"))),h.push(" do"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),h.push(i.concat([i.hardline,"end"])),i.concat(h);case"IfStatement":const r=[];return e.forEach(e=>{r.push(n(e))},"clauses"),h.push(i.join(i.hardline,r)),h.push(i.concat([i.hardline,"end"])),i.concat(h);case"IfClause":return h.push(i.concat(["if ",i.group(i.concat([i.indent(i.concat([i.softline,e.call(n,"condition")])),i.softline]))," then"])),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),i.concat(h);case"ElseifClause":return h.push(i.concat(["elseif ",i.group(i.concat([i.indent(i.concat([i.softline,e.call(n,"condition")])),i.softline]))," then"])),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),i.concat(h);case"ElseClause":return h.push("else"),h.push(d(e)),f.body.length&&h.push(c(e,t,n,"body")),i.concat(h);case"BooleanLiteral":return f.raw;case"NilLiteral":return"nil";case"NumericLiteral":return f.raw;case"StringLiteral":return function(e,t){const n=e.getValue();if("StringLiteral"!==n.type)throw new Error("printStringLiteral: Expected StringLiteral, got "+n.type);if(n.raw.startsWith("[[")||n.raw.startsWith("[="))return n.raw;const r=n.raw.slice(1,-1);let i=t.quotemark;const l=a.getStringQuotemark(i);return r.includes(l)&&(i="single"===i?"double":"single"),function(e,t){const n=a.getStringQuotemark(t),r=a.getAlternativeStringQuotemark("single"===t?"single":"double"),i=e.replace(/\\([\s\S])|(['"])/g,(e,t,i)=>t===r?t:i===n?"\\"+i:e);return n+i+n}(r,i)}(e,t);case"VarargLiteral":return"...";case"Identifier":return f.name;case"BinaryExpression":case"LogicalExpression":const p=e.getParent().type!==f.type&&f.left.type!==f.type&&f.right.type!==f.type,g=i.concat([f.operator,i.line,e.call(n,"right")]);return i.group(i.concat([e.call(n,"left"),i.indent(i.concat([" ",p?i.group(g):g]))]));case"UnaryExpression":return h.push(f.operator),"not"===f.operator&&h.push(" "),h.push(e.call(n,"argument")),i.concat(h);case"MemberExpression":return i.concat([e.call(n,"base"),f.indexer,e.call(n,"identifier")]);case"IndexExpression":return i.concat([e.call(n,"base"),"[",i.group(i.concat([i.indent(i.concat([i.softline,e.call(n,"index")])),i.softline])),"]"]);case"CallExpression":const m=e.map(n,"arguments");return i.concat([e.call(n,"base"),i.group(i.concat(["(",i.indent(i.concat([i.softline,i.join(i.concat([",",i.line]),m)])),i.softline,")"]),m.some(l.willBreak))]);case"TableCallExpression":return h.push(e.call(n,"base")),h.push(" "),h.push(e.call(n,"arguments")),i.concat(h);case"StringCallExpression":return h.push(e.call(n,"base")),h.push(" "),h.push(e.call(n,"argument")),i.concat(h);case"TableConstructorExpression":if(0===f.fields.length)return"{}";const v=[];let y=[];e.forEach(e=>{v.push(i.concat(y)),v.push(i.group(n(e))),y=[",",i.line]},"fields");const b=s.hasNewLineInRange(t.sourceText,f.range[0],f.range[1]);return i.group(i.concat(["{",i.indent(i.concat([i.softline,i.concat(v)])),i.softline,"}"]),b);case"TableKeyString":return i.concat([e.call(n,"key")," = ",e.call(n,"value")]);case"TableKey":return i.concat(["[",e.call(n,"key"),"]"," = ",e.call(n,"value")]);case"TableValue":return e.call(n,"value")}throw new Error("Unhandled AST node: "+f.type)}(e,t,n),h=[],f=e.needsParens();return f&&h.push("("),h.push(r),f&&h.push(")"),i.concat(h)})(e,t,n)),h=n(new r.FastPath(e));return l.propagateBreaks(h),h}},XVqe:function(e,t,n){"use strict";var r=n("ves3");class i extends r.a{constructor(e){super(),this.scheduler=e}static create(e){return new i(e)}static dispatch(e){const{subscriber:t}=e;t.complete()}_subscribe(e){const t=this.scheduler;if(t)return t.schedule(i.dispatch,0,{subscriber:e});e.complete()}}t.a=i},Xuzc:function(e,t,n){(function(e,n){var r,i;!function(n,l,o){"use strict";var s={function:!0,object:!0},a=s[typeof t]&&t&&!t.nodeType&&t,u=s[typeof e]&&e&&!e.nodeType&&e,c=u&&u.exports===a&&a;void 0===(i="function"==typeof(r=o)?r.apply(t,[t]):r)||(e.exports=i),a&&c&&o(u.exports)}(0,0,function(e){"use strict";var t,n,r;e.version="0.2.1";var i=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null,onLocalDeclaration:null,luaVersion:"5.1"},l=1,o=2,s=4,a=8,u=16,c=32,d=64,h=128,f=256;e.tokenTypes={EOF:l,StringLiteral:o,Keyword:s,Identifier:a,NumericLiteral:u,Punctuator:c,BooleanLiteral:d,NilLiteral:h,VarargLiteral:f};var p=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'",decimalEscapeTooLarge:"decimal escape too large near '%1'",invalidEscape:"invalid escape sequence near '%1'",hexadecimalDigitExpected:"hexadecimal digit expected near '%1'",braceExpected:"missing '%1' near '%2'",tooLargeCodepoint:"UTF-8 value too large near '%1'",unfinishedLongString:"unfinished long string (starting at line %1) near '%2'",unfinishedLongComment:"unfinished long comment (starting at line %1) near '%2'"},g=e.ast={labelStatement:function(e){return{type:"LabelStatement",label:e}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(e){return{type:"GotoStatement",label:e}},returnStatement:function(e){return{type:"ReturnStatement",arguments:e}},ifStatement:function(e){return{type:"IfStatement",clauses:e}},ifClause:function(e,t){return{type:"IfClause",condition:e,body:t}},elseifClause:function(e,t){return{type:"ElseifClause",condition:e,body:t}},elseClause:function(e){return{type:"ElseClause",body:e}},whileStatement:function(e,t){return{type:"WhileStatement",condition:e,body:t}},doStatement:function(e){return{type:"DoStatement",body:e}},repeatStatement:function(e,t){return{type:"RepeatStatement",condition:e,body:t}},localStatement:function(e,t){return{type:"LocalStatement",variables:e,init:t}},assignmentStatement:function(e,t){return{type:"AssignmentStatement",variables:e,init:t}},callStatement:function(e){return{type:"CallStatement",expression:e}},functionStatement:function(e,t,n,r){return{type:"FunctionDeclaration",identifier:e,isLocal:n,parameters:t,body:r}},forNumericStatement:function(e,t,n,r,i){return{type:"ForNumericStatement",variable:e,start:t,end:n,step:r,body:i}},forGenericStatement:function(e,t,n){return{type:"ForGenericStatement",variables:e,iterators:t,body:n}},chunk:function(e){return{type:"Chunk",body:e}},identifier:function(e){return{type:"Identifier",name:e}},literal:function(e,t,n){return{type:e=e===o?"StringLiteral":e===u?"NumericLiteral":e===d?"BooleanLiteral":e===h?"NilLiteral":"VarargLiteral",value:t,raw:n}},tableKey:function(e,t){return{type:"TableKey",key:e,value:t}},tableKeyString:function(e,t){return{type:"TableKeyString",key:e,value:t}},tableValue:function(e){return{type:"TableValue",value:e}},tableConstructorExpression:function(e){return{type:"TableConstructorExpression",fields:e}},binaryExpression:function(e,t,n){return{type:"and"===e||"or"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:n}},unaryExpression:function(e,t){return{type:"UnaryExpression",operator:e,argument:t}},memberExpression:function(e,t,n){return{type:"MemberExpression",indexer:t,identifier:n,base:e}},indexExpression:function(e,t){return{type:"IndexExpression",base:e,index:t}},callExpression:function(e,t){return{type:"CallExpression",base:e,arguments:t}},tableCallExpression:function(e,t){return{type:"TableCallExpression",base:e,arguments:t}},stringCallExpression:function(e,t){return{type:"StringCallExpression",base:e,argument:t}},comment:function(e,t){return{type:"Comment",value:e,raw:t}}};function m(e){if(re){var t=ie.pop();t.complete(),t.bless(e)}return n.onCreateNode&&n.onCreateNode(e),e}var v,y,b,w,C,_,x,S,E,T,M,O=Array.prototype.slice,k=(Object,function(e,t){for(var n=0,r=e.length;n=r)return{type:l,value:"",line:x,lineStart:S,range:[v,v]};var e=t.charCodeAt(v),i=t.charCodeAt(v+1);if(_=v,function(e){return e>=65&&e<=90||e>=97&&e<=122||95===e}(e))return function(){for(var e,r;Z(t.charCodeAt(++v)););return function(e){switch(e.length){case 2:return"do"===e||"if"===e||"in"===e||"or"===e;case 3:return"and"===e||"end"===e||"for"===e||"not"===e;case 4:return"else"===e||"then"===e||("5.2"===n.luaVersion||"5.3"===n.luaVersion)&&"goto"===e;case 5:return"break"===e||"local"===e||"until"===e||"while"===e;case 6:return"elseif"===e||"repeat"===e||"return"===e;case 8:return"function"===e}return!1}(e=t.slice(_,v))?r=s:"true"===e||"false"===e?(r=d,e="true"===e):"nil"===e?(r=h,e=null):r=a,{type:r,value:e,line:x,lineStart:S,range:[_,v]}}();switch(e){case 39:case 34:return function(){for(var e,n=t.charCodeAt(v++),i=x,l=S,s=v,a="";v=r||G(e))&&(a+=t.slice(s,v-1),D({},p.unfinishedString,a+String.fromCharCode(e)));return a+=t.slice(s,v-1),{type:o,value:a,line:i,lineStart:l,lastLine:x,lastLineStart:S,range:[_,v]}}();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return F();case 46:return q(i)?F():46===i?46===t.charCodeAt(v+2)?{type:f,value:"...",line:x,lineStart:S,range:[_,v+=3]}:L(".."):L(".");case 61:return L(61===i?"==":"=");case 62:return L("5.3"===n.luaVersion&&62===i?">>":61===i?">=":">");case 60:return L("5.3"===n.luaVersion&&60===i?"<<":61===i?"<=":"<");case 126:if(61===i)return L("~=");if("5.1"===n.luaVersion||"5.2"===n.luaVersion)break;return L("~");case 58:return L("5.2"!==n.luaVersion&&"5.3"!==n.luaVersion||58!==i?":":"::");case 91:return 91===i||61===i?function(){var e=x,t=S,n=H(!1);return!1===n&&D(y,p.expected,"[",y.value),{type:o,value:n,line:e,lineStart:t,lastLine:x,lastLineStart:S,range:[_,v]}}():L("[");case 47:return L("5.3"===n.luaVersion&&47===i?"//":"/");case 38:case 124:if("5.1"===n.luaVersion||"5.2"===n.luaVersion)break;case 42:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return L(t.charAt(v))}return R(t.charAt(v))}function P(){var e=t.charCodeAt(v),n=t.charCodeAt(v+1);return!!G(e)&&(10===e&&13===n&&++v,13===e&&10===n&&++v,++x,S=++v,!0)}function V(){for(;v=0?function(){var e,n,r,i,l=0,o=1,s=1;for(i=v+=2,K(t.charCodeAt(v))||D({},p.malformedNumber,t.slice(_,v));K(t.charCodeAt(v));)++v;if(e=parseInt(t.slice(i,v),16),"."===t.charAt(v)){for(n=++v;K(t.charCodeAt(v));)++v;l=t.slice(n,v),l=n===v?0:parseInt(l,16)/Math.pow(16,v-n)}if("pP".indexOf(t.charAt(v)||null)>=0){for("+-".indexOf(t.charAt(++v)||null)>=0&&(s="+"===t.charAt(v++)?1:-1),r=v,q(t.charCodeAt(v))||D({},p.malformedNumber,t.slice(_,v));q(t.charCodeAt(v));)++v;o=t.slice(r,v),o=Math.pow(2,o*s)}return(e+l)*o}():function(){for(;q(t.charCodeAt(v));)++v;if("."===t.charAt(v))for(++v;q(t.charCodeAt(v));)++v;if("eE".indexOf(t.charAt(v)||null)>=0)for("+-".indexOf(t.charAt(++v)||null)>=0&&++v,q(t.charCodeAt(v))||D({},p.malformedNumber,t.slice(_,v));q(t.charCodeAt(v));)++v;return parseFloat(t.slice(_,v))}();return{type:u,value:r,line:x,lineStart:S,range:[_,v]}}function $(){var e=v;switch(t.charAt(v)){case"a":return++v,"\x07";case"n":return++v,"\n";case"r":return++v,"\r";case"t":return++v,"\t";case"v":return++v,"\v";case"b":return++v,"\b";case"f":return++v,"\f";case"\r":case"\n":return P(),"\n";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;q(t.charCodeAt(v))&&v-e<3;)++v;var r=parseInt(t.slice(e,v),10);return r>255&&D({},p.decimalEscapeTooLarge,"\\"+r),String.fromCharCode(r);case"z":if("5.2"===n.luaVersion||"5.3"===n.luaVersion)return++v,V(),"";case"x":if("5.2"===n.luaVersion||"5.3"===n.luaVersion){if(K(t.charCodeAt(v+1))&&K(t.charCodeAt(v+2)))return v+=3,String.fromCharCode(parseInt(t.slice(e+1,v),16));D({},p.hexadecimalDigitExpected,"\\"+t.slice(e,v+2))}case"u":if("5.3"===n.luaVersion)return function(){var e=v++;for("{"!==t.charAt(v++)&&D({},p.braceExpected,"{","\\"+t.slice(e,v)),K(t.charCodeAt(v))||D({},p.hexadecimalDigitExpected,"\\"+t.slice(e,v));48===t.charCodeAt(v);)++v;for(var n=v;K(t.charCodeAt(v));)++v-n>6&&D({},p.tooLargeCodepoint,"\\"+t.slice(e,v));var r=t.charAt(v++);"}"!==r&&('"'===r||"'"===r?D({},p.braceExpected,"}","\\"+t.slice(e,v--)):D({},p.hexadecimalDigitExpected,"\\"+t.slice(e,v)));var i=parseInt(t.slice(n,v-1),16);return null===(i=function(e){return e<128?String.fromCharCode(e):e<2048?String.fromCharCode(192|e>>6,128|63&e):e<65536?String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e):e<1114112?String.fromCharCode(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e):null}(i))&&D({},p.tooLargeCodepoint,"\\"+t.slice(e,v)),i}();default:"5.2"!==n.luaVersion&&"5.3"!==n.luaVersion||D({},p.invalidEscape,"\\"+t.slice(e,v+1));case"\\":case'"':case"'":return t.charAt(v++)}}function j(){_=v;var e=t.charAt(v+=2),i="",l=!1,o=v,s=S,a=x;if("["===e&&(!1===(i=H(!0))?i=e:l=!0),!l){for(;v")}function W(){b=y,y=w,w=I()}function B(e){return e===y.value&&(W(),!0)}function U(e){e===y.value?W():D(y,p.expected,e,y.value)}function z(e){return 9===e||32===e||11===e||12===e}function G(e){return 10===e||13===e}function q(e){return e>=48&&e<=57}function K(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Z(e){return e>=65&&e<=90||e>=97&&e<=122||95===e||e>=48&&e<=57}function Y(e){if(l===e.type)return!0;if(s!==e.type)return!1;switch(e.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}function Q(){var e=Array.apply(null,E[T++]);E.push(e),n.onCreateScope&&n.onCreateScope()}function X(){E.pop(),T--,n.onDestroyScope&&n.onDestroyScope()}function J(e){n.onLocalDeclaration&&n.onLocalDeclaration(e),-1===k(E[T],e)&&E[T].push(e)}function ee(e){J(e.name),te(e,!0)}function te(e,t){t||-1!==function(e,t,n){for(var r=0,i=e.length;r",y)}();case"if":return W(),function(){var e,t,r,i=[];for(re&&ie.push(r=ie[ie.length-1]),e=me(),U("then"),n.scope&&Q(),t=ue(),n.scope&&X(),i.push(m(g.ifClause(e,t))),re&&(r=le());B("elseif");)ae(r),e=me(),U("then"),n.scope&&Q(),t=ue(),n.scope&&X(),i.push(m(g.elseifClause(e,t))),re&&(r=le());return B("else")&&(re&&(r=new oe(b),ie.push(r)),n.scope&&Q(),t=ue(),n.scope&&X(),i.push(m(g.elseClause(t)))),U("end"),m(g.ifStatement(i))}();case"return":return W(),function(){var e=[];if("end"!==y.value){var t=ge();for(null!=t&&e.push(t);B(",");)t=me(),e.push(t);B(";")}return m(g.returnStatement(e))}();case"function":return W(),fe(function(){var e,t,r;for(re&&(r=le()),e=he(),n.scope&&(te(e,ne(e.name)),Q());B(".");)ae(r),t=he(),e=m(g.memberExpression(e,".",t));return B(":")&&(ae(r),t=he(),e=m(g.memberExpression(e,":",t)),n.scope&&J("self")),e}());case"while":return W(),function(){var e=me();U("do"),n.scope&&Q();var t=ue();return n.scope&&X(),U("end"),m(g.whileStatement(e,t))}();case"for":return W(),function(){var e,t=he();if(n.scope&&(Q(),ee(t)),B("=")){var r=me();U(",");var i=me(),l=B(",")?me():null;return U("do"),e=ue(),U("end"),n.scope&&X(),m(g.forNumericStatement(t,r,i,l,e))}for(var o=[t];B(",");)t=he(),n.scope&&ee(t),o.push(t);U("in");var s=[];do{var a=me();s.push(a)}while(B(","));return U("do"),e=ue(),U("end"),n.scope&&X(),m(g.forGenericStatement(o,s,e))}();case"repeat":return W(),function(){n.scope&&Q();var e=ue();U("until");var t=me();return n.scope&&X(),m(g.repeatStatement(t,e))}();case"break":return W(),m(g.breakStatement());case"do":return W(),function(){n.scope&&Q();var e=ue();return n.scope&&X(),U("end"),m(g.doStatement(e))}();case"goto":return W(),function(){var e=he();return m(g.gotoStatement(e))}()}return c===y.type&&B("::")?function(){var e=y.value,t=he();return n.scope&&(J("::"+e+"::"),te(t,!0)),U("::"),m(g.labelStatement(t))}():(re&&ie.pop(),"5.2"!==n.luaVersion&&"5.3"!==n.luaVersion||!B(";")?function(){var e,t,n=y;if(re&&(t=le()),null==(e=ye()))return R(y);if(",=".indexOf(y.value)>=0){var r,i=[e],l=[];for(de(e);B(",");)null==(r=ye())&&N("",y),de(r),i.push(r);U("=");do{r=me(),l.push(r)}while(B(","));return ae(t),m(g.assignmentStatement(i,l))}return function(e){switch(e.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}(e)?(ae(t),m(g.callStatement(e))):R(n)}():void 0)}function de(e){(e.inParens||-1===["Identifier","MemberExpression","IndexExpression"].indexOf(e.type))&&D(y,p.invalidVar,y.value)}function he(){se();var e=y.value;return a!==y.type&&N("",y),W(),m(g.identifier(e))}function fe(e,t){var r=[];if(U("("),!B(")"))for(;;)if(a===y.type){var i=he();if(n.scope&&ee(i),r.push(i),B(","))continue;if(B(")"))break}else{if(f===y.type){r.push(we()),U(")");break}N(" or '...'",y)}var l=ue();return U("end"),n.scope&&X(),m(g.functionStatement(e,r,t=t||!1,l))}function pe(){for(var e,t,n=[];;){if(se(),c===y.type&&B("["))e=me(),U("]"),U("="),t=me(),n.push(m(g.tableKey(e,t)));else if(a===y.type)"="===w.value?(e=he(),W(),t=me(),n.push(m(g.tableKeyString(e,t)))):(t=me(),n.push(m(g.tableValue(t))));else{if(null==(t=ge())){ie.pop();break}n.push(m(g.tableValue(t)))}if(!(",;".indexOf(y.value)>=0))break;W()}return U("}"),m(g.tableConstructorExpression(n))}function ge(){return function e(t){var n,r,i,l=y.value;if(re&&(r=le()),function(e){return c===e.type?"#-~".indexOf(e.value)>=0:s===e.type&&"not"===e.value}(y)){se(),W();var o=e(10);null==o&&N("",y),n=m(g.unaryExpression(l,o))}if(null==n&&null==(n=we())&&(n=ye()),null==n)return null;for(;l=y.value,!(0===(i=c===y.type||s===y.type?ve(l):0)||i<=t);){"^"!==l&&".."!==l||i--,W();var a=e(i);null==a&&N("",y),re&&ie.push(r),n=m(g.binaryExpression(l,n,a))}return n}(0)}function me(){var e=ge();if(null!=e)return e;N("",y)}function ve(e){var t=e.charCodeAt(0),n=e.length;if(1===n)switch(t){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(2===n)switch(t){case 47:return 10;case 46:return 8;case 60:case 62:return"<<"===e||">>"===e?7:3;case 61:case 126:return 3;case 111:return 1}else if(97===t&&"and"===e)return 2;return 0}function ye(){var e,t,r,i,l;if(re&&(r=le()),a===y.type)t=y.value,e=he(),n.scope&&te(e,ne(t));else{if(!B("("))return null;e=me(),U(")"),e.inParens=!0}for(;;)if(c===y.type)switch(y.value){case"[":ae(r),W(),i=me(),U("]"),e=m(g.indexExpression(e,i));break;case".":ae(r),W(),l=he(),e=m(g.memberExpression(e,".",l));break;case":":ae(r),W(),l=he(),e=m(g.memberExpression(e,":",l)),ae(r),e=be(e);break;case"(":case"{":ae(r),e=be(e);break;default:return e}else{if(o!==y.type)break;ae(r),e=be(e)}return e}function be(e){if(c===y.type)switch(y.value){case"(":W();var t=[],n=ge();for(null!=n&&t.push(n);B(",");)n=me(),t.push(n);return U(")"),m(g.callExpression(e,t));case"{":se(),W();var r=pe();return m(g.tableCallExpression(e,r))}else if(o===y.type)return m(g.stringCallExpression(e,we()));N("function arguments",y)}function we(){var e,r=o|u|d|h|f,i=y.value,l=y.type;if(re&&(e=le()),l&r){ae(e);var a=t.slice(y.range[0],y.range[1]);return W(),m(g.literal(l,i,a))}return s===l&&"function"===i?(ae(e),W(),n.scope&&Q(),fe(null)):B("{")?(ae(e),pe()):void 0}function Ce(n){return t+=String(n),r=t.length,e}function _e(e){"undefined"!=typeof e&&Ce(e),t&&"#!"===t.substr(0,2)&&(t=t.replace(/^.*/,function(e){return e.replace(/./g," ")})),r=t.length,re=n.locations||n.ranges,w=I();var i=function(){W(),se(),n.scope&&Q();var e=ue();return n.scope&&X(),l!==y.type&&R(y),re&&!e.length&&(b=y),m(g.chunk(e))}();if(n.comments&&(i.comments=C),n.scope&&(i.globals=M),ie.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return i}oe.prototype.complete=function(){n.locations&&(this.loc.end.line=b.lastLine||b.line,this.loc.end.column=b.range[1]-(b.lastLineStart||b.lineStart)),n.ranges&&(this.range[1]=b.range[1])},oe.prototype.bless=function(e){if(this.loc){var t=this.loc;e.loc={start:{line:t.start.line,column:t.start.column},end:{line:t.end.line,column:t.end.column}}}this.range&&(e.range=[this.range[0],this.range[1]])},e.parse=function(l,o){if("undefined"==typeof o&&"object"==typeof l&&(o=l,l=void 0),o||(o={}),t=l||"",n=function(){for(var e,t,n=O.call(arguments),r={},i=0,l=n.length;i{this.value=t,this._isScalar=!0,e.closed||(e.next(t),e.complete())},t=>{e.closed||e.error(t)}).then(null,e=>{h.a.setTimeout(()=>{throw e})});else if(this._isScalar){if(!e.closed)return n.schedule(p,0,{value:this.value,subscriber:e})}else t.then(t=>{this.value=t,this._isScalar=!0,e.closed||e.add(n.schedule(p,0,{value:t,subscriber:e}))},t=>{e.closed||e.add(n.schedule(g,0,{err:t,subscriber:e}))}).then(null,e=>{h.a.setTimeout(()=>{throw e})})}}function p(e){const{value:t,subscriber:n}=e;n.closed||(n.next(t),n.complete())}function g(e){const{err:t,subscriber:n}=e;n.closed||n.error(t)}const m=f.create;var v=n("2zkT");class y{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new b(e,this.project,this.thisArg))}}class b extends v.a{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)}}var w=n("kLMJ");n.d(t,"AbstractControlDirective",function(){return C}),n.d(t,"AbstractFormGroupDirective",function(){return ge}),n.d(t,"CheckboxControlValueAccessor",function(){return R}),n.d(t,"ControlContainer",function(){return _}),n.d(t,"NG_VALUE_ACCESSOR",function(){return D}),n.d(t,"COMPOSITION_BUFFER_MODE",function(){return P}),n.d(t,"DefaultValueAccessor",function(){return V}),n.d(t,"NgControl",function(){return W}),n.d(t,"NgControlStatus",function(){return ye}),n.d(t,"NgControlStatusGroup",function(){return be}),n.d(t,"NgForm",function(){return Re}),n.d(t,"NgModel",function(){return je}),n.d(t,"NgModelGroup",function(){return Le}),n.d(t,"RadioControlValueAccessor",function(){return z}),n.d(t,"FormControlDirective",function(){return Be}),n.d(t,"FormControlName",function(){return Xe}),n.d(t,"FormGroupDirective",function(){return ze}),n.d(t,"FormArrayName",function(){return Ze}),n.d(t,"FormGroupName",function(){return qe}),n.d(t,"NgSelectOption",function(){return Q}),n.d(t,"SelectControlValueAccessor",function(){return Y}),n.d(t,"SelectMultipleControlValueAccessor",function(){return ee}),n.d(t,"CheckboxRequiredValidator",function(){return nt}),n.d(t,"EmailValidator",function(){return it}),n.d(t,"MaxLengthValidator",function(){return at}),n.d(t,"MinLengthValidator",function(){return ot}),n.d(t,"PatternValidator",function(){return ct}),n.d(t,"RequiredValidator",function(){return tt}),n.d(t,"FormBuilder",function(){return dt}),n.d(t,"AbstractControl",function(){return Me}),n.d(t,"FormArray",function(){return Ae}),n.d(t,"FormControl",function(){return Oe}),n.d(t,"FormGroup",function(){return ke}),n.d(t,"NG_ASYNC_VALIDATORS",function(){return E}),n.d(t,"NG_VALIDATORS",function(){return S}),n.d(t,"Validators",function(){return M}),n.d(t,"VERSION",function(){return ht}),n.d(t,"FormsModule",function(){return yt}),n.d(t,"ReactiveFormsModule",function(){return bt}),n.d(t,"\u0275ba",function(){return vt}),n.d(t,"\u0275z",function(){return mt}),n.d(t,"\u0275x",function(){return pt}),n.d(t,"\u0275y",function(){return gt}),n.d(t,"\u0275a",function(){return N}),n.d(t,"\u0275b",function(){return I}),n.d(t,"\u0275c",function(){return me}),n.d(t,"\u0275d",function(){return ve}),n.d(t,"\u0275e",function(){return De}),n.d(t,"\u0275f",function(){return Fe}),n.d(t,"\u0275g",function(){return Ve}),n.d(t,"\u0275bf",function(){return ft}),n.d(t,"\u0275bb",function(){return $}),n.d(t,"\u0275bc",function(){return j}),n.d(t,"\u0275h",function(){return B}),n.d(t,"\u0275i",function(){return U}),n.d(t,"\u0275bd",function(){return G}),n.d(t,"\u0275be",function(){return q}),n.d(t,"\u0275j",function(){return We}),n.d(t,"\u0275k",function(){return Qe}),n.d(t,"\u0275l",function(){return Ue}),n.d(t,"\u0275n",function(){return Ke}),n.d(t,"\u0275m",function(){return Ge}),n.d(t,"\u0275o",function(){return K}),n.d(t,"\u0275q",function(){return te}),n.d(t,"\u0275p",function(){return X}),n.d(t,"\u0275s",function(){return et}),n.d(t,"\u0275t",function(){return rt}),n.d(t,"\u0275v",function(){return st}),n.d(t,"\u0275u",function(){return lt}),n.d(t,"\u0275w",function(){return ut}),n.d(t,"\u0275r",function(){return Je});class C{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}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class _ extends C{get formDirective(){return null}get path(){return null}}function x(e){return null==e||0===e.length}const S=new r.InjectionToken("NgValidators"),E=new r.InjectionToken("NgAsyncValidators"),T=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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 M{static min(e){return t=>{if(x(t.value)||x(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n{if(x(t.value)||x(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}static required(e){return x(e.value)?{required:!0}:null}static requiredTrue(e){return!0===e.value?null:{required:!0}}static email(e){return T.test(e.value)?null:{email:!0}}static minLength(e){return t=>{if(x(t.value))return null;const n=t.value?t.value.length:0;return n{const n=t.value?t.value.length:0;return n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}}static pattern(e){if(!e)return M.nullValidator;let t,n;return"string"==typeof e?(n="","^"!==e.charAt(0)&&(n+="^"),n+=e,"$"!==e.charAt(e.length-1)&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(x(e.value))return null;const r=e.value;return t.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}static nullValidator(e){return null}static compose(e){if(!e)return null;const t=e.filter(O);return 0==t.length?null:function(e){return A(function(e,n){return t.map(t=>t(e))}(e))}}static composeAsync(e){if(!e)return null;const t=e.filter(O);return 0==t.length?null:function(e){const n=function(e,n){return t.map(t=>t(e))}(e).map(k);return(function(e,t){return function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new y(e,t))}}(e,t)(this)}).call(d(n),A)}}}function O(e){return null!=e}function k(e){const t=Object(r["\u0275isPromise"])(e)?m(e):e;if(!Object(r["\u0275isObservable"])(t))throw new Error("Expected validator to return Promise or Observable.");return t}function A(e){const t=e.reduce((e,t)=>null!=t?Object.assign({},e,t):e,{});return 0===Object.keys(t).length?null:t}const D=new r.InjectionToken("NgValueAccessor"),N={provide:D,useExisting:Object(r.forwardRef)(()=>R),multi:!0};class R{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=(e=>{}),this.onTouched=(()=>{})}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}const I={provide:D,useExisting:Object(r.forwardRef)(()=>V),multi:!0},P=new r.InjectionToken("CompositionEventMode");class V{constructor(e,t,n){this._renderer=e,this._elementRef=t,this._compositionMode=n,this.onChange=(e=>{}),this.onTouched=(()=>{}),this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const e=Object(w.r)()?Object(w.r)().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",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)}}function L(e){return e.validate?t=>e.validate(t):e}function F(e){return e.validate?t=>e.validate(t):e}const $={provide:D,useExisting:Object(r.forwardRef)(()=>j),multi:!0};class j{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=(e=>{}),this.onTouched=(()=>{})}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=(t=>{e(""==t?null:parseFloat(t))})}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}function H(){throw new Error("unimplemented")}class W extends C{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){return H()}get asyncValidator(){return H()}}const B={provide:D,useExisting:Object(r.forwardRef)(()=>z),multi:!0};class U{constructor(){this._accessors=[]}add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}class z{constructor(e,t,n,r){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=r,this.onChange=(()=>{}),this.onTouched=(()=>{})}ngOnInit(){this._control=this._injector.get(W),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=(()=>{e(this.value),this._registry.select(this)})}fireUncheck(e){this.writeValue(e)}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}_throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}const G={provide:D,useExisting:Object(r.forwardRef)(()=>q),multi:!0};class q{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=(e=>{}),this.onTouched=(()=>{})}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}registerOnChange(e){this.onChange=(t=>{e(""==t?null:parseFloat(t))})}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}const K={provide:D,useExisting:Object(r.forwardRef)(()=>Y),multi:!0};function Z(e,t){return null==e?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}class Y{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=(e=>{}),this.onTouched=(()=>{}),this._compareWith=r["\u0275looseIdentical"]}set compareWith(e){if("function"!=typeof e)throw new Error(`compareWith must be a function, but received ${JSON.stringify(e)}`);this._compareWith=e}writeValue(e){this.value=e;const t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=Z(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(e){this.onChange=(t=>{this.value=this._getOptionValue(t),e(this.value)})}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const t of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(t),e))return t;return null}_getOptionValue(e){const t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}}class Q{constructor(e,t,n){this._element=e,this._renderer=t,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(Z(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))}}const X={provide:D,useExisting:Object(r.forwardRef)(()=>ee),multi:!0};function J(e,t){return null==e?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}class ee{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=(e=>{}),this.onTouched=(()=>{}),this._compareWith=r["\u0275looseIdentical"]}set compareWith(e){if("function"!=typeof e)throw new Error(`compareWith must be a function, but received ${JSON.stringify(e)}`);this._compareWith=e}writeValue(e){let t;if(this.value=e,Array.isArray(e)){const n=e.map(e=>this._getOptionId(e));t=((e,t)=>{e._setSelected(n.indexOf(t.toString())>-1)})}else t=((e,t)=>{e._setSelected(!1)});this._optionMap.forEach(t)}registerOnChange(e){this.onChange=(t=>{const n=[];if(t.hasOwnProperty("selectedOptions")){const e=t.selectedOptions;for(let t=0;t{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&ie(e,t)})}(e,t),function(e,t){e.registerOnChange((e,n)=>{t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&ie(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(e=>{t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())}),t._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())})}function ie(e,t){t.viewToModelUpdate(e._pendingValue),e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),e._pendingChange=!1}function le(e,t){null==e&&se(t,"Cannot find control with"),e.validator=M.compose([e.validator,t.validator]),e.asyncValidator=M.composeAsync([e.asyncValidator,t.asyncValidator])}function oe(e){return se(e,"There is no FormControl instance attached to form control element with")}function se(e,t){let n;throw n=e.path.length>1?`path: '${e.path.join(" -> ")}'`:e.path[0]?`name: '${e.path}'`:"unspecified name attribute",new Error(`${t} ${n}`)}function ae(e){return null!=e?M.compose(e.map(L)):null}function ue(e){return null!=e?M.composeAsync(e.map(F)):null}function ce(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object(r["\u0275looseIdentical"])(t,n.currentValue)}const de=[R,q,j,Y,ee,z];function he(e,t){e._syncPendingControls(),t.forEach(e=>{const t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function fe(e,t){if(!t)return null;Array.isArray(t)||se(e,"Value accessor was not provided as an array for form control with");let n=void 0,r=void 0,i=void 0;return t.forEach(t=>{t.constructor===V?n=t:function(e){return de.some(t=>e.constructor===t)}(t)?(r&&se(e,"More than one built-in value accessor matches form control with"),r=t):(i&&se(e,"More than one custom value accessor matches form control with"),i=t)}),i||r||n||(se(e,"No valid value accessor for form control with"),null)}function pe(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ge extends _{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return ne(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return ae(this._validators)}get asyncValidator(){return ue(this._asyncValidators)}_checkParentType(){}}class me{constructor(e){this._cd=e}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}const ve={"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid","[class.ng-pending]":"ngClassPending"};class ye extends me{constructor(e){super(e)}}class be extends me{constructor(e){super(e)}}const we="VALID",Ce="INVALID",_e="PENDING",xe="DISABLED";function Se(e){const t=Te(e)?e.validators:e;return Array.isArray(t)?ae(t):t||null}function Ee(e,t){const n=Te(t)?t.asyncValidators:e;return Array.isArray(n)?ue(n):n||null}function Te(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class Me{constructor(e,t){this.validator=e,this.asyncValidator=t,this._onCollectionChange=(()=>{}),this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}get parent(){return this._parent}get valid(){return this.status===we}get invalid(){return this.status===Ce}get pending(){return this.status==_e}get disabled(){return this.status===xe}get enabled(){return this.status!==xe}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this.validator=Se(e)}setAsyncValidators(e){this.asyncValidator=Ee(e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=_e,this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){this.status=xe,this.errors=null,this._forEachChild(t=>{t.disable(Object.assign({},e,{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(e),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){this.status=we,this._forEachChild(t=>{t.enable(Object.assign({},e,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(e),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==we&&this.status!==_e||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?xe:we}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=_e;const t=k(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(t=>this.setErrors(t,{emitEvent:e}))}}_cancelExistingSubscription(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function(e,t,n){return null==t?null:(t instanceof Array||(t=t.split(".")),t instanceof Array&&0===t.length?null:t.reduce((e,t)=>e instanceof ke?e.controls[t]||null:e instanceof Ae&&e.at(t)||null,e))}(this,e)}getError(e,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new r.EventEmitter,this.statusChanges=new r.EventEmitter}_calculateStatus(){return this._allControlsDisabled()?xe:this.errors?Ce:this._anyControlsHaveStatus(_e)?_e:this._anyControlsHaveStatus(Ce)?Ce:we}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Te(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}}class Oe extends Me{constructor(e=null,t,n){super(Se(t),Ee(n,t)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(t),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=null,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=(()=>{})}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_forEachChild(e){}_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(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class ke extends Me{constructor(e,t,n){super(Se(t),Ee(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){Object.keys(e).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e={},t={}){this._forEachChild((n,r)=>{n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t instanceof Oe?t.value:t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(e,t)=>!!t._syncPendingControls()||e);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(t=>e(this.controls[t],t))}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){let t=!1;return this._forEachChild((n,r)=>{t=t||this.contains(r)&&e(n)}),t}_reduceValue(){return this._reduceChildren({},(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(e,t){let n=e;return this._forEachChild((e,r)=>{n=t(n,e,r)}),n}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Ae extends Me{constructor(e,t,n){super(Se(t),Ee(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(e){return this.controls[e]}push(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}insert(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}removeAt(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){this._checkAllValuesPresent(e),e.forEach((e,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e.forEach((e,n)=>{this.at(n)&&this.at(n).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e=[],t={}){this._forEachChild((n,r)=>{n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)}getRawValue(){return this.controls.map(e=>e instanceof Oe?e.value:e.getRawValue())}_syncPendingControls(){let e=this.controls.reduce((e,t)=>!!t._syncPendingControls()||e,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error(`Cannot find form control at index ${e}`)}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const De={provide:_,useExisting:Object(r.forwardRef)(()=>Re)},Ne=Promise.resolve(null);class Re extends _{constructor(e,t){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new r.EventEmitter,this.form=new ke({},ae(e),ue(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Ne.then(()=>{const t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),re(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Ne.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name),pe(this._directives,e)})}addFormGroup(e){Ne.then(()=>{const t=this._findContainer(e.path),n=new ke({});le(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Ne.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){Ne.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,he(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}const Ie={formControlName:'\n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n
\n
\n \n
\n
',ngModelWithFormGroup:'\n
\n \n \n
\n '};class Pe{static modelParentException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive "formControlName" instead. Example:\n\n ${Ie.formControlName}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n ${Ie.ngModelWithFormGroup}`)}static formGroupNameException(){throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${Ie.formGroupName}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${Ie.ngModelGroup}`)}static missingNameException(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')}static modelGroupParentException(){throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${Ie.formGroupName}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${Ie.ngModelGroup}`)}}const Ve={provide:_,useExisting:Object(r.forwardRef)(()=>Le)};class Le extends ge{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}_checkParentType(){this._parent instanceof Le||this._parent instanceof Re||Pe.modelGroupParentException()}}const Fe={provide:W,useExisting:Object(r.forwardRef)(()=>je)},$e=Promise.resolve(null);class je extends W{constructor(e,t,n,i){super(),this.control=new Oe,this._registered=!1,this.update=new r.EventEmitter,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=fe(this,i)}ngOnChanges(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),ce(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?ne(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return ae(this._rawValidators)}get asyncValidator(){return ue(this._rawAsyncValidators)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){re(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){!(this._parent instanceof Le)&&this._parent instanceof ge?Pe.formGroupNameException():this._parent instanceof Le||this._parent instanceof Re||Pe.modelParentException()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Pe.missingNameException()}_updateValue(e){$e.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1})})}_updateDisabled(e){const t=e.isDisabled.currentValue,n=""===t||t&&"false"!==t;$e.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}class He{static controlParentException(){throw new Error(`formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Ie.formControlName}`)}static ngModelGroupException(){throw new Error(`formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${Ie.formGroupName}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${Ie.ngModelGroup}`)}static missingFormException(){throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${Ie.formControlName}`)}static groupParentException(){throw new Error(`formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Ie.formGroupName}`)}static arrayParentException(){throw new Error(`formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Ie.formArrayName}`)}static disabledAttrWarning(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}}const We={provide:W,useExisting:Object(r.forwardRef)(()=>Be)};class Be extends W{constructor(e,t,n){super(),this.update=new r.EventEmitter,this._rawValidators=e||[],this._rawAsyncValidators=t||[],this.valueAccessor=fe(this,n)}set isDisabled(e){He.disabledAttrWarning()}ngOnChanges(e){this._isControlChanged(e)&&(re(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),ce(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return ae(this._rawValidators)}get asyncValidator(){return ue(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}const Ue={provide:_,useExisting:Object(r.forwardRef)(()=>ze)};class ze extends _{constructor(e,t){super(),this._validators=e,this._asyncValidators=t,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new r.EventEmitter}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const t=this.form.get(e.path);return re(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){pe(this.directives,e)}addFormGroup(e){const t=this.form.get(e.path);le(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormGroup(e){}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){const t=this.form.get(e.path);le(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormArray(e){}getFormArray(e){return this.form.get(e.path)}updateModel(e,t){this.form.get(e.path).setValue(t)}onSubmit(e){return this.submitted=!0,he(this.form,this.directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const t=this.form.get(e.path);e.control!==t&&(function(e,t){t.valueAccessor.registerOnChange(()=>oe(t)),t.valueAccessor.registerOnTouched(()=>oe(t)),t._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}(e.control,e),t&&re(t,e),e.control=t)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const e=ae(this._validators);this.form.validator=M.compose([this.form.validator,e]);const t=ue(this._asyncValidators);this.form.asyncValidator=M.composeAsync([this.form.asyncValidator,t])}_checkFormPresent(){this.form||He.missingFormException()}}const Ge={provide:_,useExisting:Object(r.forwardRef)(()=>qe)};class qe extends ge{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}_checkParentType(){Ye(this._parent)&&He.groupParentException()}}const Ke={provide:_,useExisting:Object(r.forwardRef)(()=>Ze)};class Ze extends _{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ne(this.name,this._parent)}get validator(){return ae(this._validators)}get asyncValidator(){return ue(this._asyncValidators)}_checkParentType(){Ye(this._parent)&&He.arrayParentException()}}function Ye(e){return!(e instanceof qe||e instanceof ze||e instanceof Ze)}const Qe={provide:W,useExisting:Object(r.forwardRef)(()=>Xe)};class Xe extends W{constructor(e,t,n,i){super(),this._added=!1,this.update=new r.EventEmitter,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=fe(this,i)}set isDisabled(e){He.disabledAttrWarning()}ngOnChanges(e){this._added||this._setUpControl(),ce(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 ne(this.name,this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return ae(this._rawValidators)}get asyncValidator(){return ue(this._rawAsyncValidators)}_checkParentType(){!(this._parent instanceof qe)&&this._parent instanceof ge?He.ngModelGroupException():this._parent instanceof qe||this._parent instanceof ze||this._parent instanceof Ze||He.controlParentException()}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}const Je={provide:S,useExisting:Object(r.forwardRef)(()=>tt),multi:!0},et={provide:S,useExisting:Object(r.forwardRef)(()=>nt),multi:!0};class tt{get required(){return this._required}set required(e){this._required=null!=e&&!1!==e&&"false"!==`${e}`,this._onChange&&this._onChange()}validate(e){return this.required?M.required(e):null}registerOnValidatorChange(e){this._onChange=e}}class nt extends tt{validate(e){return this.required?M.requiredTrue(e):null}}const rt={provide:S,useExisting:Object(r.forwardRef)(()=>it),multi:!0};class it{set email(e){this._enabled=""===e||!0===e||"true"===e,this._onChange&&this._onChange()}validate(e){return this._enabled?M.email(e):null}registerOnValidatorChange(e){this._onChange=e}}const lt={provide:S,useExisting:Object(r.forwardRef)(()=>ot),multi:!0};class ot{ngOnChanges(e){"minlength"in e&&(this._createValidator(),this._onChange&&this._onChange())}validate(e){return null==this.minlength?null:this._validator(e)}registerOnValidatorChange(e){this._onChange=e}_createValidator(){this._validator=M.minLength(parseInt(this.minlength,10))}}const st={provide:S,useExisting:Object(r.forwardRef)(()=>at),multi:!0};class at{ngOnChanges(e){"maxlength"in e&&(this._createValidator(),this._onChange&&this._onChange())}validate(e){return null!=this.maxlength?this._validator(e):null}registerOnValidatorChange(e){this._onChange=e}_createValidator(){this._validator=M.maxLength(parseInt(this.maxlength,10))}}const ut={provide:S,useExisting:Object(r.forwardRef)(()=>ct),multi:!0};class ct{ngOnChanges(e){"pattern"in e&&(this._createValidator(),this._onChange&&this._onChange())}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}_createValidator(){this._validator=M.pattern(this.pattern)}}class dt{group(e,t=null){const n=this._reduceControls(e);return new ke(n,null!=t?t.validator:null,null!=t?t.asyncValidator:null)}control(e,t,n){return new Oe(e,t,n)}array(e,t,n){const r=e.map(e=>this._createControl(e));return new Ae(r,t,n)}_reduceControls(e){const t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){return e instanceof Oe||e instanceof ke||e instanceof Ae?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}const ht=new r.Version("5.2.11");class ft{}const pt=[ft,Q,te,V,j,q,R,Y,ee,z,ye,be,tt,ot,at,ct,nt,it],gt=[je,Le,Re],mt=[Be,ze,Xe,qe,Ze];class vt{}class yt{}class bt{}},gAzQ:function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),i=n(2),l=n(3),o=n(5),s=n(6),a=n(7),u=n(8),c=n(9),d=n(10),h=n(11),f=n(13),p=n(14),g=n(16),m=n(17);t.Diff=r.default,t.diffChars=i.diffChars,t.diffWords=l.diffWords,t.diffWordsWithSpace=l.diffWordsWithSpace,t.diffLines=o.diffLines,t.diffTrimmedLines=o.diffTrimmedLines,t.diffSentences=s.diffSentences,t.diffCss=a.diffCss,t.diffJson=u.diffJson,t.diffArrays=c.diffArrays,t.structuredPatch=p.structuredPatch,t.createTwoFilesPatch=p.createTwoFilesPatch,t.createPatch=p.createPatch,t.applyPatch=d.applyPatch,t.applyPatches=d.applyPatches,t.parsePatch=h.parsePatch,t.merge=f.merge,t.convertChangesToDMP=g.convertChangesToDMP,t.convertChangesToXML=m.convertChangesToXML,t.canonicalize=u.canonicalize},function(e,t){"use strict";function n(){}function r(e,t,n,r,i){for(var l=0,o=t.length,s=0,a=0;le.length?n:e}),u.value=e.join(d)}else u.value=e.join(n.slice(s,s+u.count));s+=u.count,u.added||(a+=u.count)}}var h=t[o-1];return o>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[o-2].value+=h.value,t.pop()),t}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var o=this;function s(e){return l?(setTimeout(function(){l(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,c=1,d=a+u,h=[{newPos:-1,components:[]}],f=this.extractCommon(h[0],t,e,0);if(h[0].newPos+1>=a&&f+1>=u)return s([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*c;n<=c;n+=2){var l=void 0,d=h[n-1],f=h[n+1],p=(f?f.newPos:0)-n;d&&(h[n-1]=void 0);var g=d&&d.newPos+1=a&&p+1>=u)return s(r(o,l.components,t,e,o.useLongestToken));h[n]=l}else h[n]=void 0}c++}if(l)!function e(){setTimeout(function(){if(c>d)return l();p()||e()},0)}();else for(;c<=d;){var g=p();if(g)return g}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var i=t.length,l=n.length,o=e.newPos,s=o-r,a=0;o+12&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,r.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var l=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=t.hunks,a=n.compareLine||function(e,t,n,r){return t===r},u=0,c=n.fuzzFactor||0,d=0,h=0,f=void 0,p=void 0;function g(e,t){for(var n=0;nc)return!1;t++}}return!0}for(var m=0;m1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],l=0;function o(){var e={};for(i.push(e);l0?c(s.lines.slice(-a.context)):[],h-=p.length,f-=p.length)}(o=p).push.apply(o,i(r.map(function(e){return(t.added?"+":"-")+e}))),t.added?m+=r.length:g+=r.length}else{if(h)if(r.length<=2*a.context&&e=u.length-2&&r.length<=a.context){var C=/\n$/.test(n),_=/\n$/.test(l);0!=r.length||C?C&&_||p.push("\\ No newline at end of file"):p.splice(w.oldLines,0,"\\ No newline at end of file")}d.push(w),h=0,f=0,p=[]}g+=r.length,m+=r.length}},y=0;ye.length)return!1;for(var n=0;n/g,">")).replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],r=0;r"):i.removed&&t.push(""),t.push(n(i.value)),i.added?t.push(""):i.removed&&t.push("")}return t.join("")}}])},hfO1:function(e,t,n){"use strict";t.a={e:{}}},iSzp:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n("Fl7v"),i=n("WIdU"),l=n("mXvJ"),o=n("3+4Y"),s=n("Xuzc"),a=n("gAzQ");var u=n("3+4Y");t.defaultOptions=u.defaultOptions,t.WriteMode=u.WriteMode,t.formatText=function(e,t){const n=s.parse(e,{comments:!0,locations:!0,ranges:!0,luaVersion:"5.3"});n.range[0]=0,n.range[1]=e.length;const a=Object.assign({},o.defaultOptions,t),u=Object.assign({},a,{sourceText:e});r.injectShebang(n,u),r.attachComments(n,u);const c=i.buildDocFromAst(n,u);return l.printDocToString(c,u)},t.producePatch=function(e,t,n){return a.createPatch(e,t,n,"original","formatted")}},iaYM:function(e,t,n){"use strict";function r(e){return{type:"concat",parts:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=r,t.join=function(e,t){const n=[];return t.forEach((t,r)=>{r>0&&n.push(e),n.push(t)}),r(n)},t.line={type:"line",hard:!1,soft:!1},t.hardline={type:"line",hard:!0,soft:!1},t.softline={type:"line",hard:!1,soft:!0},t.indent=function(e){return{type:"indent",content:e}},t.lineSuffix=function(e){return{type:"lineSuffix",content:e}},t.group=function(e,t=!1){return{type:"group",content:e,willBreak:t}},t.breakParent={type:"breakParent"},t.isEmpty=function(e){return"string"==typeof e&&0===e.length}},kLMJ:function(e,t,n){"use strict";n.d(t,"a",function(){return Qe}),n.d(t,"i",function(){return Ze}),n.d(t,"g",function(){return w}),n.d(t,"h",function(){return S}),n.d(t,"c",function(){return D}),n.d(t,"d",function(){return N}),n.d(t,"e",function(){return ce}),n.d(t,"f",function(){return de}),n.d(t,"b",function(){return je}),n.d(t,"r",function(){return o}),n.d(t,"k",function(){return W}),n.d(t,"j",function(){return ae}),n.d(t,"m",function(){return he}),n.d(t,"n",function(){return ge}),n.d(t,"l",function(){return P}),n.d(t,"o",function(){return I}),n.d(t,"p",function(){return Ye}),n.d(t,"s",function(){return A}),n.d(t,"q",function(){return He});var r=n("Hp+N"),i=n("48oy");let l=null;function o(){return l}class s{constructor(){this.resourceLoaderType=null}get attrToPropMap(){return this._attrToPropMap}set attrToPropMap(e){this._attrToPropMap=e}}class a extends s{constructor(){super(),this._animationPrefix=null,this._transitionEnd=null;try{const e=this.createElement("div",document);if(null!=this.getStyle(e,"animationName"))this._animationPrefix="";else{const t=["Webkit","Moz","O","ms"];for(let n=0;n{null!=this.getStyle(e,n)&&(this._transitionEnd=t[n])})}catch(e){this._animationPrefix=null,this._transitionEnd=null}}getDistributedNodes(e){return e.getDistributedNodes()}resolveAndSetHref(e,t,n){e.href=null==n?t:t+"/../"+n}supportsDOMEvents(){return!0}supportsNativeShadowDOM(){return"function"==typeof document.body.createShadowRoot}getAnimationPrefix(){return this._animationPrefix?this._animationPrefix:""}getTransitionEnd(){return this._transitionEnd?this._transitionEnd:""}supportsAnimation(){return null!=this._animationPrefix&&null!=this._transitionEnd}}const u={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},c=3,d={"\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"},h={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};let f;i["\u0275global"].Node&&(f=i["\u0275global"].Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))});class p extends a{parse(e){throw new Error("parse not implemented")}static makeCurrent(){!function(e){l||(l=e)}(new p)}hasProperty(e,t){return t in e}setProperty(e,t,n){e[t]=n}getProperty(e,t){return e[t]}invoke(e,t,n){e[t](...n)}logError(e){window.console&&(console.error?console.error(e):console.log(e))}log(e){window.console&&window.console.log&&window.console.log(e)}logGroup(e){window.console&&window.console.group&&window.console.group(e)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}get attrToPropMap(){return u}contains(e,t){return f.call(e,t)}querySelector(e,t){return e.querySelector(t)}querySelectorAll(e,t){return e.querySelectorAll(t)}on(e,t,n){e.addEventListener(t,n,!1)}onAndCancel(e,t,n){return e.addEventListener(t,n,!1),()=>{e.removeEventListener(t,n,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}createMouseEvent(e){const t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t}createEvent(e){const t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t}preventDefault(e){e.preventDefault(),e.returnValue=!1}isPrevented(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue}getInnerHTML(e){return e.innerHTML}getTemplateContent(e){return"content"in e&&this.isTemplateElement(e)?e.content:null}getOuterHTML(e){return e.outerHTML}nodeName(e){return e.nodeName}nodeValue(e){return e.nodeValue}type(e){return e.type}content(e){return this.hasProperty(e,"content")?e.content:e}firstChild(e){return e.firstChild}nextSibling(e){return e.nextSibling}parentElement(e){return e.parentNode}childNodes(e){return e.childNodes}childNodesAsList(e){const t=e.childNodes,n=new Array(t.length);for(let r=0;re.insertBefore(n,t))}insertAfter(e,t,n){e.insertBefore(n,t.nextSibling)}setInnerHTML(e,t){e.innerHTML=t}getText(e){return e.textContent}setText(e,t){e.textContent=t}getValue(e){return e.value}setValue(e,t){e.value=t}getChecked(e){return e.checked}setChecked(e,t){e.checked=t}createComment(e){return this.getDefaultDocument().createComment(e)}createTemplate(e){const t=this.getDefaultDocument().createElement("template");return t.innerHTML=e,t}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createElementNS(e,t,n){return(n=n||this.getDefaultDocument()).createElementNS(e,t)}createTextNode(e,t){return(t=t||this.getDefaultDocument()).createTextNode(e)}createScriptTag(e,t,n){const r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(e,t),r}createStyleElement(e,t){const n=(t=t||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(e,t)),n}createShadowRoot(e){return e.createShadowRoot()}getShadowRoot(e){return e.shadowRoot}getHost(e){return e.host}clone(e){return e.cloneNode(!0)}getElementsByClassName(e,t){return e.getElementsByClassName(t)}getElementsByTagName(e,t){return e.getElementsByTagName(t)}classList(e){return Array.prototype.slice.call(e.classList,0)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}hasClass(e,t){return e.classList.contains(t)}setStyle(e,t,n){e.style[t]=n}removeStyle(e,t){e.style[t]=""}getStyle(e,t){return e.style[t]}hasStyle(e,t,n){const r=this.getStyle(e,t)||"";return n?r==n:r.length>0}tagName(e){return e.tagName}attributeMap(e){const t=new Map,n=e.attributes;for(let r=0;r[{type:void 0,decorators:[{type:i.Inject,args:[v]}]}]);class w{constructor(e){this._doc=e,this._dom=o()}addTag(e,t=!1){return e?this._getOrCreateElement(e,t):null}addTags(e,t=!1){return e?e.reduce((e,n)=>(n&&e.push(this._getOrCreateElement(n,t)),e),[]):[]}getTag(e){return e&&this._dom.querySelector(this._doc,`meta[${e}]`)||null}getTags(e){if(!e)return[];const t=this._dom.querySelectorAll(this._doc,`meta[${e}]`);return t?[].slice.call(t):[]}updateTag(e,t){if(!e)return null;t=t||this._parseSelector(e);const n=this.getTag(t);return n?this._setMetaElementAttributes(e,n):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,t=!1){if(!t){const t=this._parseSelector(e),n=this.getTag(t);if(n&&this._containsAttributes(e,n))return n}const n=this._dom.createElement("meta");this._setMetaElementAttributes(e,n);const r=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(r,n),n}_setMetaElementAttributes(e,t){return Object.keys(e).forEach(n=>this._dom.setAttribute(t,n,e[n])),t}_parseSelector(e){const t=e.name?"name":"property";return`${t}="${e[t]}"`}_containsAttributes(e,t){return Object.keys(e).every(n=>this._dom.getAttribute(t,n)===e[n])}}const C=new i.InjectionToken("TRANSITION_ID"),_=[{provide:i.APP_INITIALIZER,useFactory:function(e,t,n){return()=>{n.get(i.ApplicationInitStatus).donePromise.then(()=>{const n=o();Array.prototype.slice.apply(n.querySelectorAll(t,"style[ng-transition]")).filter(t=>n.getAttribute(t,"ng-transition")===e).forEach(e=>n.remove(e))})}},deps:[C,v,i.Injector],multi:!0}];class x{static init(){Object(i.setTestabilityGetter)(new x)}addToWindow(e){i["\u0275global"].getAngularTestability=((t,n=!0)=>{const r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r}),i["\u0275global"].getAllAngularTestabilities=(()=>e.getAllTestabilities()),i["\u0275global"].getAllAngularRootElements=(()=>e.getAllRootElements()),i["\u0275global"].frameworkStabilizers||(i["\u0275global"].frameworkStabilizers=[]),i["\u0275global"].frameworkStabilizers.push(e=>{const t=i["\u0275global"].getAllAngularTestabilities();let n=t.length,r=!1;const l=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(l)})})}findTestabilityInTree(e,t,n){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:n?o().isShadowRoot(t)?this.findTestabilityInTree(e,o().getHost(t),!0):this.findTestabilityInTree(e,o().parentElement(t),!0):null}}class S{constructor(e){this._doc=e}getTitle(){return o().getTitle(this._doc)}setTitle(e){o().setTitle(this._doc,e)}}function E(e,t){"undefined"!=typeof COMPILED&&COMPILED||((i["\u0275global"].ng=i["\u0275global"].ng||{})[e]=t)}const T={ApplicationRef:i.ApplicationRef,NgZone:i.NgZone},M="probe",O="coreTokens";function k(e){return Object(i.getDebugNode)(e)}function A(e){return E(M,k),E(O,Object.assign({},T,(e||[]).reduce((e,t)=>(e[t.name]=t.token,e),{}))),()=>k}new i.Optional;const D=new i.InjectionToken("EventManagerPlugins");class N{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(e=>e.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}addGlobalEventListener(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}getZone(){return this._zone}_findPluginFor(e){const t=this._eventNameToPlugin.get(e);if(t)return t;const n=this._plugins;for(let r=0;r{this._stylesSet.has(e)||(this._stylesSet.add(e),t.add(e))}),this.onStylesAdded(t)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}class P extends I{constructor(e){super(),this._doc=e,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(e.head)}_addStylesToHost(e,t){e.forEach(e=>{const n=this._doc.createElement("style");n.textContent=e,this._styleNodes.add(t.appendChild(n))})}addHost(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}removeHost(e){this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach(t=>this._addStylesToHost(e,t))}ngOnDestroy(){this._styleNodes.forEach(e=>o().remove(e))}}const V={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/"},L=/%COMP%/g,F="_nghost-%COMP%",$="_ngcontent-%COMP%";function j(e,t,n){for(let r=0;r{!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}class W{constructor(e,t){this.eventManager=e,this.sharedStylesHost=t,this.rendererByCompId=new Map,this.defaultRenderer=new B(e)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case i.ViewEncapsulation.Emulated:{let n=this.rendererByCompId.get(t.id);return n||(n=new G(this.eventManager,this.sharedStylesHost,t),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n}case i.ViewEncapsulation.Native:return new q(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){const e=j(t.id,t.styles,[]);this.sharedStylesHost.addStyles(e),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}class B{constructor(e){this.eventManager=e,this.data=Object.create(null)}destroy(){}createElement(e,t){return t?document.createElementNS(V[t],e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,n){e&&e.insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e){let t="string"==typeof e?document.querySelector(e):e;if(!t)throw new Error(`The selector "${e}" did not match any elements`);return t.textContent="",t}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=`${r}:${t}`;const i=V[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){const r=V[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&i.RendererStyleFlags2.DashCase?e.style.setProperty(t,n,r&i.RendererStyleFlags2.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&i.RendererStyleFlags2.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){z(t,"property"),e[t]=n}setValue(e,t){e.nodeValue=t}listen(e,t,n){return z(t,"listener"),"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,H(n)):this.eventManager.addEventListener(e,t,H(n))}}const U="@".charCodeAt(0);function z(e,t){if(e.charCodeAt(0)===U)throw new Error(`Found the synthetic ${t} ${e}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`)}class G extends B{constructor(e,t,n){super(e),this.component=n;const r=j(n.id,n.styles,[]);t.addStyles(r),this.contentAttr=$.replace(L,n.id),this.hostAttr=F.replace(L,n.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}}class q extends B{constructor(e,t,n,r){super(e),this.sharedStylesHost=t,this.hostEl=n,this.component=r,this.shadowRoot=n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const i=j(r.id,r.styles,[]);for(let l=0;l{le[e]=e}));const oe=function(e){return!!le&&le.hasOwnProperty(e)},se=function(e){const t=Q[e.type];if(!t)return;const n=this[t];if(!n)return;const r=[e];if(1===n.length){const e=n[0];return e.zone!==Zone.current?e.zone.run(e.handler,this,r):e.handler.apply(this,r)}{const t=n.slice();for(let n=0;n0;i||(i=e[n]=[]);const o=oe(t)?Zone.root:Zone.current;if(0===i.length)i.push({zone:o,handler:r});else{let e=!1;for(let t=0;tthis.removeEventListener(e,t,r)}removeEventListener(e,t,n){let r=e[Y];if(!r)return e[te].apply(e,[t,n,!1]);let i=Q[t],l=i&&e[i];if(!l)return e[te].apply(e,[t,n,!1]);let o=!1;for(let s=0;s{const i=this._config.buildHammer(e),l=function(e){r.runGuarded(function(){n(e)})};return i.on(t,l),()=>i.off(t,l)})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}const fe=["alt","control","meta","shift"],pe={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};class ge extends R{constructor(e){super(e)}supports(e){return null!=ge.parseEventName(e)}addEventListener(e,t,n){const r=ge.parseEventName(t),i=ge.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>o().onAndCancel(e,r.domEventName,i))}static parseEventName(e){const t=e.toLowerCase().split("."),n=t.shift();if(0===t.length||"keydown"!==n&&"keyup"!==n)return null;const r=ge._normalizeKey(t.pop());let i="";if(fe.forEach(e=>{const n=t.indexOf(e);n>-1&&(t.splice(n,1),i+=e+".")}),i+=r,0!=t.length||0===r.length)return null;const l={};return l.domEventName=n,l.fullKey=i,l}static getEventFullKey(e){let t="",n=o().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),fe.forEach(r=>{r!=n&&(0,pe[r])(e)&&(t+=r+".")}),t+=n}static eventCallback(e,t,n){return r=>{ge.getEventFullKey(r)===e&&n.runGuarded(()=>t(r))}}static _normalizeKey(e){switch(e){case"esc":return"escape";default:return e}}}class me{constructor(e,t){this.defaultDoc=e,this.DOM=t;const n=this.DOM.createHtmlDocument();if(this.inertBodyElement=n.body,null==this.inertBodyElement){const e=this.DOM.createElement("html",n);this.inertBodyElement=this.DOM.createElement("body",n),this.DOM.appendChild(e,this.inertBodyElement),this.DOM.appendChild(n,e)}this.DOM.setInnerHTML(this.inertBodyElement,''),!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.DOM.setInnerHTML(this.inertBodyElement,'

'),this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}getInertBodyElement_XHR(e){e=""+e+"";try{e=encodeURI(e)}catch(e){return null}const t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(null);const n=t.response.body;return n.removeChild(n.firstChild),n}getInertBodyElement_DOMParser(e){e=""+e+"";try{const t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(e){return null}}getInertBodyElement_InertDocument(e){const t=this.DOM.createElement("template");return"content"in t?(this.DOM.setInnerHTML(t,e),t):(this.DOM.setInnerHTML(this.inertBodyElement,e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)}stripCustomNsAttrs(e){this.DOM.attributeMap(e).forEach((t,n)=>{"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||this.DOM.removeAttribute(e,n)});for(const t of this.DOM.childNodesAsList(e))this.DOM.isElementNode(t)&&this.stripCustomNsAttrs(t)}}const ve=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,ye=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function be(e){return(e=String(e)).match(ve)||e.match(ye)?e:(Object(i.isDevMode)()&&o().log(`WARNING: sanitizing unsafe URL value ${e} (see http://g.co/ng/security#xss)`),"unsafe:"+e)}function we(e){const t={};for(const n of e.split(","))t[n]=!0;return t}function Ce(...e){const t={};for(const n of e)for(const e in n)n.hasOwnProperty(e)&&(t[e]=!0);return t}const _e=we("area,br,col,hr,img,wbr"),xe=we("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Se=we("rp,rt"),Ee=Ce(Se,xe),Te=Ce(xe,we("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")),Me=Ce(Se,we("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")),Oe=Ce(_e,Te,Me,Ee),ke=we("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ae=we("srcset"),De=we("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,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ne=Ce(ke,Ae,De);class Re{constructor(){this.sanitizedSomething=!1,this.buf=[],this.DOM=o()}sanitizeChildren(e){let t=this.DOM.firstChild(e);for(;t;)if(this.DOM.isElementNode(t)?this.startElement(t):this.DOM.isTextNode(t)?this.chars(this.DOM.nodeValue(t)):this.sanitizedSomething=!0,this.DOM.firstChild(t))t=this.DOM.firstChild(t);else for(;t;){this.DOM.isElementNode(t)&&this.endElement(t);let e=this.checkClobberedElement(t,this.DOM.nextSibling(t));if(e){t=e;break}t=this.checkClobberedElement(t,this.DOM.parentElement(t))}return this.buf.join("")}startElement(e){const t=this.DOM.nodeName(e).toLowerCase();Oe.hasOwnProperty(t)?(this.buf.push("<"),this.buf.push(t),this.DOM.attributeMap(e).forEach((e,t)=>{const n=t.toLowerCase();Ne.hasOwnProperty(n)?(ke[n]&&(e=be(e)),Ae[n]&&(e=String(e).split(",").map(e=>be(e.trim())).join(", ")),this.buf.push(" "),this.buf.push(t),this.buf.push('="'),this.buf.push(Ve(e)),this.buf.push('"')):this.sanitizedSomething=!0}),this.buf.push(">")):this.sanitizedSomething=!0}endElement(e){const t=this.DOM.nodeName(e).toLowerCase();Oe.hasOwnProperty(t)&&!_e.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(Ve(e))}checkClobberedElement(e,t){if(t&&this.DOM.contains(e,t))throw new Error(`Failed to sanitize html because the element is clobbered: ${this.DOM.getOuterHTML(e)}`);return t}}const Ie=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pe=/([^\#-~ |!])/g;function Ve(e){return e.replace(/&/g,"&").replace(Ie,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Pe,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let Le;const Fe=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),$e=/^url\(([^)]+)\)$/;class je{}class He extends je{constructor(e){super(),this._doc=e}sanitize(e,t){if(null==t)return null;switch(e){case i.SecurityContext.NONE:return t;case i.SecurityContext.HTML:return t instanceof Be?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),function(e,t){const n=o();let r=null;try{Le=Le||new me(e,n);let l=t?String(t):"";r=Le.getInertBodyElement(l);let o=5,s=l;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,l=s,s=n.getInnerHTML(r),r=Le.getInertBodyElement(l)}while(l!==s);const a=new Re,u=a.sanitizeChildren(n.getTemplateContent(r)||r);return Object(i.isDevMode)()&&a.sanitizedSomething&&n.log("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),u}finally{if(r){const e=n.getTemplateContent(r)||r;for(const t of n.childNodesAsList(e))n.removeChild(e,t)}}}(this._doc,String(t)));case i.SecurityContext.STYLE:return t instanceof Ue?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),function(e){if(!(e=String(e).trim()))return"";const t=e.match($e);return t&&be(t[1])===t[1]||e.match(Fe)&&function(e){let t=!0,n=!0;for(let r=0;r0){const t=[...n.lineSuffixes];n.lineSuffixes.length=0;for(const r of t)e(r.content,n)}n.renderedText.length>0&&(n.renderedText=n.renderedText.replace(/[^\S\n]*$/,""));const i=n.options.useTabs?"\t".repeat(n.indentation):" ".repeat(n.indentation*n.options.indentCount);n.renderedText+="\n"+i,n.currentLineLength=i.length;break;case"indent":n.indentation++,e(t.content,n),n.indentation--;break;case"lineSuffix":n.lineSuffixes.push(t);break;case"group":const l=function e(t,n){function i(e){return n.currentLineLength+e.length<=n.options.lineWidth&&(n.currentLineLength+=e.length,!0)}if("string"==typeof t)return i(t);switch(t.type){case"concat":return t.parts.every(t=>e(t,n));case"indent":return n.indentation++,e(t.content,n)?(n.indentation--,!0):(n.indentation--,!1);case"group":return t.willBreak&&(n.mode=r.Break),e(t.content,n);case"line":return n.mode!==r.Flat||t.hard?(n.currentLineLength=n.indentation,!0):!!t.soft||i(" ");case"lineSuffix":return!0}return!1}(t,Object.assign({},n,{mode:r.Flat})),o=n.mode;n.mode=!t.willBreak&&l?r.Flat:r.Break,e(t.content,n),n.mode=o}}(e,n),n.renderedText}},nErl:function(e,t){(function(t){e.exports=t}).call(t,{})},rSMe:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n("svqJ");t.FastPath=class{constructor(e){this.stack=[e]}getValue(){return this.stack[this.stack.length-1]}getNodeAtDepth(e){for(let t=this.stack.length-1;t>=0;t-=2){const n=this.stack[t];if(r.isNode(n)&&--e<0)return n}return null}getParent(e=0){return this.getNodeAtDepth(e+1)}call(e,t){const n=this.getValue(),r=this.stack.length;this.stack.push(t,n[t]);const i=e(this);return this.stack.length=r,i}forEach(e,t=null){let n=this.getValue();const r=this.stack.length;t&&this.stack.push(n=n[t]);for(let i=0;i{this.stack.push(n,t),r.push(e(this,n)),this.stack.length-=2}),this.stack.length=i,r}needsParens(){const e=this.getParent(),t=this.getValue();let n=!1;switch(t.type){case"FunctionDeclaration":case"Chunk":case"Identifier":case"BooleanLiteral":case"NilLiteral":case"NumericLiteral":case"StringLiteral":case"VarargLiteral":case"TableConstructorExpression":case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"MemberExpression":case"IndexExpression":case"CallExpression":case"TableCallExpression":case"StringCallExpression":n=t.inParens||!1}return e&&"UnaryExpression"===t.type&&"UnaryExpression"===e.type&&(n=!0),n}}},"s+UU":function(e,t,n){"use strict";var r=n("6MRC"),i=n("FvzS"),l=n("WFWZ"),o=n("UEsV"),s=n("hfO1");class a extends Error{constructor(e){super(),this.errors=e;const t=Error.call(this,e?`${e.length} errors occurred during unsubscription:\n ${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"");this.name=t.name="UnsubscriptionError",this.stack=t.stack,this.message=t.message}}class u{constructor(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}unsubscribe(){let e,t=!1;if(this.closed)return;let{_parent:n,_parents:u,_unsubscribe:d,_subscriptions:h}=this;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;let f=-1,p=u?u.length:0;for(;n;)n.remove(this),n=++fe.concat(t instanceof a?t.errors:t),[])}t.a=u,u.EMPTY=function(e){return e.closed=!0,e}(new u)},svqJ:function(e,t,n){"use strict";function r(e,t,n,r={}){let i=0;return n.forEach(n=>{(r.searchBackwards?e.substring(t-n.length,t):e.substring(t,t+n.length))!==n||(i=n.length)}),t+(r.searchBackwards?-i:i)}function i(e,t,n,i={}){let l=null;for(;l!==t;)l=t,t=r(e,t,n,i);return t}function l(e,t,n={}){return r(e,t,["\n","\r\n"],n)}function o(e,t,n={}){return i(e,t,[" ","\t"],n)}function s(e,t,n={}){return i(e,o(e,t),[";"],n)}function a(e,t,n={}){const r=o(e,t,n);return r!==l(e,r,n)}function u(e,t){if("-"===e.charAt(t)&&"-"===e.charAt(t+1))for(t+=2;t>=0&&t{let r;r=this.subscribe(t=>{if(r)try{e(t)}catch(e){n(e),r.unsubscribe()}else e(t)},n,t)})}_subscribe(e){return this.source.subscribe(e)}[s.a](){return this}pipe(...e){return 0===e.length?this:function(e){return e?1===e.length?e[0]:function(t){return e.reduce((e,t)=>t(e),t)}:a}(e)(this)}toPromise(e){if(e||(r.a.Rx&&r.a.Rx.config&&r.a.Rx.config.Promise?e=r.a.Rx.config.Promise:r.a.Promise&&(e=r.a.Promise)),!e)throw new Error("no Promise impl found");return new e((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}}t.a=u,u.create=(e=>new u(e))},x35b:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("48oy");class i{}n("SN96");class l{constructor(){this.build="0.8.2"}}var o=n("Hp+N"),s=function(){this.dismissible=!0,this.type="warning"},a=function(){function e(e){this.close=new r.EventEmitter,this.dismissible=e.dismissible,this.type=e.type}return e.prototype.closeHandler=function(){this.close.emit(null)},e}(),u=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function c(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,4,"button",[["aria-label","Close"],["class","close"],["type","button"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.closeHandler()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"span",[["aria-hidden","true"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\xd7"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function d(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,6,"div",[["role","alert"]],[[8,"className",0]],null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,c)),r["\u0275did"](4,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),r["\u0275ncd"](null,0),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,4,0,t.component.dismissible)},function(e,t){var n=t.component;e(t,1,0,"alert alert-"+n.type+(n.dismissible?" alert-dismissible":""))})}var h=r["\u0275ccf"]("ngb-alert",a,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"ngb-alert",[],null,null,null,d,u)),r["\u0275did"](1,49152,null,0,a,[s],null,null)],null,null)},{dismissible:"dismissible",type:"type"},{close:"close"},["*"]),f=new(function(){function e(){}return e.prototype.getAllStyles=function(e){return window.getComputedStyle(e)},e.prototype.getStyle=function(e,t){return this.getAllStyles(e)[t]},e.prototype.isStaticPositioned=function(e){return"static"===(this.getStyle(e,"position")||"static")},e.prototype.offsetParent=function(e){for(var t=e.offsetParent||document.documentElement;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement},e.prototype.position=function(e,t){var n;void 0===t&&(t=!0);var r={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position"))n=e.getBoundingClientRect();else{var i=this.offsetParent(e);n=this.offset(e,!1),i!==document.documentElement&&(r=this.offset(i,!1)),r.top+=i.clientTop,r.left+=i.clientLeft}return n.top-=r.top,n.bottom-=r.top,n.left-=r.left,n.right-=r.left,t&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n},e.prototype.offset=function(e,t){void 0===t&&(t=!0);var n=e.getBoundingClientRect(),r=window.pageYOffset-document.documentElement.clientTop,i=window.pageXOffset-document.documentElement.clientLeft,l={height:n.height||e.offsetHeight,width:n.width||e.offsetWidth,top:n.top+r,bottom:n.bottom+r,left:n.left+i,right:n.right+i};return t&&(l.height=Math.round(l.height),l.width=Math.round(l.width),l.top=Math.round(l.top),l.bottom=Math.round(l.bottom),l.left=Math.round(l.left),l.right=Math.round(l.right)),l},e.prototype.positionElements=function(e,t,n,r){var i=r?this.offset(e,!1):this.position(e,!1),l=this.getAllStyles(t),o=t.getBoundingClientRect(),s=n.split("-")[0]||"top",a=n.split("-")[1]||"center",u={height:o.height||t.offsetHeight,width:o.width||t.offsetWidth,top:0,bottom:o.height||t.offsetHeight,left:0,right:o.width||t.offsetWidth};switch(s){case"top":u.top=i.top-(t.offsetHeight+parseFloat(l.marginBottom));break;case"bottom":u.top=i.top+i.height;break;case"left":u.left=i.left-(t.offsetWidth+parseFloat(l.marginRight));break;case"right":u.left=i.left+i.width}switch(a){case"top":u.top=i.top;break;case"bottom":u.top=i.top+i.height-t.offsetHeight;break;case"left":u.left=i.left;break;case"right":u.left=i.left+i.width-t.offsetWidth;break;case"center":"top"===s||"bottom"===s?u.left=i.left+i.width/2-t.offsetWidth/2:u.top=i.top+i.height/2-t.offsetHeight/2}return u.top=Math.round(u.top),u.bottom=Math.round(u.bottom),u.left=Math.round(u.left),u.right=Math.round(u.right),u},e.prototype.getAvailablePlacements=function(e,t){var n=[],r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),l=document.documentElement;return i.width0&&n.splice(n.length,1,"left"),this.setSecondaryPlacementForLeftRight(r,i,"left",n)),i.heighti.width&&(r.top+r.height/2-t.offsetHeight/2>0&&n.splice(n.length,1,"right"),this.setSecondaryPlacementForLeftRight(r,i,"right",n)),(window.innerHeight||l.clientHeight)-r.bottom>i.height&&(n.splice(n.length,1,"bottom"),this.setSecondaryPlacementForTopBottom(r,i,"bottom",n)),n},e.prototype.setSecondaryPlacementForLeftRight=function(e,t,n,r){var i=document.documentElement;t.height<=e.bottom&&r.splice(r.length,1,n+"-bottom"),(window.innerHeight||i.clientHeight)-e.top>=t.height&&r.splice(r.length,1,n+"-top")},e.prototype.setSecondaryPlacementForTopBottom=function(e,t,n,r){var i=document.documentElement;(window.innerWidth||i.clientWidth)-e.left>=t.width&&r.splice(r.length,1,n+"-left"),t.width<=e.right&&r.splice(r.length,1,n+"-right")},e}());function p(e,t,n,r){var i=Array.isArray(n)?n:[n],l=i.findIndex(function(e){return"auto"===e});l>=0&&["top","right","bottom","left"].forEach(function(e){null==i.find(function(t){return-1!==t.search("^"+e+"|^"+e+"-")})&&i.splice(l++,1,e)});for(var o,s=0,a=0,u=f.getAvailablePlacements(e,t),c=function(n,l){if(null!=u.find(function(e){return e===n})||i.length===l+1){o=n;var c=f.positionElements(e,t,n,r);return s=c.top,a=c.left,"break"}},d=0,h=i.map(function(e,t){return{item:e,index:t}});d0?n.split(new RegExp("("+r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")+")")).map(function(e){var n=t.substr(i,e.length);return i+=e.length,n}):[t]},e}(),k=r["\u0275crt"]({encapsulation:0,styles:[".ngb-highlight[_ngcontent-%COMP%] {\n font-weight: bold;\n }"],data:{}});function A(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"span",[],[[8,"className",0]],null,null,null,null)),(e()(),r["\u0275ted"](1,null,["",""]))],null,function(e,t){e(t,0,0,r["\u0275inlineInterpolate"](1,"",t.component.highlightClass,"")),e(t,1,0,t.parent.context.$implicit)})}function D(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](0,null,["",""]))],null,function(e,t){e(t,0,0,t.parent.context.$implicit)})}function N(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](16777216,null,null,1,null,A)),r["\u0275did"](1,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275and"](16777216,null,null,1,null,D)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275and"](0,null,null,0))],function(e,t){e(t,1,0,t.context.odd),e(t,3,0,!t.context.odd)},null)}function R(e){return r["\u0275vid"](2,[(e()(),r["\u0275and"](16777216,null,null,1,null,N)),r["\u0275did"](1,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null)],function(e,t){e(t,1,0,t.component.parts)},null)}var I=function(){function e(){this.activeIdx=0,this.focusFirst=!0,this.formatter=x,this.selectEvent=new r.EventEmitter,this.activeChangeEvent=new r.EventEmitter}return e.prototype.hasActive=function(){return this.activeIdx>-1&&this.activeIdx=0?this.id+"-"+this.activeIdx:void 0)},e}(),P=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function V(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"ngb-highlight",[],null,null,null,R,k)),r["\u0275did"](2,573440,null,0,O,[],{result:[0,"result"],term:[1,"term"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,t.context.formatter(t.context.result),t.context.term)},null)}function L(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](0,null,null,0))],null,null)}function F(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,5,"button",[["class","dropdown-item"],["role","option"],["type","button"]],[[8,"id",0],[2,"active",null]],[[null,"mouseenter"],[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"mouseenter"===t&&(r=!1!==i.markActive(e.context.index)&&r),"click"===t&&(r=!1!==i.select(e.context.$implicit)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,2,null,L)),r["\u0275did"](4,540672,null,0,o.NgTemplateOutlet,[r.ViewContainerRef],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),r["\u0275pod"](5,{result:0,term:1,formatter:2}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,4,0,e(t,5,0,t.context.$implicit,n.term,n.formatter),n.resultTemplate||r["\u0275nov"](t.parent,1))},function(e,t){var n=t.component;e(t,1,0,n.id+"-"+t.context.index,t.context.index===n.activeIdx)})}function $(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,[["rt",2]],null,0,null,V)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,F)),r["\u0275did"](4,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,4,0,t.component.results)},null)}var j=r["\u0275ccf"]("ngb-typeahead-window",I,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"ngb-typeahead-window",[["class","dropdown-menu show"],["role","listbox"]],[[8,"id",0]],null,null,$,P)),r["\u0275did"](1,114688,null,0,I,[],null,null)],function(e,t){e(t,1,0)},function(e,t){e(t,0,0,r["\u0275nov"](t,1).id)})},{id:"id",focusFirst:"focusFirst",results:"results",term:"term",formatter:"formatter",resultTemplate:"resultTemplate"},{selectEvent:"select",activeChangeEvent:"activeChange"},[]),H=function(){function e(){}return e.prototype.isMuted=function(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)},e}(),W=r["\u0275crt"]({encapsulation:0,styles:["[_nghost-%COMP%] {\n text-align: center;\n width: 2rem;\n height: 2rem;\n line-height: 2rem;\n border-radius: 0.25rem;\n background: transparent;\n }\n .outside[_nghost-%COMP%] {\n opacity: 0.5;\n }"],data:{}});function B(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](0,null,["",""]))],null,function(e,t){e(t,0,0,t.component.date.day)})}var U,z=n("ejaz"),G=function(){function e(e,t,n){this.year=e,this.month=t,this.day=n}return e.from=function(t){return t?new e(t.year,t.month,t.day?t.day:1):null},e.prototype.equals=function(e){return e&&this.year===e.year&&this.month===e.month&&this.day===e.day},e.prototype.before=function(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.daye.day:this.month>e.month:this.year>e.year)},e.prototype.toStruct=function(){return{year:this.year,month:this.month,day:this.day}},e.prototype.toString=function(){return this.year+"-"+this.month+"-"+this.day},e}(),q=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=["Mo","Tu","We","Th","Fr","Sa","Su"],Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Y=["January","February","March","April","May","June","July","August","September","October","November","December"],Q=function(){},X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q(t,e),t.prototype.getWeekdayShortName=function(e){return K[e-1]},t.prototype.getMonthShortName=function(e){return Z[e-1]},t.prototype.getMonthFullName=function(e){return Y[e-1]},t}(Q),J=function(){function e(e){this.i18n=e,this.select=new r.EventEmitter}return e.prototype.changeMonth=function(e){this.select.emit(new G(this.date.year,_(e),1))},e.prototype.changeYear=function(e){this.select.emit(new G(_(e),this.date.month,1))},e}(),ee=r["\u0275crt"]({encapsulation:0,styles:["[_nghost-%COMP%] > select[_ngcontent-%COMP%] {\n \n padding: 0.25rem 0.5rem;\n font-size: 0.875rem;\n line-height: 1.25;\n \n height: inherit;\n width: 50%;\n display: inline-block;\n }"],data:{}});function te(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.component.i18n.getMonthShortName(t.context.$implicit))})}function ne(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit)})}function re(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,4,"select",[["class","custom-select"],["tabindex","-1"]],[[8,"disabled",0],[8,"value",0]],[[null,"change"]],function(e,t,n){var r=!0;return"change"===t&&(r=!1!==e.component.changeMonth(n.target.value)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,te)),r["\u0275did"](4,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,4,"select",[["class","custom-select"],["tabindex","-1"]],[[8,"disabled",0],[8,"value",0]],[[null,"change"]],function(e,t,n){var r=!0;return"change"===t&&(r=!1!==e.component.changeYear(n.target.value)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ne)),r["\u0275did"](9,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,4,0,n.months),e(t,9,0,n.years)},function(e,t){var n=t.component;e(t,1,0,n.disabled,null==n.date?null:n.date.month),e(t,6,0,n.disabled,null==n.date?null:n.date.year)})}!function(e){e[e.PREV=0]="PREV",e[e.NEXT=1]="NEXT"}(U||(U={}));var ie=function(){return function(e){this.i18n=e,this.navigation=U,this.months=[],this.navigate=new r.EventEmitter,this.select=new r.EventEmitter}}(),le=r["\u0275crt"]({encapsulation:0,styles:["[_nghost-%COMP%] {\n height: 2rem;\n line-height: 1.85rem;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n }\n .ngb-dp-navigation-chevron[_ngcontent-%COMP%]::before {\n border-style: solid;\n border-width: 0.2em 0.2em 0 0;\n content: '';\n display: inline-block;\n width: 0.75em;\n height: 0.75em;\n transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n -ms-transform: rotate(-135deg);\n }\n .right[_ngcontent-%COMP%] .ngb-dp-navigation-chevron[_ngcontent-%COMP%]:before {\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n .ngb-dp-arrow[_ngcontent-%COMP%] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex-basis: auto;\n flex-grow: 1;\n padding-right: 0px;\n padding-left: 0px;\n margin: 0px;\n width: 2rem;\n height: 2rem;\n }\n .ngb-dp-arrow.right[_ngcontent-%COMP%] {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n }\n .ngb-dp-arrow-btn[_ngcontent-%COMP%] {\n padding: 0rem 1rem;\n }\n .ngb-dp-month-name[_ngcontent-%COMP%] {\n font-size: larger;\n height: 2rem;\n line-height: 2rem;\n text-align: center;\n }\n .ngb-dp-navigation-select[_ngcontent-%COMP%] {\n -webkit-box-flex: 1 1 9rem;\n -ms-flex: 1 1 9rem;\n flex-grow: 1;\n flex-basis: 9rem;\n }"],data:{}});function oe(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"ngb-datepicker-navigation-select",[["class","d-block ngb-dp-navigation-select"]],null,[[null,"select"]],function(e,t,n){var r=!0;return"select"===t&&(r=!1!==e.component.select.emit(n)&&r),r},re,ee)),r["\u0275did"](1,49152,null,0,J,[Q],{date:[0,"date"],disabled:[1,"disabled"],months:[2,"months"],years:[3,"years"]},{select:"select"}),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,1,0,n.date,n.disabled,n.selectBoxes.months,n.selectBoxes.years)},null)}function se(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,0,"div",[["class","ngb-dp-arrow"]],null,null,null,null,null))],null,null)}function ae(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,0,"div",[["class","ngb-dp-arrow"]],null,null,null,null,null))],null,null)}function ue(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,se)),r["\u0275did"](2,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,1,"div",[["class","ngb-dp-month-name d-block"]],null,null,null,null,null)),(e()(),r["\u0275ted"](5,null,["\n "," ","\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ae)),r["\u0275did"](8,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,2,0,t.context.index>0),e(t,8,0,t.context.index!==n.months.length-1)},function(e,t){e(t,5,0,t.component.i18n.getMonthFullName(t.context.$implicit.number),t.context.$implicit.year)})}function ce(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](16777216,null,null,1,null,ue)),r["\u0275did"](1,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275and"](0,null,null,0))],function(e,t){e(t,1,0,t.component.months)},null)}function de(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,6,"div",[["class","ngb-dp-arrow"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](3,0,null,null,3,"button",[["class","btn btn-link ngb-dp-arrow-btn"],["tabindex","-1"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"click"===t&&(r=0!=!!i.navigate.emit(i.navigation.PREV)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,0,"span",[["class","ngb-dp-navigation-chevron"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,oe)),r["\u0275did"](10,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ce)),r["\u0275did"](13,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](15,0,null,null,6,"div",[["class","ngb-dp-arrow right"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](17,0,null,null,3,"button",[["class","btn btn-link ngb-dp-arrow-btn"],["tabindex","-1"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"click"===t&&(r=0!=!!i.navigate.emit(i.navigation.NEXT)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](19,0,null,null,0,"span",[["class","ngb-dp-navigation-chevron"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,10,0,n.showSelect),e(t,13,0,!n.showSelect)},function(e,t){var n=t.component;e(t,3,0,n.prevDisabled),e(t,17,0,n.nextDisabled)})}var he=function(){function e(e){this.i18n=e,this.select=new r.EventEmitter}return e.prototype.doSelect=function(e){e.context.disabled||this.isHidden(e)||this.select.emit(G.from(e.date))},e.prototype.isCollapsed=function(e){return"collapsed"===this.outsideDays&&e.days[0].date.month!==this.month.number&&e.days[e.days.length-1].date.month!==this.month.number},e.prototype.isHidden=function(e){return("hidden"===this.outsideDays||"collapsed"===this.outsideDays)&&this.month.number!==e.date.month},e}(),fe=r["\u0275crt"]({encapsulation:0,styles:[".ngb-dp-weekday[_ngcontent-%COMP%], .ngb-dp-week-number[_ngcontent-%COMP%] {\n line-height: 2rem;\n }\n .ngb-dp-weekday[_ngcontent-%COMP%] {\n color: #5bc0de;\n }\n .ngb-dp-week[_ngcontent-%COMP%] {\n border-radius: 0.25rem;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n }\n .ngb-dp-weekdays[_ngcontent-%COMP%] {\n border-bottom: 1px solid rgba(0, 0, 0, 0.125);\n border-radius: 0rem;\n }\n .ngb-dp-day[_ngcontent-%COMP%], .ngb-dp-weekday[_ngcontent-%COMP%], .ngb-dp-week-number[_ngcontent-%COMP%] {\n width: 2rem;\n height: 2rem;\n }\n .ngb-dp-day[_ngcontent-%COMP%] {\n cursor: pointer;\n }\n .ngb-dp-day.disabled[_ngcontent-%COMP%], .ngb-dp-day.hidden[_ngcontent-%COMP%] {\n cursor: default;\n }"],data:{}});function pe(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,0,"div",[["class","ngb-dp-weekday ngb-dp-showweek"]],null,null,null,null,null))],null,null)}function ge(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"div",[["class","ngb-dp-weekday small text-center font-italic"]],null,null,null,null,null)),(e()(),r["\u0275ted"](1,null,["\n ","\n "]))],null,function(e,t){e(t,1,0,t.component.i18n.getWeekdayShortName(t.context.$implicit))})}function me(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[["class","ngb-dp-week ngb-dp-weekdays bg-light"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,pe)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ge)),r["\u0275did"](6,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,3,0,n.showWeekNumbers),e(t,6,0,n.month.weekdays)},null)}function ve(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"div",[["class","ngb-dp-week-number small text-center font-italic text-muted"]],null,null,null,null,null)),(e()(),r["\u0275ted"](1,null,["",""]))],null,function(e,t){e(t,1,0,t.parent.parent.context.$implicit.number)})}function ye(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](0,null,null,0))],null,null)}function be(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ye)),r["\u0275did"](2,540672,null,0,o.NgTemplateOutlet,[r.ViewContainerRef],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,t.parent.context.$implicit.context,t.component.dayTemplate)},null)}function we(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,4,"div",[["class","ngb-dp-day"]],[[2,"disabled",null],[2,"hidden",null]],[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.doSelect(e.context.$implicit)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,be)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,3,0,!t.component.isHidden(t.context.$implicit))},function(e,t){e(t,0,0,t.context.$implicit.context.disabled,t.component.isHidden(t.context.$implicit))})}function Ce(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[["class","ngb-dp-week"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ve)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,we)),r["\u0275did"](6,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,3,0,t.component.showWeekNumbers),e(t,6,0,t.parent.context.$implicit.days)},null)}function _e(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ce)),r["\u0275did"](2,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,!t.component.isCollapsed(t.context.$implicit))},null)}function xe(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,me)),r["\u0275did"](2,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,_e)),r["\u0275did"](5,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,2,0,n.showWeekdays),e(t,5,0,n.month.weeks)},null)}var Se=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Ee(e){return new G(e.getFullYear(),e.getMonth()+1,e.getDate())}function Te(e){var t=new Date(e.year,e.month-1,e.day,12);return isNaN(t.getTime())||t.setFullYear(e.year),t}var Me=function(){},Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Se(t,e),t.prototype.getDaysPerWeek=function(){return 7},t.prototype.getMonths=function(){return[1,2,3,4,5,6,7,8,9,10,11,12]},t.prototype.getWeeksPerMonth=function(){return 6},t.prototype.getNext=function(e,t,n){void 0===t&&(t="d"),void 0===n&&(n=1);var r=Te(e);switch(t){case"y":return new G(e.year+n,1,1);case"m":r=new Date(e.year,e.month+n-1,1,12);break;case"d":r.setDate(r.getDate()+n);break;default:return e}return Ee(r)},t.prototype.getPrev=function(e,t,n){return void 0===t&&(t="d"),void 0===n&&(n=1),this.getNext(e,t,-n)},t.prototype.getWeekday=function(e){var t=Te(e).getDay();return 0===t?7:t},t.prototype.getWeekNumber=function(e,t){7===t&&(t=0);var n=Te(e[(11-t)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));var r=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((r-n.getTime())/864e5)/7)+1},t.prototype.getToday=function(){return Ee(new Date)},t.prototype.isValid=function(e){if(!(e&&E(e.year)&&E(e.month)&&E(e.day)))return!1;var t=Te(e);return!isNaN(t.getTime())&&t.getFullYear()===e.year&&t.getMonth()+1===e.month&&t.getDate()===e.day},t}(Me),ke=n("W/Sc");function Ae(e,t){return!function(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}(e,t)}function De(e,t,n){return e&&t&&e.before(t)?G.from(t):e&&n&&e.after(n)?G.from(n):e}function Ne(e,t){var n=t.minDate,r=t.maxDate,i=t.disabled,l=t.markDisabled;return!(!T(e)||i||l&&l(e,{year:e.year,month:e.month})||n&&e.before(n)||r&&e.after(r))}var Re=n("2zkT");class Ie{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new Pe(e,this.predicate,this.thisArg))}}class Pe extends Re.a{constructor(e,t,n){super(e),this.predicate=t,this.thisArg=n,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)}}function Ve(e,t){return function(e,t){return function(n){return n.lift(new Ie(e,t))}}(e,t)(this)}var Le,Fe=function(){function e(e){this._calendar=e,this._model$=new ke.a,this._select$=new ke.a,this._state={disabled:!1,displayMonths:1,firstDayOfWeek:1,focusVisible:!1,months:[],navigation:"select",prevDisabled:!1,nextDisabled:!1,selectBoxes:{years:[],months:[]},selectedDate:null}}return Object.defineProperty(e.prototype,"model$",{get:function(){return Ve.call(this._model$.asObservable(),function(e){return e.months.length>0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"select$",{get:function(){return Ve.call(this._select$.asObservable(),function(e){return null!==e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{set:function(e){this._state.disabled!==e&&this._nextState({disabled:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"displayMonths",{set:function(e){E(e=_(e))&&e>0&&this._state.displayMonths!==e&&this._nextState({displayMonths:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstDayOfWeek",{set:function(e){E(e=_(e))&&e>=0&&this._state.firstDayOfWeek!==e&&this._nextState({firstDayOfWeek:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusVisible",{set:function(e){this._state.focusVisible===e||this._state.disabled||this._nextState({focusVisible:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{set:function(e){var t=this.toValidDate(e,null);Ae(this._state.maxDate,t)&&this._nextState({maxDate:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markDisabled",{set:function(e){this._state.markDisabled!==e&&this._nextState({markDisabled:e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDate",{set:function(e){var t=this.toValidDate(e,null);Ae(this._state.minDate,t)&&this._nextState({minDate:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"navigation",{set:function(e){this._state.navigation!==e&&this._nextState({navigation:e})},enumerable:!0,configurable:!0}),e.prototype.focus=function(e){!this._state.disabled&&this._calendar.isValid(e)&&Ae(this._state.focusDate,e)&&this._nextState({focusDate:e})},e.prototype.focusMove=function(e,t){this.focus(this._calendar.getNext(this._state.focusDate,e,t))},e.prototype.focusSelect=function(){Ne(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})},e.prototype.open=function(e){var t=this.toValidDate(e,this._calendar.getToday());this._state.disabled||this._nextState({firstDate:t})},e.prototype.select=function(e,t){void 0===t&&(t={});var n=this.toValidDate(e,null);this._state.disabled||(Ae(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),t.emitEvent&&Ne(n,this._state)&&this._select$.next(n))},e.prototype.toValidDate=function(e,t){var n=G.from(e);return void 0===t&&(t=this._calendar.getToday()),this._calendar.isValid(n)?n:t},e.prototype._nextState=function(e){var t=this._updateState(e);this._patchContexts(t),this._state=t,this._model$.next(this._state)},e.prototype._patchContexts=function(e){e.months.forEach(function(t){t.weeks.forEach(function(t){t.days.forEach(function(t){e.focusDate&&(t.context.focused=e.focusDate.equals(t.date)&&e.focusVisible),!0===e.disabled&&(t.context.disabled=!0),void 0!==e.selectedDate&&(t.context.selected=null!==e.selectedDate&&e.selectedDate.equals(t.date))})})})},e.prototype._updateState=function(e){var t=Object.assign({},this._state,e),n=t.firstDate;if(("minDate"in e||"maxDate"in e)&&(function(e,t){if(t&&e&&t.before(e))throw new Error("'maxDate' "+t+" should be greater than 'minDate' "+e)}(t.minDate,t.maxDate),t.focusDate=De(t.focusDate,t.minDate,t.maxDate),t.firstDate=De(t.firstDate,t.minDate,t.maxDate),n=t.focusDate),"disabled"in e&&(t.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(n=t.selectedDate),"focusDate"in e&&(t.focusDate=De(t.focusDate,t.minDate,t.maxDate),n=t.focusDate,0!==t.months.length&&!t.focusDate.before(t.firstDate)&&!t.focusDate.after(t.lastDate)))return t;if("firstDate"in e&&(t.firstDate=De(t.firstDate,t.minDate,t.maxDate),n=t.firstDate),n){var r=function(e,t,n,r){for(var i=n.displayMonths,l=n.months,o=[],s=function(i){var s=e.getNext(t,"m",i),a=l.findIndex(function(e){return e.firstDate.equals(s)});o.push(r||-1===a?function(e,t,n){var r=n.minDate,i=n.maxDate,l=n.firstDayOfWeek,o=n.markDisabled,s={firstDate:null,lastDate:null,number:t.month,year:t.year,weeks:[],weekdays:[]};t=function(e,t,n){var r=e.getDaysPerWeek(),i=new G(t.year,t.month,1),l=e.getWeekday(i)%r;return e.getPrev(i,"d",(r+l-n)%r)}(e,t,l);for(var a=0;a0?r[0].firstDate:void 0,t.lastDate=r.length>0?r[r.length-1].lastDate:void 0,"selectedDate"in e&&!Ne(t.selectedDate,t)&&(t.selectedDate=null),"firstDate"in e&&(void 0===t.focusDate||t.focusDate.before(t.firstDate)||t.focusDate.after(t.lastDate))&&(t.focusDate=n);var i=!this._state.firstDate||this._state.firstDate.year!==t.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==t.firstDate.month;"select"===t.navigation?(("minDate"in e||"maxDate"in e||0===t.selectBoxes.years.length||i)&&(t.selectBoxes.years=function(e,t,n){if(!e)return[];var r=t&&t.year||e.year-10;return Array.from({length:(n&&n.year||e.year+10)-r+1},function(e,t){return r+t})}(t.focusDate,t.minDate,t.maxDate)),("minDate"in e||"maxDate"in e||0===t.selectBoxes.months.length||i)&&(t.selectBoxes.months=function(e,t,n,r){if(!t)return[];var i=e.getMonths();if(n&&t.year===n.year){var l=i.findIndex(function(e){return e===n.month});i=i.slice(l)}return r&&t.year===r.year&&(l=i.findIndex(function(e){return e===r.month}),i=i.slice(0,l+1)),i}(this._calendar,t.focusDate,t.minDate,t.maxDate))):t.selectBoxes={years:[],months:[]},"arrows"!==t.navigation&&"select"!==t.navigation||!(l||i||"minDate"in e||"maxDate"in e||"disabled"in e)||(t.prevDisabled=t.disabled||function(e,n,r){var i=e.getPrev(t.firstDate,"m");return r&&(i.year===r.year&&i.month ngb-datepicker-month-view > .ngb-dp-week {\n padding-left: 1rem;\n }\n .ngb-dp-month + .ngb-dp-month > .ngb-dp-month-name {\n padding-left: 1rem;\n }\n .ngb-dp-month:last-child .ngb-dp-week {\n padding-right: .25rem;\n }\n .ngb-dp-month:first-child .ngb-dp-week {\n padding-left: .25rem;\n }\n .ngb-dp-month > ngb-datepicker-month-view > .ngb-dp-week:last-child {\n padding-bottom: .25rem;\n }\n .ngb-dp-months[_ngcontent-%COMP%] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n }"],data:{}});function Ge(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,2,"div",[["class","btn-light"],["ngbDatepickerDayView",""]],[[2,"bg-primary",null],[2,"text-white",null],[2,"text-muted",null],[2,"outside",null],[2,"active",null]],null,null,B,W)),r["\u0275did"](2,49152,null,0,H,[],{currentMonth:[0,"currentMonth"],date:[1,"date"],disabled:[2,"disabled"],focused:[3,"focused"],selected:[4,"selected"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,t.context.currentMonth,t.context.date,t.context.disabled,t.context.focused,t.context.selected)},function(e,t){e(t,1,0,r["\u0275nov"](t,2).selected,r["\u0275nov"](t,2).selected,r["\u0275nov"](t,2).isMuted(),r["\u0275nov"](t,2).isMuted(),r["\u0275nov"](t,2).focused)})}function qe(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"ngb-datepicker-navigation",[],null,[[null,"navigate"],[null,"select"]],function(e,t,n){var r=!0,i=e.component;return"navigate"===t&&(r=!1!==i.onNavigateEvent(n)&&r),"select"===t&&(r=!1!==i.onNavigateDateSelect(n)&&r),r},de,le)),r["\u0275did"](1,49152,null,0,ie,[Q],{date:[0,"date"],disabled:[1,"disabled"],months:[2,"months"],showSelect:[3,"showSelect"],prevDisabled:[4,"prevDisabled"],nextDisabled:[5,"nextDisabled"],selectBoxes:[6,"selectBoxes"]},{navigate:"navigate",select:"select"}),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,1,0,n.model.firstDate,n.model.disabled,n.model.months,"select"===n.model.navigation,n.model.prevDisabled,n.model.nextDisabled,n.model.selectBoxes)},null)}function Ke(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"div",[["class","ngb-dp-month-name bg-light"]],null,null,null,null,null)),(e()(),r["\u0275ted"](1,null,["\n "," ","\n "]))],null,function(e,t){e(t,1,0,t.component.i18n.getMonthFullName(t.parent.context.$implicit.number),t.parent.context.$implicit.year)})}function Ze(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,8,"div",[["class","ngb-dp-month d-block"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ke)),r["\u0275did"](4,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,2,"ngb-datepicker-month-view",[["class","d-block"]],null,[[null,"select"]],function(e,t,n){var r=!0;return"select"===t&&(r=!1!==e.component.onDateSelect(n)&&r),r},xe,fe)),r["\u0275did"](7,49152,null,0,he,[Q],{dayTemplate:[0,"dayTemplate"],month:[1,"month"],outsideDays:[2,"outsideDays"],showWeekdays:[3,"showWeekdays"],showWeekNumbers:[4,"showWeekNumbers"]},{select:"select"}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,4,0,"none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),e(t,7,0,n.dayTemplate||r["\u0275nov"](t.parent,1),t.context.$implicit,1===n.displayMonths?n.outsideDays:"hidden",n.showWeekdays,n.showWeekNumbers)},null)}function Ye(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,[["dt",2]],null,0,null,Ge)),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](3,0,null,null,4,"div",[["class","ngb-dp-header bg-light"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,qe)),r["\u0275did"](6,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](9,0,null,null,4,"div",[["class","ngb-dp-months"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ze)),r["\u0275did"](12,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,6,0,"none"!==n.navigation),e(t,12,0,n.model.months)},null)}var Qe=r["\u0275ccf"]("ngb-datepicker",Ue,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,4,"ngb-datepicker",[["tabindex","0"]],[[1,"tabindex",0]],[[null,"blur"],[null,"focus"],[null,"keydown"]],function(e,t,n){var i=!0;return"blur"===t&&(i=!1!==r["\u0275nov"](e,4).showFocus(!1)&&i),"focus"===t&&(i=!1!==r["\u0275nov"](e,4).showFocus(!0)&&i),"keydown"===t&&(i=!1!==r["\u0275nov"](e,4).onKeyDown(n)&&i),i},Ye,ze)),r["\u0275prd"](5120,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[Ue]),r["\u0275prd"](512,null,Fe,Fe,[Me]),r["\u0275prd"](512,null,$e,$e,[Fe,Me]),r["\u0275did"](4,770048,null,0,Ue,[$e,Fe,Me,Q,je,r.ChangeDetectorRef,r.ElementRef,We],null,null)],function(e,t){e(t,4,0)},function(e,t){e(t,0,0,r["\u0275nov"](t,4).model.disabled?void 0:"0")})},{dayTemplate:"dayTemplate",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},{navigate:"navigate",select:"select"},[]),Xe=function(){},Je=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function et(e){return r["\u0275vid"](0,[],null,null)}var tt=r["\u0275ccf"]("ngb-modal-backdrop",Xe,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"ngb-modal-backdrop",[],[[8,"className",0]],null,null,et,Je)),r["\u0275did"](1,49152,null,0,Xe,[],null,null)],null,function(e,t){e(t,0,0,"modal-backdrop fade show"+(r["\u0275nov"](t,1).backdropClass?" "+r["\u0275nov"](t,1).backdropClass:""))})},{backdropClass:"backdropClass"},{},[]),nt=function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e}({}),rt=function(){function e(e,t,n){this._elRef=t,this._renderer=n,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new r.EventEmitter,this._document=e}return e.prototype.backdropClick=function(e){!0===this.backdrop&&this._elRef.nativeElement===e.target&&this.dismiss(nt.BACKDROP_CLICK)},e.prototype.escKey=function(e){this.keyboard&&!e.defaultPrevented&&this.dismiss(nt.ESC)},e.prototype.dismiss=function(e){this.dismissEvent.emit(e)},e.prototype.ngOnInit=function(){this._elWithFocus=this._document.activeElement,this._renderer.addClass(this._document.body,"modal-open")},e.prototype.ngAfterViewInit=function(){this._elRef.nativeElement.contains(document.activeElement)||this._elRef.nativeElement.focus.apply(this._elRef.nativeElement,[])},e.prototype.ngOnDestroy=function(){var e,t=this._document.body,n=this._elWithFocus;(e=n&&n.focus&&t.contains(n)?n:t).focus.apply(e,[]),this._elWithFocus=null,this._renderer.removeClass(t,"modal-open")},e}(),it=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function lt(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,4,"div",[["role","document"]],[[8,"className",0]],null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](3,0,null,null,1,"div",[["class","modal-content"]],null,null,null,null,null)),r["\u0275ncd"](null,0),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,function(e,t){var n=t.component;e(t,1,0,"modal-dialog"+(n.size?" modal-"+n.size:"")+(n.centered?" modal-dialog-centered":""))})}var ot=r["\u0275ccf"]("ngb-modal-window",rt,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"ngb-modal-window",[["role","dialog"],["tabindex","-1"]],[[8,"className",0]],[[null,"keyup.esc"],[null,"click"]],function(e,t,n){var i=!0;return"keyup.esc"===t&&(i=!1!==r["\u0275nov"](e,1).escKey(n)&&i),"click"===t&&(i=!1!==r["\u0275nov"](e,1).backdropClick(n)&&i),i},lt,it)),r["\u0275did"](1,4440064,null,0,rt,[o.DOCUMENT,r.ElementRef,r.Renderer2],null,null)],function(e,t){e(t,1,0)},function(e,t){e(t,0,0,"modal fade show d-block"+(r["\u0275nov"](t,1).windowClass?" "+r["\u0275nov"](t,1).windowClass:""))})},{backdrop:"backdrop",centered:"centered",keyboard:"keyboard",size:"size",windowClass:"windowClass"},{dismissEvent:"dismiss"},["*"]),st=function(){this.placement="top",this.triggers="click",this.disablePopover=!1},at=function(){function e(e,t){this._element=e,this._renderer=t,this.placement="top"}return e.prototype.applyPlacement=function(e){this._renderer.removeClass(this._element.nativeElement,"bs-popover-"+this.placement.toString().split("-")[0]),this._renderer.removeClass(this._element.nativeElement,"bs-popover-"+this.placement.toString()),this.placement=e,this._renderer.addClass(this._element.nativeElement,"bs-popover-"+this.placement.toString().split("-")[0]),this._renderer.addClass(this._element.nativeElement,"bs-popover-"+this.placement.toString())},e}(),ut=r["\u0275crt"]({encapsulation:0,styles:[".bs-popover-top[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-bottom[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n left: 50%;\n margin-left: -5px;\n }\n\n .bs-popover-top-left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-bottom-left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n left: 2em;\n }\n\n .bs-popover-top-right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-bottom-right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n left: auto;\n right: 2em;\n }\n\n .bs-popover-left[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-right[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n top: 50%;\n margin-top: -5px;\n }\n \n .bs-popover-left-top[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-right-top[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n top: 0.7em;\n }\n\n .bs-popover-left-bottom[_nghost-%COMP%] .arrow[_ngcontent-%COMP%], .bs-popover-right-bottom[_nghost-%COMP%] .arrow[_ngcontent-%COMP%] {\n top: auto;\n bottom: 0.7em;\n }"],data:{}});function ct(e){return r["\u0275vid"](2,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,0,"div",[["class","arrow"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](3,0,null,null,1,"h3",[["class","popover-header"]],null,null,null,null,null)),(e()(),r["\u0275ted"](4,null,["",""])),(e()(),r["\u0275eld"](5,0,null,null,1,"div",[["class","popover-body"]],null,null,null,null,null)),r["\u0275ncd"](null,0)],null,function(e,t){e(t,4,0,t.component.title)})}var dt=r["\u0275ccf"]("ngb-popover-window",at,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"ngb-popover-window",[["role","tooltip"]],[[8,"className",0],[8,"id",0]],null,null,ct,ut)),r["\u0275did"](1,49152,null,0,at,[r.ElementRef,r.Renderer2],null,null)],null,function(e,t){e(t,0,0,"popover bs-popover-"+r["\u0275nov"](t,1).placement.split("-")[0]+" bs-popover-"+r["\u0275nov"](t,1).placement,r["\u0275nov"](t,1).id)})},{placement:"placement",title:"title",id:"id"},{},["*"]);class ht{constructor(){this.type_="TickStreamSource"}toString(){return this.priceType}clone(){const e=new ht;return e.priceType=this.priceType,e}}class ft extends ht{constructor(){super(...arguments),this.shift=0,this.type_="TickValueSource"}clone(){const e=new ft;return e.priceType=this.priceType,e.shift=this.shift,e}}class pt{static all(){return[pt.open,pt.high,pt.low,pt.close]}}pt.open="Open",pt.high="High",pt.low="Low",pt.close="Close";class gt{constructor(){this.priceTypes=pt.all()}ngOnInit(){this.source.priceType||(this.source.priceType=pt.close)}}var mt,vt=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function yt(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],null,null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],null,null),(e()(),r["\u0275ted"](3,null,["",""]))],null,function(e,t){e(t,3,0,t.context.$implicit)})}function bt(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,12,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,3).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.priceType=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](5,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](7,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,yt)),r["\u0275did"](10,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275eld"](14,0,null,null,18,"div",[["class","row no-gutters"],["style","margin-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](18,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Shift"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](22,0,null,null,9,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](24,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,25)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,25).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,25)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,25)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,26).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,26).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,26).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.shift=n)&&i),i},null,null)),r["\u0275did"](25,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](26,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](28,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](30,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,5,0,n.source.priceType),e(t,10,0,n.priceTypes),e(t,28,0,n.source.shift)},function(e,t){e(t,2,0,r["\u0275nov"](t,7).ngClassUntouched,r["\u0275nov"](t,7).ngClassTouched,r["\u0275nov"](t,7).ngClassPristine,r["\u0275nov"](t,7).ngClassDirty,r["\u0275nov"](t,7).ngClassValid,r["\u0275nov"](t,7).ngClassInvalid,r["\u0275nov"](t,7).ngClassPending),e(t,24,0,r["\u0275nov"](t,30).ngClassUntouched,r["\u0275nov"](t,30).ngClassTouched,r["\u0275nov"](t,30).ngClassPristine,r["\u0275nov"](t,30).ngClassDirty,r["\u0275nov"](t,30).ngClassValid,r["\u0275nov"](t,30).ngClassInvalid,r["\u0275nov"](t,30).ngClassPending)})}class wt{constructor(e,t){this.property=e,this.sender=t}}class Ct{constructor(){this.type_="IndicatorStreamSource",this.parameters={},this.indicatorChanged=new ke.a}get indicator(){return this._indicator}set indicator(e){const t=this._indicator!==e;this._indicator=e,t&&this.indicatorChanged.next(new wt("Indicator",this))}get source(){return this.source_}set source(e){this.source_=e}clone(){const e=new Ct;return e.indicator=this.indicator,e.stream=this.stream,e.source=this.source.clone(),this.parameters&&(e.parameters=Object.assign({},this.parameters)),e}toString(){if(this.indicator)return this.indicator.streams&&this.indicator.streams.length>1&&this.stream?`${this.indicator.id}.${this.stream} (${Object.values(this.parameters).join(", ")})`:`${this.indicator.id} (${Object.values(this.parameters).join(", ")})`}}class _t extends Ct{constructor(){super(...arguments),this.shift=0,this.type_="IndicatorValueSource"}clone(){const e=new _t;return e.indicator=this.indicator,e.stream=this.stream,e.shift=this.shift,e.source=this.source.clone(),this.parameters&&(e.parameters=Object.assign({},this.parameters)),e}}class xt{constructor(e,t,n,r,i){this.id=e,this.name=t,this.displayName="("+this.id+") "+this.name,this.streams=n,this.parameters=r,this.sourceType=i}}class St{constructor(e,t){this.id=e,this.displayName=t}}class Et{constructor(e,t,n,r=null){this.name=e,this.type=t,this.defaultValue=n,this.availableValues=r}}!function(e){e.Bar="Bar",e.Tick="Tick"}(mt||(mt={}));class Tt{constructor(e,t){this.name=e,this.value=t}toString(){return this.value}}class Mt{constructor(){this.indicators={},this.indicators.RSI=new xt("RSI","Relative Strength Index",[new St("RSI","RSI")],[new Et("Periods","int",14)],mt.Tick),this.indicators.MACD=new xt("MACD","Moving Average Convergence/Divergence",[new St("MACD","MACD"),new St("SIGNAL","MACD Signal Line"),new St("HISTOGRAM","HISTOGRAM")],[new Et("Fast MA Periods","int",12),new Et("Slow MA Periods","int",26),new Et("Signal Line Periods","int",9)],mt.Tick),this.indicators.EMA=new xt("EMA","Exponential Moving Average",[new St("EMA","EMA")],[new Et("Periods","int",10)],mt.Tick),this.indicators.MVA=new xt("MVA","Simple Moving Average",[new St("MVA","MVA")],[new Et("Periods","int",10)],mt.Tick),this.indicators.ADX=new xt("ADX","Average Directional Index",[new St("ADX","ADX")],[new Et("Periods","int",14)],mt.Bar),this.indicators.DMI=new xt("DMI","Directional Movement Index",[new St("DIP","DI+"),new St("DIM","DI-")],[new Et("Periods","int",14)],mt.Bar),this.indicators.ICH=new xt("ICH","Ichimoku",[new St("SL","SL"),new St("TL","TL"),new St("CS","CS"),new St("SA","SA"),new St("SB","SB")],[new Et("Tenkan-sen Periods","int",9),new Et("Kijun-sen Periods","int",26),new Et("Senkou Span B Periods","int",52)],mt.Bar),this.indicators.SAR=new xt("SAR","Parabolic Time/Price System",[new St("UP","UP"),new St("DN","DN")],[new Et("Step","double",.02),new Et("Max","double",.2)],mt.Bar),this.indicators.CCI=new xt("CCI","Commodity Channel Index",[new St("CCI","CCI")],[new Et("Periods","int",14)],mt.Bar),this.indicators.SFK=new xt("SFK","Stochastic Fast",[new St("K","K"),new St("D","D")],[new Et("KPeriods","int",5),new Et("DPeriods","int",5)],mt.Bar),this.indicators.SSD=new xt("SSD","Stochastic Slow",[new St("K","K"),new St("D","D")],[new Et("KPeriods","int",5),new Et("SlowDPeriods","int",3),new Et("DPeriods","int",3)],mt.Bar),this.indicators.STOCHASTIC=new xt("STOCHASTIC","Stochastic",[new St("K","K"),new St("D","D")],[new Et("KPeriods","int",5),new Et("SlowDPeriods","int",3),new Et("DPeriods","int",3),new Et("%K Smoothing Type","string",new Tt("MVA","MVA"),[new Tt("MVA","MVA"),new Tt("EMA","EMA"),new Tt("Fast Smoothed","FS")]),new Et("%D Smoothing Type","string",new Tt("MVA","MVA"),[new Tt("MVA","MVA"),new Tt("EMA","EMA")])],mt.Bar),this.indicators.TSI=new xt("TSI","True Strength Index",[new St("TSI","TSI")],[new Et("Smooth1","int",7),new Et("Smooth2","int",14)],mt.Tick),this.indicators.BB=new xt("BB","Bollinger Band",[new St("TL","TL"),new St("BL","BL"),new St("AL","AL")],[new Et("Periods","int",20),new Et("Deviations","double",2)],mt.Tick),this.indicators.ATR=new xt("ATR","Average True Range",[new St("ATR","ATR")],[new Et("Periods","int",14)],mt.Bar),this.indicators.EW=new xt("EW","Elliot Wave Indicator",[new St("EW","EW")],[new Et("Trigger Value %","int",70),new Et("Periods","int",20),new Et("Fast MA Periods","int",5),new Et("Slow MA Periods","int",35)],mt.Bar),this.indicators.OBV=new xt("OBV","On Balance Volume",[new St("OBV","OBV")],void 0,mt.Bar),this.indicators.LWMA=new xt("LWMA","Linear Weighted Moving Average",[new St("LWMA","LWMA")],[new Et("Periods","int",14)],mt.Tick),this.indicators.KAMA=new xt("KAMA","Kaufman Adaptive Moving Average",[new St("KAMA","KAMA")],[new Et("Periods","int",14)],mt.Tick),this.indicators.PPMA=new xt("PPMA","Pivot Point Moving Average",[new St("PPMA","PPMA")],[new Et("Periods","int",14)],mt.Bar),this.indicators.SMMA=new xt("SMMA","Smoothed Moving Average",[new St("SMMA","SMMA")],[new Et("Periods","int",7)],mt.Tick),this.indicators.TMA=new xt("TMA","Triangular Moving Average",[new St("TMA","TMA")],[new Et("Periods","int",7)],mt.Tick),this.indicators.WMA=new xt("WMA","Wilders Moving Average",[new St("WMA","WMA")],[new Et("Periods","int",7)],mt.Tick),this.indicators.AROON=new xt("AROON","Aroon",[new St("UP","UP"),new St("DOWN","DOWN")],[new Et("Periods","int",25)],mt.Bar),this.indicators.ARSI=new xt("ARSI","Adaptive Relative Strength Index",[new St("ARSI","ARSI")],[new Et("Periods","int",14)],mt.Bar),this.indicators.REGRESSION=new xt("REGRESSION","Regression Line",[new St("Regression","Regression")],[new Et("Periods","int",14)],mt.Tick),this.indicators.ROC=new xt("ROC","Rate of Change",[new St("ROC","ROC")],[new Et("Periods","int",14)],mt.Tick),this.indicators.TMACD=new xt("TMACD","Triangular Moving Average Convergence/Divergence",[new St("TMACD","TMACD")],[new Et("Fast MA periods","int",7),new Et("Slow MA periods","int",14)],mt.Tick),this.indicators.AC=new xt("AC","Acceleration/Deceleration",[new St("AC","AC")],[new Et("Fast MA periods","int",5),new Et("Slow MA periods","int",35),new Et("A/D Periods","int",5)],mt.Bar),this.indicators.ALLIGATOR=new xt("ALLIGATOR","Alligator",[new St("Jaw","Jaw"),new St("Teeth","Teeth"),new St("Lips","Lips")],[new Et("Jaw Smoothing Periods","int",13),new Et("Jaw Shifting Periods","int",8),new Et("Teeth Smoothing Periods","int",8),new Et("Teeth Shifting Periods","int",5),new Et("Lips Smoothing Periods","int",5),new Et("Lips Shifting Periods","int",3),new Et("Smoothing Method","string",new Tt("SMMA","SMMA"),[new Tt("MVA","MVA"),new Tt("EMA","EMA"),new Tt("LWMA","LWMA"),new Tt("REGRESSION","REGRESSION"),new Tt("SMMA","SMMA"),new Tt("VIDYA","VIDYA"),new Tt("VIDYA92","VIDYA92"),new Tt("WMA","WMA")])],mt.Bar),this.indicators.AO=new xt("AO","Awesome Oscillator",[new St("AO","AO")],[new Et("Fast MA periods","int",5),new Et("Slow MA periods","int",35)],mt.Bar),this.indicators.ASI=new xt("ASI","Accumulation Swing Index",[new St("ASI","ASI")],[new Et("T","int",300)],mt.Bar),this.indicators.ZIGZAG=new xt("ZIGZAG","ZigZag",[new St("out","out")],[new Et("Depth","int",12),new Et("Deviation","int",5),new Et("Backstep","int",3)],mt.Bar),this.indicators.MAE=new xt("MAE","Moving Average Envelope",[new St("ME1","ME1"),new St("ME2","ME2")],[new Et("Periods","int",7),new Et("Upper % Value","double",.5),new Et("Lower % Value","double",.5)],mt.Tick),this.indicators.AD=new xt("AD","Accumulation/Distribution",[new St("AD","AD")],[new Et("Method","string",new Tt("Classic Incremental","CI"),[new Tt("Classic Incremental","CI"),new Tt("Classic","CS"),new Tt("Trade Station","TS")])],mt.Bar)}}var Ot,kt=function(){this.closeOthers=!1},At=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[kt]}},e}(),Dt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[s]}},e}(),Nt=(Object(r.forwardRef)(function(){return Nt}),function(){function e(e){this._label=e,this.disabled=!1,this.valueChecked=!0,this.valueUnChecked=!1,this.onChange=function(e){},this.onTouched=function(){}}return Object.defineProperty(e.prototype,"focused",{set:function(e){this._label.focused=e,e||this.onTouched()},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(e){var t=e.target.checked?this.valueChecked:this.valueUnChecked;this.onChange(t),this.onTouched(),this.writeValue(t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this._label.disabled=e},e.prototype.writeValue=function(e){this.checked=e===this.valueChecked,this._label.active=this.checked},e}()),Rt=(Object(r.forwardRef)(function(){return It}),0),It=function(){function e(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+Rt++,this.onChange=function(e){},this.onTouched=function(){}}return Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this.setDisabledState(e)},enumerable:!0,configurable:!0}),e.prototype.onRadioChange=function(e){this.writeValue(e.value),this.onChange(e.value)},e.prototype.onRadioValueUpdate=function(){this._updateRadiosValue()},e.prototype.register=function(e){this._radios.add(e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._disabled=e,this._updateRadiosDisabled()},e.prototype.unregister=function(e){this._radios.delete(e)},e.prototype.writeValue=function(e){this._value=e,this._updateRadiosValue()},e.prototype._updateRadiosValue=function(){var e=this;this._radios.forEach(function(t){return t.updateValue(e._value)})},e.prototype._updateRadiosDisabled=function(){this._radios.forEach(function(e){return e.updateDisabled()})},e}(),Pt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}(),Vt=function(){this.interval=5e3,this.wrap=!0,this.keyboard=!0};!function(e){e[e.LEFT="left"]="LEFT",e[e.RIGHT="right"]="RIGHT"}(Ot||(Ot={}));var Lt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Vt]}},e}(),Ft=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}(),$t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};Object;var jt=function(){},Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}$t(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.parse=function(e){if(e){var t=e.trim().split("-");if(1===t.length&&S(t[0]))return{year:_(t[0]),month:null,day:null};if(2===t.length&&S(t[0])&&S(t[1]))return{year:_(t[0]),month:_(t[1]),day:null};if(3===t.length&&S(t[0])&&S(t[1])&&S(t[2]))return{year:_(t[0]),month:_(t[1]),day:_(t[2])}}return null},t.prototype.format=function(e){return e?e.year+"-"+(S(e.month)?M(e.month):"")+"-"+(S(e.day)?M(e.day):""):""},t}(jt),Wt=(Object(r.forwardRef)(function(){return Wt}),Object(r.forwardRef)(function(){return Wt}),function(){function e(e,t,n,i,l,o,s,a,u){var c=this;this._parserFormatter=e,this._elRef=t,this._vcRef=n,this._renderer=i,this._cfr=l,this._service=s,this._calendar=a,this._ngbDateAdapter=u,this._cRef=null,this._disabled=!1,this.autoClose=!0,this.placement="bottom-left",this.dateSelect=new r.EventEmitter,this.navigate=new r.EventEmitter,this._onChange=function(e){},this._onTouched=function(){},this._validatorChange=function(){},this._zoneSubscription=o.onStable.subscribe(function(){c._cRef&&p(c._elRef.nativeElement,c._cRef.location.nativeElement,c.placement,"body"===c.container)})}return Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=""===e||e&&"false"!==e,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)},enumerable:!0,configurable:!0}),e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.registerOnValidatorChange=function(e){this._validatorChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.validate=function(e){var t=e.value;if(null===t||void 0===t)return null;var n=this._fromDateStruct(this._ngbDateAdapter.fromModel(t));return this._calendar.isValid(n)?this.minDate&&n.before(G.from(this.minDate))?{ngbDate:{requiredBefore:this.minDate}}:this.maxDate&&n.after(G.from(this.maxDate))?{ngbDate:{requiredAfter:this.maxDate}}:void 0:{ngbDate:{invalid:e.value}}},e.prototype.writeValue=function(e){this._model=this._fromDateStruct(this._ngbDateAdapter.fromModel(e)),this._writeModelValue(this._model)},e.prototype.manualDateChange=function(e,t){void 0===t&&(t=!1),this._model=this._fromDateStruct(this._parserFormatter.parse(e)),this._onChange(this._model?this._ngbDateAdapter.toModel(this._model):""===e?null:e),t&&this._model&&this._writeModelValue(this._model)},e.prototype.isOpen=function(){return!!this._cRef},e.prototype.open=function(){var e=this;if(!this.isOpen()){var t=this._cfr.resolveComponentFactory(Ue);this._cRef=this._vcRef.createComponent(t),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._ngbDateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(function(t){e.writeValue(t),e._onChange(t)}),this._cRef.instance.focus(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&window.document.querySelector(this.container).appendChild(this._cRef.location.nativeElement)}},e.prototype.close=function(){this.isOpen()&&(this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null)},e.prototype.toggle=function(){this.isOpen()?this.close():this.open()},e.prototype.navigateTo=function(e){this.isOpen()&&this._cRef.instance.navigateTo(e)},e.prototype.onBlur=function(){this._onTouched()},e.prototype.ngOnChanges=function(e){(e.minDate||e.maxDate)&&this._validatorChange()},e.prototype.ngOnDestroy=function(){this.close(),this._zoneSubscription.unsubscribe()},e.prototype._applyDatepickerInputs=function(e){var t=this;["dayTemplate","displayMonths","firstDayOfWeek","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(function(n){void 0!==t[n]&&(e[n]=t[n])}),e.startDate=this.startDate||this._model},e.prototype._applyPopupStyling=function(e){this._renderer.addClass(e,"dropdown-menu"),this._renderer.setStyle(e,"padding","0"),this._renderer.addClass(e,"show")},e.prototype._subscribeForDatepickerOutputs=function(e){var t=this;e.navigate.subscribe(function(e){return t.navigate.emit(e)}),e.select.subscribe(function(e){t.dateSelect.emit(e),t.autoClose&&t.close()})},e.prototype._writeModelValue=function(e){this._renderer.setProperty(this._elRef.nativeElement,"value",this._parserFormatter.format(e)),this.isOpen()&&(this._cRef.instance.writeValue(this._ngbDateAdapter.toModel(e)),this._onTouched())},e.prototype._fromDateStruct=function(e){var t=e?new G(e.year,e.month,e.day):null;return this._calendar.isValid(t)?t:null},e}()),Bt=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bt(t,e),t.prototype.getDaysPerWeek=function(){return 7},t.prototype.getMonths=function(){return[1,2,3,4,5,6,7,8,9,10,11,12]},t.prototype.getWeeksPerMonth=function(){return 6},t.prototype.isValid=function(e){return e&&S(e.year)&&S(e.month)&&S(e.day)&&!isNaN(this.toGregorian(e).getTime())},t.prototype.setDay=function(e,t){t=+t;var n=this.getDaysInIslamicMonth(e.month,e.year);if(t<=0)for(;t<=0;)e=this.setMonth(e,e.month-1),t+=n=this.getDaysInIslamicMonth(e.month,e.year);else if(t>n)for(;t>n;)t-=n,e=this.setMonth(e,e.month+1),n=this.getDaysInIslamicMonth(e.month,e.year);return e.day=t,e},t.prototype.setMonth=function(e,t){return t=+t,e.year=e.year+Math.floor((t-1)/12),e.month=Math.floor(((t-1)%12+12)%12)+1,e},t.prototype.setYear=function(e,t){return e.year=+t,e},t.prototype._isIslamicLeapYear=function(e){return(14+11*e)%30<11},t.prototype._getMonthStart=function(e,t){return Math.ceil(29.5*t)+354*(e-1)+Math.floor((3+11*e)/30)},t.prototype._getYearStart=function(e){return 354*(e-1)+Math.floor((3+11*e)/30)},t}(Me),zt=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Gt(e){var t=e.getFullYear();return t%4==0&&t%100!=0||t%400==0}function qt(e,t){return e-t*Math.floor(e/t)}var Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zt(t,e),t.prototype.fromGregorian=function(e){var t=new Date(e),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),l=1721424.5+365*(n-1)+Math.floor((n-1)/4)+-Math.floor((n-1)/100)+Math.floor((n-1)/400)+Math.floor((367*(r+1)-362)/12+(r+1<=2?0:Gt(t)?-1:-2)+i),o=(l=Math.floor(l)+.5)-1948439.5,s=Math.floor((30*o+10646)/10631),a=Math.ceil((o-29-this._getYearStart(s))/29.5);a=Math.min(a,11);var u=Math.ceil(o-this._getMonthStart(s,a))+1;return new G(s,a+1,u)},t.prototype.toGregorian=function(e){var t=e.year,n=e.day+Math.ceil(29.5*(e.month-1))+354*(t-1)+Math.floor((3+11*t)/30)+1948439.5-1,r=Math.floor(n-.5)+.5,i=r-1721425.5,l=Math.floor(i/146097),o=qt(i,146097),s=Math.floor(o/36524),a=qt(o,36524),u=Math.floor(a/1461),c=qt(a,1461),d=Math.floor(c/365),h=400*l+100*s+4*u+d;4!==s&&4!==d&&h++;var f=r-(1721425.5+365*(h-1)+Math.floor((h-1)/4)-Math.floor((h-1)/100)+Math.floor((h-1)/400)),p=r<1721424.5+365*(h-1)+Math.floor((h-1)/4)-Math.floor((h-1)/100)+Math.floor((h-1)/400)+Math.floor(739/12+(Gt(new Date(h,3,1))?-1:-2)+1)?0:Gt(new Date(h,3,1))?1:2,g=Math.floor((12*(f+p)+373)/367),m=1721424.5+365*(h-1)+Math.floor((h-1)/4)-Math.floor((h-1)/100)+Math.floor((h-1)/400)+Math.floor((367*g-362)/12+(g<=2?0:Gt(new Date(h,g-1,1))?-1:-2)+1);return new Date(h,g-1,r-m+1)},t.prototype.getDaysInIslamicMonth=function(e,t){t+=Math.floor(e/13);var n=29+(e=(e-1)%12+1)%2;return 12===e&&this._isIslamicLeapYear(t)&&n++,n},t.prototype.getNext=function(e,t,n){switch(void 0===t&&(t="d"),void 0===n&&(n=1),e=G.from(e),t){case"y":return(e=this.setYear(e,e.year+n)).month=1,e.day=1,e;case"m":return(e=this.setMonth(e,e.month+n)).day=1,e;case"d":return this.setDay(e,e.day+n);default:return e}},t.prototype.getPrev=function(e,t,n){return void 0===t&&(t="d"),void 0===n&&(n=1),this.getNext(e,t,-n)},t.prototype.getWeekday=function(e){var t=this.toGregorian(e).getDay();return 0===t?7:t},t.prototype.getWeekNumber=function(e,t){7===t&&(t=0);var n=e[(11-t)%7],r=this.toGregorian(n);r.setDate(r.getDate()+4-(r.getDay()||7));var i=r.getTime(),l=this.toGregorian(new G(n.year,1,1));return Math.floor(Math.round((i-l.getTime())/864e5)/7)+1},t.prototype.getToday=function(){return this.fromGregorian(new Date)},t}(Ut);this&&this.__extends||Object.setPrototypeOf||Array,new Date(1882,10,12),new Date(2174,10,25),new Kt;var Zt,Yt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[{provide:Me,useClass:Oe},{provide:Q,useClass:X},{provide:jt,useClass:Ht},{provide:We,useClass:Be},je]}},e}(),Qt=function(){this.autoClose=!0,this.placement="bottom-left"},Xt=(this&&this.__extends||Object.setPrototypeOf||Array,function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Qt]}},e}()),Jt=function(){function e(){}return e.prototype.close=function(e){},e.prototype.dismiss=function(e){},e}(),en=function(){function e(e,t,n,r){var i=this;this._windowCmptRef=e,this._contentRef=t,this._backdropCmptRef=n,this._beforeDismiss=r,e.instance.dismissEvent.subscribe(function(e){i.dismiss(e)}),this.result=new Promise(function(e,t){i._resolve=e,i._reject=t}),this.result.then(null,function(){})}return Object.defineProperty(e.prototype,"componentInstance",{get:function(){if(this._contentRef.componentRef)return this._contentRef.componentRef.instance},set:function(e){},enumerable:!0,configurable:!0}),e.prototype.close=function(e){this._windowCmptRef&&(this._resolve(e),this._removeModalElements())},e.prototype.dismiss=function(e){this._windowCmptRef&&(this._beforeDismiss&&!1===this._beforeDismiss()||(this._reject(e),this._removeModalElements()))},e.prototype._removeModalElements=function(){var e=this._windowCmptRef.location.nativeElement;if(e.parentNode.removeChild(e),this._windowCmptRef.destroy(),this._backdropCmptRef){var t=this._backdropCmptRef.location.nativeElement;t.parentNode.removeChild(t),this._backdropCmptRef.destroy()}this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._backdropCmptRef=null,this._contentRef=null},e}(),tn=function(){function e(e,t,n,r){this._applicationRef=e,this._injector=t,this._componentFactoryResolver=n,this._windowAttributes=["backdrop","centered","keyboard","size","windowClass"],this._backdropAttributes=["backdropClass"],this._document=r}return e.prototype.open=function(e,t,n,r){var i=T(r.container)?this._document.querySelector(r.container):this._document.body;if(!i)throw new Error('The specified modal container "'+(r.container||"body")+'" was not found in the DOM.');var l=new Jt,o=this._getContentRef(e,r.injector||t,n,l),s=!1!==r.backdrop?this._attachBackdrop(i):null,a=this._attachWindowComponent(i,o),u=new en(a,o,s,r.beforeDismiss);return l.close=function(e){u.close(e)},l.dismiss=function(e){u.dismiss(e)},this._applyWindowOptions(a.instance,r),s&&s.instance&&this._applyBackdropOptions(s.instance,r),u},e.prototype._attachBackdrop=function(e){var t=this._componentFactoryResolver.resolveComponentFactory(Xe).create(this._injector);return this._applicationRef.attachView(t.hostView),e.appendChild(t.location.nativeElement),t},e.prototype._attachWindowComponent=function(e,t){var n=this._componentFactoryResolver.resolveComponentFactory(rt).create(this._injector,t.nodes);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n},e.prototype._applyWindowOptions=function(e,t){this._windowAttributes.forEach(function(n){T(t[n])&&(e[n]=t[n])})},e.prototype._applyBackdropOptions=function(e,t){this._backdropAttributes.forEach(function(n){T(t[n])&&(e[n]=t[n])})},e.prototype._getContentRef=function(e,t,n,i){return n?n instanceof r.TemplateRef?this._createFromTemplateRef(n,i):"string"==typeof n?this._createFromString(n):this._createFromComponent(e,t,n,i):new g([])},e.prototype._createFromTemplateRef=function(e,t){var n=e.createEmbeddedView(t);return this._applicationRef.attachView(n),new g([n.rootNodes],n)},e.prototype._createFromString=function(e){var t=this._document.createTextNode(""+e);return new g([[t]])},e.prototype._createFromComponent=function(e,t,n,i){var l=e.resolveComponentFactory(n),o=r.ReflectiveInjector.resolveAndCreate([{provide:Jt,useValue:i}],t),s=l.create(o);return this._applicationRef.attachView(s.hostView),new g([[s.location.nativeElement]],s.hostView,s)},e}(),nn=function(){function e(e,t,n){this._moduleCFR=e,this._injector=t,this._modalStack=n}return e.prototype.open=function(e,t){return void 0===t&&(t={}),this._modalStack.open(this._moduleCFR,this._injector,e,t)},e}(),rn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[nn,tn]}},e}(),ln=function(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1},on=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[ln]}},e}(),sn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[st]}},e}(),an=function(){this.max=100,this.animated=!1,this.striped=!1,this.showValue=!1},un=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[an]}},e}(),cn=function(){this.max=10,this.readonly=!1,this.resettable=!1};!function(e){e[e.End=35]="End",e[e.Home=36]="Home",e[e.ArrowLeft=37]="ArrowLeft",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowRight=39]="ArrowRight",e[e.ArrowDown=40]="ArrowDown"}(Zt||(Zt={})),Object(r.forwardRef)(function(){return dn});var dn=function(){function e(e,t){this._changeDetectorRef=t,this.contexts=[],this.disabled=!1,this.hover=new r.EventEmitter,this.leave=new r.EventEmitter,this.rateChange=new r.EventEmitter(!0),this.onChange=function(e){},this.onTouched=function(){},this.max=e.max,this.readonly=e.readonly}return e.prototype.ariaValueText=function(){return this.nextRate+" out of "+this.max},e.prototype.enter=function(e){this.readonly||this.disabled||this._updateState(e),this.hover.emit(e)},e.prototype.handleBlur=function(){this.onTouched()},e.prototype.handleClick=function(e){this.update(this.resettable&&this.rate===e?0:e)},e.prototype.handleKeyDown=function(e){if(Zt[x(e.which)])switch(e.preventDefault(),e.which){case Zt.ArrowDown:case Zt.ArrowLeft:this.update(this.rate-1);break;case Zt.ArrowUp:case Zt.ArrowRight:this.update(this.rate+1);break;case Zt.Home:this.update(0);break;case Zt.End:this.update(this.max)}},e.prototype.ngOnChanges=function(e){e.rate&&this.update(this.rate)},e.prototype.ngOnInit=function(){this.contexts=Array.from({length:this.max},function(e,t){return{fill:0,index:t}}),this._updateState(this.rate)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.reset=function(){this.leave.emit(this.nextRate),this._updateState(this.rate)},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.update=function(e,t){void 0===t&&(t=!0);var n=function(e,t,n){return void 0===n&&(n=0),Math.max(Math.min(e,t),n)}(e,this.max,0);this.readonly||this.disabled||this.rate===n||(this.rate=n,this.rateChange.emit(this.rate)),t&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)},e.prototype.writeValue=function(e){this.update(e,!1),this._changeDetectorRef.markForCheck()},e.prototype._getFillValue=function(e){var t=this.nextRate-e;return t>=1?100:t<1&&t>0?Number.parseInt((100*t).toFixed(2)):0},e.prototype._updateState=function(e){var t=this;this.nextRate=e,this.contexts.forEach(function(e,n){return e.fill=t._getFillValue(n)})},e}(),hn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[cn]}},e}(),fn=function(){this.justify="start",this.orientation="horizontal",this.type="tabs"},pn=0,gn=function(e){this.templateRef=e},mn=function(e){this.templateRef=e},vn=function(){function e(){this.id="ngb-tab-"+pn++,this.disabled=!1}return e.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.contentTpl=this.contentTpls.first},e}(),yn=function(){function e(e){this.destroyOnHide=!0,this.tabChange=new r.EventEmitter,this.type=e.type,this.justify=e.justify,this.orientation=e.orientation}return Object.defineProperty(e.prototype,"justify",{set:function(e){this.justifyClass="fill"===e||"justified"===e?"nav-"+e:"justify-content-"+e},enumerable:!0,configurable:!0}),e.prototype.select=function(e){var t=this._getTabById(e);if(t&&!t.disabled&&this.activeId!==t.id){var n=!1;this.tabChange.emit({activeId:this.activeId,nextId:t.id,preventDefault:function(){n=!0}}),n||(this.activeId=t.id)}},e.prototype.ngAfterContentChecked=function(){var e=this._getTabById(this.activeId);this.activeId=e?e.id:this.tabs.length?this.tabs.first.id:null},e.prototype._getTabById=function(e){var t=this.tabs.filter(function(t){return t.id===e});return t.length?t[0]:null},e}(),bn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[fn]}},e}(),wn=function(){function e(e,t,n){this.hour=_(e),this.minute=_(t),this.second=_(n)}return e.prototype.changeHour=function(e){void 0===e&&(e=1),this.updateHour((isNaN(this.hour)?0:this.hour)+e)},e.prototype.updateHour=function(e){this.hour=S(e)?(e<0?24+e:e)%24:NaN},e.prototype.changeMinute=function(e){void 0===e&&(e=1),this.updateMinute((isNaN(this.minute)?0:this.minute)+e)},e.prototype.updateMinute=function(e){S(e)?(this.minute=e%60<0?60+e%60:e%60,this.changeHour(Math.floor(e/60))):this.minute=NaN},e.prototype.changeSecond=function(e){void 0===e&&(e=1),this.updateSecond((isNaN(this.second)?0:this.second)+e)},e.prototype.updateSecond=function(e){S(e)?(this.second=e<0?60+e%60:e%60,this.changeMinute(Math.floor(e/60))):this.second=NaN},e.prototype.isValid=function(e){return void 0===e&&(e=!0),S(this.hour)&&S(this.minute)&&(!e||S(this.second))},e.prototype.toString=function(){return(this.hour||0)+":"+(this.minute||0)+":"+(this.second||0)},e}(),Cn=function(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"},_n=(Object(r.forwardRef)(function(){return _n}),function(){function e(e){this.onChange=function(e){},this.onTouched=function(){},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}return e.prototype.writeValue=function(e){this.model=e?new wn(e.hour,e.minute,e.second):new wn,this.seconds||e&&S(e.second)||(this.model.second=0)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.changeHour=function(e){this.model.changeHour(e),this.propagateModelChange()},e.prototype.changeMinute=function(e){this.model.changeMinute(e),this.propagateModelChange()},e.prototype.changeSecond=function(e){this.model.changeSecond(e),this.propagateModelChange()},e.prototype.updateHour=function(e){var t=this.model.hour>=12,n=_(e);this.model.updateHour(this.meridian&&(t&&n<12||!t&&12===n)?n+12:n),this.propagateModelChange()},e.prototype.updateMinute=function(e){this.model.updateMinute(_(e)),this.propagateModelChange()},e.prototype.updateSecond=function(e){this.model.updateSecond(_(e)),this.propagateModelChange()},e.prototype.toggleMeridian=function(){this.meridian&&this.changeHour(12)},e.prototype.formatHour=function(e){return S(e)?M(this.meridian?e%12==0?12:e%12:e%24):M(NaN)},e.prototype.formatMinSec=function(e){return M(e)},e.prototype.setFormControlSize=function(){return{"form-control-sm":"small"===this.size,"form-control-lg":"large"===this.size}},e.prototype.setButtonSize=function(){return{"btn-sm":"small"===this.size,"btn-lg":"large"===this.size}},e.prototype.ngOnChanges=function(e){e.seconds&&!this.seconds&&this.model&&!S(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))},e.prototype.propagateModelChange=function(e){void 0===e&&(e=!0),e&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange({hour:this.model.hour,minute:this.model.minute,second:this.model.second}):this.onChange(null)},e}()),xn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Cn]}},e}(),Sn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[v]}},e}(),En=n("7nan");class Tn extends ke.a{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new En.a;return this._value}next(e){super.next(this._value=e)}}class Mn{constructor(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}call(e,t){return t.subscribe(new On(e,this.nextOrObserver,this.error,this.complete))}}class On extends Re.a{constructor(e,t,n,r){super(e);const i=new Re.a(t,n,r);i.syncErrorThrowable=!0,this.add(i),this.safeSubscriber=i}_next(e){const{safeSubscriber:t}=this;t.next(e),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.next(e)}_error(e){const{safeSubscriber:t}=this;t.error(e),this.destination.error(t.syncErrorThrown?t.syncErrorValue:e)}_complete(){const{safeSubscriber:e}=this;e.complete(),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.complete()}}function kn(e,t,n){return function(e,t,n){return function(r){return r.lift(new Mn(e,t,n))}}(e,t,n)(this)}var An=n("JEOp"),Dn=n("73El");class Nn extends An.a{constructor(e,t,n){super(e),this.project=t,this.resultSelector=n,this.index=0}_next(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this._innerSub(t,e,n)}_innerSub(e,t,n){const r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=Object(Dn.a)(this,e,t,n))}_complete(){const{innerSubscription:e}=this;e&&!e.closed||super._complete()}_unsubscribe(){this.innerSubscription=null}notifyComplete(e){this.remove(e),this.innerSubscription=null,this.isStopped&&super._complete()}notifyNext(e,t,n,r,i){this.resultSelector?this._tryNotifyNext(e,t,n,r):this.destination.next(t)}_tryNotifyNext(e,t,n,r){let i;try{i=this.resultSelector(e,t,n,r)}catch(e){return void this.destination.error(e)}this.destination.next(i)}}var Rn=n("ves3"),In=n("UEsV"),Pn=n("WFWZ"),Vn=n("hfO1"),Ln=n("s+UU");const Fn=Object.prototype.toString;class $n extends Rn.a{constructor(e,t,n,r){super(),this.sourceObj=e,this.eventName=t,this.selector=n,this.options=r}static create(e,t,n,r){return Object(Pn.a)(n)&&(r=n,n=void 0),new $n(e,t,r,n)}static setupSubscription(e,t,n,r,i){let l;if(function(e){return!!e&&"[object NodeList]"===Fn.call(e)}(e)||function(e){return!!e&&"[object HTMLCollection]"===Fn.call(e)}(e))for(let o=0,s=e.length;or.removeEventListener(t,n,i))}else if(function(e){return!!e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){const r=e;e.on(t,n),l=(()=>r.off(t,n))}else{if(!function(e){return!!e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e))throw new TypeError("Invalid event target");{const r=e;e.addListener(t,n),l=(()=>r.removeListener(t,n))}}r.add(new Ln.a(l))}_subscribe(e){const t=this.selector;$n.setupSubscription(this.sourceObj,this.eventName,t?(...n)=>{let r=Object(In.a)(t)(...n);r===Vn.a?e.error(Vn.a.e):e.next(r)}:t=>e.next(t),e,this.options)}}const jn=$n.create;var Hn,Wn=function(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement="bottom-left"};!function(e){e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Escape=27]="Escape",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowDown=40]="ArrowDown"}(Hn||(Hn={})),Object(r.forwardRef)(function(){return Un});var Bn=0,Un=function(){function e(e,t,n,i,l,o,s){var a=this;this._elementRef=e,this._viewContainerRef=t,this._renderer=n,this._injector=i,this.placement="bottom-left",this.selectItem=new r.EventEmitter,this.popupId="ngb-typeahead-"+Bn++,this._onTouched=function(){},this._onChange=function(e){},this.container=o.container,this.editable=o.editable,this.focusFirst=o.focusFirst,this.showHint=o.showHint,this.placement=o.placement,this._valueChanges=jn(e.nativeElement,"input",function(e){return e.target.value}),this._resubscribeTypeahead=new Tn(null),this._popupService=new m(I,i,t,n,l),this._zoneSubscription=s.onStable.subscribe(function(){a.isPopupOpen()&&p(a._elementRef.nativeElement,a._windowRef.location.nativeElement,a.placement,"body"===a.container)})}return e.prototype.ngOnInit=function(){var e=this,t=kn.call(this._valueChanges,function(t){e._inputValueBackup=t,e.editable&&e._onChange(t)}),n=(function(e){return e(this)}).call(t,this.ngbTypeahead),r=kn.call(n,function(){e.editable||e._onChange(void 0)}),i=(function(e,t){return function(e,t){return function(n){return n.lift(new class{constructor(e,t){this.project=e,this.resultSelector=t}call(e,t){return t.subscribe(new Nn(e,this.project,this.resultSelector))}}(e,t))}}(e,t)(this)}).call(this._resubscribeTypeahead,function(){return r});this._subscription=this._subscribeToUserInput(i)},e.prototype.ngOnDestroy=function(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()},e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.writeValue=function(e){this._writeInputValue(this._formatItemForInput(e))},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype.onDocumentClick=function(e){e.target!==this._elementRef.nativeElement&&this.dismissPopup()},e.prototype.dismissPopup=function(){this.isPopupOpen()&&(this._closePopup(),this._writeInputValue(this._inputValueBackup))},e.prototype.isPopupOpen=function(){return null!=this._windowRef},e.prototype.handleBlur=function(){this._resubscribeTypeahead.next(null),this._onTouched()},e.prototype.handleKeyDown=function(e){if(this.isPopupOpen()&&Hn[x(e.which)])switch(e.which){case Hn.ArrowDown:e.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case Hn.ArrowUp:e.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case Hn.Enter:case Hn.Tab:var t=this._windowRef.instance.getActive();T(t)&&(e.preventDefault(),e.stopPropagation(),this._selectResult(t)),this._closePopup();break;case Hn.Escape:e.preventDefault(),this._resubscribeTypeahead.next(null),this.dismissPopup()}},e.prototype._openPopup=function(){var e=this;this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(function(t){return e._selectResultClosePopup(t)}),this._windowRef.instance.activeChangeEvent.subscribe(function(t){return e.activeDescendant=t}),"body"===this.container&&window.document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement))},e.prototype._closePopup=function(){this._popupService.close(),this._windowRef=null,this.activeDescendant=void 0},e.prototype._selectResult=function(e){var t=!1;this.selectItem.emit({item:e,preventDefault:function(){t=!0}}),this._resubscribeTypeahead.next(null),t||(this.writeValue(e),this._onChange(e))},e.prototype._selectResultClosePopup=function(e){this._selectResult(e),this._closePopup()},e.prototype._showHint=function(){if(this.showHint&&this._windowRef.instance.hasActive()&&null!=this._inputValueBackup){var e=this._inputValueBackup.toLowerCase(),t=this._formatItemForInput(this._windowRef.instance.getActive());e===t.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+t.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,t.length])):this.writeValue(this._windowRef.instance.getActive())}},e.prototype._formatItemForInput=function(e){return e&&this.inputFormatter?this.inputFormatter(e):x(e)},e.prototype._writeInputValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",x(e))},e.prototype._subscribeToUserInput=function(e){var t=this;return e.subscribe(function(e){e&&0!==e.length?(t._openPopup(),t._windowRef.instance.focusFirst=t.focusFirst,t._windowRef.instance.results=e,t._windowRef.instance.term=t._elementRef.nativeElement.value,t.resultFormatter&&(t._windowRef.instance.formatter=t.resultFormatter),t.resultTemplate&&(t._windowRef.instance.resultTemplate=t.resultTemplate),t._windowRef.instance.resetActive(),t._windowRef.changeDetectorRef.detectChanges(),t._showHint()):t._closePopup()})},e.prototype._unsubscribeFromUserInput=function(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null},e}(),zn=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Wn]}},e}(),Gn=function(){};class qn{constructor(e){this.activeModal=e}get sourceType(){return this._sourceType}set sourceType(e){const t=this._sourceType!=e;this._sourceType=e,t&&this.handleSourceTypeChanged()}ngOnInit(){this.source instanceof Ct?this._sourceType="Indicator":this.source instanceof ht&&(this._sourceType="Price")}handleSourceTypeChanged(){"Indicator"===this.sourceType?this.source=new Ct:"Price"===this.sourceType&&(this.source=new ht)}}class Kn{constructor(){this.type_="BarStreamSource"}clone(){return new Kn}}class Zn{constructor(e,t){this.indicatorProvider=e,this.modalService=t,this.sourceChange=new r.EventEmitter,this.indicators=Object.values(e.indicators).sort((e,t)=>e.id>t.id?1:e.idthis.handleSourceIndicatorChanged(e)))}editSource(){const e=this.modalService.open(qn,{windowClass:"stream-source-editor"});e.componentInstance.source=this.source.source.clone(),e.result.then(e=>{this.source.source=e},e=>{})}indicatorParameterEnumCompare(e,t){return e&&t&&e.value===t.value}handleSourceIndicatorChanged(e){if(this.source){this.source.stream=this.source.indicator.streams[0].id,this.source.indicator.sourceType===mt.Tick?(this.source.source=new ht,this.source.source.priceType=pt.close):this.source.source=new Kn;const e={};this.source.indicator.parameters&&this.source.indicator.parameters.forEach(t=>{e[t.name]=t.defaultValue}),this.source.parameters=e}}}var Yn=r["\u0275crt"]({encapsulation:0,styles:[["label[_ngcontent-%COMP%]{color:#fff}"]],data:{}});function Qn(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{ngValue:[0,"ngValue"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{ngValue:[0,"ngValue"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit.displayName)})}function Xn(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,12,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,3).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.indicator=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](5,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](7,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Qn)),r["\u0275did"](10,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,5,0,n.source.indicator),e(t,10,0,n.indicators)},function(e,t){e(t,2,0,r["\u0275nov"](t,7).ngClassUntouched,r["\u0275nov"](t,7).ngClassTouched,r["\u0275nov"](t,7).ngClassPristine,r["\u0275nov"](t,7).ngClassDirty,r["\u0275nov"](t,7).ngClassValid,r["\u0275nov"](t,7).ngClassInvalid,r["\u0275nov"](t,7).ngClassPending)})}function Jn(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],null,null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],null,null),(e()(),r["\u0275ted"](3,null,["",""]))],null,function(e,t){e(t,3,0,t.context.$implicit.id)})}function er(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,15,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Stream"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,6).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,6).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.stream=n)&&i),i},null,null)),r["\u0275did"](6,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](8,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](10,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Jn)),r["\u0275did"](13,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,8,0,n.source.stream),e(t,13,0,n.source.indicator.streams)},function(e,t){e(t,5,0,r["\u0275nov"](t,10).ngClassUntouched,r["\u0275nov"](t,10).ngClassTouched,r["\u0275nov"](t,10).ngClassPristine,r["\u0275nov"](t,10).ngClassDirty,r["\u0275nov"](t,10).ngClassValid,r["\u0275nov"](t,10).ngClassInvalid,r["\u0275nov"](t,10).ngClassPending)})}function tr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,16,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,13,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Source"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,1,"a",[["style","color:rgb(65, 174, 225); font-size:16px;"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.editSource()&&r),r},null,null)),(e()(),r["\u0275ted"](13,null,["",""])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,function(e,t){e(t,13,0,t.component.source.source)})}function nr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{ngValue:[0,"ngValue"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{ngValue:[0,"ngValue"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit.name)})}function rr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,1).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],{compareWith:[0,"compareWith"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,nr)),r["\u0275did"](8,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,1,0,n.indicatorParameterEnumCompare),e(t,3,0,n.source.parameters[t.parent.context.$implicit.name]),e(t,8,0,t.parent.context.$implicit.availableValues)},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function ir(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,2).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](2,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](4,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](6,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,4,0,t.component.source.parameters[t.parent.context.$implicit.name])},function(e,t){e(t,0,0,r["\u0275nov"](t,6).ngClassUntouched,r["\u0275nov"](t,6).ngClassTouched,r["\u0275nov"](t,6).ngClassPristine,r["\u0275nov"](t,6).ngClassDirty,r["\u0275nov"](t,6).ngClassValid,r["\u0275nov"](t,6).ngClassInvalid,r["\u0275nov"](t,6).ngClassPending)})}function lr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,5,"input",[["class","form-control"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.DefaultValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,3,0,t.component.source.parameters[t.parent.context.$implicit.name])},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function or(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,22,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,19,"div",[["class","row no-gutters"],["style","padding-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"label",[],null,null,null,null,null)),(e()(),r["\u0275ted"](7,null,["",""])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,10,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,rr)),r["\u0275did"](13,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ir)),r["\u0275did"](16,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,lr)),r["\u0275did"](19,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,13,0,t.context.$implicit.availableValues),e(t,16,0,!t.context.$implicit.availableValues&&("int"==t.context.$implicit.type||"double"==t.context.$implicit.type)),e(t,19,0,!t.context.$implicit.availableValues&&"string"==t.context.$implicit.type)},function(e,t){e(t,7,0,t.context.$implicit.name)})}function sr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Parameters"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,or)),r["\u0275did"](6,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,6,0,t.component.source.indicator.parameters)},null)}function ar(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,33,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,er)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,tr)),r["\u0275did"](6,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](8,0,null,null,21,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,18,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](14,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Shift"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](18,0,null,null,9,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](20,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,21)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,21).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,21)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,21)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,22).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,22).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,22).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.shift=n)&&i),i},null,null)),r["\u0275did"](21,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](22,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](24,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](26,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,sr)),r["\u0275did"](32,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,3,0,n.source.indicator.streams&&n.source.indicator.streams.length>1),e(t,6,0,"Tick"==n.source.indicator.sourceType),e(t,24,0,n.source.shift),e(t,32,0,n.source.indicator.parameters&&n.source.indicator.parameters.length>0)},function(e,t){e(t,20,0,r["\u0275nov"](t,26).ngClassUntouched,r["\u0275nov"](t,26).ngClassTouched,r["\u0275nov"](t,26).ngClassPristine,r["\u0275nov"](t,26).ngClassDirty,r["\u0275nov"](t,26).ngClassValid,r["\u0275nov"](t,26).ngClassInvalid,r["\u0275nov"](t,26).ngClassPending)})}function ur(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,13,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,10,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,7,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Xn)),r["\u0275did"](7,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ar)),r["\u0275did"](10,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,7,0,n.source&&n.source.indicator),e(t,10,0,n.source&&n.source.indicator)},null)}class cr{constructor(e){this.defaultSource=e}get value(){return void 0===this._value&&(this.value=this.defaultValue()),this._value}set value(e){this._value=e}defaultValue(){return"Constant"===this.defaultSource?0:"Price"===this.defaultSource?new ft:new _t}toString(){return this.value instanceof _t?this.value.toString():this.value instanceof ft?this.value.toString():"number"==typeof this.value?0===this.value?"0":this.value.toString():void 0===this.value?void 0:toString()}clone(){const e=new cr(this.defaultSource);return null!=this.value&&(e.value=this.value instanceof _t?this.value.clone():this.value instanceof ft?this.value.clone():this.value),e}}class dr{get source(){return this._source}set source(e){const t=this._source!==e;this._source=e,t&&this.handleSourceChanged()}ngOnInit(){this._source=this.conditionValue.value instanceof _t?"Indicator":this.conditionValue.value instanceof ft?"Price":"Constant"}handleSourceChanged(){this.conditionValue.value="Indicator"===this.source?new _t:"Price"===this.source?new ft:0}}var hr=r["\u0275crt"]({encapsulation:0,styles:[["label[_ngcontent-%COMP%]{color:#fff}"]],data:{}});function fr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,9,"label",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,6,"input",[["class","form-control"],["name","optradio"],["style","margin-right:5px;"],["type","radio"],["value","Constant"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,3)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,3)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,3)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,4).onChange()&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,4).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](4,212992,null,0,z.RadioControlValueAccessor,[r.Renderer2,r.ElementRef,z["\u0275i"],r.Injector],{name:[0,"name"],value:[1,"value"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z.RadioControlValueAccessor]),r["\u0275did"](6,671744,null,0,z.NgModel,[[2,z.ControlContainer],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](8,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["Constant\n "]))],function(e,t){var n=t.component;e(t,4,0,"optradio","Constant"),e(t,6,0,"optradio",n.source)},function(e,t){e(t,2,0,r["\u0275nov"](t,8).ngClassUntouched,r["\u0275nov"](t,8).ngClassTouched,r["\u0275nov"](t,8).ngClassPristine,r["\u0275nov"](t,8).ngClassDirty,r["\u0275nov"](t,8).ngClassValid,r["\u0275nov"](t,8).ngClassInvalid,r["\u0275nov"](t,8).ngClassPending)})}function pr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,9,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,3)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,3)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,3)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,4).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,4).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,4).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.conditionValue.value=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](4,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](6,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](8,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,6,0,t.component.conditionValue.value)},function(e,t){e(t,2,0,r["\u0275nov"](t,8).ngClassUntouched,r["\u0275nov"](t,8).ngClassTouched,r["\u0275nov"](t,8).ngClassPristine,r["\u0275nov"](t,8).ngClassDirty,r["\u0275nov"](t,8).ngClassValid,r["\u0275nov"](t,8).ngClassInvalid,r["\u0275nov"](t,8).ngClassPending)})}function gr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"app-price-value-source",[],null,[[null,"sourceChange"]],function(e,t,n){var r=!0;return"sourceChange"===t&&(r=!1!==(e.component.conditionValue.value=n)&&r),r},bt,vt)),r["\u0275did"](1,114688,null,0,gt,[],{source:[0,"source"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,1,0,t.component.conditionValue.value)},null)}function mr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"app-indicator-value-source",[],null,[[null,"sourceChange"]],function(e,t,n){var r=!0;return"sourceChange"===t&&(r=!1!==(e.component.conditionValue.value=n)&&r),r},ur,Yn)),r["\u0275did"](1,770048,null,0,Zn,[Mt,nn],{source:[0,"source"]},{sourceChange:"sourceChange"}),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,1,0,t.component.conditionValue.value)},null)}function vr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,42,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,39,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,36,"div",[["class","text-center"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,33,"form",[["class","form-inline"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(e,t,n){var i=!0;return"submit"===t&&(i=!1!==r["\u0275nov"](e,8).onSubmit(n)&&i),"reset"===t&&(i=!1!==r["\u0275nov"](e,8).onReset()&&i),i},null,null)),r["\u0275did"](7,16384,null,0,z["\u0275bf"],[],null,null),r["\u0275did"](8,4210688,null,0,z.NgForm,[[8,null],[8,null]],null,null),r["\u0275prd"](2048,null,z.ControlContainer,null,[z.NgForm]),r["\u0275did"](10,16384,null,0,z.NgControlStatusGroup,[z.ControlContainer],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,26,"div",[["class","row no-gutters"],["style","width:100%;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](14,0,null,null,9,"label",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,6,"input",[["class","form-control"],["name","optradio"],["style","margin-right:5px;"],["type","radio"],["value","Price"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,17)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,17).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,17)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,17)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,18).onChange()&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,18).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source=n)&&i),i},null,null)),r["\u0275did"](17,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](18,212992,null,0,z.RadioControlValueAccessor,[r.Renderer2,r.ElementRef,z["\u0275i"],r.Injector],{name:[0,"name"],value:[1,"value"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z.RadioControlValueAccessor]),r["\u0275did"](20,671744,null,0,z.NgModel,[[2,z.ControlContainer],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](22,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["Price\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](25,0,null,null,9,"label",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](27,0,null,null,6,"input",[["class","form-control"],["name","optradio"],["style","margin-right:5px;"],["type","radio"],["value","Indicator"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,28)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,28).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,28)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,28)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,29).onChange()&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,29).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source=n)&&i),i},null,null)),r["\u0275did"](28,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](29,212992,null,0,z.RadioControlValueAccessor,[r.Renderer2,r.ElementRef,z["\u0275i"],r.Injector],{name:[0,"name"],value:[1,"value"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z.RadioControlValueAccessor]),r["\u0275did"](31,671744,null,0,z.NgModel,[[2,z.ControlContainer],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](33,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["Indicator\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,fr)),r["\u0275did"](37,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275ted"](-1,null,["\n\n"])),(e()(),r["\u0275eld"](44,0,null,null,16,"div",[["class","row no-gutters"],["style","border: 3px solid rgb(133, 189, 145); border-radius: 5px; background:rgb(57, 65, 57); margin-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](46,0,null,null,13,"div",[["class","col"],["style","padding:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,pr)),r["\u0275did"](50,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,gr)),r["\u0275did"](54,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,mr)),r["\u0275did"](58,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,18,0,"optradio","Price"),e(t,20,0,"optradio",n.source),e(t,29,0,"optradio","Indicator"),e(t,31,0,"optradio",n.source),e(t,37,0,n.isConstantSupported),e(t,50,0,n.isConstantSupported&&"Constant"==n.source),e(t,54,0,"Price"==n.source),e(t,58,0,"Indicator"==n.source)},function(e,t){e(t,6,0,r["\u0275nov"](t,10).ngClassUntouched,r["\u0275nov"](t,10).ngClassTouched,r["\u0275nov"](t,10).ngClassPristine,r["\u0275nov"](t,10).ngClassDirty,r["\u0275nov"](t,10).ngClassValid,r["\u0275nov"](t,10).ngClassInvalid,r["\u0275nov"](t,10).ngClassPending),e(t,16,0,r["\u0275nov"](t,22).ngClassUntouched,r["\u0275nov"](t,22).ngClassTouched,r["\u0275nov"](t,22).ngClassPristine,r["\u0275nov"](t,22).ngClassDirty,r["\u0275nov"](t,22).ngClassValid,r["\u0275nov"](t,22).ngClassInvalid,r["\u0275nov"](t,22).ngClassPending),e(t,27,0,r["\u0275nov"](t,33).ngClassUntouched,r["\u0275nov"](t,33).ngClassTouched,r["\u0275nov"](t,33).ngClassPristine,r["\u0275nov"](t,33).ngClassDirty,r["\u0275nov"](t,33).ngClassValid,r["\u0275nov"](t,33).ngClassInvalid,r["\u0275nov"](t,33).ngClassPending)})}class yr{constructor(e,t,n=null){this.id=e,this.displayName=t,this.value=n}static get all(){return[yr.greaterThan,yr.greaterThanOrEqual,yr.lessThan,yr.lessThanOrEqual,yr.equals,yr.notEquals,yr.crossesOver,yr.crossesUnder]}toString(){return this.displayName}get isCrossOperator(){return this.id==yr.crossesOver.id||this.id==yr.crossesUnder.id}}yr.greaterThan=new yr("GT","Greater Than",">"),yr.greaterThanOrEqual=new yr("GTEQ","Greater Than Or Equal",">="),yr.lessThan=new yr("LT","Less Than","<"),yr.lessThanOrEqual=new yr("LTEQ","Less Than Or Equal","<="),yr.equals=new yr("EQ","Equals","=="),yr.notEquals=new yr("NQE","Not Equal To","~="),yr.crossesOver=new yr("CO","Crosses Over"),yr.crossesUnder=new yr("CU","Crosses Under");class br{constructor(){this.left=new cr("Price"),this.operator=yr.crossesOver,this.right=new cr("Indicator")}clone(){const e=new br;return e.left=this.left.clone(),e.operator=this.operator,e.right=this.right.clone(),e}}class wr{constructor(e){this.activeModal=e,this.operators=yr.all}ngOnChanges(e){}}var Cr=r["\u0275crt"]({encapsulation:0,styles:[[".condition-col[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:5px;padding-right:5px}"]],data:{}});function _r(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{ngValue:[0,"ngValue"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{ngValue:[0,"ngValue"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit.displayName)})}function xr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,63,"div",[["style","background: rgb(44, 44, 44); border:1px solid rgb(133, 189, 145); padding:15px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,7,"div",[["class","row"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"div",[["style","font-size:18px; padding:10px; color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Edit Trade Condition"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](11,0,null,null,36,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](13,0,null,null,4,"div",[["class","col-sm condition-col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](15,0,null,null,1,"app-condition-value",[],null,null,null,vr,hr)),r["\u0275did"](16,114688,null,0,dr,[],{isConstantSupported:[0,"isConstantSupported"],conditionValue:[1,"conditionValue"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](19,0,null,null,21,"div",[["class","col-sm-3 condition-col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](21,0,null,null,4,"div",[["class","text-center"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](23,0,null,null,1,"label",[["style","color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Compare Type"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](27,0,null,null,12,"div",[["class","form-group"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](29,0,null,null,9,"select",[["class","form-control"],["style","width:100%; border: 3px solid rgb(133, 189, 145); background:rgb(57, 65, 57); color:white; font-size:16px; border-radius: 5px; padding:5px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,30).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,30).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.tradeCondition.operator=n)&&i),i},null,null)),r["\u0275did"](30,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](32,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](34,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,_r)),r["\u0275did"](37,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](42,0,null,null,4,"div",[["class","col-sm condition-col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](44,0,null,null,1,"app-condition-value",[],null,null,null,vr,hr)),r["\u0275did"](45,114688,null,0,dr,[],{isConstantSupported:[0,"isConstantSupported"],conditionValue:[1,"conditionValue"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](49,0,null,null,13,"div",[["class","row"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](51,0,null,null,10,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](53,0,null,null,7,"div",[["class","pull-right"],["style","margin-top:20px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](55,0,null,null,1,"button",[["class","btn"],["style","background: rgb(165, 211, 221); border: 1px solid rgb(133, 189, 145);"]],null,[[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"click"===t&&(r=!1!==i.activeModal.close(i.tradeCondition)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["Save"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](58,0,null,null,1,"button",[["class","btn"],["style","background: rgb(201, 139, 139); border: 1px solid rgb(133, 189, 145);"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.activeModal.dismiss("User Cancelled")&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["Cancel"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,16,0,!1,n.tradeCondition.left),e(t,32,0,n.tradeCondition.operator),e(t,37,0,n.operators),e(t,45,0,!0,n.tradeCondition.right)},function(e,t){e(t,29,0,r["\u0275nov"](t,34).ngClassUntouched,r["\u0275nov"](t,34).ngClassTouched,r["\u0275nov"](t,34).ngClassPristine,r["\u0275nov"](t,34).ngClassDirty,r["\u0275nov"](t,34).ngClassValid,r["\u0275nov"](t,34).ngClassInvalid,r["\u0275nov"](t,34).ngClassPending)})}var Sr=r["\u0275ccf"]("app-trade-condition",wr,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"app-trade-condition",[],null,null,null,xr,Cr)),r["\u0275did"](1,573440,null,0,wr,[Jt],null,null)],null,null)},{tradeCondition:"tradeCondition"},{},[]);class Er{constructor(){this.priceTypes=pt.all()}ngOnInit(){this.source.priceType||(this.source.priceType=pt.close)}}var Tr=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function Mr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],null,null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],null,null),(e()(),r["\u0275ted"](3,null,["",""]))],null,function(e,t){e(t,3,0,t.context.$implicit)})}function Or(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,12,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,3).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.priceType=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](5,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](7,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Mr)),r["\u0275did"](10,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,5,0,n.source.priceType),e(t,10,0,n.priceTypes)},function(e,t){e(t,2,0,r["\u0275nov"](t,7).ngClassUntouched,r["\u0275nov"](t,7).ngClassTouched,r["\u0275nov"](t,7).ngClassPristine,r["\u0275nov"](t,7).ngClassDirty,r["\u0275nov"](t,7).ngClassValid,r["\u0275nov"](t,7).ngClassInvalid,r["\u0275nov"](t,7).ngClassPending)})}class kr{constructor(e){this.indicatorProvider=e,this.sourceChange=new r.EventEmitter,this.indicators=Object.values(e.indicators).sort((e,t)=>e.id>t.id?1:e.idthis.handleSourceIndicatorChanged(e)))}indicatorParameterEnumCompare(e,t){return e&&t&&e.value===t.value}handleSourceIndicatorChanged(e){if(this.source){this.source.stream=this.source.indicator.streams[0].id,this.source.indicator.sourceType===mt.Tick?(this.source.source=new ht,this.source.source.priceType=pt.close):this.source.source=new Kn;const e={};this.source.indicator.parameters.forEach(t=>{e[t.name]=t.defaultValue}),this.source.parameters=e}}}var Ar=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function Dr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{ngValue:[0,"ngValue"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{ngValue:[0,"ngValue"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit.displayName)})}function Nr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,12,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,3).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,3).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.indicator=n)&&i),i},null,null)),r["\u0275did"](3,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](5,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](7,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Dr)),r["\u0275did"](10,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,5,0,n.source.indicator),e(t,10,0,n.indicators)},function(e,t){e(t,2,0,r["\u0275nov"](t,7).ngClassUntouched,r["\u0275nov"](t,7).ngClassTouched,r["\u0275nov"](t,7).ngClassPristine,r["\u0275nov"](t,7).ngClassDirty,r["\u0275nov"](t,7).ngClassValid,r["\u0275nov"](t,7).ngClassInvalid,r["\u0275nov"](t,7).ngClassPending)})}function Rr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],null,null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],null,null),(e()(),r["\u0275ted"](3,null,["",""]))],null,function(e,t){e(t,3,0,t.context.$implicit.id)})}function Ir(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,15,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Stream"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,6).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,6).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.stream=n)&&i),i},null,null)),r["\u0275did"](6,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](8,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](10,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Rr)),r["\u0275did"](13,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,8,0,n.source.stream),e(t,13,0,n.source.indicator.streams)},function(e,t){e(t,5,0,r["\u0275nov"](t,10).ngClassUntouched,r["\u0275nov"](t,10).ngClassTouched,r["\u0275nov"](t,10).ngClassPristine,r["\u0275nov"](t,10).ngClassDirty,r["\u0275nov"](t,10).ngClassValid,r["\u0275nov"](t,10).ngClassInvalid,r["\u0275nov"](t,10).ngClassPending)})}function Pr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,17,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,14,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Source"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,5,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,2,"app-price-stream-source",[],null,[[null,"sourceChange"]],function(e,t,n){var r=!0;return"sourceChange"===t&&(r=!1!==(e.component.source.source=n)&&r),r},Or,Tr)),r["\u0275did"](13,114688,null,0,Er,[],{source:[0,"source"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,13,0,t.component.source.source)},null)}function Vr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"option",[],null,null,null,null,null)),r["\u0275did"](1,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{ngValue:[0,"ngValue"]},null),r["\u0275did"](2,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{ngValue:[0,"ngValue"]},null),(e()(),r["\u0275ted"](3,null,["",""]))],function(e,t){e(t,1,0,t.context.$implicit),e(t,2,0,t.context.$implicit)},function(e,t){e(t,3,0,t.context.$implicit.name)})}function Lr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,9,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0,l=e.component;return"change"===t&&(i=!1!==r["\u0275nov"](e,1).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],{compareWith:[0,"compareWith"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Vr)),r["\u0275did"](8,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,1,0,n.indicatorParameterEnumCompare),e(t,3,0,n.source.parameters[t.parent.context.$implicit.name]),e(t,8,0,t.parent.context.$implicit.availableValues)},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function Fr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,2).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](2,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](4,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](6,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,4,0,t.component.source.parameters[t.parent.context.$implicit.name])},function(e,t){e(t,0,0,r["\u0275nov"](t,6).ngClassUntouched,r["\u0275nov"](t,6).ngClassTouched,r["\u0275nov"](t,6).ngClassPristine,r["\u0275nov"](t,6).ngClassDirty,r["\u0275nov"](t,6).ngClassValid,r["\u0275nov"](t,6).ngClassInvalid,r["\u0275nov"](t,6).ngClassPending)})}function $r(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,5,"input",[["class","form-control"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"ngModelChange"===t&&(i=!1!==(l.source.parameters[e.parent.context.$implicit.name]=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.DefaultValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,3,0,t.component.source.parameters[t.parent.context.$implicit.name])},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function jr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,22,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,19,"div",[["class","row no-gutters"],["style","padding-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"label",[["style","color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](7,null,["",""])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,10,"div",[["class","col-sm-6"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Lr)),r["\u0275did"](13,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Fr)),r["\u0275did"](16,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,$r)),r["\u0275did"](19,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,13,0,t.context.$implicit.availableValues),e(t,16,0,!t.context.$implicit.availableValues&&("int"==t.context.$implicit.type||"double"==t.context.$implicit.type)),e(t,19,0,!t.context.$implicit.availableValues&&"string"==t.context.$implicit.type)},function(e,t){e(t,7,0,t.context.$implicit.name)})}function Hr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[["style","margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"label",[["style","color:rgb(133, 189, 145)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Parameters"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,jr)),r["\u0275did"](6,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,6,0,t.component.source.indicator.parameters)},null)}function Wr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,10,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ir)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Pr)),r["\u0275did"](6,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Hr)),r["\u0275did"](9,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,3,0,n.source.indicator.streams&&n.source.indicator.streams.length>1),e(t,6,0,"Tick"==n.source.indicator.sourceType),e(t,9,0,n.source.indicator.parameters&&n.source.indicator.parameters.length>0)},null)}function Br(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,13,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,10,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,7,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Nr)),r["\u0275did"](7,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Wr)),r["\u0275did"](10,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,7,0,n.source&&n.source.indicator),e(t,10,0,n.source&&n.source.indicator)},null)}var Ur=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function zr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"app-price-stream-source",[],null,[[null,"sourceChange"]],function(e,t,n){var r=!0;return"sourceChange"===t&&(r=!1!==(e.component.source=n)&&r),r},Or,Tr)),r["\u0275did"](1,114688,null,0,Er,[],{source:[0,"source"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,1,0,t.component.source)},null)}function Gr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,2,"app-indicator-stream-source",[],null,[[null,"sourceChange"]],function(e,t,n){var r=!0;return"sourceChange"===t&&(r=!1!==(e.component.source=n)&&r),r},Br,Ar)),r["\u0275did"](1,770048,null,0,kr,[Mt],{source:[0,"source"]},{sourceChange:"sourceChange"}),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,1,0,t.component.source)},null)}function qr(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,80,"div",[["style","background: rgb(44, 44, 44); border:1px solid rgb(133, 189, 145); padding:15px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,7,"div",[["class","row"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,4,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"div",[["style","font-size:18px; padding:10px; color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Select Indicator Stream Source"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](11,0,null,null,39,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](13,0,null,null,36,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](15,0,null,null,33,"div",[["class","text-center"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](17,0,null,null,30,"form",[["class","form-inline"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(e,t,n){var i=!0;return"submit"===t&&(i=!1!==r["\u0275nov"](e,19).onSubmit(n)&&i),"reset"===t&&(i=!1!==r["\u0275nov"](e,19).onReset()&&i),i},null,null)),r["\u0275did"](18,16384,null,0,z["\u0275bf"],[],null,null),r["\u0275did"](19,4210688,null,0,z.NgForm,[[8,null],[8,null]],null,null),r["\u0275prd"](2048,null,z.ControlContainer,null,[z.NgForm]),r["\u0275did"](21,16384,null,0,z.NgControlStatusGroup,[z.ControlContainer],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](23,0,null,null,23,"div",[["class","row no-gutters"],["style","width:100%; color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](25,0,null,null,9,"label",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](27,0,null,null,6,"input",[["class","form-control"],["name","optradio"],["style","margin-right:5px;"],["type","radio"],["value","Indicator"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,28)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,28).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,28)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,28)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,29).onChange()&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,29).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.sourceType=n)&&i),i},null,null)),r["\u0275did"](28,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](29,212992,null,0,z.RadioControlValueAccessor,[r.Renderer2,r.ElementRef,z["\u0275i"],r.Injector],{name:[0,"name"],value:[1,"value"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z.RadioControlValueAccessor]),r["\u0275did"](31,671744,null,0,z.NgModel,[[2,z.ControlContainer],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](33,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["Indicator\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](36,0,null,null,9,"label",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](38,0,null,null,6,"input",[["class","form-control"],["name","optradio"],["style","margin-right:5px;"],["type","radio"],["value","Price"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,39)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,39).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,39)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,39)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,40).onChange()&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,40).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(l.sourceType=n)&&i),i},null,null)),r["\u0275did"](39,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](40,212992,null,0,z.RadioControlValueAccessor,[r.Renderer2,r.ElementRef,z["\u0275i"],r.Injector],{name:[0,"name"],value:[1,"value"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z.RadioControlValueAccessor]),r["\u0275did"](42,671744,null,0,z.NgModel,[[2,z.ControlContainer],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](44,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["Price\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](52,0,null,null,12,"div",[["class","row no-gutters"],["style","border: 3px solid rgb(133, 189, 145); border-radius: 5px; background:rgb(57, 65, 57); margin-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](54,0,null,null,9,"div",[["class","col-sm"],["style","padding:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,zr)),r["\u0275did"](58,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Gr)),r["\u0275did"](62,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](66,0,null,null,13,"div",[["class","row"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](68,0,null,null,10,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](70,0,null,null,7,"div",[["class","pull-right"],["style","margin-top:20px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](72,0,null,null,1,"button",[["class","btn"],["style","background: rgb(165, 211, 221); border: 1px solid rgb(133, 189, 145);"]],null,[[null,"click"]],function(e,t,n){var r=!0,i=e.component;return"click"===t&&(r=!1!==i.activeModal.close(i.source)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["Save"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](75,0,null,null,1,"button",[["class","btn"],["style","background: rgb(201, 139, 139); border: 1px solid rgb(133, 189, 145);"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.activeModal.dismiss("User Cancelled")&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["Cancel"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,29,0,"optradio","Indicator"),e(t,31,0,"optradio",n.sourceType),e(t,40,0,"optradio","Price"),e(t,42,0,"optradio",n.sourceType),e(t,58,0,"Price"==n.sourceType),e(t,62,0,"Indicator"==n.sourceType)},function(e,t){e(t,17,0,r["\u0275nov"](t,21).ngClassUntouched,r["\u0275nov"](t,21).ngClassTouched,r["\u0275nov"](t,21).ngClassPristine,r["\u0275nov"](t,21).ngClassDirty,r["\u0275nov"](t,21).ngClassValid,r["\u0275nov"](t,21).ngClassInvalid,r["\u0275nov"](t,21).ngClassPending),e(t,27,0,r["\u0275nov"](t,33).ngClassUntouched,r["\u0275nov"](t,33).ngClassTouched,r["\u0275nov"](t,33).ngClassPristine,r["\u0275nov"](t,33).ngClassDirty,r["\u0275nov"](t,33).ngClassValid,r["\u0275nov"](t,33).ngClassInvalid,r["\u0275nov"](t,33).ngClassPending),e(t,38,0,r["\u0275nov"](t,44).ngClassUntouched,r["\u0275nov"](t,44).ngClassTouched,r["\u0275nov"](t,44).ngClassPristine,r["\u0275nov"](t,44).ngClassDirty,r["\u0275nov"](t,44).ngClassValid,r["\u0275nov"](t,44).ngClassInvalid,r["\u0275nov"](t,44).ngClassPending)})}var Kr=r["\u0275ccf"]("app-stream-source",qn,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"app-stream-source",[],null,null,null,qr,Ur)),r["\u0275did"](1,114688,null,0,qn,[Jt],null,null)],function(e,t){e(t,1,0)},null)},{source:"source"},{},[]);class Zr{constructor(){this._groups=[]}addGroup(e){this._groups.push(e)}removeGroup(e){var t=this._groups.indexOf(e);t>-1&&this._groups.splice(t,1)}get groups(){return this._groups}set groups(e){this._groups=e}}class Yr{static valueToString(e){return e instanceof _t?e.indicator.streams&&e.indicator.streams.length>1&&e.stream?`${e.indicator.id}.${e.stream} (${e.parameters.keys().join(", ")})`:`value.indicator.id (${e.parameters.keys().join(", ")})`:e instanceof ft?e.priceType+" Price":"number"==e&&0==e?"0":e.toString()}static print(e){let t=e.left,n=e.right;return void 0==t||void 0==n?null:`${this.valueToString(t)} ${e.operator.displayName} ${this.valueToString(n)}`}static printShift(e){return void 0==e||0==e?"(Current)":1==e?"(Prior)":" (Shifted "+e.toString()+" bars back)"}}class Qr{constructor(){this.conditions=[]}}class Xr{constructor(e,t){this.modalService=e,this.groupService=t}addCondition(){const e=this.modalService.open(wr,{windowClass:"condition-editor"});e.componentInstance.tradeCondition=new br,e.result.then(e=>{e.description=Yr.print(e),this.group.conditions.push(e)},e=>{})}removeCondition(e){let t=this.group.conditions.indexOf(e);t>-1&&this.group.conditions.splice(t,1)}editCondition(e){const t=this.modalService.open(wr,{size:"lg",windowClass:"condition-editor"});t.componentInstance.tradeCondition=e.clone(),t.result.then(t=>{let n=t;n.description=Yr.print(n),this.removeCondition(e),this.group.conditions.push(n)},e=>{})}removeGroup(){this.groupService.removeGroup(this.group)}}var Jr=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function ei(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,14,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,11,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,8,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-pencil-square-o"],["style","color:rgb(104, 218, 253)"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.editCondition(e.context.$implicit)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](8,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-times"],["style","color:rgb(238, 142, 142)"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.removeCondition(e.context.$implicit)&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,1,"i",[["style","margin-left:5px; color:white;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](11,null,["",""])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,function(e,t){e(t,11,0,t.context.$implicit.description)})}function ti(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,35,"div",[["style","background:rgb(41, 46, 42); border: 3px solid rgb(28, 31, 28)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,15,"div",[["style","padding:3px; border-bottom: 2px solid rgb(34, 34, 34); background: rgb(33, 44, 38);"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,5,"input",[["class","pull-left"],["style","padding-left:3px; background:transparent; color:white; border:0px;"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var i=!0,l=e.component;return"input"===t&&(i=!1!==r["\u0275nov"](e,5)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,5).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,5)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,5)._compositionEnd(n.target.value)&&i),"ngModelChange"===t&&(i=!1!==(l.group.name=n)&&i),i},null,null)),r["\u0275did"](5,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.DefaultValueAccessor]),r["\u0275did"](7,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](9,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](11,0,null,null,3,"div",[["class","align-middle pull-right"],["style","display:inline-block"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.removeGroup()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](13,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-times fa-lg"],["style","color:rgb(238, 142, 142); padding-right: 5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,0,"div",[["class","clearfix"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](19,0,null,null,15,"div",[["style","padding:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,ei)),r["\u0275did"](22,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](24,0,null,null,9,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](26,0,null,null,6,"div",[],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.addCondition()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](28,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-plus"],["style","color:rgb(104, 218, 253); margin-left:2px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](30,0,null,null,1,"i",[["style","color:white; margin-left:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Add condition..."])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,7,0,n.group.name),e(t,22,0,n.group.conditions)},function(e,t){e(t,4,0,r["\u0275nov"](t,9).ngClassUntouched,r["\u0275nov"](t,9).ngClassTouched,r["\u0275nov"](t,9).ngClassPristine,r["\u0275nov"](t,9).ngClassDirty,r["\u0275nov"](t,9).ngClassValid,r["\u0275nov"](t,9).ngClassInvalid,r["\u0275nov"](t,9).ngClassPending)})}class ni{transform(e,t){return e&&t?e.filter(e=>e.type==t):e}}class ri{constructor(e,t){this.modalService=e,this.groupService=t}get groups(){return this.groupService.groups}get groupCount(){return this.groups.filter(e=>e.type===this.conditionType).length}addGroup(){const e=new Qr;e.type=this.conditionType,e.name=this.conditionType+"Group"+(this.groupCount+1),this.groupService.addGroup(e)}removeAllGroups(){this.groupService.groups.filter(e=>e.type===this.conditionType).forEach(e=>this.groupService.removeGroup(e))}removeGroup(e){this.groupService.removeGroup(e)}}var ii=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function li(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,4,"div",[["class","pull-left"],["style","margin-right:7px; margin-top:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,1,"app-condition-group",[],null,null,null,ti,Jr)),r["\u0275did"](5,49152,null,0,Xr,[nn,Zr],{group:[0,"group"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,5,0,t.context.$implicit)},null)}function oi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,6,"span",[["style","color:rgb(238, 142, 142); padding:5px;"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.removeAllGroups()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-times fa-lg"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,1,"i",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Remove All"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function si(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,4,"span",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,oi)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,3,0,t.context.ngIf.length>0)},null)}function ai(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,34,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,10,"div",[["class","row no-gutters"],["style","padding-top:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,7,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,2,null,li)),r["\u0275did"](7,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),r["\u0275pid"](0,ni,[]),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,0,"div",[["class","clearfix"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](14,0,null,null,19,"div",[["class","row no-gutters"],["style","margin-top:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,16,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](18,0,null,null,13,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](20,0,null,null,6,"span",[["style","color:rgb(133, 189, 145); padding:5px;"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.addGroup()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](22,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-plus fa-lg"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](24,0,null,null,1,"i",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Add Group"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,2,null,si)),r["\u0275did"](29,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),r["\u0275pid"](0,ni,[]),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,7,0,r["\u0275unv"](t,7,0,r["\u0275nov"](t,8).transform(n.groups,n.conditionType))),e(t,29,0,r["\u0275unv"](t,29,0,r["\u0275nov"](t,30).transform(n.groups,n.conditionType)))},null)}class ui{}var ci=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function di(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,4,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,1,"app-conditions-editor",[],null,null,null,ai,ii)),r["\u0275did"](5,49152,null,0,ri,[nn,Zr],{name:[0,"name"],conditionType:[1,"conditionType"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275eld"](9,0,null,null,7,"div",[["class","row no-gutters"],["style","margin-top:15px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](11,0,null,null,4,"div",[["class","col-sm-4"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](13,0,null,null,1,"div",[["style","color:gainsboro; font-size: 14px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Note that exit conditions are optional. Trades can be managed by\n exit conditions and/or stop and limit orders. Stops and limits are defaulted on the Options page."])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,5,0,n.name,n.conditionType)},null)}class hi{get error(){return this._error}get value(){return this._value}set value(e){this._value=e,this._error=void 0!=this._validate?this._validate(this._value):void 0}constructor(e,t,n,r,i){this.id=e,this.name=t,this.type=n,this._value=r,this._validate=i}}class fi{constructor(){this.defaultOptions={},this.options=[],this.options.push(new hi("StrategyName","Strategy Name","string","Strategy1")),this.defaultOptions.StrategyName="Strategy1";const e=new hi("LotSize","Lot Size","int",1);e.isParameter=!0,e.min=1,this.options.push(e),this.defaultOptions.LotSize=1;const t=new hi("AllowTrading","Allow Trading","boolean",!0);t.isParameter=!0,t.flag="core.FLAG_ALLOW_TRADE",this.options.push(t),this.defaultOptions.AllowTrading=!0;const n=new hi("CloseAndReverse","Close and Reverse","boolean",!0);n.isParameter=!0,this.options.push(n),this.defaultOptions.CloseAndReverse=!0;const r=new hi("MagicNumber","Magic Number","int",1);r.isParameter=!0,r.min=1,this.options.push(r),this.defaultOptions.MagicNumber=1;const i=new hi("StopLoss","Stop Loss","double",0);i.isParameter=!0,i.min=0,this.options.push(i),this.defaultOptions.StopLoss=0;const l=new hi("TrailStop","Trailing Stop","int",0,e=>{if(e<0||e>1&&e<10)return"Invalid stop value. Stop can be '1' for dynamic trailing and '10+' for fixed trailing"});l.isParameter=!0,l.min=0,this.options.push(l),this.defaultOptions.TrailStop=0;const o=new hi("TakeProfit","Take Profit","double",0);o.isParameter=!0,o.min=0,this.options.push(o),this.defaultOptions.TakeProfit=0}}class pi{constructor(e){this.optionsProvider=e,this.options=e.options}}var gi=r["\u0275crt"]({encapsulation:0,styles:[["td[_ngcontent-%COMP%]{border:none;padding:5px}th[_ngcontent-%COMP%]{text-align:center;border:none}table[_ngcontent-%COMP%]{border:none}"]],data:{}});function mi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,5,"input",[["class","form-control"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var i=!0;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"ngModelChange"===t&&(i=!1!==(e.parent.context.$implicit.value=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.DefaultValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,3,0,t.parent.context.$implicit.value)},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function vi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,6,"input",[["class","form-control"],["type","number"]],[[8,"min",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(e,t,n){var i=!0;return"input"===t&&(i=!1!==r["\u0275nov"](e,1)._handleInput(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"compositionstart"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionStart()&&i),"compositionend"===t&&(i=!1!==r["\u0275nov"](e,1)._compositionEnd(n.target.value)&&i),"change"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"input"===t&&(i=!1!==r["\u0275nov"](e,2).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,2).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(e.parent.context.$implicit.value=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.DefaultValueAccessor,[r.Renderer2,r.ElementRef,[2,z.COMPOSITION_BUFFER_MODE]],null,null),r["\u0275did"](2,16384,null,0,z["\u0275bc"],[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e,t){return[e,t]},[z.DefaultValueAccessor,z["\u0275bc"]]),r["\u0275did"](4,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](6,16384,null,0,z.NgControlStatus,[z.NgControl],null,null)],function(e,t){e(t,4,0,t.parent.context.$implicit.value)},function(e,t){e(t,0,0,t.parent.context.$implicit.min,r["\u0275nov"](t,6).ngClassUntouched,r["\u0275nov"](t,6).ngClassTouched,r["\u0275nov"](t,6).ngClassPristine,r["\u0275nov"](t,6).ngClassDirty,r["\u0275nov"](t,6).ngClassValid,r["\u0275nov"](t,6).ngClassInvalid,r["\u0275nov"](t,6).ngClassPending)})}function yi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,16,"select",[["class","custom-select"],["style","width:100%;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(e,t,n){var i=!0;return"change"===t&&(i=!1!==r["\u0275nov"](e,1).onChange(n.target.value)&&i),"blur"===t&&(i=!1!==r["\u0275nov"](e,1).onTouched()&&i),"ngModelChange"===t&&(i=!1!==(e.parent.context.$implicit.value=n)&&i),i},null,null)),r["\u0275did"](1,16384,null,0,z.SelectControlValueAccessor,[r.Renderer2,r.ElementRef],null,null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[z.SelectControlValueAccessor]),r["\u0275did"](3,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](5,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](7,0,null,null,3,"option",[["value","true"]],null,null,null,null,null)),r["\u0275did"](8,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{value:[0,"value"]},null),r["\u0275did"](9,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),(e()(),r["\u0275ted"](-1,null,["Yes"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,3,"option",[["value","false"]],null,null,null,null,null)),r["\u0275did"](13,147456,null,0,z.NgSelectOption,[r.ElementRef,r.Renderer2,[2,z.SelectControlValueAccessor]],{value:[0,"value"]},null),r["\u0275did"](14,147456,null,0,z["\u0275q"],[r.ElementRef,r.Renderer2,[8,null]],{value:[0,"value"]},null),(e()(),r["\u0275ted"](-1,null,["No"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,3,0,t.parent.context.$implicit.value),e(t,8,0,"true"),e(t,9,0,"true"),e(t,13,0,"false"),e(t,14,0,"false")},function(e,t){e(t,0,0,r["\u0275nov"](t,5).ngClassUntouched,r["\u0275nov"](t,5).ngClassTouched,r["\u0275nov"](t,5).ngClassPristine,r["\u0275nov"](t,5).ngClassDirty,r["\u0275nov"](t,5).ngClassValid,r["\u0275nov"](t,5).ngClassInvalid,r["\u0275nov"](t,5).ngClassPending)})}function bi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"label",[["style","margin-top: 3px; color:rgb(238, 142, 142)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](1,null,["",""]))],null,function(e,t){e(t,1,0,t.parent.context.$implicit.error)})}function wi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,19,"tr",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,1,"td",[],null,null,null,null,null)),(e()(),r["\u0275ted"](3,null,["",""])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,13,"td",[["style","width:300px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,mi)),r["\u0275did"](8,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,vi)),r["\u0275did"](11,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,yi)),r["\u0275did"](14,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,bi)),r["\u0275did"](17,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,8,0,"string"==t.context.$implicit.type),e(t,11,0,"double"==t.context.$implicit.type||"int"==t.context.$implicit.type),e(t,14,0,"boolean"==t.context.$implicit.type),e(t,17,0,t.context.$implicit.error)},function(e,t){e(t,3,0,t.context.$implicit.name)})}function Ci(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,25,"div",[["class","row no-gutters"],["style","padding:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,22,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,17,"div",[["class","pull-left"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,14,"table",[["class","table table-sm"],["style","color:white; margin-top:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](8,0,null,null,12,"tbody",[],null,null,null,null,null)),(e()(),r["\u0275eld"](9,0,null,null,7,"tr",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](11,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Option"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](14,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Value"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,wi)),r["\u0275did"](19,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](23,0,null,null,0,"div",[["class","clearfix"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){e(t,19,0,t.component.options)},null)}var _i=n("zK+N"),xi=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function Si(e){return r["\u0275vid"](0,[r["\u0275qud"](402653184,1,{host:0}),(e()(),r["\u0275eld"](1,0,[[1,0],["host",1]],null,0,"textarea",[],null,null,null,null,null))],null,null)}class Ei{}class Ti{constructor(e,t,n){this.groupService=e,this.builder=t,this.optionsProvider=n}build(){return this.builder.build(this.groupService.groups,this.optionsProvider.options)}}var Mi=n("lDdF");class Oi{constructor(e,t){this.optionsProvider=e,this.builder=t,this.config={value:null,mode:"lua",readOnly:!0,theme:"dracula",lineNumbers:!0,viewportMargin:1/0}}get hideTestWarning(){return localStorage.hideTestWarning}set hideTestWarning(e){localStorage.hideTestWarning=e}ngOnInit(){let e=this.optionsProvider.options.filter(e=>void 0!=e.error);if(this.isValid=e.length<1,!this.isValid)return this.error="

Unable to compile strategy due to invalid strategy options:",e.forEach(e=>{this.error+=`

Option Name: '${e.name}'
Error: ${e.error}`}),void(this.error+="

");try{this.result=this.builder.build()}catch(e){console.log(`${JSON.stringify(e)} at ${console.trace()}`),this.isValid=!1,this.error=`

${e.message}

`}}export(){this.hideTestWarning=!0,Object(Mi.saveAs)(new File([this.result.code],`${this.result.name}.lua`))}}var ki=r["\u0275crt"]({encapsulation:0,styles:[["button[_ngcontent-%COMP%]{font-weight:400;border:1px solid #fff;border-radius:3px;background:#85bd91;color:#1a1a1a;padding:3px 15px}"]],data:{}});function Ai(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,12,"div",[["style","padding:5px; color:rgb(238, 142, 142);"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,9,"p",[["class","text-center"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-exclamation-circle fa-lg"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n It is expected that you test and validate your strategy. Consider using a demo account. FXCM demo accounts are\n free and easy to create here:\n "])),(e()(),r["\u0275eld"](6,0,null,null,1,"a",[["href","https://www.fxcm.com/uk/forex-trading-demo/"],["style","color: rgb(119, 216, 245)"],["target","_blank"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["FXCM TS\n Demo Account"])),(e()(),r["\u0275ted"](-1,null,[". By exporting\n this strategy you acknowledge this reponsibility. For more information, please contact us at\n "])),(e()(),r["\u0275eld"](9,0,null,null,1,"a",[["href","mailto:info@fxengineer.com"],["style","color: rgb(119, 216, 245)"],["target","_blank"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["info@fxengineer.com"])),(e()(),r["\u0275ted"](-1,null,[".\n Thank you!"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function Di(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,17,"div",[["style","margin:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ai)),r["\u0275did"](3,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,4,"div",[["style","padding-top:5px; padding-bottom:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](7,0,null,null,1,"button",[],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.export()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["Export Strategy"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](11,0,null,null,5,"codemirror",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"]],function(e,t,n){var r=!0;return"ngModelChange"===t&&(r=!1!==(e.component.result.code=n)&&r),r},Si,xi)),r["\u0275did"](12,4374528,null,0,_i.CodemirrorComponent,[],{config:[0,"config"]},null),r["\u0275prd"](1024,null,z.NG_VALUE_ACCESSOR,function(e){return[e]},[_i.CodemirrorComponent]),r["\u0275did"](14,671744,null,0,z.NgModel,[[8,null],[8,null],[8,null],[2,z.NG_VALUE_ACCESSOR]],{model:[0,"model"]},{update:"ngModelChange"}),r["\u0275prd"](2048,null,z.NgControl,null,[z.NgModel]),r["\u0275did"](16,16384,null,0,z.NgControlStatus,[z.NgControl],null,null),(e()(),r["\u0275ted"](-1,null,["\n"]))],function(e,t){var n=t.component;e(t,3,0,!n.hideTestWarning),e(t,12,0,n.config),e(t,14,0,n.result.code)},function(e,t){e(t,11,0,r["\u0275nov"](t,16).ngClassUntouched,r["\u0275nov"](t,16).ngClassTouched,r["\u0275nov"](t,16).ngClassPristine,r["\u0275nov"](t,16).ngClassDirty,r["\u0275nov"](t,16).ngClassValid,r["\u0275nov"](t,16).ngClassInvalid,r["\u0275nov"](t,16).ngClassPending)})}function Ni(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,3,"div",[["style","padding:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,0,"div",[["style","color:rgb(238, 142, 142)"]],[[8,"innerHTML",1]],null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n"]))],null,function(e,t){e(t,2,0,t.component.error)})}function Ri(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](16777216,null,null,1,null,Di)),r["\u0275did"](1,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275and"](16777216,null,null,1,null,Ni)),r["\u0275did"](4,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,1,0,n.isValid),e(t,4,0,!n.isValid)},null)}var Ii=r["\u0275crt"]({encapsulation:2,styles:[],data:{}});function Pi(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](0,null,null,0))],null,null)}function Vi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,7,"li",[["class","nav-item"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](2,0,null,null,4,"a",[["class","nav-link"],["href",""],["role","tab"]],[[8,"id",0],[2,"active",null],[2,"disabled",null],[1,"tabindex",0],[1,"aria-controls",0],[1,"aria-expanded",0],[1,"aria-disabled",0]],[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=0!=!!e.component.select(e.context.$implicit.id)&&r),r},null,null)),(e()(),r["\u0275ted"](3,null,["\n ",""])),(e()(),r["\u0275and"](16777216,null,null,1,null,Pi)),r["\u0275did"](5,540672,null,0,o.NgTemplateOutlet,[r.ViewContainerRef],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,5,0,null==t.context.$implicit.titleTpl?null:t.context.$implicit.titleTpl.templateRef)},function(e,t){var n=t.component;e(t,2,0,t.context.$implicit.id,t.context.$implicit.id===n.activeId,t.context.$implicit.disabled,t.context.$implicit.disabled?"-1":void 0,n.destroyOnHide&&t.context.$implicit.id!==n.activeId?null:t.context.$implicit.id+"-panel",t.context.$implicit.id===n.activeId,t.context.$implicit.disabled),e(t,3,0,t.context.$implicit.title)})}function Li(e){return r["\u0275vid"](0,[(e()(),r["\u0275and"](0,null,null,0))],null,null)}function Fi(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,4,"div",[["role","tabpanel"]],[[8,"className",0],[1,"aria-labelledby",0],[8,"id",0],[1,"aria-expanded",0]],null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Li)),r["\u0275did"](3,540672,null,0,o.NgTemplateOutlet,[r.ViewContainerRef],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,3,0,null==t.parent.context.$implicit.contentTpl?null:t.parent.context.$implicit.contentTpl.templateRef)},function(e,t){var n=t.component;e(t,0,0,r["\u0275inlineInterpolate"](1,"tab-pane ",t.parent.context.$implicit.id===n.activeId?"active":null,""),t.parent.context.$implicit.id,r["\u0275inlineInterpolate"](1,"",t.parent.context.$implicit.id,"-panel"),t.parent.context.$implicit.id===n.activeId)})}function $i(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Fi)),r["\u0275did"](2,16384,null,0,o.NgIf,[r.ViewContainerRef,r.TemplateRef],{ngIf:[0,"ngIf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,2,0,!n.destroyOnHide||t.context.$implicit.id===n.activeId)},null)}function ji(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,4,"ul",[["role","tablist"]],[[8,"className",0]],null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,Vi)),r["\u0275did"](4,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](7,0,null,null,4,"div",[["class","tab-content"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](16777216,null,null,1,null,$i)),r["\u0275did"](10,802816,null,0,o.NgForOf,[r.ViewContainerRef,r.TemplateRef,r.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){var n=t.component;e(t,4,0,n.tabs),e(t,10,0,n.tabs)},function(e,t){var n=t.component;e(t,1,0,"nav nav-"+n.type+("horizontal"==n.orientation?" "+n.justifyClass:" flex-column"))})}class Hi{}class Wi{constructor(e,t){this.optionsProvider=e,this.indicatorProvider=t}deserialize(e){const t=new Hi,n=JSON.parse(e);return t.groups=this.getConditionGroups(n),t.options=this.getOptions(n),t}getOptions(e){const t=this.optionsProvider.options;if(void 0!==e.options)for(const n of e.options){const e=t.find(e=>e.id===n.id);void 0!==e&&(e.value=n._value)}return t}getConditionGroups(e){const t=[];if(void 0!==e.groups){for(const n of e.groups){const e=new Qr;e.name=n.name,e.type=n.type;for(const t of n.conditions){const n=new br;n.left=this.getConditionValue(t.left,"Price"),n.operator=yr.all.find(e=>e.id===t.operator.id),n.right=this.getConditionValue(t.right,"Indicator"),n.description=Yr.print(n),e.conditions.push(n)}t.push(e)}return t}}getConditionValue(e,t){const n=new cr(t),r=e._value,i=r.type_;if("IndicatorValueSource"===i)n.value=this.getIndicatorValueSource(r);else if("TickValueSource"===i){const e=new ft;Object.assign(e,r),n.value=e}else n.value=r;return n}getIndicatorValueSource(e){const t=new _t;t.indicator=this.indicatorProvider.indicators[e._indicator.id],t.parameters=e.parameters,t.shift=e.shift,t.stream=e.stream;const n=e.source_;if("IndicatorStreamSource"===n.type_){const e=new Ct;e.indicator=this.indicatorProvider.indicators[n._indicator.id],e.parameters=n.parameters,e.stream=n.stream,e.source=this.getPriceBasedSource(n.source_),t.source=e}else t.source=this.getPriceBasedSource(n);return t}getPriceBasedSource(e){if("TickStreamSource"===e.type_){const t=new ht;return Object.assign(t,e),t}if("BarStreamSource"===e.type_){const t=new Kn;return Object.assign(t,e),t}}}class Bi{constructor(e,t,n,r){this.groupService=e,this.builder=t,this.optionsProvider=n,this.strategySerializer=r}clear(){this.groupService.groups=[];for(const e of this.optionsProvider.options)e.value=this.optionsProvider.defaultOptions[e.id]}load(e){const t=this.strategySerializer.deserialize(e);void 0!==t&&void 0!==t.groups&&t.groups.length>0&&void 0!==t.options&&(this.groupService.groups=t.groups,this.optionsProvider.options=t.options)}save(){const e=this.groupService.groups;if(e.length<1)return;const t=this.optionsProvider.options,n=`${t.find(e=>"StrategyName"===e.id).value}.json`;console.log(`Saving to strategy definition file: ${n}`);const r=new Hi;r.groups=e,r.options=t;const i=JSON.stringify(r);Object(Mi.saveAs)(new File([i],n))}}class Ui{constructor(e){this.strategyDataContext=e}save(){this.strategyDataContext.save()}clear(){this.strategyDataContext.clear()}load(){const e=this.input.nativeElement.files;if(void 0!==e&&1===e.length){const t=e[0];console.log(`Loading ${t.name}`),t.text().then(e=>{console.log(`Content: ${e}`);try{this.strategyDataContext.load(e),this.input.nativeElement.value=null}catch(e){console.error(`Error parsing strategy file: ${e}`)}})}}}var zi=r["\u0275crt"]({encapsulation:0,styles:[["a[_ngcontent-%COMP%]{color:#8eaaff;font-weight:700}.tab-title[_ngcontent-%COMP%]{color:#85bd91}.strategy-editor-button[_ngcontent-%COMP%]{color:#85bd91;padding-right:4px}.strategy-editor-button[_ngcontent-%COMP%]:hover{color:#77d8f5}"]],data:{}});function Gi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Buy"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function qi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-conditions-editor",[["Name","Buy Conditions"],["conditionType","Buy"]],null,null,null,ai,ii)),r["\u0275did"](2,49152,null,0,ri,[nn,Zr],{conditionType:[0,"conditionType"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,"Buy")},null)}function Ki(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Sell"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function Zi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-conditions-editor",[["Name","Sell Conditions"],["conditionType","Sell"]],null,null,null,ai,ii)),r["\u0275did"](2,49152,null,0,ri,[nn,Zr],{conditionType:[0,"conditionType"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,"Sell")},null)}function Yi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Exit Buy"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function Qi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-exit-conditions-editor",[["conditionType","ExitBuy"],["name","Exit Buy Conditions"]],null,null,null,di,ci)),r["\u0275did"](2,49152,null,0,ui,[],{name:[0,"name"],conditionType:[1,"conditionType"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,"Exit Buy Conditions","ExitBuy")},null)}function Xi(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Exit Sell"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function Ji(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-exit-conditions-editor",[["conditionType","ExitSell"],["name","Exit Sell Conditions"]],null,null,null,di,ci)),r["\u0275did"](2,49152,null,0,ui,[],{name:[0,"name"],conditionType:[1,"conditionType"]},null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0,"Exit Sell Conditions","ExitSell")},null)}function el(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Options"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function tl(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-strategy-options",[["name","Options"]],null,null,null,Ci,gi)),r["\u0275did"](2,49152,null,0,pi,[fi],null,null),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function nl(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"div",[["class","tab-title"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Code"])),(e()(),r["\u0275ted"](-1,null,["\n "]))],null,null)}function rl(e){return r["\u0275vid"](0,[(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](1,0,null,null,1,"app-strategy-result",[],null,null,null,Ri,ki)),r["\u0275did"](2,114688,null,0,Oi,[fi,Ti],null,null),(e()(),r["\u0275ted"](-1,null,["\n "]))],function(e,t){e(t,2,0)},null)}function il(e){return r["\u0275vid"](0,[r["\u0275qud"](402653184,1,{input:0}),(e()(),r["\u0275eld"](1,0,null,null,104,"div",[["style","padding-top:10px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](3,0,null,null,18,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](5,0,null,null,15,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](7,0,null,null,1,"div",[["style","font-size: 20px; font-family: Verdana; font-weight: bold; color: rgb(133, 189, 145); padding-bottom:7px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n Strategy\n Editor\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](10,0,null,null,9,"div",[["style","margin-top: 5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](12,0,null,null,0,"i",[["aria-hidden","true"],["class","strategy-editor-button fa fa-floppy-o fa-lg"],["data-toggle","tooltip"],["title","Save strategy"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.save()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](14,0,null,null,0,"i",[["aria-hidden","true"],["class","strategy-editor-button fa fa-upload fa-lg"],["data-toggle","tooltip"],["title","Upload strategy from file"]],null,[[null,"click"]],function(e,t,n){var i=!0;return"click"===t&&(i=!1!==r["\u0275nov"](e,18).click()&&i),i},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,0,"i",[["aria-hidden","true"],["class","strategy-editor-button fa fa-trash-o fa-lg"],["data-toggle","tooltip"],["title","Clear current strategy"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.clear()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](18,0,[[1,0],["strategyFileInput",1]],null,0,"input",[["accept","application/json"],["class","form-control"],["style","height: 0px; visibility: hidden"],["type","file"]],null,[[null,"change"]],function(e,t,n){var r=!0;return"change"===t&&(r=!1!==e.component.load()&&r),r},null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](23,0,null,null,81,"div",[["class","row no-gutters"],["style","padding-top:5px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](25,0,null,null,78,"div",[["class","col-sm"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](27,0,null,null,75,"ngb-tabset",[],null,null,null,ji,Ii)),r["\u0275did"](28,2146304,null,1,yn,[fn],null,null),r["\u0275qud"](603979776,2,{tabs:1}),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](31,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](32,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,3,{titleTpls:1}),r["\u0275qud"](603979776,4,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Gi)),r["\u0275did"](37,16384,[[3,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,qi)),r["\u0275did"](40,16384,[[4,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](43,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](44,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,5,{titleTpls:1}),r["\u0275qud"](603979776,6,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Ki)),r["\u0275did"](49,16384,[[5,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Zi)),r["\u0275did"](52,16384,[[6,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](55,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](56,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,7,{titleTpls:1}),r["\u0275qud"](603979776,8,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Yi)),r["\u0275did"](61,16384,[[7,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Qi)),r["\u0275did"](64,16384,[[8,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](67,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](68,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,9,{titleTpls:1}),r["\u0275qud"](603979776,10,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Xi)),r["\u0275did"](73,16384,[[9,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,Ji)),r["\u0275did"](76,16384,[[10,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](79,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](80,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,11,{titleTpls:1}),r["\u0275qud"](603979776,12,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,el)),r["\u0275did"](85,16384,[[11,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,tl)),r["\u0275did"](88,16384,[[12,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](91,0,null,null,10,"ngb-tab",[],null,null,null,null,null)),r["\u0275did"](92,2113536,[[2,4]],2,vn,[],null,null),r["\u0275qud"](603979776,13,{titleTpls:1}),r["\u0275qud"](603979776,14,{contentTpls:1}),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,nl)),r["\u0275did"](97,16384,[[13,4]],0,gn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275and"](0,null,null,1,null,rl)),r["\u0275did"](100,16384,[[14,4]],0,mn,[r.TemplateRef],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n"])),(e()(),r["\u0275ted"](-1,null,["\n"]))],null,null)}var ll=r["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}});function ol(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,53,"div",[["style","background: rgb(44, 44, 44)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](2,0,null,null,10,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](4,0,null,null,7,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](6,0,null,null,4,"div",[["style","background:linear-gradient(rgb(26, 26, 26), rgb(44,44,44), rgb(26, 26, 26)); padding: 20px;"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](8,0,null,null,1,"div",[["class","text-uppercase"],["style","font-size: 32px; color: rgb(119, 216, 245); font-family: Verdana; font-weight: bold"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["FXCM Trading\n Station Strategy Builder"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](14,0,null,null,10,"div",[["class","container-fluid"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](16,0,null,null,7,"div",[["class","row no-gutters"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](18,0,null,null,4,"div",[["class","col"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](20,0,null,null,1,"app-strategy-editor",[],null,null,null,il,zi)),r["\u0275did"](21,49152,null,0,Ui,[Bi],null,null),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n\n "])),(e()(),r["\u0275eld"](26,0,null,null,26,"footer",[["class","footer"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](28,0,null,null,0,"hr",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](30,0,null,null,21,"div",[["class","footer-content"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](32,0,null,null,7,"div",[],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n Copyright \xa9 2015-2020 FXE Software, LLC |\n "])),(e()(),r["\u0275eld"](34,0,null,null,1,"a",[["href","mailto:info@fxengineer.com"],["style","color: rgb(119, 216, 245)"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["info@fxengineer.com"])),(e()(),r["\u0275ted"](-1,null,[" |\n "])),(e()(),r["\u0275eld"](37,0,null,null,1,"a",[["href","https://www.fxengineer.com"],["style","color: rgb(133, 189, 145)"],["target","_blank"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["fxengineer.com"])),(e()(),r["\u0275ted"](39,null,[" |\n v","\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](41,0,null,null,6,"div",[],null,null,null,null,null)),(e()(),r["\u0275eld"](42,0,null,null,1,"a",[["href","https://storage.googleapis.com/fxengineer/docs/PrivacyPolicy.pdf"],["target","_blank"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Privacy Policy"])),(e()(),r["\u0275ted"](-1,null,["\n | "])),(e()(),r["\u0275eld"](45,0,null,null,1,"a",[["href","https://storage.googleapis.com/fxengineer/docs/TermsOfUse.pdf"],["target","_blank"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["Terms of Use"])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275eld"](49,0,null,null,1,"div",[["class","disclaimer"]],null,null,null,null,null)),(e()(),r["\u0275ted"](-1,null,["\n Foreign exchange and CFD trading carry a high level of risk that may not be suitable for all investors. Leverage\n creates\n additional risk and loss exposure. Before you decide to trade foreign exchange or CFDs, carefully consider your\n investment\n objectives, experience level, and risk tolerance. Your losses could exceed your initital deposit; do not invest\n money\n that you cannot afford to lose. Educate yourself on the risks associated with foreign exchange and CFD trading,\n and\n seek advice from an independent financial or tax advisor if you have any questions. Any data and information is\n provided\n 'as is' solely for informational purposes, and is not intended for trading purposes or advice.\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n "])),(e()(),r["\u0275ted"](-1,null,["\n"])),(e()(),r["\u0275ted"](-1,null,["\n"]))],null,function(e,t){e(t,39,0,t.component.build)})}var sl=r["\u0275ccf"]("app-root",l,function(e){return r["\u0275vid"](0,[(e()(),r["\u0275eld"](0,0,null,null,1,"app-root",[],null,null,null,ol,ll)),r["\u0275did"](1,49152,null,0,l,[],null,null)],null,null)},{},{},[]),al=n("kLMJ");class ul{constructor(e,t,n,r,i){this.id=e,this.name=t,this.indicator=n,this.parameters=r,this.source=i}}class cl{static getStreamSourceId(e){return`${e.indicator.id}-${e.parameters?JSON.stringify(e.parameters):""}`}static getIndicatorSourceKey(e){if(e&&e.indicator&&e.indicator.id)return e.source instanceof Ct?`${this.getStreamSourceId(e)}-${this.getIndicatorSourceKey(e.source)}`:`${this.getStreamSourceId(e)}-${e.source.priceType}`}}class dl{}dl.buy="Buy",dl.sell="Sell",dl.exitBuy="ExitBuy",dl.exitSell="ExitSell";class hl{constructor(e){this.name=e}}class fl{constructor(e,t){this.source=e,this.stream=t}}class pl{static createIndicatorInstance(e,t,n){let r;return n.source instanceof Ct?r=new fl(this.createIndicatorInstance(`${e}.${n.source.indicator.id}`,`${t}_${n.source.indicator.id}`,n.source),n.source.stream):n.source instanceof Kn?r=new fl(new hl("source")):n.source instanceof ht&&(r=new fl(new hl("source"),n.source.priceType.toLowerCase())),new ul(e,t,n.indicator,n.parameters,r)}static getIndicatorLocals(e){let t=[];return Object.keys(e).forEach(n=>{let r,i=e[n],l=0,o=!1;do{r=i.indicator.id,l>0&&(r+=l.toString()),t[r]||(t[r]={source:i,id:n},o=!0),l++}while(!o)}),t}static getIndicators(e){let t={};for(let r=0;rthis.createIndicatorInstance(n[e].id,e,n[e].source))}}class gl{get customTextPrefix(){return"'FXES_EXTB'"}getExitConditionTemplate(e,t){let n=this.getSideLongName(e).toUpperCase();return`\n -- ${n} EXIT CONDITION \n if allowTrading and HasTrade('${e}') then\n if ${t} then\n core.host:trace("${n} exit condition met. Condition: '${t}'")\n ExtSignal(source, period, 'Exit ${n} Signal Created', soundFile, email, recurrentSound)\n MarketCloseAll('${e}')\n end\n end\n `}getEntryConditionTemplate(e,t){let n=this.getSideLongName(e).toUpperCase();return`\n -- ${n} ENTRY CONDITION\n if ${t} then\n\n core.host:trace("${n} condition met. Condition: '${t}'")\n ExtSignal(source, period, '${n} Signal Created', soundFile, email, recurrentSound)\n\n if allowTrading and not HasTrade('${e}') then\n local hasOtherSide = HasTrade('${this.getOpposingSide(e)}')\n if not hasOtherSide or closeAndReverse then\n if hasOtherSide then\n core.host:trace('Closing opposite side (${this.getSideLongName(this.getOpposingSide(e)).toUpperCase()})')\n MarketCloseAll('${this.getOpposingSide(e)}')\n end\n core.host:trace('Entering new trade ${n} trade')\n CreateMarketOrder('${e}')\n end\n end\n end\n `}compile(e){return`\n function Init()\n strategy:name(${e.STRATEGY_NAME});\n strategy:description(${e.STRATEGY_NAME});\n strategy:type(core.Both)\n\n strategy.parameters:addGroup('Indicator Parameters')\n strategy.parameters:addString('TimeFrame', 'TimeFrame', 'TimeFrame', 'm15')\n strategy.parameters:setFlag('TimeFrame', core.FLAG_PERIODS)\n ${e.INDICATOR_PARAMETERS}\n\n strategy.parameters:addGroup("Trading Parameters")\n strategy.parameters:addString('Account', 'Account', 'Account', '')\n strategy.parameters:setFlag('Account', core.FLAG_ACCOUNT)\n ${e.STRATEGY_OPTIONS}\n\n ${this.getAlertParameters()}\n end\n\n local source\n local accountId\n local offerId\n local stopLoss\n local trailStop\n local takeProfit\n local lotSize\n local customText\n local soundFile\n local email\n local recurrentSound\n local canClose\n local allowTrading\n local closeAndReverse\n ${e.STRATEGY_LOCALS}\n\n function Prepare(onlyName)\n source = ExtSubscribe(1, instance.bid:instrument(), instance.parameters['TimeFrame'], true, "bar")\n offerId = core.host:findTable('offers'):find('Instrument', instance.bid:instrument()).OfferID\n accountId = instance.parameters['Account']\n stopLoss = instance.parameters['StopLoss']\n trailStop = instance.parameters['TrailStop']\n takeProfit = instance.parameters['TakeProfit']\n allowTrading = instance.parameters['AllowTrading']\n closeAndReverse = instance.parameters['CloseAndReverse']\n lotSize = instance.parameters['LotSize'] * core.host:execute('getTradingProperty', 'baseUnitSize', instance.bid:instrument(), accountId)\n canClose = core.host:execute("getTradingProperty", "canCreateMarketClose", instance.bid:instrument(), accountId)\n customText = string.format('%s-%s-%d', ${this.customTextPrefix}, ${e.STRATEGY_NAME}, instance.parameters['MagicNumber'])\n instance:name(string.format('%s-%s-%d', ${e.STRATEGY_NAME}, instance.bid:instrument(), instance.parameters['MagicNumber']))\n\n if instance.parameters['PlaySound'] then\n soundFile = instance.parameters['SoundFile']\n recurrentSound = instance.parameters['RecurrentSound']\n end\n\n if instance.parameters['SendEmail'] then\n email = instance.parameters['Email']\n end\n\n local alertName = string.format("%s-%s-%d:", ${e.STRATEGY_NAME}, instance.bid:instrument(), instance.parameters['MagicNumber']);\n ExtSetupSignal(alertName, instance.parameters['ShowAlert'])\n ExtSetupSignalMail(alertName)\n\n ${e.STRATEGY_PREPARATION}\n end\n\n function ExtUpdate(id, source, period)\n if id == 1 then\n ${e.INDICATOR_UPDATES}\n\n ${e.LOG_INDICATOR_DATA}\n \n ${e.TRADE_CONDITIONS}\n end\n end\n\n ${this.getFunctions()}\n dofile(core.app_path() .. '\\\\strategies\\\\standard\\\\include\\\\helper.lua')\n `}getOpposingSide(e){return"B"==e?"S":"S"==e?"B":void 0}getSideLongName(e){return"B"==e?"Buy":"S"==e?"Sell":void 0}getAlertParameters(){return"\n strategy.parameters:addGroup('Alert Parameters')\n strategy.parameters:addBoolean('ShowAlert', 'ShowAlert', '', false)\n strategy.parameters:addBoolean('PlaySound', 'PlaySound', '', false)\n strategy.parameters:addBoolean('RecurrentSound', 'RecurrentSound', '', false)\n strategy.parameters:addFile('SoundFile', 'SoundFile', '', '')\n strategy.parameters:setFlag('SoundFile', core.FLAG_SOUND)\n strategy.parameters:addBoolean('SendEmail', 'SendEmail', '', false)\n strategy.parameters:addString('Email', 'Email', 'Email', '')\n strategy.parameters:setFlag('Email', core.FLAG_EMAIL)\n "}getFunctions(){return'\n function HasTrade(side)\n local enum, row\n\n enum = core.host:findTable("trades"):enumerator()\n row = enum:next()\n\n while row ~= nil do\n if accountId == row.AccountID and offerId == row.OfferID and customText == row.QTXT and (side == nil or side == row.BS) then\n return true\n end\n row = enum:next()\n end\n\n return false\n end\n\n function GetMarketOrderRequest(side)\n local valuemap = core.valuemap()\n\n valuemap.Command = "CreateOrder"\n valuemap.OrderType = "OM"\n valuemap.OfferID = offerId\n valuemap.AcctID = accountId\n valuemap.Quantity = lotSize\n valuemap.BuySell = side\n valuemap.CustomID = customText\n\n if takeProfit > 0 then\n valuemap.PegTypeLimit = "M"\n if side == \'B\' then\n valuemap.PegPriceOffsetPipsLimit = takeProfit\n else\n valuemap.PegPriceOffsetPipsLimit = -takeProfit\n end\n end\n\n if stopLoss > 0 then\n valuemap.PegTypeStop = "M"\n if side == \'B\' then\n valuemap.PegPriceOffsetPipsStop = -stopLoss\n else\n valuemap.PegPriceOffsetPipsStop = stopLoss\n end\n \n if trailStop > 0 then\n valuemap.TrailStepStop = trailStop\n end\n end\n\n if not canClose and (takeProfit > 0 or stopLoss > 0) then\n valuemap.EntryLimitStop = \'Y\'\n end\n\n return valuemap\n end\n\n function CreateMarketOrder(side)\n local success, msg = terminal:execute(100, GetMarketOrderRequest(side))\n if not success then\n core.host:trace("Create market order failed due to: " .. tostring(msg))\n end\n end\n\n function MarketCloseAll(side)\n local enum, row\n enum = core.host:findTable("trades"):enumerator()\n row = enum:next()\n while row ~= nil do\n if accountId == row.AccountID and offerId == row.OfferID and customText == row.QTXT and (side == nil or side == row.BS) then\n local success, msg = terminal:execute(100, GetMarketCloseRequest(row))\n if not success then\n core.host:trace("Market close failed due to: " .. tostring(msg))\n end\n end\n row = enum:next()\n end\n end\n\n function GetMarketCloseRequest(row)\n local valuemap = core.valuemap()\n valuemap.Command = "CreateOrder"\n valuemap.OrderType = "CM"\n valuemap.OfferID = row.OfferID\n valuemap.AcctID = row.AccountID\n valuemap.Quantity = row.Lot\n valuemap.TradeID = row.TradeID\n valuemap.CustomID = customText\n if row.BS == \'B\' then\n valuemap.BuySell = \'S\'\n else\n valuemap.BuySell = \'B\'\n end\n return valuemap\n end\n '}}var ml=n("iSzp");class vl{}class yl{constructor(e,t){this.name=e,this.code=t}}class bl{constructor(){this.templates=new gl}build(e,t){if((e.length>0?e.map(e=>e.conditions.length).reduce((e,t)=>e+t):0)<1)throw Error("At least one Buy or Sell condition must exist.");const n=new vl,r=pl.getIndicators(e),i=t.find(e=>"StrategyName"==e.id).value;n.STRATEGY_NAME=`'${i}'`,n.STRATEGY_OPTIONS=this.getStrategyOptionsTemplateSection(t),n.INDICATOR_PARAMETERS=this.getIndicatorParameterTemplateSection(r),n.STRATEGY_LOCALS=this.getIndicatorLocalsTemplateSection(r),n.STRATEGY_PREPARATION=this.getStrategyPreparationTemplateSection(r),n.INDICATOR_UPDATES=this.getIndicatorUpdateTemplateSection(r),n.LOG_INDICATOR_DATA=this.getLogIndicatorValuesTemplateSection(r);const l=e.filter(e=>e.type==dl.exitBuy&&e.conditions.length>0),o=e.filter(e=>e.type==dl.exitSell&&e.conditions.length>0),s=e.filter(e=>e.type==dl.buy&&e.conditions.length>0),a=e.filter(e=>e.type==dl.sell&&e.conditions.length>0);n.TRADE_CONDITIONS="",l.length>0&&(n.TRADE_CONDITIONS+=this.templates.getExitConditionTemplate("B",this.getTradeConditionExpression(r,l))+" "),o.length>0&&(n.TRADE_CONDITIONS+=this.templates.getExitConditionTemplate("S",this.getTradeConditionExpression(r,o))+" "),s.length>0&&(n.TRADE_CONDITIONS+=this.templates.getEntryConditionTemplate("B",this.getTradeConditionExpression(r,s))+" "),a.length>0&&(n.TRADE_CONDITIONS+=this.templates.getEntryConditionTemplate("S",this.getTradeConditionExpression(r,a))+" ");const u=this.templates.compile(n);return new yl(i,Object(ml.formatText)(u))}getLogIndicatorStreamsStatement(e){let t=`core.host:trace('${e.name} >>'`;for(let n=0;n1==e.isParameter);for(let r=0;re.id==n).name}.${e.stream}`}getPriceStreamReferenceExpression(e){if(e instanceof fl)return e.stream?`${e.source.name}.${e.stream}`:e.source.name;if(e instanceof Kn)return"source";if(e instanceof ht)return`source.${e.priceType.toLowerCase()}`;throw Error("Unknown source type: "+typeof e)}getValueExpression(e){return"string"==typeof e?`'${e}'`:e}getCrossExpression(e,t){let n,r;return e.left.value instanceof _t?n=this.getIndicatorStreamReferenceExpression(e.left.value,t):e.left.value instanceof ft&&(n=this.getPriceStreamReferenceExpression(e.left.value)),r=e.right.value instanceof _t?this.getIndicatorStreamReferenceExpression(e.right.value,t):e.right.value instanceof ft?this.getPriceStreamReferenceExpression(e.right.value):this.getValueExpression(e.right.value),`core.crosses${e.operator==yr.crossesOver?"Over":"Under"}(${n}, ${r}, ${e.left.value.shift>0?`period - ${e.left.value.shift.toString()}`:"period"})`}getIndicatorValueExpression(e,t){const n=this.getIndicatorStreamReferenceExpression(e,t);return e.shift&&e.shift>0?`${n}[period - ${e.shift}]`:`${n}[period]`}getPriceValueExpression(e){return`${this.getPriceStreamReferenceExpression(e)}${e.shift>0?`[period - ${e.shift}]`:"[period]"}`}getCompareExpression(e,t){let n,r;return e.left.value instanceof _t?n=this.getIndicatorValueExpression(e.left.value,t):e.left.value instanceof ft&&(n=this.getPriceValueExpression(e.left.value)),r=e.right.value instanceof _t?this.getIndicatorValueExpression(e.right.value,t):e.right.value instanceof ft?this.getPriceValueExpression(e.right.value):this.getValueExpression(e.right.value),`${n} ${e.operator.value} ${r}`}getFalseExpression(){return"false"}getTradeConditionExpression(e,t){const n=[];for(let i=0;ie.join(" and ")).join(" or ");return r.length>0?r:this.getFalseExpression()}getIndicatorUpdateTemplateSection(e){let t="";return e.forEach(e=>{e.source.source instanceof ul&&(t=`${t} ${e.source.source.name}:update(core.UpdateLast)`),t=`${t} ${e.name}:update(core.UpdateLast)`}),t}getIndicatorLocalPrepareStatement(e,t){let n="%LOCAL% = core.indicators:create('%ID', %SOURCE%";if(n=(n=(n=n.replace("%LOCAL%",e.name)).replace("%ID",e.indicator.id)).replace("%SOURCE%",e.source.source instanceof ul?`${e.source.source.name}.${e.source.stream}`:this.getPriceStreamReferenceExpression(e.source)),e.parameters){const t=Object.keys(e.parameters);for(let r=0;r{e.source.source instanceof ul&&(t=`${t} local ${e.source.source.name} `),t=`${t} local ${e.name} `}),t}getIndicatorParameterStatements(e){let t="";const n=e.indicator.parameters;if(n)for(let r=0;rconsole.log(e))},"zK+N":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("48oy"),i=n("ejaz"),l=n("8U58");t.CodemirrorComponent=function(){function e(){this.change=new r.EventEmitter,this.focus=new r.EventEmitter,this.blur=new r.EventEmitter,this.cursorActivity=new r.EventEmitter,this.instance=null,this._value=""}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this._value=e,this.onChange(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){},e.prototype.ngAfterViewInit=function(){this.config=this.config||{},this.codemirrorInit(this.config)},e.prototype.codemirrorInit=function(e){var t=this;this.instance=l.fromTextArea(this.host.nativeElement,e),this.instance.setValue(this._value),this.instance.on("change",function(){t.updateValue(t.instance.getValue())}),this.instance.on("focus",function(e,n){t.focus.emit({instance:e,event:n})}),this.instance.on("cursorActivity",function(e){t.cursorActivity.emit({instance:e})}),this.instance.on("blur",function(e,n){t.blur.emit({instance:e,event:n})})},e.prototype.updateValue=function(e){this.value=e,this.onTouched(),this.change.emit(e)},e.prototype.writeValue=function(e){this._value=e||"",this.instance&&this.instance.setValue(this._value)},e.prototype.onChange=function(e){},e.prototype.onTouched=function(){},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:r.Component,args:[{selector:"codemirror",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef(function(){return e}),multi:!0}],template:""}]}],e.propDecorators={config:[{type:r.Input}],change:[{type:r.Output}],focus:[{type:r.Output}],blur:[{type:r.Output}],cursorActivity:[{type:r.Output}],host:[{type:r.ViewChild,args:["host"]}],instance:[{type:r.Output}],value:[{type:r.Input}]},e}()},zOxy:function(e,t,n){"use strict";const r=function(e){let t,r=n("bbL7").a.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}();t.a=r}},[0]);