(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"+0iv":function(e,t,n){"use strict";var r=n("qDJ8");function i(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==i(e)&&"function"==typeof(t=e.constructor)&&!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")}},"1vjc":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("fXoL"),i=n("Xa2L");let a=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Mb({type:e,selectors:[["app-acting-spinner"]],decls:2,vars:0,consts:[[1,"overlay"],["color","accent"]],template:function(e,t){1&e&&(r.Yb(0,"div",0),r.Tb(1,"mat-spinner",1),r.Xb())},directives:[i.b],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#000;opacity:.5;z-index:999999}.overlay[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{position:fixed;left:calc(50% - 50px);top:35%}"]}),e})()},7104:function(e,t){var n=Object.prototype.toString;function r(e){return e.constructor?e.constructor.name:null}e.exports=function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;if("boolean"===t)return"boolean";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if("function"===t)return"GeneratorFunction"===r(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(r(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(t=n.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}},JIfX:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(e,t){this.name=e,this.value=t}}},KXBU:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("fXoL"),i=n("0MNC");let a=(()=>{class e{constructor(e){this._mobile=!0,e.observe(["(min-width: 425px)"]).subscribe(e=>{this.mobile=!e.matches})}get mobile(){return this._mobile}set mobile(e){this._mobile=e}}return e.\u0275fac=function(t){return new(t||e)(r.cc(i.a))},e.\u0275prov=r.Ob({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},UvZa:function(e,t,n){"use strict";const r=Symbol.prototype.valueOf,i=n("7104");e.exports=function(e,t){switch(i(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return function(e){const t=e.length,n=Buffer.allocUnsafe?Buffer.allocUnsafe(t):Buffer.from(t);return e.copy(n),n}(e);case"symbol":return function(e){return r?Object(r.call(e)):{}}(e);case"arraybuffer":return function(e){const t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}(e);case"regexp":return function(e){const t=void 0!==e.flags?e.flags:/\w+$/.exec(e)||void 0,n=new e.constructor(e.source,t);return n.lastIndex=e.lastIndex,n}(e);case"error":return Object.create(e);default:return e}}},YBOo:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n("yLV6");var r=n("JIfX"),i=n("pKDw"),a=n("fXoL"),o=n("XGsO");let c=(()=>{class e{constructor(e){this.eventbus=e,this.images=[],this.ngxGalleryOptions=[]}onPreviewOpen(){this.eventbus.emit(new r.a(i.b.HideScrollbar,!0))}onPreviewClose(){this.eventbus.emit(new r.a(i.b.HideScrollbar,!1))}}return e.\u0275fac=function(t){return new(t||e)(a.Sb(i.a))},e.\u0275cmp=a.Mb({type:e,selectors:[["app-gallery-viewer"]],inputs:{images:"images",ngxGalleryOptions:"ngxGalleryOptions"},decls:1,vars:2,consts:[[3,"options","images","previewOpen","previewClose"]],template:function(e,t){1&e&&(a.Yb(0,"ngx-gallery",0),a.gc("previewOpen",(function(e){return t.onPreviewOpen()}))("previewClose",(function(e){return t.onPreviewClose()})),a.Xb()),2&e&&a.qc("options",t.ngxGalleryOptions)("images",t.images)},directives:[o.b],styles:["ngx-gallery[_ngcontent-%COMP%]     .ngx-gallery-bullet{background:hsla(0,0%,100%,.52)}"]}),e})()},bJsK:function(e,t,n){"use strict";n.r(t);var r=n("ofXK"),i=n("3Pt+"),a=n("Spb/"),o=n("PCNd"),c=n("R0Ic"),s=n("A5z7"),l=n("lnXG"),m=n("XNiG"),b=n("LRne"),u=n("1G5W"),p=n("eIep"),g=n("vkgz"),d=function(e){return e[e.NONE=0]="NONE",e[e.XS=1]="XS",e[e.S=2]="S",e[e.M=3]="M",e[e.L=4]="L",e[e.XL=5]="XL",e[e.XXL=6]="XXL",e[e.ALL=10]="ALL",e}({});const h=[{size:d.XS,available:!1,color:"warn"},{size:d.S,available:!1,color:"warn"},{size:d.M,available:!1,color:"warn"},{size:d.L,available:!1,color:"warn"},{size:d.XL,available:!1,color:"warn"},{size:d.XXL,available:!1,color:"warn"}];var f=n("pKDw"),v=n("tk/3"),y=n("2Vo4"),I=n("itXk"),O=n("UXun"),w=n("lJxs"),x=n("JIr8"),k=n("5+tZ"),S=n("ezqR"),C=n("JIfX"),X=n("fXoL"),P=n("tyNb");let Y=(()=>{class e{constructor(e,t,n,r){this.http=e,this.snackBarService=t,this.eventBus=n,this.router=r,this.merchandiseUrl="merchandise",this.updateGearItemAction=new y.a(null),this.addGearItemAction=new y.a(null),this.deleteGearItemAction=new y.a(null),this.pageChangeAction=new y.a(null),this.loadingSubject=new m.a,this.loading$=this.loadingSubject.asObservable(),this.loadingDeleteSubject=new m.a,this.loadingDelete$=this.loadingDeleteSubject.asObservable(),this.gearItems$=new y.a([]).asObservable(),this.updatedGearItems$=Object(I.a)([this.updateGearItemAction,this.gearItems$]).pipe(Object(p.a)(([e])=>(this.loadingSubject.next(!0),this.updateGearItemAsync(e))),Object(O.a)()),this.newLatestGearItems$=Object(I.a)([this.addGearItemAction,this.gearItems$]).pipe(Object(p.a)(([e])=>(this.loadingSubject.next(!0),this.createGearItemAsync(e))),Object(O.a)()),this.deleteGearItemsLatest$=Object(I.a)([this.deleteGearItemAction,this.gearItems$]).pipe(Object(p.a)(([e])=>this.deleteGearItemAsync(e)),Object(O.a)())}resolve(e,t){const n={headers:new v.e({"Content-Type":"application/json",Accept:"application/json"})};return this.gearItems$=this.http.get(this.merchandiseUrl,n).pipe(Object(w.a)(e=>(this.gearItems=e).reverse()),Object(x.a)(()=>(this.router.navigate(["about"]),this.snackBarService.openSnackBarFromComponent("Error occured. Please come back later","Dismiss",S.a.Error),Object(b.a)([]))),Object(O.a)()),this.gearItems$}onPageChange(){return this.pageChangeAction.next({})}findGearItem(e){return this.gearItems$.pipe(Object(k.a)(t=>t.filter(t=>t.id===e)))}updateGearItem(e){this.updateGearItemAction.next(e)}updateGearItemAsync(e){return null===e?Object(b.a)([]):Object(I.a)([this.gearItems$,this.http.patch(`${this.merchandiseUrl}/${e.id}`,e.formData)]).pipe(Object(w.a)(([t,n])=>{const r=t.map(e=>e.id).indexOf(e.id);return r>-1&&t.splice(r,1,n),t}),Object(g.a)(t=>{this.loadingSubject.next(!1),this.snackBarService.openSnackBarFromComponent(`Successfully updated ${e.name}`,"Dismiss",S.a.Success)}),Object(g.a)(()=>this.eventBus.emit(new C.a(f.b.CloseOpen,!0))),Object(x.a)(()=>(this.loadingSubject.next(!1),this.snackBarService.openSnackBarFromComponent(`Error occured updating ${e.name}`,"Dismiss",S.a.Error),Object(b.a)([]))))}createGearItem(e){this.addGearItemAction.next(e)}createGearItemAsync(e){return null===e?Object(b.a)([]):Object(I.a)([this.gearItems$,this.http.post(`${this.merchandiseUrl}`,e.formData)]).pipe(Object(w.a)(([e,t])=>(e.unshift(t),e)),Object(g.a)(t=>{this.loadingSubject.next(!1),this.snackBarService.openSnackBarFromComponent(`Successfully created ${e.name}`,"Dismiss",S.a.Success)}),Object(g.a)(()=>this.eventBus.emit(new C.a(f.b.CloseOpen,!0))),Object(x.a)(()=>(this.loadingSubject.next(!1),this.snackBarService.openSnackBarFromComponent(`Error occured creating ${e.name}`,"Dismiss",S.a.Error),Object(b.a)([]))))}deleteGearItem(e){this.deleteGearItemAction.next(e)}deleteGearItemAsync(e){return null===e?Object(b.a)([]):(this.eventBus.emit(new C.a(f.b.Loading,!0)),Object(I.a)([this.gearItems$,this.http.delete(`${this.merchandiseUrl}/${e.id}`)]).pipe(Object(w.a)(([t])=>{const n=t.map(e=>e.id).indexOf(e.id);return n>-1&&t.splice(n,1),t}),Object(g.a)(t=>{this.eventBus.emit(new C.a(f.b.Loading,!1)),this.snackBarService.openSnackBarFromComponent(`Successfully deleted ${e.name}`,"Dismiss",S.a.Success)}),Object(x.a)(t=>(this.eventBus.emit(new C.a(f.b.Loading,!1)),this.snackBarService.openSnackBarFromComponent(`Error occured deleting ${e.name}`,"Dismiss",S.a.Error),Object(b.a)(null)))))}}return e.\u0275fac=function(t){return new(t||e)(X.cc(v.b),X.cc(S.b),X.cc(f.a),X.cc(P.c))},e.\u0275prov=X.Ob({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var _=n("9JtH");class j{isErrorState(e,t){return e&&e.invalid&&e.touched}}var M=n("0IaG"),z=n("xHqg"),E=n("kmnG"),A=n("qFsG"),F=n("bTqV"),G=n("znSr"),q=n("1jcm"),J=n("bv9b"),$=n("NFeN");let L=(()=>{class e{transform(e){for(let t=0;t<e.length;t++){const n=e[t];n.name=n.name?n.name.slice(0,27):"placeholderImageName",e.splice(t,1,n)}return e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=X.Rb({name:"gearImageView",type:e,pure:!1}),e})();function N(e,t){1&e&&(X.Wb(0),X.Tb(1,"mat-progress-bar",24),X.Vb())}function D(e,t){1&e&&X.Jc(0,"Info")}function T(e,t){1&e&&X.Jc(0,"Details")}function B(e,t){if(1&e){const e=X.Zb();X.Wb(0),X.Wb(1,25),X.Yb(2,"mat-chip",26),X.gc("click",(function(n){X.Ac(e);const r=t.$implicit,i=t.index;return X.kc().onSelectedChipSize(r,i)})),X.Jc(3),X.Xb(),X.Vb(),X.Vb()}if(2&e){const e=t.$implicit,n=t.index,r=X.kc();X.Eb(1),X.qc("formGroupName",n),X.Eb(1),X.qc("selected",e.value.available)("color",e.value.color),X.Eb(1),X.Lc(" ",r.sizeEnum[e.value.size]," ")}}function H(e,t){if(1&e){const e=X.Zb();X.Wb(0),X.Yb(1,"mat-chip",27),X.gc("removed",(function(n){X.Ac(e);const r=t.$implicit;return X.kc().onRemoveImage(r)})),X.Jc(2),X.Yb(3,"mat-icon",28),X.Jc(4,"cancel"),X.Xb(),X.Xb(),X.Vb()}if(2&e){const e=t.$implicit;X.Eb(1),X.qc("removable",!0),X.Eb(1),X.Lc("",e.name," ")}}const U=function(e){return{"margin-bottom":e}};let V=(()=>{class e{constructor(e,t,n,r,i){this.fb=e,this.route=t,this.merchandiseService=n,this.dialogRef=r,this.eventBus=i,this.editMode=!1,this.selectedFileFormData=new FormData,this.gearItemImages=[],this.noSizesSelectedStateMatcher=new j,this.gearSizes=[],this.isInStock=!0,this.sizeEnum=d,this.isLoading$=this.merchandiseService.loading$,this.unsubscribed$=new m.a,this.testChips=[{color:"warn",size:"M",selected:!0},{color:"warn",size:"L",selected:!0}],this.gearSizes=[...h]}ngOnInit(){this.subscription=this.eventBus.on(f.b.CloseOpen,e=>{e&&this.dialogRef.close()}),this.route.children[0].firstChild.children.filter(e=>e.outlet===_.f).map(e=>e.params.pipe(Object(u.a)(this.unsubscribed$),Object(p.a)(e=>(this.editMode=void 0!==e.id,this.editMode?this.merchandiseService.findGearItem(+e.id):Object(b.a)({}))),Object(g.a)(e=>{this.gearItem=l(e)})).subscribe(e=>this.initForm()))}ngOnDestroy(){this.subscription.unsubscribe(),this.unsubscribed$.next(),this.unsubscribed$.complete()}onSubmit(){this.dialogRef.close();const e=this.gearItemObjectForDelivery();this.editMode?this.merchandiseService.updateGearItem(e):this.merchandiseService.createGearItem(e)}gearItemObjectForDelivery(){const e=this.editMode?this.gearItemImages.filter(e=>void 0!==e.id):[],t={name:this.gearItemForm.value.name,price:this.gearItemForm.value.price,sizes:this.gearItemForm.controls.sizes.controls.map(e=>e.value),inStock:this.gearItemForm.value.inStock,images:e};return this.editMode&&(t.id=this.gearItem.id),t.formData=this.selectedFileFormData,t.formData.append("gearItem",JSON.stringify(t)),t}onSlideChange(){this.gearItem.inStock=!this.gearItem.inStock}onSelectedChipSize(e,t){e.patchValue({available:!e.value.available}),this.gearItemForm.controls.sizes.updateValueAndValidity()}onCancel(){this.dialogRef.close()}onFileSelected(e){const t=e.target.files.length<3?e.target.files.length:3,n=e.target.files;if(3===this.gearItemImages.length){this.gearItemImages=[...this.gearItemImages];for(let e=0;e<t;e++){this.gearItemImages.splice(e,1,{name:n[e].name,size:n[e].size,type:n[e].type,previewId:e});const t=n[e];t.previewId=e,this.selectedFileFormData.append(_.c.GearImages,t)}}else if(this.gearItemImages.length>0&&this.gearItemImages.length<3){this.gearItemImages=[...this.gearItemImages];for(let e=0;e<t;e++)if(this.gearItemImages.length<3){this.gearItemImages=[{name:n[e].name,size:n[e].size,type:n[e].type,previewId:e},...this.gearItemImages];const t=n[e];t.previewId=e,this.selectedFileFormData.append(_.c.GearImages,t)}}else for(let r=0;r<t;r++){this.gearItemImages=[...this.gearItemImages,{name:n[r].name,size:n[r].size,type:n[r].type,previewId:r}];const e=n[r];e.previewId=r,this.selectedFileFormData.append(_.c.GearImages,e)}}onRemoveImage(e){const t=this.gearItemImages.map(e=>e.name).indexOf(e.name);if(t>-1){this.gearItemImages.splice(t,1);const n=this.selectedFileFormData.getAll(_.c.GearImages).filter(t=>t.previewId!==e.previewId);this.selectedFileFormData=new FormData,n.forEach(e=>{this.selectedFileFormData.append(_.c.GearImages,e)})}}hideIfEmpty(){if(void 0===this.gearItemImages&&(this.gearItemImages=[]),0===this.gearItemImages.length)return"0px"}initForm(){let e="",t=null,n=this.gearSizes,r=[],a=this.isInStock;this.editMode&&(e=this.gearItem.name,t=this.gearItem.price,a=this.gearItem.inStock,r=this.gearItem.images,n=this.gearItem.sizes,this.gearItemImages=this.gearItem.images);const o=[];for(let i=0;i<n.length;i++)o.push(this.initGearSizeForm(n[i]));this.gearItemForm=this.fb.group({name:this.fb.control(e,i.v.required),price:this.fb.control(t,i.v.required),sizes:this.fb.array(o,this.requireSize()),inStock:this.fb.control(a),images:this.fb.control(r)})}initGearSizeForm(e){return this.fb.group({id:this.fb.control(e.id),size:this.fb.control(e.size),available:this.fb.control(e.available),color:this.fb.control(e.color)})}requireSize(){return e=>e.value.filter(e=>!0===e.available).length>0?(e.markAsTouched(),null):{invalidSize:{value:"Please select a size"}}}}return e.\u0275fac=function(t){return new(t||e)(X.Sb(i.d),X.Sb(P.a),X.Sb(Y),X.Sb(M.d),X.Sb(f.a))},e.\u0275cmp=X.Mb({type:e,selectors:[["app-merchandise-dialog"]],viewQuery:function(e,t){var n;1&e&&X.Pc(s.c,!0),2&e&&X.wc(n=X.hc())&&(t.matChipList=n.first)},decls:54,vars:21,consts:[["mat-dialog-title","",1,"gear-item-title"],[4,"ngIf"],[3,"formGroup","ngSubmit"],["matStepLabel",""],["matInput","","placeholder","Name of the item","formControlName","name","cdkFocusInitial",""],["matInput","","type","number","placeholder","Price","formControlName","price",1,"right-align"],["matPrefix",""],["matSuffix",""],[1,"action-buttons"],["mat-raised-button","","color","warn","type","button",2,"margin-right","5px",3,"click"],["mat-raised-button","","color","accent","matStepperNext","","type","button"],["formArrayName","sizes"],["floatLabel","always"],["aria-label","Gear Item Sizes",3,"multiple"],["chipList",""],[4,"ngFor","ngForOf"],["id","imagesToUploadContainer"],["formControlName","images",1,"mat-chip-list-stacked","upload-image-chips",3,"ngStyle"],["formControlName","inStock","color","accent",2,"display","block",3,"labelPosition","checked","change"],["mat-raised-button","","color","warn","matStepperPrevious","","type","button",2,"align-self","flex-end","margin-right","5px"],["mat-raised-button","","color","accent","type","button",1,"action-buttons",3,"click"],["type","file","multiple","multiple",2,"display","none",3,"change"],["fileUpload",""],["mat-raised-button","","color","accent",1,"post-button",2,"align-self","flex-end",3,"disabled"],["color","accent","mode","indeterminate"],[3,"formGroupName"],[3,"selected","color","click"],[3,"removable","removed"],["matChipRemove",""]],template:function(e,t){if(1&e){const e=X.Zb();X.Yb(0,"h1",0),X.Jc(1),X.Xb(),X.Hc(2,N,2,0,"ng-container",1),X.lc(3,"async"),X.Yb(4,"form",2),X.gc("ngSubmit",(function(e){return t.onSubmit()})),X.Yb(5,"mat-horizontal-stepper"),X.Yb(6,"mat-step"),X.Hc(7,D,1,0,"ng-template",3),X.Yb(8,"mat-form-field"),X.Tb(9,"input",4),X.Yb(10,"mat-error"),X.Jc(11,"You must enter a "),X.Yb(12,"strong"),X.Jc(13,"name"),X.Xb(),X.Xb(),X.Xb(),X.Yb(14,"mat-form-field"),X.Tb(15,"input",5),X.Yb(16,"span",6),X.Jc(17,"$\xa0"),X.Xb(),X.Yb(18,"span",7),X.Jc(19,".00"),X.Xb(),X.Yb(20,"mat-error"),X.Jc(21,"You must enter a "),X.Yb(22,"strong"),X.Jc(23,"price"),X.Xb(),X.Xb(),X.Xb(),X.Yb(24,"div",8),X.Yb(25,"button",9),X.gc("click",(function(e){return t.onCancel()})),X.Jc(26," Cancel "),X.Xb(),X.Yb(27,"button",10),X.Jc(28," Next "),X.Xb(),X.Xb(),X.Xb(),X.Yb(29,"mat-step"),X.Hc(30,T,1,0,"ng-template",3),X.Wb(31,11),X.Yb(32,"mat-form-field",12),X.Yb(33,"mat-label"),X.Jc(34,"Please select sizes"),X.Xb(),X.Yb(35,"mat-chip-list",13,14),X.Hc(37,B,4,4,"ng-container",15),X.Xb(),X.Xb(),X.Vb(),X.Yb(38,"div",16),X.Yb(39,"mat-chip-list",17),X.Hc(40,H,5,2,"ng-container",15),X.lc(41,"gearImageView"),X.Xb(),X.Xb(),X.Yb(42,"mat-slide-toggle",18),X.gc("change",(function(e){return t.onSlideChange()})),X.Jc(43),X.Xb(),X.Yb(44,"div",8),X.Yb(45,"button",19),X.Jc(46," Back "),X.Xb(),X.Yb(47,"button",20),X.gc("click",(function(t){return X.Ac(e),X.xc(50).click()})),X.Jc(48," Images "),X.Xb(),X.Yb(49,"input",21,22),X.gc("change",(function(e){return t.onFileSelected(e)})),X.Xb(),X.Yb(51,"button",23),X.lc(52,"async"),X.Jc(53),X.Xb(),X.Xb(),X.Xb(),X.Xb(),X.Xb()}2&e&&(X.Eb(1),X.Lc(" ",t.editMode?"Edit Item":"New Gear","\n"),X.Eb(1),X.qc("ngIf",X.mc(3,13,t.isLoading$)),X.Eb(2),X.qc("formGroup",t.gearItemForm),X.Eb(31),X.qc("multiple",!0),X.Eb(2),X.qc("ngForOf",null==t.gearItemForm.controls?null:t.gearItemForm.controls.sizes.controls),X.Eb(1),X.qc("@imageUpload",t.gearItemImages.length),X.Eb(1),X.qc("ngStyle",X.tc(19,U,t.hideIfEmpty())),X.Eb(1),X.qc("ngForOf",X.mc(41,15,t.gearItemImages)),X.Eb(2),X.qc("labelPosition","after")("checked",t.gearItemForm.controls.inStock.value),X.Eb(1),X.Kc(t.gearItemForm.controls.inStock.value?"In stock":"Out of stock"),X.Eb(8),X.qc("disabled",!t.gearItemForm.valid||X.mc(52,17,t.isLoading$)),X.Eb(2),X.Lc(" ",t.editMode?"Update":"Post"," "))},directives:[M.e,r.m,i.w,i.p,i.g,z.a,z.b,z.c,E.b,A.b,i.b,i.o,i.f,E.a,i.s,E.h,E.i,F.b,z.e,i.c,E.f,s.c,r.l,r.n,G.c,q.a,z.f,J.a,i.h,s.a,$.a,s.d],pipes:[r.b,L],styles:[".gear-item-title[_ngcontent-%COMP%]{padding-left:24px}.action-buttons[_ngcontent-%COMP%]{margin-top:15px;display:-webkit-box;display:flex}.action-buttons[_ngcontent-%COMP%]   .post-button[_ngcontent-%COMP%]{margin-left:auto}.mat-form-field[_ngcontent-%COMP%]{width:100%}#imagesToUploadContainer[_ngcontent-%COMP%]{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start;flex-wrap:wrap;flex-flow:column;-webkit-box-pack:space-evenly;justify-content:space-evenly;margin-top:10px}.right-align[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]     .mat-horizontal-content-container{padding-left:0;padding-right:0;padding-bottom:24px}[_nghost-%COMP%]     .mat-form-field.mat-focused .mat-form-field-label{color:hsla(0,0%,100%,.7)}[_nghost-%COMP%]     .mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:auto}.upload-image-chips[_ngcontent-%COMP%]{margin-bottom:10px}[_nghost-%COMP%]     #imagesToUploadContainer mat-form-field div:nth-child(2){display:none}mat-slide-toggle[_ngcontent-%COMP%]{padding-left:10px;display:inline-block!important}[_nghost-%COMP%]     .mat-horizontal-content-container{padding-bottom:0!important}"],data:{animation:[Object(c.o)("imageUpload",[Object(c.n)("* => *",[Object(c.i)(":enter",[Object(c.m)({opacity:0,transform:"translateY(-100%)"}),Object(c.k)(290,[Object(c.e)(".3s ease-in-out",Object(c.m)({opacity:1,transform:"translateY(-3%)"}))])],{optional:!0}),Object(c.i)(":leave",[Object(c.m)({opacity:1,transform:"translateX(0)"}),Object(c.e)(".3s cubic-bezier(.34,-0.39,.7,1.5)",Object(c.m)({opacity:0,transform:"translateX(-30%)"}))],{optional:!0})])])]}}),e})(),R=(()=>{class e extends Y{constructor(e,t,n,r){super(e,t,n,r),this.preOrderAction=new m.a,this.preOrder$=this.preOrderAction.asObservable().pipe(Object(p.a)(e=>this.preOrderGearItemAsync(e))),this.headers={headers:new v.e({"Content-Type":"application/json"})}}preOrderGearItem(e){this.preOrderAction.next(e)}preOrderGearItemAsync(e){return this.loadingSubject.next(!0),this.http.post(`${this.merchandiseUrl}/${e.gearItemId}/pre-order`,JSON.stringify(e),this.headers).pipe(Object(g.a)(()=>this.loadingSubject.next(!1)),Object(x.a)(e=>(this.loadingSubject.next(!1),this.snackBarService.openSnackBarFromComponent("Error occured submitting the pre-order","Dismiss",S.a.Error),Object(b.a)(null))))}}return e.\u0275fac=function(t){return new(t||e)(X.cc(v.b),X.cc(S.b),X.cc(f.a),X.cc(P.c))},e.\u0275prov=X.Ob({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var W=n("d3UM"),Z=n("FKr1"),K=n("QibW");let Q=(()=>{class e{transform(e){return e.filter(e=>e.available)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=X.Rb({name:"filteredGearSizes",type:e,pure:!0}),e})();function ee(e,t){1&e&&(X.Wb(0),X.Tb(1,"mat-progress-bar",27),X.Vb())}function te(e,t){if(1&e&&(X.Yb(0,"mat-option",28),X.Jc(1),X.Xb()),2&e){const e=t.$implicit,n=X.kc(2);X.qc("value",e.size),X.Eb(1),X.Lc(" ",n.sizeEnum[e.size]," ")}}function ne(e,t){if(1&e){const e=X.Zb();X.Wb(0),X.Hc(1,ee,2,0,"ng-container",3),X.lc(2,"async"),X.Yb(3,"form",4),X.gc("ngSubmit",(function(t){return X.Ac(e),X.kc().onSubmit()})),X.Yb(4,"mat-horizontal-stepper"),X.Yb(5,"mat-step"),X.Yb(6,"mat-form-field"),X.Tb(7,"input",5),X.Yb(8,"mat-error"),X.Jc(9,"You must provide"),X.Yb(10,"strong"),X.Jc(11,"First Name"),X.Xb(),X.Xb(),X.Xb(),X.Yb(12,"mat-form-field"),X.Tb(13,"input",6),X.Yb(14,"mat-error"),X.Jc(15,"You must provide "),X.Yb(16,"strong"),X.Jc(17,"Last Name"),X.Xb(),X.Xb(),X.Xb(),X.Yb(18,"div",7),X.Yb(19,"button",8),X.gc("click",(function(t){return X.Ac(e),X.kc().onCancel()})),X.Jc(20," Cancel "),X.Xb(),X.Yb(21,"button",9),X.Jc(22," Next "),X.Xb(),X.Xb(),X.Xb(),X.Yb(23,"mat-step"),X.Yb(24,"mat-form-field"),X.Tb(25,"input",10),X.Yb(26,"mat-error"),X.Jc(27,"You must provide a "),X.Yb(28,"strong"),X.Jc(29,"Phone Number"),X.Xb(),X.Xb(),X.Xb(),X.Yb(30,"mat-form-field"),X.Tb(31,"input",11),X.Yb(32,"mat-error"),X.Jc(33,"You must provide an "),X.Yb(34,"strong"),X.Jc(35,"E-mail"),X.Xb(),X.Jc(36," address"),X.Xb(),X.Xb(),X.Yb(37,"div",7),X.Yb(38,"button",12),X.Jc(39,"Back"),X.Xb(),X.Yb(40,"button",9),X.Jc(41," Next "),X.Xb(),X.Xb(),X.Xb(),X.Yb(42,"mat-step"),X.Yb(43,"div",13),X.Yb(44,"mat-form-field",14),X.Yb(45,"mat-placeholder",15),X.Jc(46,"Select Your Size"),X.Xb(),X.Yb(47,"mat-select",16),X.Yb(48,"mat-option"),X.Jc(49,"--"),X.Xb(),X.Hc(50,te,2,2,"mat-option",17),X.lc(51,"filteredGearSizes"),X.Xb(),X.Yb(52,"mat-error"),X.Jc(53,"You must select a "),X.Yb(54,"strong"),X.Jc(55,"size"),X.Xb(),X.Xb(),X.Xb(),X.Yb(56,"mat-form-field"),X.Tb(57,"input",18),X.Yb(58,"mat-error"),X.Jc(59,"You must specify "),X.Yb(60,"strong"),X.Jc(61,"quantity"),X.Xb(),X.Xb(),X.Xb(),X.Xb(),X.Yb(62,"div",19),X.Yb(63,"mat-placeholder",15),X.Jc(64,"Preferred Contact:"),X.Xb(),X.Xb(),X.Yb(65,"div",20),X.Yb(66,"mat-radio-group",21),X.Yb(67,"mat-radio-button",22),X.Jc(68,"Text/Call"),X.Xb(),X.Yb(69,"mat-radio-button",23),X.Jc(70,"Email"),X.Xb(),X.Xb(),X.Xb(),X.Yb(71,"div",7),X.Yb(72,"button",24),X.Jc(73," Back "),X.Xb(),X.Yb(74,"button",25),X.gc("click",(function(t){return X.Ac(e),X.kc().onCancel()})),X.Jc(75," Cancel "),X.Xb(),X.Yb(76,"button",26),X.lc(77,"async"),X.Jc(78," Order! "),X.Xb(),X.Xb(),X.Xb(),X.Xb(),X.Xb(),X.Vb()}if(2&e){const e=X.kc();X.Eb(1),X.qc("ngIf",X.mc(2,5,e.isLoading$)),X.Eb(2),X.qc("formGroup",e.preOrderForm),X.Eb(47),X.qc("ngForOf",X.mc(51,7,e.gearItem.sizes)),X.Eb(17),X.qc("checked",!0),X.Eb(9),X.qc("disabled",!e.preOrderForm.valid||X.mc(77,9,e.isLoading$))}}function re(e,t){1&e&&X.Jc(0,"Order Summary")}function ie(e,t){if(1&e){const e=X.Zb();X.Yb(0,"mat-horizontal-stepper"),X.Yb(1,"mat-step"),X.Hc(2,re,1,0,"ng-template",29),X.Yb(3,"div"),X.Jc(4),X.Xb(),X.Yb(5,"div",7),X.Yb(6,"button",30),X.gc("click",(function(t){return X.Ac(e),X.kc().onCancel()})),X.Jc(7," Complete "),X.Xb(),X.Xb(),X.Xb(),X.Xb()}if(2&e){const e=X.kc();X.Eb(4),X.Nc(" Thank you for your pre-order. You have pre-ordered ",e.preOrderForm.get("orderDetails").value.quantity," ",e.gearItem.name," for $",e.gearItem.price," each. Your total is $",e.computeTotalPrice(),". We will be sending you a confirmation e-mail shortly. ")}}let ae=(()=>{class e{constructor(e,t,n,r,a){this.fb=e,this.dialogRef=t,this.route=n,this.merchandiseService=r,this.preOrderService=a,this.preOrderForm=this.fb.group({firstName:this.fb.control(null,i.v.required),lastName:this.fb.control(null,i.v.required),phoneNumber:this.fb.control(null,[i.v.required,i.v.pattern("[0-9]{0,10}")]),email:this.fb.control(null,[i.v.required,i.v.email]),orderDetails:this.fb.group({quantity:this.fb.control(1,i.v.required),size:this.fb.control(null,i.v.required)}),contactPreference:this.fb.group({cellOrEmail:this.fb.control(1)})}),this.sizeEnum=d,this.preOrderdItem$=this.preOrderService.preOrder$,this.isLoading$=this.preOrderService.loading$}ngOnInit(){this.route.children[0].firstChild.children.filter(e=>e.outlet===_.f).map(e=>e.params.pipe(Object(p.a)(e=>this.merchandiseService.findGearItem(+e.id)),Object(g.a)(e=>{this.gearItem=l(e)})).subscribe())}onSubmit(){this.preOrderService.preOrderGearItem({quantity:this.preOrderForm.value.orderDetails.quantity,size:this.preOrderForm.value.orderDetails.size,gearItemId:this.gearItem.id,contact:{firstName:this.preOrderForm.value.firstName,lastName:this.preOrderForm.value.lastName,email:this.preOrderForm.value.email,phoneNumber:this.preOrderForm.value.phoneNumber,preferredContact:+this.preOrderForm.value.contactPreference.cellOrEmail}})}computeTotalPrice(){return this.gearItem.price*this.preOrderForm.value.orderDetails.quantity}onCancel(){this.dialogRef.close()}}return e.\u0275fac=function(t){return new(t||e)(X.Sb(i.d),X.Sb(M.d),X.Sb(P.a),X.Sb(Y),X.Sb(R))},e.\u0275cmp=X.Mb({type:e,selectors:[["app-merchandise-pre-order-dialog"]],features:[X.Db([R])],decls:6,vars:5,consts:[["mat-dialog-title","",1,"gear-item-title"],[4,"ngIf","ngIfElse"],["finalizeOrder",""],[4,"ngIf"],[3,"formGroup","ngSubmit"],["matInput","","placeholder","First Name","formControlName","firstName","cdkFocusInitial",""],["matInput","","placeholder","Last Name","formControlName","lastName"],[1,"action-buttons"],["mat-raised-button","","color","warn","type","button",2,"margin-right","5px",3,"click"],["mat-raised-button","","color","accent","matStepperNext","","type","button"],["matInput","","type","number","maxlength","10","minlength","10","placeholder","Phone Number","formControlName","phoneNumber"],["matInput","","type","email","placeholder","E-mail","formControlName","email"],["mat-raised-button","","matStepperPrevious","","color","warn",2,"margin-right","5px"],["formGroupName","orderDetails"],["floatLabel","always"],[1,"placeholder"],["formControlName","size"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number","placeholder","Quantity","formControlName","quantity"],["id","preferred-contact-lable"],["formGroupName","contactPreference",1,"contact-preference"],["formControlName","cellOrEmail","aria-label","Select an option"],["value","1",3,"checked"],["value","2"],["mat-raised-button","","color","accent","matStepperPrevious","","type","button",2,"align-self","flex-end","margin-right","5px"],["mat-raised-button","","color","warn","type","button",1,"action-buttons",3,"click"],["mat-raised-button","","color","accent",1,"post-button",2,"align-self","flex-end",3,"disabled"],["color","accent","mode","indeterminate"],[3,"value"],["matStepLabel",""],["mat-raised-button","","color","accent",1,"post-button",2,"align-self","flex-end",3,"click"]],template:function(e,t){if(1&e&&(X.Yb(0,"h1",0),X.Jc(1),X.Xb(),X.Hc(2,ne,79,11,"ng-container",1),X.lc(3,"async"),X.Hc(4,ie,8,4,"ng-template",null,2,X.Ic)),2&e){const e=X.xc(5);X.Eb(1),X.Lc(" Pre-Order for ",t.gearItem.name,"\n"),X.Eb(1),X.qc("ngIf",!X.mc(3,3,t.preOrderdItem$))("ngIfElse",e)}},directives:[M.e,r.m,i.w,i.p,i.g,z.a,z.b,E.b,A.b,i.b,i.o,i.f,E.a,F.b,z.e,i.s,i.j,i.k,z.f,i.h,E.g,W.a,Z.n,r.l,K.b,K.a,J.a,z.c],pipes:[r.b,Q],styles:[".gear-item-title[_ngcontent-%COMP%]{padding-left:24px}.action-buttons[_ngcontent-%COMP%]{margin-top:15px;display:-webkit-box;display:flex}.action-buttons[_ngcontent-%COMP%]   .post-button[_ngcontent-%COMP%]{margin-left:auto}.mat-form-field[_ngcontent-%COMP%]{width:100%}#imagesToUploadContainer[_ngcontent-%COMP%]{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start;flex-wrap:wrap;flex-flow:column;-webkit-box-pack:space-evenly;justify-content:space-evenly;margin-top:10px}.right-align[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]     .mat-horizontal-content-container{padding-left:0;padding-right:0;padding-bottom:24px}[_nghost-%COMP%]     .mat-form-field.mat-focused .mat-form-field-label{color:hsla(0,0%,100%,.7)}[_nghost-%COMP%]     .mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:auto}.upload-image-chips[_ngcontent-%COMP%]{margin-bottom:10px}[_nghost-%COMP%]     #imagesToUploadContainer mat-form-field div:nth-child(2){display:none}mat-slide-toggle[_ngcontent-%COMP%]{padding-left:10px;display:inline-block!important}[_nghost-%COMP%]     .mat-horizontal-content-container{padding-bottom:0!important}.mat-radio-button[_ngcontent-%COMP%] ~ .mat-radio-button[_ngcontent-%COMP%]{margin-left:16px}.contact-preference[_ngcontent-%COMP%]{margin-left:10px}#preferred-contact-lable[_ngcontent-%COMP%]{margin-bottom:7px}"],changeDetection:0}),e})(),oe=(()=>{class e{constructor(e,t){this.router=e,this.route=t,this.component=V}openMerchandiseDialog(e){this.component=this.router.url.includes("pre-order")?ae:V,e.open(this.component,{width:"90%",maxWidth:"450px"}).afterClosed().subscribe(()=>{this.router.navigate(["merchandise"],{relativeTo:this.route})})}}return e.\u0275fac=function(t){return new(t||e)(X.cc(P.c),X.cc(P.a))},e.\u0275prov=X.Ob({token:e,factory:e.\u0275fac}),e})(),ce=(()=>{class e{constructor(e,t){this.merchandiseDialogService=e,this.dialog=t}ngOnInit(){setTimeout(()=>{this.merchandiseDialogService.openMerchandiseDialog(this.dialog)})}}return e.\u0275fac=function(t){return new(t||e)(X.Sb(oe),X.Sb(M.b))},e.\u0275cmp=X.Mb({type:e,selectors:[["app-merchandise-dialog-container"]],decls:0,vars:0,template:function(e,t){},styles:["mat-horizontal-stepper.mat-horizontal-content-container[_ngcontent-%COMP%]{padding:0 0 24px!important}"]}),e})();var se=n("mrSG"),le=n("M9IT"),me=n("Kqap"),be=n("0aut");let ue=(()=>{class e{constructor(){}getRemovedStoreItem(e,t){let n=null;for(let r=0;r<t.length;r++){const i=t[r];-1===e.indexOf(i)&&(n=i)}return n}getPagedItems(e,t,n,r,i){if(0===i.length)return e.slice(0,r);if(e.length===i.length){const t=[];return e.filter(e=>{n.map(n=>{n.id===e.id&&t.push(e)})}),t}if(e.length>i.length)return i.firstPage(),e.slice(0,r);if(n.length>0&&t.length>r){if(e.length<t.length){const a=this.getRemovedStoreItem(e,t);if(n.length>1){const o=n.indexOf(a),c=[...n];if(c.splice(o,1),!i.hasNextPage())return c;if(i.hasNextPage()){if(e.length===n.length)return e;const i=t.indexOf(a);return c.splice(n.length-1,0,e[i-1+(r-o)]),c}}else{if(e.length<=r)return i.firstPage(),e.slice(0,e.length);if(!i.hasNextPage()&&i.hasPreviousPage())return i.previousPage(),e.slice(e.length-r)}}}else if(!i.hasNextPage()&&!i.hasPreviousPage())return e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=X.Ob({token:e,factory:e.\u0275fac}),e})();var pe=n("e5XA"),ge=n("vxfF"),de=n("KXBU"),he=n("RL7/");let fe=(()=>{class e{constructor(){this.setVHFunc=()=>{const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",`${e}px`)}}onResize(){this.setVHFunc()}ngOnInit(){this.setVHFunc()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=X.Nb({type:e,selectors:[["","appIosVH",""]],hostBindings:function(e,t){1&e&&X.gc("resize",(function(e){return t.onResize(e)}),!1,X.zc)}}),e})();var ve=n("1vjc"),ye=n("XGsO"),Ie=n("Wp6s"),Oe=n("YBOo");function we(e,t){if(1&e&&(X.Yb(0,"mat-chip",11),X.Jc(1),X.Xb()),2&e){const e=X.kc().$implicit,t=X.kc();X.Eb(1),X.Lc(" ",t.sizes[e.size]," ")}}function xe(e,t){if(1&e&&(X.Wb(0),X.Hc(1,we,2,1,"mat-chip",10),X.Vb()),2&e){const e=t.$implicit;X.Eb(1),X.qc("ngIf",e.available)}}function ke(e,t){if(1&e){const e=X.Zb();X.Wb(0),X.Yb(1,"button",12),X.gc("click",(function(t){return X.Ac(e),X.kc(2).onEditGearItem()})),X.Jc(2," EDIT "),X.Xb(),X.Yb(3,"button",13),X.gc("click",(function(t){return X.Ac(e),X.kc(2).onDeleteGearItem()})),X.Jc(4," DELETE "),X.Xb(),X.Vb()}}function Se(e,t){if(1&e&&(X.Wb(0),X.Hc(1,ke,5,0,"ng-container",8),X.Vb()),2&e){const e=X.kc();X.Eb(1),X.qc("ngIf",e.isAdmin)}}const Ce=[{width:"360px",height:"400px",imageAnimation:ye.a.Zoom,thumbnails:!1,previewSwipe:!0,imageSwipe:!0,imageArrowsAutoHide:!1,previewCloseOnClick:!0,previewCloseOnEsc:!0,previewKeyboardNavigation:!0,previewInfinityMove:!0,imageInfinityMove:!0,previewZoom:!0,imageAutoPlay:!1,imageAutoPlayPauseOnHover:!0,previewAutoPlay:!1,previewAutoPlayPauseOnHover:!0,previewArrowsAutoHide:!0,imageBullets:!0,lazyLoading:!0,previewRotate:!0},{breakpoint:800,width:"100%",height:"360px",imagePercent:80,thumbnailsPercent:20,thumbnailsMargin:20,thumbnailMargin:20},{breakpoint:400,preview:!0,height:"260px"}];let Xe=(()=>{class e{constructor(e,t,n,r){this.router=e,this.route=t,this.merchandiseService=n,this.authService=r,this.sizes=d,this.galleryOptions=Ce,this.routeAnimationsElements=be.a}onEditGearItem(){this.router.navigate([{outlets:{modal:[this.gearItem.id,"edit"]}}],{relativeTo:this.route})}onPreOrderGearItem(){this.router.navigate([{outlets:{modal:[this.gearItem.id,"pre-order"]}}],{relativeTo:this.route})}onDeleteGearItem(){this.merchandiseService.deleteGearItem(this.gearItem)}}return e.\u0275fac=function(t){return new(t||e)(X.Sb(P.c),X.Sb(P.a),X.Sb(Y),X.Sb(he.a))},e.\u0275cmp=X.Mb({type:e,selectors:[["app-merchandise-item"]],inputs:{gearItem:"gearItem",isAdmin:"isAdmin"},decls:26,vars:13,consts:[[1,"gear-item",3,"ngClass"],["mat-card-image",""],[3,"ngxGalleryOptions","images"],[1,"gear-sizes"],[1,"sizes"],[3,"selectable"],[4,"ngFor","ngForOf"],[1,"price"],[4,"ngIf"],["id","pre-order","mat-raised-button","","color","accent",3,"click"],["id","chip",4,"ngIf"],["id","chip"],["id","edit","mat-raised-button","","color","accent",3,"click"],["id","delete","mat-raised-button","","color","warn",3,"click"]],template:function(e,t){1&e&&(X.Yb(0,"mat-card",0),X.Yb(1,"mat-card-header"),X.Yb(2,"mat-card-title"),X.Yb(3,"div"),X.Yb(4,"h3"),X.Jc(5),X.Xb(),X.Xb(),X.Xb(),X.Yb(6,"mat-card-subtitle"),X.Yb(7,"div"),X.Jc(8),X.Xb(),X.Xb(),X.Xb(),X.Yb(9,"div",1),X.Tb(10,"app-gallery-viewer",2),X.Xb(),X.Yb(11,"mat-card-content"),X.Yb(12,"div"),X.Yb(13,"div",3),X.Yb(14,"span",4),X.Jc(15,"Available Sizes:"),X.Xb(),X.Tb(16,"br"),X.Yb(17,"mat-chip-list",5),X.Hc(18,xe,2,1,"ng-container",6),X.Xb(),X.Xb(),X.Yb(19,"h2",7),X.Jc(20),X.Xb(),X.Xb(),X.Xb(),X.Yb(21,"mat-card-actions"),X.Hc(22,Se,2,1,"ng-container",8),X.lc(23,"async"),X.Yb(24,"button",9),X.gc("click",(function(e){return t.onPreOrderGearItem()})),X.Jc(25," PRE-ORDER "),X.Xb(),X.Xb(),X.Xb()),2&e&&(X.Ib("mat-elevation-z7",!0),X.qc("ngClass",t.routeAnimationsElements),X.Eb(5),X.Lc(" ",t.gearItem.name," "),X.Eb(3),X.Lc(" ",t.gearItem.inStock?"In stock":"Out of stock"," "),X.Eb(2),X.qc("ngxGalleryOptions",t.galleryOptions)("images",t.gearItem.images),X.Eb(7),X.qc("selectable",!1),X.Eb(1),X.qc("ngForOf",t.gearItem.sizes),X.Eb(2),X.Lc("$",t.gearItem.price,""),X.Eb(2),X.qc("ngIf",X.mc(23,11,t.authService.isLoggedIn$)))},directives:[Ie.a,r.k,G.a,Ie.e,Ie.i,Ie.h,Ie.f,Oe.a,Ie.d,s.c,r.l,Ie.b,r.m,F.b,s.a],pipes:[r.b],styles:["[_nghost-%COMP%]{margin:0 4px}.gear-item[_ngcontent-%COMP%]{margin:1.5rem 0;box-sizing:border-box;position:relative;top:0;width:300px;-webkit-transition:top .3s ease;transition:top .3s ease}@media(min-width:375px){.gear-item[_ngcontent-%COMP%]{width:360px}}.sizes[_ngcontent-%COMP%],   app-gallery-viewer>ngx-gallery{display:inline-block}.sizes[_ngcontent-%COMP%]{margin-bottom:8px}.price[_ngcontent-%COMP%]{margin-top:8px}.gear-item[_ngcontent-%COMP%]:hover{top:-10px}#delete[_ngcontent-%COMP%]{margin-right:0!important}"]}),e})();const Pe=["gearUp"],Ye=["paginator"];function _e(e,t){1&e&&X.Tb(0,"app-acting-spinner")}function je(e,t){if(1&e){const e=X.Zb();X.Yb(0,"div",18),X.Yb(1,"span"),X.Jc(2,"As an admin you can modify your inventory here"),X.Xb(),X.Yb(3,"button",19),X.gc("click",(function(t){return X.Ac(e),X.kc(2).onAddGearItems()})),X.Jc(4," Upload Gear "),X.Xb(),X.Xb()}}function Me(e,t){if(1&e&&(X.Wb(0),X.Hc(1,je,5,0,"div",17),X.Vb()),2&e){const e=X.kc();X.Eb(1),X.qc("ngIf",e.isAdmin)}}function ze(e,t){if(1&e&&(X.Wb(0),X.Tb(1,"app-merchandise-item",21),X.Vb()),2&e){const e=t.$implicit,n=X.kc(2);X.Eb(1),X.qc("isAdmin",n.isAdmin)("gearItem",e)}}function Ee(e,t){if(1&e&&(X.Wb(0),X.Hc(1,ze,2,2,"ng-container",20),X.Vb()),2&e){const e=t.ngIf;X.Eb(1),X.qc("ngForOf",e)}}const Ae=function(e){return{marginTop:e}},Fe=[{path:"",component:(()=>{class e{constructor(e,t,n,r,i,a,o,c){this.merchandiseService=e,this.router=t,this.eventbus=n,this.route=r,this.scroll=i,this.paginatorService=a,this.deviceInfo=o,this.authService=c,this.routeAnimationsElements=be.a,this.gearItems=[],this.pagedGearItems=[],this.breakpoint=3,this.length=0,this.pageSize=6,this.pageSizeOptions=[6,12,18,24],this.isSticky=!1,this.isAdmin=!1,this.gearItems$=Object(I.a)([this.merchandiseService.gearItems$,this.merchandiseService.updatedGearItems$,this.merchandiseService.newLatestGearItems$,this.merchandiseService.deleteGearItemsLatest$,this.merchandiseService.pageChangeAction]).pipe(Object(w.a)(([e])=>{const t=this.paginatorService.getPagedItems([...e],[...this.gearItems],[...this.pagedGearItems],this.pageSize,this.paginator);return this.length=e.length,this.gearItems=[...e],this.pagedGearItems=t,this.pagedGearItems}))}ngOnInit(){this.isAdmin=this.route.snapshot.data.roles.includes(_.g.Admin),this.eventbus.emit(new C.a(f.b.StickyHeader,this.isSticky)),this.scrollingSubscription=this.scroll.scrolled().pipe(Object(me.a)((e,t)=>{const n=t.getElementRef().nativeElement.scrollTop;return e.push(n),e.slice(e.length-2)},new Array)).subscribe(e=>{this.onWindowScroll(e)})}ngOnDestroy(){this.eventbus.emit(new C.a(f.b.StickyHeader,!this.isSticky)),this.eventbus.emit(new C.a(f.b.HideToolbar,!1)),this.scrollingSubscription.unsubscribe()}onWindowScroll(e){const t=e[e.length-1]||0;t<(e[e.length-2]||0)?this.eventbus.emit(new C.a(f.b.HideToolbar,!1)):t>280?this.eventbus.emit(new C.a(f.b.HideToolbar,!0)):t<280&&this.eventbus.emit(new C.a(f.b.HideToolbar,!1))}onArrowClick(){this.merchandiseCards.nativeElement.scrollIntoView({behavior:"smooth"})}onAddGearItems(){this.router.navigate([{outlets:{modal:["new"]}}],{relativeTo:this.route})}OnPageChange(e){this.pageEvent=new le.c,this.pageSize=e.pageSize;const t=e.pageIndex*e.pageSize;let n=t+e.pageSize;n>this.length&&(n=this.length),this.pagedGearItems=this.gearItems.slice(t,n),this.merchandiseService.onPageChange()}onResize(e){this.breakpoint=e.target.innerWidth<=800?1:3}}return e.\u0275fac=function(t){return new(t||e)(X.Sb(Y),X.Sb(P.c),X.Sb(f.a),X.Sb(P.a),X.Sb(ge.b),X.Sb(ue),X.Sb(de.a),X.Sb(he.a))},e.\u0275cmp=X.Mb({type:e,selectors:[["app-merchandise-list"]],viewQuery:function(e,t){var n;1&e&&(X.Pc(Pe,!0),X.Fc(Ye,!0)),2&e&&(X.wc(n=X.hc())&&(t.merchandiseCards=n.first),X.wc(n=X.hc())&&(t.paginator=n.first))},features:[X.Db([ue])],decls:24,vars:17,consts:[[3,"ngStyle"],[1,"background"],[1,"gradient"],[1,"container"],["appIosVH","",1,"gradient-2",3,"ngClass"],[2,"height","350px"],["cdkScrollable","","id","arrow-wrapper"],[1,"arrow-border",3,"click"],[1,"arrow","down"],[1,"pulse"],[4,"ngIf"],[2,"padding","0 10px"],[1,"heading","mat-display-2"],["gearUp",""],[1,"merchandise-cards"],[3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page","resize"],["paginator",""],["class","admin",4,"ngIf"],[1,"admin"],["mat-raised-button","","color","accent","type","button",3,"click"],[4,"ngFor","ngForOf"],[1,"list-item",3,"isAdmin","gearItem"]],template:function(e,t){1&e&&(X.Yb(0,"div",0),X.Yb(1,"div",1),X.Yb(2,"div",2),X.Tb(3,"div",3),X.Xb(),X.Yb(4,"div",4),X.Yb(5,"div",3),X.Tb(6,"div",5),X.Xb(),X.Xb(),X.Yb(7,"div",6),X.Yb(8,"div",7),X.gc("click",(function(e){return t.onArrowClick()})),X.Tb(9,"div",8),X.Tb(10,"div",9),X.Xb(),X.Xb(),X.Xb(),X.Hc(11,_e,1,0,"app-acting-spinner",10),X.lc(12,"async"),X.Yb(13,"div",11),X.Yb(14,"h2",12,13),X.Jc(16," The P League Collection "),X.Xb(),X.Hc(17,Me,2,1,"ng-container",10),X.lc(18,"async"),X.Yb(19,"div",14),X.Hc(20,Ee,2,1,"ng-container",10),X.lc(21,"async"),X.Xb(),X.Yb(22,"mat-paginator",15,16),X.gc("page",(function(e){return t.OnPageChange(e)}))("resize",(function(e){return t.onResize(e)}),!1,X.zc),X.Xb(),X.Xb(),X.Xb()),2&e&&(X.qc("ngStyle",X.tc(15,Ae,t.isSticky?"50px":"0")),X.Eb(4),X.qc("ngClass",t.deviceInfo.mobile?"mobile-img":"parallax"),X.Eb(7),X.qc("ngIf",X.mc(12,9,t.acting$)),X.Eb(6),X.qc("ngIf",X.mc(18,11,t.authService.isLoggedIn$)),X.Eb(3),X.qc("ngIf",X.mc(21,13,t.gearItems$)),X.Eb(2),X.qc("length",t.length)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",!0))},directives:[r.n,G.c,fe,r.k,G.a,r.m,le.a,ve.a,F.b,r.l,Xe],pipes:[r.b],styles:['mat-paginator[_ngcontent-%COMP%]{margin:1.5rem 0 1rem}.heading[_ngcontent-%COMP%]{text-align:center;letter-spacing:.05rem;line-height:1.4;font-weight:400;text-transform:uppercase;font-style:normal}.admin[_ngcontent-%COMP%]{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;height:100%;flex-wrap:wrap;-webkit-box-pack:space-evenly;justify-content:space-evenly}.admin[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .admin[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{align-self:center}.admin[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:16px}.merchandise-cards[_ngcontent-%COMP%]{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;flex-wrap:wrap;-webkit-box-pack:space-evenly;justify-content:space-evenly;-webkit-box-align:start;align-items:flex-start}.background[_ngcontent-%COMP%]{padding:0;position:relative}.background[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;bottom:0;right:0;opacity:.7;content:"";z-index:0}.background[_ngcontent-%COMP%]   .mobile-img[_ngcontent-%COMP%], .background[_ngcontent-%COMP%]   .parallax[_ngcontent-%COMP%]{background:url(https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_10/v1581901755/pleague/merchanidse_welcome_grpre3.jpg);background:-webkit-image-set(url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_10/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 1x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_20/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 2x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_30/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 3x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_50/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 4x) no-repeat top;background-image:-webkit-image-set(url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_10/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 1x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_20/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 2x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_30/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 3x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_50/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 4x) no-repeat center top;background-image:image-set(url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_10/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 1x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_20/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 2x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_30/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 3x,url("https://res.cloudinary.com/dkbelxhih/image/upload/f_auto,q_50/v1581901755/pleague/merchanidse_welcome_grpre3.jpg") 4x) no-repeat center top;height:100vh;height:calc(var(--vh, 1vh)*100);transform:translatez(0);-webkit-transform:translatez(0);background-position:50%;background-repeat:no-repeat;background-size:cover}.background[_ngcontent-%COMP%]   .mobile-img[_ngcontent-%COMP%]{background-attachment:scroll}.background[_ngcontent-%COMP%]   .gradient[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;bottom:51%;right:0;content:"";z-index:0}.background[_ngcontent-%COMP%]   .gradient-2[_ngcontent-%COMP%]:before{position:absolute;top:51%;left:0;bottom:0;right:0;content:"";z-index:0}.background[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{position:relative;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto;max-width:100%}#arrow-wrapper[_ngcontent-%COMP%]{width:60px;height:60px;display:block;position:absolute;left:50%;margin:0 auto 0 -30px;cursor:pointer;bottom:15px}.arrow-border[_ngcontent-%COMP%]{position:relative}.arrow-border[_ngcontent-%COMP%], .pulse[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%}.pulse[_ngcontent-%COMP%]{position:absolute;margin:0;-webkit-animation:pulsate 2s ease-out;animation:pulsate 2s ease-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;opacity:0;box-shadow:0 0 1px 2px #89849b;-webkit-animation-delay:2s;animation-delay:2s}@-webkit-keyframes pulsate{0%{-webkit-transform:scale(.9);transform:scale(.9);opacity:0}50%{opacity:1}to{-webkit-transform:scale(1.3);transform:scale(1.3);opacity:0}}@keyframes pulsate{0%{-webkit-transform:scale(.9);transform:scale(.9);opacity:0}50%{opacity:1}to{-webkit-transform:scale(1.3);transform:scale(1.3);opacity:0}}.down[_ngcontent-%COMP%]{-webkit-transform:rotate(135deg);transform:rotate(135deg)}'],changeDetection:0}),Object(se.a)([Object(pe.a)(),Object(se.b)("design:type",Object)],e.prototype,"acting$",void 0),e})(),data:{animation:"MerchandiseListPage"},resolve:{roles:a.a,merchandiseItems:Y}},{path:":id/edit",outlet:"modal",component:ce},{path:":id/pre-order",outlet:"modal",component:ce},{path:"new",outlet:"modal",component:ce}];let Ge=(()=>{class e{}return e.\u0275mod=X.Qb({type:e}),e.\u0275inj=X.Pb({factory:function(t){return new(t||e)},imports:[[P.g.forChild(Fe)],P.g]}),e})();n.d(t,"MerchandiseModule",(function(){return qe}));let qe=(()=>{class e{}return e.\u0275mod=X.Qb({type:e}),e.\u0275inj=X.Pb({factory:function(t){return new(t||e)},providers:[oe,a.a,{provide:M.d,useValue:{}},{provide:M.a,useValue:{}}],imports:[[r.c,Ge,o.a,i.t]]}),e})()},e5XA:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("CxKc"),i=n("0eTy");function a(){return function(e,t){const n=i.a.get(r.a);e[t]=n.acting$}}},lnXG:function(e,t,n){"use strict";const r=n("UvZa"),i=n("7104"),a=n("+0iv");e.exports=function e(t,n){switch(i(t)){case"object":return function(t,n){if("function"==typeof n)return n(t);if(n||a(t)){const r=new t.constructor;for(let i in t)r[i]=e(t[i],n);return r}return t}(t,n);case"array":return function(t,n){const r=new t.constructor(t.length);for(let i=0;i<t.length;i++)r[i]=e(t[i],n);return r}(t,n);default:return r(t)}}},qDJ8:function(e,t,n){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}}}]);