-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.181f27fa6fe2e873.js
1 lines (1 loc) · 2.61 KB
/
common.181f27fa6fe2e873.js
1
"use strict";(self.webpackChunkwire_store=self.webpackChunkwire_store||[]).push([[592],{1227:(E,c,e)=>{e.d(c,{N:()=>l});var a=e(5e3),_=e(1158);let l=(()=>{class i{constructor(n){this._locationService=n}resolve(n,s){return this._locationService.getStates()}}return i.\u0275fac=function(n){return new(n||i)(a.\u0275\u0275inject(_.a))},i.\u0275prov=a.\u0275\u0275defineInjectable({token:i,factory:i.\u0275fac,providedIn:"root"}),i})()},1158:(E,c,e)=>{e.d(c,{a:()=>n});var a=e(1135),_=e(8505),l=e(4004),i=e(5e3),r=e(520);let n=(()=>{class s{constructor(t){this._httpClient=t,this._states=new a.X(null),this._statesCodes=new a.X(null),this._cities=new a.X(null)}get states$(){return this._states.asObservable()}get statesCodes$(){return this._statesCodes.asObservable()}get cities$(){return this._cities.asObservable()}getStates(){return this._httpClient.get("assets/data/states.json").pipe((0,_.b)(t=>{this._states.next(t)}))}getStatesCodes(){return this._httpClient.get("assets/data/statescodes.json").pipe((0,_.b)(t=>{this._statesCodes.next(t)}))}getCitiesByState(t){return this._httpClient.get("assets/data/cities.json").pipe((0,l.U)(h=>h.filter(o=>o.state===t)))}getStateFiltered(t){return this._httpClient.get("assets/data/statescodes.json").pipe((0,l.U)(h=>h.filter(o=>o.name===t)))}}return s.\u0275fac=function(t){return new(t||s)(i.\u0275\u0275inject(r.eN))},s.\u0275prov=i.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"}),s})()},6816:(E,c,e)=>{e.d(c,{M:()=>d});var a=e(8505),_=e(5161),l=e(2340),i=e(5e3),r=e(520),n=e(5620);const s=l.N.API_URL;let d=(()=>{class t{constructor(o,u){this._httpClient=o,this.store=u}addToWishlist(o){return console.log("AddToWishlist:",o),this._httpClient.post(`${s}/wishlist`,{product:o}).pipe((0,a.b)(({wishlist:u})=>{this.store.dispatch((0,_.ju)({wishlist:u}))}))}getClientWishlist(){return console.log("GetClientWishlist"),this._httpClient.get(`${s}/wishlist/by-client`).pipe((0,a.b)(({wishlist:o})=>{console.log(o),this.store.dispatch((0,_.ju)({wishlist:o}))}))}removeFromWishlist(o){return this._httpClient.delete(`${s}/wishlist/${o}`).pipe((0,a.b)(({wishlist:u})=>{this.store.dispatch((0,_.ju)({wishlist:u}))}))}}return t.\u0275fac=function(o){return new(o||t)(i.\u0275\u0275inject(r.eN),i.\u0275\u0275inject(n.yh))},t.\u0275prov=i.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},9652:(E,c,e)=>{e.d(c,{kP:()=>l});let a=r=>crypto.getRandomValues(new Uint8Array(r)),l=(r,n=21)=>((r,n,s)=>{let d=(2<<Math.log(r.length-1)/Math.LN2)-1,t=-~(1.6*d*n/r.length);return(h=n)=>{let o="";for(;;){let u=s(t),v=t;for(;v--;)if(o+=r[u[v]&d]||"",o.length===h)return o}}})(r,n,a)}}]);