{"version":3,"file":"333.bedd986812f59d8f.js","sources":["webpack:///./src/app/modules/opt-out/pages/opt-out/verify-address/verify-address.component.html","webpack:///./src/app/modules/opt-out/pages/opt-out/verify-address/verify-address.component.ts","webpack:///./src/app/modules/opt-out/pages/opt-out/opt-out.component.html","webpack:///./src/app/modules/opt-out/opt-out.routing.ts","webpack:///./src/app/modules/opt-out/pages/opt-out/opt-out.component.ts","webpack:///./src/app/modules/opt-out/opt-out.module.ts"],"sourceRoot":"webpack:///","sourcesContent":["
\n \n \n \n\n
\n \n
\n \n
\n \n\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport SmartyStreetsSDK from 'smartystreets-javascript-sdk';\nimport { environment } from '../../../../../../environments/environment';\nimport { ISmartyAddress } from '@shared/models/address';\nimport { ReCaptchaV3Service } from 'ng-recaptcha';\nimport {\n BehaviorSubject,\n catchError,\n delay,\n distinctUntilChanged,\n filter,\n from,\n map,\n mergeMap,\n Observable,\n of,\n tap,\n} from 'rxjs';\nimport { RecaptchaService } from '@core/services/recaptcha.service';\n\nconst SmartyCore = SmartyStreetsSDK.core;\nconst Lookup = SmartyStreetsSDK.usAutocompletePro.Lookup;\n\n@UntilDestroy({ checkProperties: true })\n@Component({\n selector: 'app-opt-out-verify-address',\n templateUrl: './verify-address.component.html',\n styleUrls: [\n '../../../../sell/pages/sell/verify-address/verify-address.component.scss',\n ],\n})\nexport class OptOutVerifyAddressComponent {\n @ViewChild('trigger') menuTrigger!: MatMenuTrigger;\n @ViewChild('streetAddressInput') streetAddressInput!: ElementRef;\n @Output() selectAddress = new EventEmitter();\n streetAddress$ = new BehaviorSubject('');\n protected focused = false;\n protected results: ISmartyAddress[] = [];\n protected resultsSelected: ISmartyAddress[] = [];\n private client: any;\n private lookup?: SmartyStreetsSDK.usAutocompletePro.Lookup;\n private checked = false;\n private selected = false;\n\n constructor(\n private recaptchaV3Service: ReCaptchaV3Service,\n private recaptchaService: RecaptchaService\n ) {\n let key = environment.smartyCode;\n const credentials = new SmartyCore.SharedCredentials(key);\n let clientBuilder = new SmartyCore.ClientBuilder(credentials).withLicenses([\n 'us-autocomplete-pro-cloud',\n ]);\n this.client = clientBuilder.buildUsAutocompleteProClient();\n this.streetAddress$\n .pipe(\n distinctUntilChanged(),\n filter((address) => address.length > 3),\n mergeMap((address) => {\n if (!this.checked) {\n return this.needRecaptchaCheck().pipe(\n map((result) => {\n if (!result) {\n return '';\n }\n this.checked = true;\n return address;\n })\n );\n }\n return of(address);\n }),\n filter((address) => !!address),\n map((address: string) => {\n this.lookup = new Lookup(address);\n this.lookup.maxResults = 10;\n (this.lookup as any).source = 'all';\n console.log('Lookup', this.lookup);\n return this.lookup;\n }),\n mergeMap((lookup) =>\n from(this.client.send(lookup)).pipe(\n map((results: any) => results.result),\n tap((results) => {\n this.results = results as ISmartyAddress[];\n if (results.length > 0) {\n this.menuTrigger.openMenu();\n } else {\n this.menuTrigger.closeMenu();\n }\n }),\n delay(10),\n tap((results) => {\n if (results.length > 0) {\n this.streetAddressInput.nativeElement.focus();\n }\n })\n )\n ),\n catchError((error) => {\n console.log(error);\n return of([]);\n })\n )\n .subscribe();\n }\n\n get streetAddress(): string {\n return this.streetAddress$.value;\n }\n\n set streetAddress(value: string) {\n this.streetAddress$.next(value);\n }\n\n needRecaptchaCheck(): Observable {\n return this.recaptchaV3Service\n .execute('getMyOffer')\n .pipe(mergeMap((token) => this.recaptchaService.checkToken(token)));\n }\n\n async handleSelected(selected: string) {\n if (!this.lookup) return;\n this.lookup.selected = selected;\n try {\n const results = await this.client.send(this.lookup);\n this.resultsSelected = results.result;\n } catch (err) {\n console.log(err);\n }\n }\n\n handleSelect(address: ISmartyAddress) {\n if (address.entries > 1) {\n const selected =\n address.streetLine +\n ' ' +\n address.secondary +\n ' (' +\n address.entries +\n ') ' +\n address.city +\n ', ' +\n address.state +\n ' ' +\n address.zipcode;\n this.handleSelected(selected);\n } else {\n this.selectAddress.emit(address);\n this.streetAddress =\n address.streetLine +\n ' ' +\n address.secondary +\n ' ' +\n address.city +\n ', ' +\n address.state +\n ' ' +\n address.zipcode;\n setTimeout(() => {\n this.menuTrigger.closeMenu();\n }, 500);\n }\n }\n\n clearSelected() {\n setTimeout(() => {\n this.resultsSelected = [];\n }, 500);\n }\n\n handleFocus() {\n this.focused = true;\n if (this.streetAddress.length > 3 && this.results.length > 0) {\n this.menuTrigger.openMenu();\n }\n }\n}\n","
\n
\n
\n

Take Me Off Your Mailing List

\n
\n If you do not wish to receive mail from us, please provide your mailing\n address below.\n
\n
\n\n
\n
\n \n
\n\n \n Unsubscribe\n \n
\n
\n
\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { APP_TITLE } from '@core/constants';\n\nimport { OptOutComponent } from './pages/opt-out/opt-out.component';\n\nconst routes: Routes = [\n {\n path: '',\n children: [\n {\n path: '',\n component: OptOutComponent,\n title: APP_TITLE('Opt Out'),\n },\n ],\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class OptOutRoutingModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { DeviceDetectorService } from 'ngx-device-detector';\nimport { environment } from '../../../../../environments/environment';\n\nimport { ISmartyAddress } from '@shared/models/address';\nimport { HttpParams } from '@angular/common/http';\n\n@Component({\n selector: 'app-opt-out',\n templateUrl: './opt-out.component.html',\n styleUrls: ['../../../sell/pages/sell/sell.component.scss'],\n})\nexport class OptOutComponent implements OnInit {\n protected step: 'verify-address' = 'verify-address';\n address?: ISmartyAddress;\n loading = false;\n utm_source: string | null = null;\n protected isMobile = false;\n protected browser: string = '';\n protected device: string = '';\n\n constructor(private deviceService: DeviceDetectorService) {\n const url = new URL(window.location.href);\n this.utm_source = url.searchParams.get('utm_source');\n\n this.browser = this.deviceService.browser;\n this.device = this.deviceService.isMobile() ? 'mobile' : 'desktop';\n }\n\n ngOnInit(): void {\n this.isMobile = this.deviceService.isMobile();\n }\n\n selectAddress(address: ISmartyAddress) {\n this.address = address;\n }\n\n sendSelectedData() {\n if (!this.address) {\n return;\n }\n // this.loading = true;\n let params = new HttpParams()\n .set('city', this.address.city)\n .set('secondary', this.address.secondary)\n .set('state', this.address.state)\n .set('street_line', this.address.streetLine)\n .set('zipcode', this.address.zipcode)\n .set('browser', this.browser.toLowerCase())\n .set('device', this.device);\n if (this.utm_source) {\n params = params.append('utm_source', this.utm_source);\n }\n\n parent.postMessage(\n { type: 'resizeIframe', height: this.isMobile ? 1180 : 1000 },\n '*'\n );\n document.location.href = `${\n environment.beIframe\n }/opt_out?${params.toString()}`;\n }\n\n clearAddress() {\n this.address = undefined;\n this.step = 'verify-address';\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { SharedModule } from '@shared/shared.module';\nimport { OptOutRoutingModule } from './opt-out.routing';\n\nimport { OptOutComponent } from './pages/opt-out/opt-out.component';\nimport { OptOutVerifyAddressComponent } from './pages/opt-out/verify-address/verify-address.component';\nimport { RECAPTCHA_V3_SITE_KEY, RecaptchaV3Module } from 'ng-recaptcha';\nimport { environment } from '../../../environments/environment';\nimport { RecaptchaService } from '@core/services/recaptcha.service';\n\n@NgModule({\n declarations: [OptOutComponent, OptOutVerifyAddressComponent],\n imports: [\n CommonModule,\n SharedModule,\n OptOutRoutingModule,\n FormsModule,\n MatMenuModule,\n MatSelectModule,\n RecaptchaV3Module,\n ],\n providers: [\n {\n provide: RECAPTCHA_V3_SITE_KEY,\n useValue: environment.recaptchaKey,\n },\n RecaptchaService,\n ],\n})\nexport class OptOutModule {}\n"],"names":["i0","result_r6","_r8","$implicit","ctx_r7","handleSelect","streetLine","secondary","city","state","zipcode","OptOutVerifyAddressComponent_ng_container_10_li_1_Template","ctx_r3","resultsSelected","result_r10","entries","_r14","ctx_r13","OptOutVerifyAddressComponent_ng_container_11_li_1_span_3_Template","OptOutVerifyAddressComponent_ng_container_11_li_1_Template","ctx_r4","results","SmartyCore","SmartyStreetsSDK","Lookup","OptOutVerifyAddressComponent","_class","constructor","recaptchaV3Service","recaptchaService","this","selectAddress","EventEmitter","streetAddress$","BehaviorSubject","focused","checked","selected","credentials","SharedCredentials","environment","smartyCode","clientBuilder","ClientBuilder","withLicenses","client","buildUsAutocompleteProClient","pipe","distinctUntilChanged","filter","address","length","mergeMap","of","needRecaptchaCheck","map","result","lookup","maxResults","source","console","log","from","send","tap","menuTrigger","openMenu","closeMenu","delay","streetAddressInput","nativeElement","focus","catchError","error","subscribe","streetAddress","value","next","execute","token","checkToken","handleSelected","_this","_asyncToGenerator","err","emit","setTimeout","clearSelected","handleFocus","i1","i2","core","Xpm","selectors","viewQuery","rf","ctx","$event","OptOutVerifyAddressComponent_ng_container_10_Template","OptOutVerifyAddressComponent_ng_container_11_Template","_r2","ctx_r1","__decorate","UntilDestroy","checkProperties","routes","path","children","component","OptOutComponent","deviceService","step","loading","utm_source","isMobile","browser","device","url","URL","window","location","href","searchParams","get","ngOnInit","sendSelectedData","params","HttpParams","set","toLowerCase","append","parent","postMessage","type","height","document","beIframe","toString","clearAddress","undefined","decls","vars","consts","template","OptOutComponent_app_opt_out_verify_address_9_Template","title","APP_TITLE","OptOutRoutingModule","RouterModule","forChild","OptOutModule","provide","RECAPTCHA_V3_SITE_KEY","useValue","recaptchaKey","RecaptchaService","imports","CommonModule","SharedModule","FormsModule","MatMenuModule","MatSelectModule","RecaptchaV3Module"],"mappings":";;kiBAiCUA,MAAA,WAEEA,MAAA,yBAAAC,EAAAD,MAAAE,GAAAC,UAAAC,EAAAJ,MAAA,UAASA,MAAAI,EAAAC,aAAAJ,GAAoB,GAE7BD,MAAA,aACEA,MAAA,GAGFA,sCAHEA,MAAA,GAAAA,MAAA,IAAAC,EAAAK,WAAA,IAAAL,EA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