import{f as J,g as y,h as b,i as K,j as C}from"./chunk-NNMVEAHQ.js";import{m as Y}from"./chunk-NDLDFKR2.js";import{$c as B,C as D,Cb as E,Cc as U,Db as A,Fb as F,Ha as M,Hb as d,Ka as k,_ as z,ad as G,bc as o,cc as u,dc as g,ec as v,fa as N,fb as R,g as S,ga as j,h as _,ia as P,kb as c,pc as f,qc as T,rc as L,sd as Q,tc as V,uc as q,vb as p,vc as H,ve as X,we as Z,zc as h}from"./chunk-PVUKHE45.js";import{a as I,b as O}from"./chunk-MZPAXKJS.js";var $=["overlay"],ee=["*"];function te(n,e){n&1&&v(0,"div")}function ie(n,e){if(n&1&&(u(0,"div"),d(1,te,1,0,"div",6),g()),n&2){let r=f(2);U(r.spinner.class),h("color",r.spinner.color),c(),o("ngForOf",r.spinner.divArray)}}function ne(n,e){if(n&1&&(v(0,"div",7),B(1,"safeHtml")),n&2){let r=f(2);o("innerHTML",G(1,1,r.template),R)}}function se(n,e){if(n&1&&(u(0,"div",2,0),d(2,ie,2,5,"div",3)(3,ne,2,3,"div",4),u(4,"div",5),L(5),g()()),n&2){let r=f();h("background-color",r.spinner.bdColor)("z-index",r.spinner.zIndex)("position",r.spinner.fullScreen?"fixed":"absolute"),o("@.disabled",r.disableAnimation)("@fadeIn","in"),c(2),o("ngIf",!r.template),c(),o("ngIf",r.template),c(),h("z-index",r.spinner.zIndex)}}var re={"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},w={BD_COLOR:"rgba(51,51,51,0.8)",SPINNER_COLOR:"#fff",Z_INDEX:99999},x="primary",l=class n{constructor(e){Object.assign(this,e)}static create(e){return!e?.template&&!e?.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(e)}},ae=(()=>{let e=class e{constructor(){this.spinnerObservable=new _(null)}getSpinner(t){return this.spinnerObservable.asObservable().pipe(D(i=>i&&i.name===t))}show(t=x,i){return new Promise((s,a)=>{setTimeout(()=>{i&&Object.keys(i).length?(i.name=t,this.spinnerObservable.next(new l(O(I({},i),{show:!0}))),s(!0)):(this.spinnerObservable.next(new l({name:t,show:!0})),s(!0))},10)})}hide(t=x,i=10){return new Promise((s,a)=>{setTimeout(()=>{this.spinnerObservable.next(new l({name:t,show:!1})),s(!0)},i)})}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),W=new P("NGX_SPINNER_CONFIG"),oe=(()=>{let e=class e{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}};e.\u0275fac=function(i){return new(i||e)(p(Y,16))},e.\u0275pipe=F({name:"safeHtml",type:e,pure:!0});let n=e;return n})(),Se=(()=>{let e=class e{constructor(t,i,s,a){this.spinnerService=t,this.changeDetector=i,this.elementRef=s,this.globalConfig=a,this.disableAnimation=!1,this.spinner=new l,this.ngUnsubscribe=new S,this.setDefaultOptions=()=>{let{type:m}=this.globalConfig??{};this.spinner=l.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=w.BD_COLOR,this.zIndex=w.Z_INDEX,this.color=w.SPINNER_COLOR,this.size="large",this.fullScreen=!0,this.name=x,this.template=null,this.showSpinner=!1,this.divArray=[],this.divCount=0,this.show=!1}initObservable(){this.spinnerService.getSpinner(this.name).pipe(z(this.ngUnsubscribe)).subscribe(t=>{this.setDefaultOptions(),Object.assign(this.spinner,t),t.show&&this.onInputChange(),this.changeDetector.detectChanges()})}ngOnInit(){this.setDefaultOptions(),this.initObservable()}isSpinnerZone(t){return t===this.elementRef.nativeElement.parentElement?!0:t.parentNode&&this.isSpinnerZone(t.parentNode)}ngOnChanges(t){for(let i in t)if(i){let s=t[i];if(s.isFirstChange())return;typeof s.currentValue<"u"&&s.currentValue!==s.previousValue&&s.currentValue!==""&&(this.spinner[i]=s.currentValue,i==="showSpinner"&&(s.currentValue?this.spinnerService.show(this.spinner.name,this.spinner):this.spinnerService.hide(this.spinner.name)),i==="name"&&this.initObservable())}}getClass(t,i){this.spinner.divCount=re[t],this.spinner.divArray=Array(this.spinner.divCount).fill(0).map((a,m)=>m);let s="";switch(i.toLowerCase()){case"small":s="la-sm";break;case"medium":s="la-2x";break;case"large":s="la-3x";break;default:break}return"la-"+t+" "+s}onInputChange(){this.spinner.class=this.getClass(this.spinner.type,this.spinner.size)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}};e.\u0275fac=function(i){return new(i||e)(p(ae),p(Q),p(k),p(W,8))},e.\u0275cmp=E({type:e,selectors:[["ngx-spinner"]],viewQuery:function(i,s){if(i&1&&V($,5),i&2){let a;q(a=H())&&(s.spinnerDOM=a.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:ee,decls:1,vars:1,consts:[["overlay",""],["class","ngx-spinner-overlay",3,"background-color","z-index","position",4,"ngIf"],[1,"ngx-spinner-overlay"],[3,"class","color",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"loading-text"],[4,"ngFor","ngForOf"],[3,"innerHTML"]],template:function(i,s){i&1&&(T(),d(0,se,6,12,"div",1)),i&2&&o("ngIf",s.spinner.show)},dependencies:[oe,Z,X],styles:[".ngx-spinner-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%}.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%)}"],data:{animation:[J("fadeIn",[K("in",b({opacity:1})),C(":enter",[b({opacity:0}),y(300)]),C(":leave",y(200,b({opacity:0})))])]},changeDetection:0});let n=e;return n})(),_e=(()=>{let e=class e{static forRoot(t){return{ngModule:e,providers:[{provide:W,useValue:t}]}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=A({type:e}),e.\u0275inj=j({});let n=e;return n})();export{ae as a,Se as b,_e as c};
//# sourceMappingURL=chunk-IPJVSZRC.js.map
