import{m as $}from"./chunk-GQAU5ACB.js";import{$b as T,Ac as Q,Bb as l,Bc as X,Fc as h,Gc as Z,Ib as k,Ic as Y,Jb as R,K as w,Lb as A,Pa as M,Sa as j,ac as p,cc as d,e as x,ea as S,ec as V,f as _,fc as F,fd as J,gc as L,gd as K,la as O,lc as u,ma as I,mc as f,nb as E,nc as b,oa as N,qa as P,rc as H,sb as a,sc as q,vc as c,wc as U,xc as B,ya as D,yd as W,za as z,zc as G}from"./chunk-ISMRT7VU.js";import{a as C,b as y}from"./chunk-M5TX2NVG.js";var ne=["overlay"],te=["*"];function ie(n,s){n&1&&b(0,"div")}function se(n,s){if(n&1&&(u(0,"div"),F(1,ie,1,0,"div",null,V),f()),n&2){let e=c(2);Y(e.spinner.class),h("color",e.spinner.color),a(),L(e.spinner.divArray)}}function oe(n,s){if(n&1&&(b(0,"div",4),J(1,"safeHtml")),n&2){let e=c(2);q("innerHTML",K(1,1,e.template),E)}}function re(n,s){if(n&1){let e=H();u(0,"div",2,0),T(function(){D(e);let i=c();return z(i.disableAnimation?"":"fade-out")}),p(2,se,3,4,"div",3),p(3,oe,2,3,"div",4),u(4,"div",5),B(5),f()()}if(n&2){let e=c();h("background-color",e.spinner.bdColor)("z-index",e.spinner.zIndex)("position",e.spinner.fullScreen?"fixed":"absolute"),Z("no-animate",e.disableAnimation),a(2),d(e.template?-1:2),a(),d(e.template?3:-1),a(),h("z-index",e.spinner.zIndex)}}var ae={"ball-8bits":16,"ball-atom":4,"ball-beat":3,"ball-circus":5,"ball-climbing-dot":4,"ball-clip-rotate":1,"ball-clip-rotate-multiple":2,"ball-clip-rotate-pulse":2,"ball-elastic-dots":5,"ball-fall":3,"ball-fussion":4,"ball-grid-beat":9,"ball-grid-pulse":9,"ball-newton-cradle":4,"ball-pulse":3,"ball-pulse-rise":5,"ball-pulse-sync":3,"ball-rotate":1,"ball-running-dots":5,"ball-scale":1,"ball-scale-multiple":3,"ball-scale-pulse":2,"ball-scale-ripple":1,"ball-scale-ripple-multiple":3,"ball-spin":8,"ball-spin-clockwise":8,"ball-spin-clockwise-fade":8,"ball-spin-clockwise-fade-rotating":8,"ball-spin-fade":8,"ball-spin-fade-rotating":8,"ball-spin-rotate":2,"ball-square-clockwise-spin":8,"ball-square-spin":8,"ball-triangle-path":3,"ball-zig-zag":2,"ball-zig-zag-deflect":2,cog:1,"cube-transition":2,fire:3,"line-scale":5,"line-scale-party":5,"line-scale-pulse-out":5,"line-scale-pulse-out-rapid":5,"line-spin-clockwise-fade":8,"line-spin-clockwise-fade-rotating":8,"line-spin-fade":8,"line-spin-fade-rotating":8,pacman:6,"square-jelly-box":2,"square-loader":1,"square-spin":1,timer:1,"triangle-skew-spin":1},g={BD_COLOR:"rgba(51,51,51,0.8)",SPINNER_COLOR:"#fff",Z_INDEX:99999},v="primary",r=class n{constructor(s){Object.assign(this,s)}static create(s){return!s?.template&&!s?.type&&console.warn(`[ngx-spinner]: Property "type" is missed. Please, provide animation type to <ngx-spinner> component
        and ensure css is added to angular.json file`),new n(s)}},le=(()=>{class n{constructor(){this.spinnerObservable=new _(null)}getSpinner(e){return this.spinnerObservable.asObservable().pipe(w(t=>t&&t.name===e))}show(e=v,t){return new Promise((i,o)=>{setTimeout(()=>{t&&Object.keys(t).length?(t.name=e,this.spinnerObservable.next(new r(y(C({},t),{show:!0}))),i(!0)):(this.spinnerObservable.next(new r({name:e,show:!0})),i(!0))},10)})}hide(e=v,t=10){return new Promise((i,o)=>{setTimeout(()=>{this.spinnerObservable.next(new r({name:e,show:!1})),i(!0)},t)})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ee=new N("NGX_SPINNER_CONFIG"),ce=(()=>{class n{constructor(){this.sanitizer=P($)}transform(e){return e?this.sanitizer.bypassSecurityTrustHtml(e):""}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275pipe=A({name:"safeHtml",type:n,pure:!0})}}return n})(),Oe=(()=>{class n{constructor(e,t,i,o){this.spinnerService=e,this.changeDetector=t,this.elementRef=i,this.globalConfig=o,this.disableAnimation=!1,this.spinner=new r,this.ngUnsubscribe=new x,this.setDefaultOptions=()=>{let{type:m}=this.globalConfig??{};this.spinner=r.create({name:this.name,bdColor:this.bdColor,size:this.size,color:this.color,type:this.type??m,fullScreen:this.fullScreen,divArray:this.divArray,divCount:this.divCount,show:this.show,zIndex:this.zIndex,template:this.template,showSpinner:this.showSpinner})},this.bdColor=g.BD_COLOR,this.zIndex=g.Z_INDEX,this.color=g.SPINNER_COLOR,this.size="large",this.fullScreen=!0,this.name=v,this.template=null,this.showSpinner=!1,this.divArray=[],this.divCount=0,this.show=!1}initObservable(){this.spinnerService.getSpinner(this.name).pipe(S(this.ngUnsubscribe)).subscribe(e=>{this.setDefaultOptions(),Object.assign(this.spinner,e),e.show&&this.onInputChange(),this.changeDetector.detectChanges()})}ngOnInit(){this.setDefaultOptions(),this.initObservable()}isSpinnerZone(e){return e===this.elementRef.nativeElement.parentElement?!0:e.parentNode&&this.isSpinnerZone(e.parentNode)}ngOnChanges(e){for(let t in e)if(t){let i=e[t];if(i.isFirstChange())return;typeof i.currentValue<"u"&&i.currentValue!==i.previousValue&&i.currentValue!==""&&(this.spinner[t]=i.currentValue,t==="showSpinner"&&(i.currentValue?this.spinnerService.show(this.spinner.name,this.spinner):this.spinnerService.hide(this.spinner.name)),t==="name"&&this.initObservable())}}getClass(e,t){this.spinner.divCount=ae[e],this.spinner.divArray=Array(this.spinner.divCount).fill(0).map((o,m)=>m);let i="";switch(t.toLowerCase()){case"small":i="la-sm";break;case"medium":i="la-2x";break;case"large":i="la-3x";break;default:break}return"la-"+e+" "+i}onInputChange(){this.spinner.class=this.getClass(this.spinner.type,this.spinner.size)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}static{this.\u0275fac=function(t){return new(t||n)(l(le),l(W),l(j),l(ee,8))}}static{this.\u0275cmp=k({type:n,selectors:[["ngx-spinner"]],viewQuery:function(t,i){if(t&1&&G(ne,5),t&2){let o;Q(o=X())&&(i.spinnerDOM=o.first)}},inputs:{bdColor:"bdColor",size:"size",color:"color",type:"type",fullScreen:"fullScreen",name:"name",zIndex:"zIndex",template:"template",showSpinner:"showSpinner",disableAnimation:"disableAnimation"},features:[M],ngContentSelectors:te,decls:1,vars:1,consts:[["overlay",""],[1,"ngx-spinner-overlay",3,"no-animate","background-color","z-index","position"],[1,"ngx-spinner-overlay"],[3,"class","color"],[3,"innerHTML"],[1,"loading-text"]],template:function(t,i){t&1&&(U(),p(0,re,6,12,"div",1)),t&2&&d(i.spinner.show?0:-1)},dependencies:[ce],styles:[".ngx-spinner-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;opacity:1;transition:opacity .3s ease-in}.ngx-spinner-overlay[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:not(.loading-text){top:50%;left:50%;margin:0;position:absolute;transform:translate(-50%,-50%)}.loading-text[_ngcontent-%COMP%]{position:absolute;top:60%;left:50%;transform:translate(-50%,-60%)}@starting-style{.ngx-spinner-overlay[_ngcontent-%COMP%]{opacity:0}}.fade-out[_ngcontent-%COMP%]{opacity:0;transition:opacity .2s ease-out}.no-animate[_ngcontent-%COMP%]{transition:none!important}@starting-style{.no-animate[_ngcontent-%COMP%]{opacity:1!important;transition:none!important}}"],changeDetection:0})}}return n})(),Ie=(()=>{class n{static forRoot(e){return{ngModule:n,providers:[{provide:ee,useValue:e}]}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=R({type:n})}static{this.\u0275inj=I({})}}return n})();export{le as a,Oe as b,Ie as c};
//# sourceMappingURL=chunk-L2UY4DVK.js.map
