UNPKG

374 kBJavaScriptView Raw
1import { CommonModule } from '@angular/common';
2import { Component, Input, NgModule, Optional, Inject, EventEmitter, Output, Injectable, ChangeDetectionStrategy, Pipe, ChangeDetectorRef, InjectionToken } from '@angular/core';
3import { MatCardModule, MatButtonModule, MatIconModule, MatMenuModule, MatChipsModule, MatTooltipModule, MatCheckboxModule, MatExpansionModule, MatInputModule, MatOptionModule, MatProgressSpinnerModule, MatSelectModule, MatListModule as MatListModule$1, MatDividerModule } from '@angular/material';
4import { ImageTransformationService, ImageTransformationModule } from '@vendasta/core/image-transformation';
5import { VaIconModule, VaBadgeModule, VaSafeHtmlModule, VaListModule, VaImageGalleryModule, VaBreadcrumbsModule, CheckboxFilterField, FilterSection, Filters, TabbedFilterField, FilterService, UIKitModule } from '@vendasta/uikit';
6import { __read, __spread, __extends, __assign, __values } from 'tslib';
7import { DisplayPriceService, CoreSharedModule, formatDisplayPrice, formatBillingFrequency, Addon } from '@vendasta/core/shared';
8import { BehaviorSubject, combineLatest, of, Observable, ReplaySubject, merge, zip } from 'rxjs';
9import { TranslateService, TranslateModule } from '@ngx-translate/core';
10import { map, switchMap, debounceTime, distinctUntilChanged, startWith, filter, take, skipWhile, shareReplay, tap } from 'rxjs/operators';
11import { Validators, FormControl, FormGroup, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
12import { MatListModule } from '@angular/material/list';
13import { VaFormsModule } from '@vendasta/forms';
14import { BillingModel, buildBilledProductFromProductPricingAndAddon, BillingService, BillingModule } from '@vendasta/core/billing';
15import { FieldType, Field, CustomField, AddonKey, CommonField } from '@vendasta/sales-orders';
16import uuid from 'uuid/v4';
17import { MatProgressSpinnerModule as MatProgressSpinnerModule$1 } from '@angular/material/progress-spinner';
18import { isNullOrUndefined } from 'util';
19import { Categories, Pricing as Pricing$1, Currency } from '@vendasta/core/marketplace-packages';
20import { trigger, state, style, transition, animate } from '@angular/animations';
21
22/**
23 * @fileoverview added by tsickle
24 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
25 */
26var VaPricingComponent = /** @class */ (function () {
27 function VaPricingComponent(translateService, displayPriceService) {
28 var _this = this;
29 this.translateService = translateService;
30 this.displayPriceService = displayPriceService;
31 this.pricing = null;
32 this.wrapFrequency = false;
33 this.isAddon = false;
34 this.hasVerifiedContract = false;
35 this.highlightPrice = true;
36 this.loaded = true;
37 this.pricing$$ = new BehaviorSubject(null);
38 this.billedProduct$$ = new BehaviorSubject(null);
39 this.hasVerifiedContract$$ = new BehaviorSubject(false);
40 this.isFree$ = combineLatest([this.pricing$, this.billedProduct$, this.hasVerifiedContract$]).pipe(map((/**
41 * @param {?} __0
42 * @return {?}
43 */
44 function (_a) {
45 var _b = __read(_a, 3), pricing = _b[0], billedProduct = _b[1], hasVerifiedContract = _b[2];
46 /** @type {?} */
47 var isFreeHelper = (/**
48 * @param {?} prices
49 * @return {?}
50 */
51 function (prices) {
52 return prices ? prices.some((/**
53 * @param {?} p
54 * @return {?}
55 */
56 function (p) { return p.price === 0 || p.price === undefined; })) : false;
57 });
58 if (hasVerifiedContract && billedProduct) {
59 return billedProduct.pricingTiers.length === 1 ? isFreeHelper(billedProduct.pricingTiers) : false;
60 }
61 return !!pricing && isFreeHelper(pricing.prices);
62 })));
63 this.shouldContactSales$ = combineLatest([this.pricing$, this.billedProduct$, this.hasVerifiedContract$]).pipe(map((/**
64 * @param {?} __0
65 * @return {?}
66 */
67 function (_a) {
68 var _b = __read(_a, 3), pricing = _b[0], billedProduct = _b[1], hasVerifiedContract = _b[2];
69 /** @type {?} */
70 var nestedPricesIsContactSales = (/**
71 * @param {?} prices
72 * @return {?}
73 */
74 function (prices) {
75 return prices && prices.length > 0 ? prices.some((/**
76 * @param {?} p
77 * @return {?}
78 */
79 function (p) { return p.price === null || p.price < 0; })) : true;
80 });
81 if (hasVerifiedContract && billedProduct) {
82 return nestedPricesIsContactSales(billedProduct.pricingTiers);
83 }
84 if (!pricing) {
85 return true;
86 }
87 return nestedPricesIsContactSales(pricing.prices);
88 })));
89 this.isFlatPrice$ = this.billedProduct$.pipe(map((/**
90 * @param {?} billedProduct
91 * @return {?}
92 */
93 function (billedProduct) { return billedProduct.pricingTiers.length === 1; })));
94 this.pricingTierData$ = this.billedProduct$.pipe(switchMap((/**
95 * @param {?} billedProduct
96 * @return {?}
97 */
98 function (billedProduct) {
99 /** @type {?} */
100 var pricingTierObservables = billedProduct.pricingTiers.map((/**
101 * @param {?} pricingTier
102 * @return {?}
103 */
104 function (pricingTier) {
105 return combineLatest(of(pricingTier.isStartingPrice), _this.buildPricingTierString(pricingTier), _this.buildPricingTierForProduct(pricingTier, billedProduct.billingFrequency), _this.buildPricingTierForAddon(pricingTier), _this.buildPriceStringForTier(pricingTier, billedProduct.billingFrequency, pricingTier.isStartingPrice), _this.buildPriceStringForTier(pricingTier)).pipe(map((/**
106 * @param {?} __0
107 * @return {?}
108 */
109 function (_a) {
110 var _b = __read(_a, 6), isStartingPrice = _b[0], pricingTierString = _b[1], pricingTierForProduct = _b[2], pricingTierForAddon = _b[3], priceStringForTier = _b[4], priceStringForTierWithoutFreq = _b[5];
111 return {
112 isStartingPrice: isStartingPrice,
113 pricingTierString: pricingTierString,
114 pricingTierForProduct: pricingTierForProduct,
115 pricingTierForAddon: pricingTierForAddon,
116 priceStringForTier: priceStringForTier,
117 priceStringForTierWithoutFreq: priceStringForTierWithoutFreq
118 };
119 })));
120 }));
121 return combineLatest.apply(void 0, __spread(pricingTierObservables));
122 })));
123 this.priceData$ = this.pricing$.pipe(switchMap((/**
124 * @param {?} pricing
125 * @return {?}
126 */
127 function (pricing) {
128 /** @type {?} */
129 var priceObservables = pricing.prices.map((/**
130 * @param {?} price
131 * @return {?}
132 */
133 function (price) {
134 return combineLatest(of(price.isStartingPrice), _this.buildPriceStringForPricing(price, pricing.currency, true, false), _this.buildPriceStringForPricing(price, pricing.currency, false, true), _this.buildFrequencyString(price.frequency)).pipe(map((/**
135 * @param {?} __0
136 * @return {?}
137 */
138 function (_a) {
139 var _b = __read(_a, 4), isStartingPrice = _b[0], priceStringForPricingWithoutFrequency = _b[1], priceStringForPricingWithFrequency = _b[2], frequencyString = _b[3];
140 return {
141 isStartingPrice: isStartingPrice,
142 priceStringForPricingWithoutFrequency: priceStringForPricingWithoutFrequency,
143 priceStringForPricingWithFrequency: priceStringForPricingWithFrequency,
144 frequencyString: frequencyString
145 };
146 })));
147 }));
148 return combineLatest.apply(void 0, __spread(priceObservables));
149 })));
150 this.commitmentMessage$ = this.buildCommitmentMessage();
151 }
152 Object.defineProperty(VaPricingComponent.prototype, "pricing$", {
153 get: /**
154 * @return {?}
155 */
156 function () {
157 return this.pricing$$.asObservable();
158 },
159 enumerable: true,
160 configurable: true
161 });
162 Object.defineProperty(VaPricingComponent.prototype, "billedProduct$", {
163 get: /**
164 * @return {?}
165 */
166 function () {
167 return this.billedProduct$$.asObservable();
168 },
169 enumerable: true,
170 configurable: true
171 });
172 Object.defineProperty(VaPricingComponent.prototype, "hasVerifiedContract$", {
173 get: /**
174 * @return {?}
175 */
176 function () {
177 return this.hasVerifiedContract$$.asObservable();
178 },
179 enumerable: true,
180 configurable: true
181 });
182 /**
183 * @param {?} changes
184 * @return {?}
185 */
186 VaPricingComponent.prototype.ngOnChanges = /**
187 * @param {?} changes
188 * @return {?}
189 */
190 function (changes) {
191 if (changes.hasOwnProperty('pricing')) {
192 this.pricing$$.next(changes.pricing.currentValue);
193 }
194 if (changes.hasOwnProperty('billedProduct')) {
195 this.billedProduct$$.next(changes.billedProduct.currentValue);
196 }
197 if (changes.hasOwnProperty('hasVerifiedContract')) {
198 this.hasVerifiedContract$$.next(changes.hasVerifiedContract.currentValue);
199 }
200 };
201 /**
202 * @param {?} tier
203 * @return {?}
204 */
205 VaPricingComponent.prototype.buildPricingTierString = /**
206 * @param {?} tier
207 * @return {?}
208 */
209 function (tier) {
210 /** @type {?} */
211 var max = String(tier.rangeMax);
212 if (tier.rangeMax === -1) {
213 max = '∞';
214 if (tier.rangeMin === 0 || tier.rangeMin === 1) {
215 return of('');
216 }
217 }
218 return this.translateService.stream('FRONTEND.STORE.MIN_TO_MAX', { minRange: String(tier.rangeMin), maxRange: max });
219 };
220 /**
221 * @param {?} tier
222 * @param {?=} frequency
223 * @return {?}
224 */
225 VaPricingComponent.prototype.buildPricingTierForProduct = /**
226 * @param {?} tier
227 * @param {?=} frequency
228 * @return {?}
229 */
230 function (tier, frequency) {
231 var _this = this;
232 return combineLatest(this.buildPricingTierString(tier), this.buildFrequencyString(frequency)).pipe(switchMap((/**
233 * @param {?} __0
234 * @return {?}
235 */
236 function (_a) {
237 var _b = __read(_a, 2), pricingTier = _b[0], formattedFrequency = _b[1];
238 if (pricingTier) {
239 return _this.translateService.stream('FRONTEND.STORE.PRODUCT_PRICING_WITH_FREQUENCY', {
240 pricingTier: pricingTier,
241 frequency: formattedFrequency
242 });
243 }
244 return of(formattedFrequency);
245 })));
246 };
247 /**
248 * @param {?} tier
249 * @return {?}
250 */
251 VaPricingComponent.prototype.buildPricingTierForAddon = /**
252 * @param {?} tier
253 * @return {?}
254 */
255 function (tier) {
256 return this.buildPricingTierString(tier).pipe(map((/**
257 * @param {?} pricingRange
258 * @return {?}
259 */
260 function (pricingRange) { return pricingRange ? pricingRange : ''; })));
261 };
262 /**
263 * @param {?} price
264 * @param {?} currency
265 * @param {?} excludeFrequency
266 * @param {?} canIncludeStartingAtPrefix
267 * @return {?}
268 */
269 VaPricingComponent.prototype.buildPriceStringForPricing = /**
270 * @param {?} price
271 * @param {?} currency
272 * @param {?} excludeFrequency
273 * @param {?} canIncludeStartingAtPrefix
274 * @return {?}
275 */
276 function (price, currency, excludeFrequency, canIncludeStartingAtPrefix) {
277 return this.displayPriceService.formatDisplayPrice(price.price, currency, (/** @type {?} */ ((excludeFrequency ? '' : price.frequency))), true, true, true, price.isStartingPrice && canIncludeStartingAtPrefix);
278 };
279 /**
280 * @param {?} tier
281 * @param {?=} frequency
282 * @param {?=} isStartingPrice
283 * @return {?}
284 */
285 VaPricingComponent.prototype.buildPriceStringForTier = /**
286 * @param {?} tier
287 * @param {?=} frequency
288 * @param {?=} isStartingPrice
289 * @return {?}
290 */
291 function (tier, frequency, isStartingPrice) {
292 return this.displayPriceService.formatDisplayPrice(tier.price, this.billedProduct.currency, (/** @type {?} */ (frequency)), undefined, undefined, undefined, isStartingPrice);
293 };
294 /**
295 * @param {?=} frequency
296 * @return {?}
297 */
298 VaPricingComponent.prototype.buildFrequencyString = /**
299 * @param {?=} frequency
300 * @return {?}
301 */
302 function (frequency) {
303 return this.displayPriceService.formatBillingFrequency(frequency);
304 };
305 /**
306 * @return {?}
307 */
308 VaPricingComponent.prototype.buildCommitmentMessage = /**
309 * @return {?}
310 */
311 function () {
312 var _this = this;
313 return combineLatest([
314 this.translateService.stream('FRONTEND.STORE.PRICING_FREQUENCIES'),
315 this.billedProduct$,
316 this.pricing$,
317 this.isFree$,
318 this.shouldContactSales$
319 ]).pipe(switchMap((/**
320 * @param {?} __0
321 * @return {?}
322 */
323 function (_a) {
324 var _b = __read(_a, 5), frequencyTranslations = _b[0], billedProduct = _b[1], pricing = _b[2], isFree = _b[3], shouldContactSales = _b[4];
325 /** @type {?} */
326 var frequency = billedProduct ? billedProduct.billingFrequency.toString().toLowerCase() :
327 pricing && pricing.prices.length > 0 ? pricing.prices[0].frequency.toLowerCase() : '';
328 /** @type {?} */
329 var frequencyString = '';
330 if (frequency === 'yearly') {
331 frequencyString = frequencyTranslations.YEAR;
332 }
333 else if (frequency === 'monthly') {
334 frequencyString = frequencyTranslations.MONTH;
335 }
336 if (!frequencyString || isFree || shouldContactSales) {
337 return of('');
338 }
339 if (billedProduct && billedProduct.commitment) {
340 /** @type {?} */
341 var initial = billedProduct.commitment.initial;
342 /** @type {?} */
343 var recurring = billedProduct.commitment.recurring;
344 return _this.translateService.stream('FRONTEND.STORE.COMMITMENT_WITH_RENEWAL', {
345 initial: initial,
346 frequencyString: frequencyString,
347 recurring: recurring,
348 });
349 }
350 return of('');
351 })));
352 };
353 VaPricingComponent.decorators = [
354 { type: Component, args: [{
355 selector: 'va-pricing',
356 template: "<ng-container *ngIf=\"highlightPrice\">\n <highlight-pricing [pricing]=\"pricing\"\n [billedProduct]=\"billedProduct\"\n [highlightPrice]=\"highlightPrice\"\n [isAddon]=\"isAddon\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [wrapFrequency]=\"wrapFrequency\"\n [loaded]=\"loaded\">\n </highlight-pricing>\n</ng-container>\n<ng-container *ngIf=\"!highlightPrice\">\n <table-pricing [pricing]=\"pricing\"\n [highlightPrice]=\"highlightPrice\"\n [billedProduct]=\"billedProduct\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [loaded]=\"loaded\">\n </table-pricing>\n</ng-container>\n",
357 styles: [""]
358 }] }
359 ];
360 /** @nocollapse */
361 VaPricingComponent.ctorParameters = function () { return [
362 { type: TranslateService },
363 { type: DisplayPriceService }
364 ]; };
365 VaPricingComponent.propDecorators = {
366 pricing: [{ type: Input }],
367 billedProduct: [{ type: Input }],
368 wrapFrequency: [{ type: Input }],
369 isAddon: [{ type: Input }],
370 hasVerifiedContract: [{ type: Input }],
371 highlightPrice: [{ type: Input }],
372 loaded: [{ type: Input }]
373 };
374 return VaPricingComponent;
375}());
376if (false) {
377 /** @type {?} */
378 VaPricingComponent.prototype.pricing;
379 /** @type {?} */
380 VaPricingComponent.prototype.billedProduct;
381 /** @type {?} */
382 VaPricingComponent.prototype.wrapFrequency;
383 /** @type {?} */
384 VaPricingComponent.prototype.isAddon;
385 /** @type {?} */
386 VaPricingComponent.prototype.hasVerifiedContract;
387 /** @type {?} */
388 VaPricingComponent.prototype.highlightPrice;
389 /** @type {?} */
390 VaPricingComponent.prototype.loaded;
391 /** @type {?} */
392 VaPricingComponent.prototype.pricing$$;
393 /** @type {?} */
394 VaPricingComponent.prototype.billedProduct$$;
395 /** @type {?} */
396 VaPricingComponent.prototype.hasVerifiedContract$$;
397 /** @type {?} */
398 VaPricingComponent.prototype.isFree$;
399 /** @type {?} */
400 VaPricingComponent.prototype.shouldContactSales$;
401 /** @type {?} */
402 VaPricingComponent.prototype.isFlatPrice$;
403 /** @type {?} */
404 VaPricingComponent.prototype.pricingTierData$;
405 /** @type {?} */
406 VaPricingComponent.prototype.priceData$;
407 /** @type {?} */
408 VaPricingComponent.prototype.commitmentMessage$;
409 /**
410 * @type {?}
411 * @private
412 */
413 VaPricingComponent.prototype.translateService;
414 /**
415 * @type {?}
416 * @private
417 */
418 VaPricingComponent.prototype.displayPriceService;
419}
420
421/**
422 * @fileoverview added by tsickle
423 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
424 */
425var HighlightPricingComponent = /** @class */ (function (_super) {
426 __extends(HighlightPricingComponent, _super);
427 function HighlightPricingComponent() {
428 return _super !== null && _super.apply(this, arguments) || this;
429 }
430 HighlightPricingComponent.decorators = [
431 { type: Component, args: [{
432 selector: 'highlight-pricing',
433 template: "<ng-container *ngIf=\"loaded; else loading\">\n <div class=\"no-price\" *ngIf=\"shouldContactSales$ | async; else dontContactSales\">\n {{ 'FRONTEND.STORE.CONTACT_SALES' | translate }}\n </div>\n <ng-template #dontContactSales>\n <div class=\"no-price\" *ngIf=\"isFree$ | async; else notFree\">\n <b>{{ 'FRONTEND.STORE.FREE' | translate }}</b>\n </div>\n <ng-template #notFree>\n <ng-container *ngIf=\"!isAddon\">\n <ng-container *ngIf=\"hasVerifiedContract && billedProduct; else usePricing\">\n <div *ngFor=\"let tier of pricingTierData$ | async\" class=\"price-box\">\n <span>\n <span *ngIf=\"tier.isStartingPrice\" class=\"starting-at\">{{ 'FRONTEND.STORE.STARTING_AT' | translate }}</span>\n <b class=\"price-number\">{{ tier.priceStringForTierWithoutFreq }}</b>\n </span>\n <span class=\"tier-billing-freq\" [ngClass]=\"{'va-wrap': wrapFrequency}\">\n {{ tier.pricingTierForProduct }}\n </span>\n </div>\n </ng-container>\n <ng-template #usePricing>\n <ng-container *ngIf=\"pricing?.prices\">\n <div *ngFor=\"let price of priceData$ | async; let i = index\" class=\"price-box\">\n <span>\n <span *ngIf=\"price.isStartingPrice\" class=\"starting-at\">{{ 'FRONTEND.STORE.STARTING_AT' | translate }}</span>\n <b class=\"price-number\">\n <ng-container *ngIf=\"i == 1\">+</ng-container>\n {{ price.priceStringForPricingWithoutFrequency }}\n </b>\n </span>\n <span *ngIf=\"price.frequencyString\" class=\"billing-freq\" [ngClass]=\"{'va-wrap': wrapFrequency}\">\n {{ price.frequencyString }}\n </span>\n </div>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"isAddon\">\n <div *ngIf=\"hasVerifiedContract && billedProduct; else useAddonPricing\">\n <div *ngFor=\"let tier of pricingTierData$ | async\" class=\"price-box\">\n <span class=\"addon-billing-freq\">\n {{ tier.pricingTierForAddon }}\n </span>\n <span>\n <span *ngIf=\"tier.isStartingPrice\" class=\"starting-at\">{{ 'FRONTEND.STORE.STARTING_AT' | translate }}</span>\n <b class=\"price-number\">\n {{ tier.priceStringForTier }}\n </b>\n </span>\n </div>\n </div>\n <ng-template #useAddonPricing>\n <div class=\"price-box\">\n <span *ngIf=\"pricing?.prices[0].frequency\" class=\"addon-billing-freq\">\n {{ (priceData$ | async)[0]?.frequencyString }}\n </span>\n <span>\n <span *ngIf=\"pricing?.prices[0]?.isStartingPrice\" class=\"starting-at\">\n {{ 'FRONTEND.STORE.STARTING_AT' | translate }}\n </span>\n <b class=\"price-number\">\n {{ (priceData$ | async)[0]?.priceStringForPricingWithoutFrequency }}\n </b>\n </span>\n </div>\n </ng-template>\n </ng-container>\n <div class=\"commitment\" *ngIf=\"billedProduct && billedProduct.commitment && billedProduct.commitment.initial > 1\">\n {{ commitmentMessage$ | async }}\n </div>\n </ng-template>\n </ng-template>\n</ng-container>\n<ng-template #loading>\n <div class=\"stencil-pricing stencil-shimmer\"></div>\n</ng-template>\n",
434 styles: [":host{color:#9e9e9e}.starting-at{margin-right:5px}.price-box{display:-webkit-box;display:flex;-webkit-box-align:baseline;align-items:baseline;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;flex-direction:row-reverse}.no-price{text-align:center}b{color:#212121;font-size:20px}@media screen and (max-width:600px){.no-price,.price-box,b{font-size:16px}}.billing-freq{text-transform:capitalize;-webkit-box-flex:1;flex:1}.tier-billing-freq{-webkit-box-flex:1;flex:1}.addon-billing-freq{padding-left:5px}.va-wrap{display:block}.stencil-pricing{height:1em}.commitment{color:#9e9e9e;font-size:12px;font-style:italic}"]
435 }] }
436 ];
437 return HighlightPricingComponent;
438}(VaPricingComponent));
439
440/**
441 * @fileoverview added by tsickle
442 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
443 */
444var TablePricingComponent = /** @class */ (function (_super) {
445 __extends(TablePricingComponent, _super);
446 function TablePricingComponent() {
447 return _super !== null && _super.apply(this, arguments) || this;
448 }
449 TablePricingComponent.decorators = [
450 { type: Component, args: [{
451 selector: 'table-pricing',
452 template: "<ng-container *ngIf=\"loaded; else loading\">\n <div *ngIf=\"hasVerifiedContract && billedProduct; else usePricing\">\n <div class=\"price-container\" *ngIf=\"isFlatPrice$ | async; else notFlatPrice\">\n <div class=\"price\">\n {{ (pricingTierData$ | async)[0]?.priceStringForTier }}\n </div>\n </div>\n <ng-template #notFlatPrice>\n <div class=\"price-container--tiered\" *ngIf=\"!(isFlatPrice$ | async)\">\n <div class=\"pricing-tier\" *ngFor=\"let tier of pricingTierData$ | async\">\n <div class=\"pricing-tier__range\">{{ tier.pricingTierString }}</div>\n <div class=\"pricing-tier__price\">\n {{ tier.priceStringForTier }}\n </div>\n </div>\n </div>\n </ng-template>\n <div class=\"commitment\" *ngIf=\"billedProduct && billedProduct.commitment && billedProduct.commitment.initial > 1\">\n {{ commitmentMessage$ | async }}\n </div>\n </div>\n <ng-template #usePricing>\n <div class=\"gray-font\">\n <ng-container *ngIf=\"shouldContactSales$ | async; else dontContactSales\">\n {{ 'FRONTEND.STORE.CONTACT_SALES' | translate }}\n </ng-container>\n <ng-template #dontContactSales>\n <ng-container *ngIf=\"isFree$ | async; else notFree\">\n {{ 'FRONTEND.STORE.FREE' | translate }}\n </ng-container>\n <ng-template #notFree>\n {{ (priceData$ | async)[0].priceStringForPricingWithFrequency }}\n <div class=\"commitment\" *ngIf=\"billedProduct && billedProduct.commitment && billedProduct.commitment.initial > 1\">\n {{ commitmentMessage$ | async }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n </ng-template>\n</ng-container>\n<ng-template #loading>\n <div class=\"stencil-pricing stencil-shimmer\"></div>\n</ng-template>\n",
453 styles: [":host{color:#616161}.price-container--tiered{font-size:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;display:-webkit-box;display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.price-container--tiered .pricing-tier{border-bottom:1px solid #e0e0e0;padding:5px 0;display:-webkit-box;display:flex}.price-container--tiered .pricing-tier:first-child{padding-top:0}.price-container--tiered .pricing-tier:last-child{padding-bottom:0;border-bottom:none}.price-container--tiered .pricing-tier .pricing-tier__range{padding-right:20px;-webkit-box-flex:1;flex:1}.stencil-pricing{height:1em}.commitment{color:#9e9e9e;font-size:12px;font-style:italic}"]
454 }] }
455 ];
456 return TablePricingComponent;
457}(VaPricingComponent));
458
459/**
460 * @fileoverview added by tsickle
461 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
462 */
463/*tslint:disable*/
464var En = /** @class */ (function () {
465 function En() {
466 }
467 En.en = {
468 "FRONTEND.STORE": {
469 "TOTAL": "Total",
470 "CONTACT_SALES": "Contact Sales",
471 "FREE": "Free",
472 "STARTING_AT": "Starting at",
473 "ENABLED_UPPER": "ENABLED",
474 "ENABLE_UPPER": "ENABLE",
475 "MIN_TO_MAX": "{{minRange}} to {{maxRange}}",
476 "PRODUCT_PRICING_WITH_FREQUENCY": "{{pricingTier}} accounts {{frequency}}",
477 "COMMITMENT_WITH_RENEWAL": "*{{initial}} {{frequencyString}} minimum, renews for {{recurring}} {{frequencyString}} periods",
478 "COMMITMENT": "${{initial}} ${{frequencyString}} commitment",
479 "PRICING_FREQUENCIES": {
480 "MONTH": "month",
481 "YEAR": "year"
482 },
483 "REQUIRES_DESCRIPTOR": "(Requires {{requirementName}})",
484 "ADMINISTRATIVE_QUESTIONS": "Administrative Questions",
485 "AUTO_TITLE_TEXT": {
486 "SOME_FIELDS_INVALID": "* Some fields are invalid and/or required but empty",
487 "OPTIONAL_FIELDS_UNANSWERED": "Optional fields unanswered",
488 "COMPLETE": "Complete"
489 },
490 "REQUIRES": "Requires",
491 "ENABLED_WITH_PREREQUISITE": "Enabled with {{prerequisite}}",
492 "PRICE_APPLIES_PER_UNIT": "Price applies per unit within a range",
493 "PRICE_APPLIES_TO_ALL_UNITS": "Price applies to all units once range is met",
494 "PRICING": "Pricing",
495 "FAQS": "FAQs",
496 "GALLERY": "Gallery",
497 "FILES": "Files",
498 "GET_IT_NOW": "Get It Now",
499 "CONTAINS_NUM_ITEMS": "Contains {{itemCount}} items"
500 }
501 };
502 return En;
503}());
504if (false) {
505 /** @type {?} */
506 En.en;
507}
508
509/**
510 * @fileoverview added by tsickle
511 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
512 */
513/*tslint:disable*/
514var Cs = /** @class */ (function () {
515 function Cs() {
516 }
517 Cs.cs = {
518 "FRONTEND.STORE": {
519 "TOTAL": "Celkem",
520 "CONTACT_SALES": "Kontaktovat obchodního zástupce",
521 "FREE": "Zdarma",
522 "STARTING_AT": "Začíná na",
523 "ENABLED_UPPER": "POVOLENO",
524 "ENABLE_UPPER": "POVOLIT",
525 "MIN_TO_MAX": "{{minRange}} až {{maxRange}}",
526 "PRODUCT_PRICING_WITH_FREQUENCY": "{{pricingTier}} účtů za {{frequency}}",
527 "COMMITMENT_WITH_RENEWAL": "*{{initial}} {{frequencyString}} minimum, obnovuje se na {{recurring}} {{frequencyString}}",
528 "COMMITMENT": "Závazek {{initial}} {{frequencyString}}",
529 "PRICING_FREQUENCIES": {
530 "MONTH": "měsíč",
531 "YEAR": "rok"
532 },
533 "REQUIRES_DESCRIPTOR": "(Vyžaduje {{requirementName}})",
534 "ADMINISTRATIVE_QUESTIONS": "Administrativní otázky",
535 "AUTO_TITLE_TEXT": {
536 "SOME_FIELDS_INVALID": "* Některá pole jsou neplatná a/nebo povinná, ale prázdná",
537 "OPTIONAL_FIELDS_UNANSWERED": "Volitelná pole nezodpovězena",
538 "COMPLETE": "Kompletní"
539 },
540 "REQUIRES": "Vyžaduje",
541 "ENABLED_WITH_PREREQUISITE": "Povoleno s {{prerequisite}}",
542 "PRICE_APPLIES_PER_UNIT": "Cena platí za jednotku v rozsahu",
543 "PRICE_APPLIES_TO_ALL_UNITS": "Cena se vztahuje na všechny jednotky, jakmile je dosaženo rozsahu",
544 "PRICING": "Cena",
545 "FAQS": "FAQ",
546 "GALLERY": "Galerie",
547 "FILES": "Soubory",
548 "GET_IT_NOW": "Získat hned",
549 "CONTAINS_NUM_ITEMS": "Obsahuje {{itemCount}} položek"
550 }
551 };
552 return Cs;
553}());
554if (false) {
555 /** @type {?} */
556 Cs.cs;
557}
558
559/**
560 * @fileoverview added by tsickle
561 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
562 */
563var VaPricingModule = /** @class */ (function () {
564 function VaPricingModule(translateService, currentLang$, defaultLang$) {
565 this.translateService = translateService;
566 if (!this.translateService.translations.hasOwnProperty('en')) {
567 this.translateService.reloadLang('en');
568 }
569 if (!this.translateService.translations.hasOwnProperty('cs')) {
570 this.translateService.reloadLang('cs');
571 }
572 this.translateService.setTranslation('en', En.en, true);
573 this.translateService.setTranslation('cs', Cs.cs, true);
574 if (currentLang$) {
575 currentLang$.subscribe((/**
576 * @param {?} currentLang
577 * @return {?}
578 */
579 function (currentLang) { return translateService.use(currentLang); }));
580 }
581 if (defaultLang$) {
582 defaultLang$.subscribe((/**
583 * @param {?} defaultLang
584 * @return {?}
585 */
586 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
587 }
588 }
589 VaPricingModule.decorators = [
590 { type: NgModule, args: [{
591 imports: [
592 CommonModule,
593 CoreSharedModule,
594 TranslateModule.forChild()
595 ],
596 declarations: [VaPricingComponent, HighlightPricingComponent, TablePricingComponent],
597 exports: [VaPricingComponent]
598 },] }
599 ];
600 /** @nocollapse */
601 VaPricingModule.ctorParameters = function () { return [
602 { type: TranslateService },
603 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
604 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
605 ]; };
606 return VaPricingModule;
607}());
608if (false) {
609 /**
610 * @type {?}
611 * @private
612 */
613 VaPricingModule.prototype.translateService;
614}
615
616/**
617 * @fileoverview added by tsickle
618 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
619 */
620var StoreCardComponent = /** @class */ (function () {
621 function StoreCardComponent(imageTransformationService) {
622 this.imageTransformationService = imageTransformationService;
623 this.purchasedClicked = new EventEmitter();
624 this.cardClicked = new EventEmitter();
625 this.descriptionClicked = new EventEmitter();
626 this.bannerClicked = new EventEmitter();
627 }
628 /**
629 * @return {?}
630 */
631 StoreCardComponent.prototype.getBannerColorForName = /**
632 * @return {?}
633 */
634 function () {
635 // determine an icon color for a product with no icon by using the product name
636 /** @type {?} */
637 var COLOR_CODES = [
638 '#EF5350', '#42A5F5', '#66BB6A', '#FFA726', '#AB47BC', '#FFCA28', '#EC407A', '#26C6DA',
639 '#FF7B57'
640 ];
641 /** @type {?} */
642 var nameSum = 0;
643 /** @type {?} */
644 var defaultColor = '#808080';
645 if (!this.item.name) {
646 return defaultColor;
647 }
648 for (var i = 0; i < this.item.name.length; i++) {
649 nameSum += this.item.name[i].charCodeAt(0);
650 }
651 /** @type {?} */
652 var index = nameSum % COLOR_CODES.length;
653 return COLOR_CODES[index];
654 };
655 /**
656 * @param {?} imageUrl
657 * @return {?}
658 */
659 StoreCardComponent.prototype.getSrcsetHeaderUrls = /**
660 * @param {?} imageUrl
661 * @return {?}
662 */
663 function (imageUrl) {
664 return this.imageTransformationService.getSrcSetForImage(imageUrl, [680, 1360, 2720]);
665 };
666 StoreCardComponent.decorators = [
667 { type: Component, args: [{
668 selector: 'va-store-card',
669 template: "\n<mat-card class=\"hover-card\" *ngIf=\"item\" (click)=\"cardClicked.emit(item)\">\n<div class=\"hover-area\">\n <div class=\"product-banner\" (click)=\"bannerClicked.emit(item)\"\n [style.background-color]=\"item.headerImageUrl ? '': getBannerColorForName()\">\n <img class=\"img-container\" *ngIf=\"item.headerImageUrl\"\n [src]=\"item.headerImageUrl\" [srcset]=\"getSrcsetHeaderUrls(item.headerImageUrl)\">\n </div>\n\n <div class=\"description\" (click)=\"descriptionClicked.emit(item)\">\n <mat-card-header>\n <va-icon mat-card-avatar [diameter]=\"40\" [name]=\"item.name\" [iconUrl]=\"item.iconUrl\"></va-icon>\n <mat-card-title>{{item.name}}</mat-card-title>\n <mat-card-subtitle>\n <ng-container *ngIf=\"item.pricing; else formatted\">\n <va-pricing [pricing]=\"item.pricing\"\n [highlightPrice]=\"false\"></va-pricing>\n </ng-container>\n <ng-template #formatted>{{item.formattedPrice}}</ng-template>\n </mat-card-subtitle>\n </mat-card-header>\n <mat-card-content> {{ item.tagline }}\n </mat-card-content>\n </div>\n\n <button *ngIf=\"item.purchased !== undefined\"\n mat-button color=\"primary\" class=\"enabled-indicator\" (click)=\"purchasedClicked.emit(item)\" [disabled]=\"item.purchased\">\n <i *ngIf=\"!item.purchased\" class=\"material-icons\">add</i>\n <i *ngIf=\"item.purchased\" class=\"material-icons\" style=\"color: #39B74A\">check</i>\n <span>{{ (item.purchased ? 'FRONTEND.STORE.ENABLED_UPPER' : 'FRONTEND.STORE.ENABLE_UPPER') | translate }}</span>\n </button>\n </div>\n</mat-card>\n ",
670 styles: [":host{position:relative}::ng-deep .mat-card-header-text{width:100%}mat-card.hover-card{overflow:hidden;padding:0;margin-bottom:0}mat-card.hover-card mat-card-subtitle,mat-card.hover-card mat-card-title{margin:0 80px 0 0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}mat-card.hover-card mat-card-subtitle{font-size:12px;margin-top:4px}.hover-area{position:relative;cursor:pointer}.product-banner{max-height:133px;overflow:hidden;display:-webkit-box;display:flex;width:100%;height:100px;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center}.product-banner img{max-width:100%}@media screen and (min-width:480px){.hover-area{padding-top:55%}.hover-area:hover .description{top:0}.hover-area:hover .enabled-indicator span{width:70px}.product-banner{max-height:none;position:absolute;height:60%;top:0}}.description{box-sizing:border-box;padding:10px 16px 0;overflow:hidden;background:#fff;color:#212121;-webkit-transition:.3s;transition:.3s}.description:after{content:'';display:block;width:100%;height:40%;position:absolute;bottom:0;left:0;background:-webkit-gradient(linear,left top,left bottom,color-stop(40%,rgba(255,255,255,0)),color-stop(70%,#fff));background:linear-gradient(rgba(255,255,255,0) 40%,#fff 70%)}mat-card-header{box-sizing:border-box;padding-bottom:16px;margin:0;height:40%;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}mat-card-content{min-height:40px;max-height:80px;padding:16px;margin:0 -16px;border-top:1px solid #e0e0e0;font-size:12px}.enabled-indicator{position:absolute;right:8px;bottom:8px}.enabled-indicator span{display:inline-block;width:70px;overflow:hidden;-webkit-transition:.3s;transition:.3s}@media screen and (min-width:480px){.description{position:absolute;top:60%;width:100%;height:100%}.description:after{height:70%}mat-card-content{min-height:0;max-height:none}.enabled-indicator span{width:0}}button[mat-button]{padding:0 8px;min-width:0}mat-card-actions{position:relative;padding:8px!important;margin:0!important;text-align:right;border-top:1px solid #e0e0e0;background-color:#fff;color:#212121}.status{font-size:14px}.img-container{height:100%;width:100%}"]
671 }] }
672 ];
673 /** @nocollapse */
674 StoreCardComponent.ctorParameters = function () { return [
675 { type: ImageTransformationService }
676 ]; };
677 StoreCardComponent.propDecorators = {
678 item: [{ type: Input }],
679 purchasedClicked: [{ type: Output }],
680 cardClicked: [{ type: Output }],
681 descriptionClicked: [{ type: Output }],
682 bannerClicked: [{ type: Output }]
683 };
684 return StoreCardComponent;
685}());
686if (false) {
687 /** @type {?} */
688 StoreCardComponent.prototype.item;
689 /** @type {?} */
690 StoreCardComponent.prototype.purchasedClicked;
691 /** @type {?} */
692 StoreCardComponent.prototype.cardClicked;
693 /** @type {?} */
694 StoreCardComponent.prototype.descriptionClicked;
695 /** @type {?} */
696 StoreCardComponent.prototype.bannerClicked;
697 /**
698 * @type {?}
699 * @private
700 */
701 StoreCardComponent.prototype.imageTransformationService;
702}
703
704/**
705 * @fileoverview added by tsickle
706 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
707 */
708var StoreCardModule = /** @class */ (function () {
709 function StoreCardModule(translateService, currentLang$, defaultLang$) {
710 this.translateService = translateService;
711 if (!this.translateService.translations.hasOwnProperty('en')) {
712 this.translateService.reloadLang('en');
713 }
714 if (!this.translateService.translations.hasOwnProperty('cs')) {
715 this.translateService.reloadLang('cs');
716 }
717 this.translateService.setTranslation('en', En.en, true);
718 this.translateService.setTranslation('cs', Cs.cs, true);
719 if (currentLang$) {
720 currentLang$.subscribe((/**
721 * @param {?} currentLang
722 * @return {?}
723 */
724 function (currentLang) { return translateService.use(currentLang); }));
725 }
726 if (defaultLang$) {
727 defaultLang$.subscribe((/**
728 * @param {?} defaultLang
729 * @return {?}
730 */
731 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
732 }
733 }
734 StoreCardModule.decorators = [
735 { type: NgModule, args: [{
736 imports: [
737 CommonModule,
738 VaIconModule,
739 MatCardModule,
740 MatButtonModule,
741 MatIconModule,
742 MatMenuModule,
743 ImageTransformationModule,
744 VaPricingModule,
745 TranslateModule.forChild()
746 ],
747 declarations: [StoreCardComponent],
748 exports: [StoreCardComponent]
749 },] }
750 ];
751 /** @nocollapse */
752 StoreCardModule.ctorParameters = function () { return [
753 { type: TranslateService },
754 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
755 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
756 ]; };
757 return StoreCardModule;
758}());
759if (false) {
760 /**
761 * @type {?}
762 * @private
763 */
764 StoreCardModule.prototype.translateService;
765}
766
767/**
768 * @fileoverview added by tsickle
769 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
770 */
771var StoreComponent = /** @class */ (function () {
772 function StoreComponent() {
773 this.items = [];
774 this.searchable = true;
775 this.itemClicked = new EventEmitter();
776 }
777 Object.defineProperty(StoreComponent.prototype, "filteredItems", {
778 get: /**
779 * @return {?}
780 */
781 function () {
782 var _this = this;
783 if (this.filterTerm) {
784 return this.items.filter((/**
785 * @param {?} pkg
786 * @return {?}
787 */
788 function (pkg) { return pkg.name.toLowerCase().indexOf(_this.filterTerm.toLowerCase()) !== -1; }));
789 }
790 return this.items;
791 },
792 enumerable: true,
793 configurable: true
794 });
795 StoreComponent.decorators = [
796 { type: Component, args: [{
797 selector: 'va-store',
798 template: "\n <div class=\"toolbar\">\n <div *ngIf=\"searchable\" class=\"table-controls-row\">\n <va-search-box (update)=\"filterTerm = $event\"></va-search-box>\n </div>\n </div>\n <div class=\"row row-gutters\">\n <div *ngFor=\"let item of filteredItems\" class=\"col-flex\">\n <va-store-card [item]=\"item\" (cardClicked)=\"this.itemClicked.emit(item)\"></va-store-card>\n </div>\n </div>\n ",
799 styles: [".flex-row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.toolbar{padding:0;background-color:#fff;color:#616161}.toolbar .disabled{cursor:default}.toolbar .disabled mat-icon{cursor:default;color:#9e9e9e}.toolbar va-search-box{margin-right:10px;width:350px}.toolbar .table-controls-row{padding:0 10px 10px;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.toolbar .table-controls-row:first-of-type{padding-top:10px}.top-border{border-top:1px solid #fff}.selected{background-color:#fff}.row{display:-webkit-box;display:flex;flex-wrap:wrap}.row+.row-gutters{margin-top:0}.row-gutters{margin-top:-20px;margin-left:-20px}.row-gutters>.col-flex{padding-top:20px;padding-left:20px}.col-flex{position:relative;max-width:100%;box-sizing:border-box;-webkit-box-flex:0;flex:0 0 auto;width:100%}@media screen and (min-width:480px){.col-flex{width:50%}}@media screen and (min-width:1200px){.col-flex{width:33.333333%}}"]
800 }] }
801 ];
802 StoreComponent.propDecorators = {
803 items: [{ type: Input }],
804 searchable: [{ type: Input }],
805 itemClicked: [{ type: Output }]
806 };
807 return StoreComponent;
808}());
809if (false) {
810 /** @type {?} */
811 StoreComponent.prototype.items;
812 /** @type {?} */
813 StoreComponent.prototype.searchable;
814 /** @type {?} */
815 StoreComponent.prototype.itemClicked;
816 /** @type {?} */
817 StoreComponent.prototype.filterTerm;
818}
819
820/**
821 * @fileoverview added by tsickle
822 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
823 */
824var DropDownFormSectionComponent = /** @class */ (function () {
825 function DropDownFormSectionComponent(translateService) {
826 this.translateService = translateService;
827 this.startOpen = false;
828 this.displayAutoTitle = false;
829 this.titleText = '';
830 this.displayAutoDescription = true;
831 this.descriptionText = '';
832 this.editingHint = '';
833 this.expandable = true;
834 this.autoDescriptionText = '';
835 this.iconName = 'help_outline';
836 this.subscriptions = [];
837 this.uniqueIndex = 1;
838 this.autoTitleText = '';
839 }
840 /**
841 * @return {?}
842 */
843 DropDownFormSectionComponent.prototype.ngOnInit = /**
844 * @return {?}
845 */
846 function () {
847 var _this = this;
848 /** @type {?} */
849 var allFieldsHidden = this.fields.reduce((/**
850 * @param {?} p
851 * @param {?} c
852 * @param {?} i
853 * @param {?} a
854 * @return {?}
855 */
856 function (p, c, i, a) { return p && c.hidden; }), true);
857 if (allFieldsHidden) {
858 this.expandable = false;
859 }
860 while (this.parentForm.controls.hasOwnProperty(this.titleText + this.uniqueIndex)) {
861 this.uniqueIndex += 1;
862 }
863 this.parentForm.addControl(this.titleText + this.uniqueIndex, this.toFormGroup(this.fields));
864 /** @type {?} */
865 var form = (/** @type {?} */ (this.parentForm.controls[this.titleText + this.uniqueIndex]));
866 for (var key in form.controls) {
867 if (form.controls.hasOwnProperty(key)) {
868 if (this.prepopulatedData != null && this.prepopulatedData.hasOwnProperty(key)) {
869 form.controls[key].setValue(this.prepopulatedData[key]);
870 }
871 }
872 }
873 this.subscriptions.push(combineLatest([
874 form.statusChanges,
875 this.translateService.stream('FRONTEND.STORE.AUTO_TITLE_TEXT')
876 ]).subscribe((/**
877 * @param {?} __0
878 * @return {?}
879 */
880 function (_a) {
881 var _b = __read(_a, 2), change = _b[0], autoTitleText = _b[1];
882 /** @type {?} */
883 var missingFields = false;
884 for (var control in form.controls) {
885 if (!form.controls[control].value || (form.controls[control].value.constructor === Array && !form.controls[control].value[0])) {
886 _this.iconName = 'help_outline';
887 missingFields = true;
888 if (change === 'INVALID') {
889 _this.autoTitleText = autoTitleText.SOME_FIELDS_INVALID;
890 if (form.controls[control].dirty || form.controls[control].touched) {
891 _this.iconName = 'warning';
892 break;
893 }
894 }
895 else {
896 _this.autoTitleText = autoTitleText.OPTIONAL_FIELDS_UNANSWERED;
897 }
898 }
899 }
900 if (!missingFields) {
901 _this.iconName = 'check_circle';
902 _this.autoTitleText = autoTitleText.COMPLETE;
903 }
904 })));
905 if (this.displayAutoDescription) {
906 this.subscriptions.push(form.valueChanges.subscribe((/**
907 * @param {?} changes
908 * @return {?}
909 */
910 function (changes) {
911 /** @type {?} */
912 var description = '';
913 for (var key in changes) {
914 if (changes.hasOwnProperty(key) && changes[key] != null && changes[key].length > 0) {
915 if (changes[key][0].name) {
916 for (var fileKey in changes[key]) {
917 if (changes[key][fileKey] != null) {
918 description += changes[key][fileKey].name;
919 description += ', ';
920 }
921 }
922 }
923 else {
924 description += changes[key];
925 description += ', ';
926 }
927 }
928 }
929 _this.autoDescriptionText = description.substring(0, description.length - 2);
930 })));
931 }
932 form.updateValueAndValidity({ onlySelf: false, emitEvent: true });
933 };
934 /**
935 * @param {?} formFields
936 * @return {?}
937 */
938 DropDownFormSectionComponent.prototype.toFormGroup = /**
939 * @param {?} formFields
940 * @return {?}
941 */
942 function (formFields) {
943 var _this = this;
944 /** @type {?} */
945 var group = {};
946 formFields.forEach((/**
947 * @param {?} field
948 * @return {?}
949 */
950 function (field) {
951 /** @type {?} */
952 var validations;
953 if (!field.required || field.hidden) {
954 validations = field.validator;
955 }
956 else if (field.controlType === 'checkbox') {
957 validations = [Validators.requiredTrue, field.validator];
958 }
959 else {
960 validations = [Validators.required, field.validator];
961 }
962 /** @type {?} */
963 var formControl = new FormControl({ value: field.value, disabled: field.disabled }, validations);
964 group[field.id] = formControl;
965 _this.subscriptions.push(formControl.valueChanges.subscribe((/**
966 * @param {?} value
967 * @return {?}
968 */
969 function (value) { return (field.value = value); })));
970 }));
971 return new FormGroup(group);
972 };
973 /**
974 * @return {?}
975 */
976 DropDownFormSectionComponent.prototype.ngOnDestroy = /**
977 * @return {?}
978 */
979 function () {
980 this.subscriptions.forEach((/**
981 * @param {?} subscription
982 * @return {?}
983 */
984 function (subscription) { return subscription.unsubscribe(); }));
985 };
986 DropDownFormSectionComponent.decorators = [
987 { type: Component, args: [{
988 selector: 'va-dropdown-form-section',
989 template: "\n <mat-expansion-panel *ngIf=\"expandable || expandable == undefined\" [expanded]=\"startOpen\">\n <mat-expansion-panel-header [collapsedHeight]=\"'*'\" [expandedHeight]=\"'*'\">\n <div class=\"dropdown-form-header\">\n <mat-icon\n [ngClass]=\"{invalid: iconName=='warning', valid: iconName=='check_circle', question: iconName=='help_outline'}\">\n {{ iconName }}\n </mat-icon>\n <mat-panel-title *ngIf=\"!displayAutoTitle\">\n {{ titleText }}\n </mat-panel-title>\n <mat-panel-title *ngIf=\"displayAutoTitle\"\n [ngClass]=\"{valid: iconName=='check_circle', invalid: iconName=='warning'}\">\n <div class=\"title\"> {{ titleText }}</div>\n <div *ngIf=\"titleText && autoTitleText\"> &nbsp;</div>\n <div><ng-container><i> {{autoTitleText}} </i></ng-container></div>\n </mat-panel-title>\n <mat-panel-description *ngIf=\"displayAutoDescription\" [ngClass]=\"{invalid: iconName=='warning'}\">\n {{ autoDescriptionText }}\n </mat-panel-description>\n <mat-panel-description *ngIf=\"!displayAutoDescription\" [ngClass]=\"{invalid: iconName=='warning'}\">\n <i> {{descriptionText}} </i>\n </mat-panel-description>\n </div>\n </mat-expansion-panel-header>\n <div class=\"expansion-panel-body\">\n <va-field *ngFor=\"let field of fields\" [field]=\"field\"\n [form]=\"parentForm.controls[titleText + uniqueIndex]\"\n ></va-field>\n <p *ngIf=\"editingHint != ''\" class=\"editing-hint\"><i>{{ editingHint }}</i></p>\n </div>\n </mat-expansion-panel>\n ",
990 styles: [":host-context(va-dropdown-form-section){font-size:14px}:host-context(va-dropdown-form-section) .expansion-panel-body{margin-top:-10px;display:block}@media screen and (min-width:600px){:host-context(va-dropdown-form-section) .expansion-panel-body{width:60%}}.mat-expanded,.mat-expansion-panel{-webkit-transition:margin .4s;transition:margin .4s}mat-expansion-panel-header{min-height:48px;padding:12px 24px}.dropdown-form-header{width:90%;display:-webkit-box;display:flex}mat-panel-description{align-self:center;-webkit-box-flex:inherit;flex:inherit;display:initial;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}mat-panel-description.invalid{color:#c62828}mat-icon{margin-right:7px;-ms-grid-row-align:center;align-self:center}mat-icon.valid{color:#4caf50}mat-icon.invalid{color:#c62828}mat-icon.question{color:#9e9e9e}mat-panel-title{align-self:center;-webkit-box-flex:0;flex:none;margin-right:20px;display:-webkit-box;display:flex;max-width:100%}mat-panel-title div{display:-webkit-box;display:flex}mat-panel-title.valid{color:#4caf50}mat-panel-title.invalid{color:#c62828}.editing-hint{color:#9e9e9e}.title{color:#212121}.not-expandable-card{background:#fff;cursor:default;font-size:15px;display:-webkit-box;display:flex;height:48px;-webkit-box-align:center;align-items:center;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.not-expandable-card .not-expandable-icon{margin-left:24px}.not-expandable-card .not-expandable-header{display:-webkit-box;display:flex}.not-expandable-card .not-expandable-description{margin-left:22px}.not-expandable-card .valid{color:#4caf50}"]
991 }] }
992 ];
993 /** @nocollapse */
994 DropDownFormSectionComponent.ctorParameters = function () { return [
995 { type: TranslateService }
996 ]; };
997 DropDownFormSectionComponent.propDecorators = {
998 prepopulatedData: [{ type: Input }],
999 startOpen: [{ type: Input }],
1000 parentForm: [{ type: Input }],
1001 displayAutoTitle: [{ type: Input }],
1002 titleText: [{ type: Input }],
1003 displayAutoDescription: [{ type: Input }],
1004 descriptionText: [{ type: Input }],
1005 fields: [{ type: Input }],
1006 editingHint: [{ type: Input }],
1007 expandable: [{ type: Input }]
1008 };
1009 return DropDownFormSectionComponent;
1010}());
1011if (false) {
1012 /** @type {?} */
1013 DropDownFormSectionComponent.prototype.prepopulatedData;
1014 /** @type {?} */
1015 DropDownFormSectionComponent.prototype.startOpen;
1016 /** @type {?} */
1017 DropDownFormSectionComponent.prototype.parentForm;
1018 /** @type {?} */
1019 DropDownFormSectionComponent.prototype.displayAutoTitle;
1020 /** @type {?} */
1021 DropDownFormSectionComponent.prototype.titleText;
1022 /** @type {?} */
1023 DropDownFormSectionComponent.prototype.displayAutoDescription;
1024 /** @type {?} */
1025 DropDownFormSectionComponent.prototype.descriptionText;
1026 /** @type {?} */
1027 DropDownFormSectionComponent.prototype.fields;
1028 /** @type {?} */
1029 DropDownFormSectionComponent.prototype.editingHint;
1030 /** @type {?} */
1031 DropDownFormSectionComponent.prototype.expandable;
1032 /** @type {?} */
1033 DropDownFormSectionComponent.prototype.autoDescriptionText;
1034 /** @type {?} */
1035 DropDownFormSectionComponent.prototype.iconName;
1036 /** @type {?} */
1037 DropDownFormSectionComponent.prototype.subscriptions;
1038 /** @type {?} */
1039 DropDownFormSectionComponent.prototype.uniqueIndex;
1040 /** @type {?} */
1041 DropDownFormSectionComponent.prototype.autoTitleText;
1042 /**
1043 * @type {?}
1044 * @private
1045 */
1046 DropDownFormSectionComponent.prototype.translateService;
1047}
1048
1049/**
1050 * @fileoverview added by tsickle
1051 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1052 */
1053var FieldComponent = /** @class */ (function () {
1054 function FieldComponent() {
1055 }
1056 Object.defineProperty(FieldComponent.prototype, "isValid", {
1057 get: /**
1058 * @return {?}
1059 */
1060 function () {
1061 return this.form.controls[this.field.id].valid || this.form.controls[this.field.id].pristine;
1062 },
1063 enumerable: true,
1064 configurable: true
1065 });
1066 /**
1067 * @param {?} field
1068 * @return {?}
1069 */
1070 FieldComponent.prototype.showCheckboxError = /**
1071 * @param {?} field
1072 * @return {?}
1073 */
1074 function (field) {
1075 return this.form.controls[field].errors && this.form.controls[field].errors.required && this.form.controls[field].touched;
1076 };
1077 FieldComponent.decorators = [
1078 { type: Component, args: [{
1079 selector: 'va-field',
1080 template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n <div *ngIf=\"!field.hidden\" [ngClass]=\"{'for-office-use-only': field.forOfficeUseOnly}\">\n <span *ngIf=\"field.forOfficeUseOnly\" class=\"office-text\">*For Office Use Only</span>\n\n <ng-container *ngSwitchCase=\"'dropdown'\">\n <ng-container *ngIf=\"!field.allowMultiples\">\n <mat-form-field class=\"form-field-container\">\n <mat-select matInput [formControlName]=\"field.id\" [id]=\"field.id\" [placeholder]=\"field.getLabel()\">\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.value\">{{ option.label }}</mat-option>\n </mat-select>\n <mat-hint *ngIf=\"field.description\"> {{ field.description }} </mat-hint>\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"field.allowMultiples\">\n <va-input-tags class=\"form-field-container\" [id]=\"field.id\" [formControlName]=\"field.id\"\n [placeholder]=\"field.getLabel()\"\n [tooltip]=\"field.description\"\n [required]=\"field.required\"\n [options]=\"field.options\"\n [allowDuplicates]=\"field.allowDuplicates\"\n [maxFields]=\"field.maxChoices\">\n </va-input-tags>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'textbox'\">\n <mat-form-field class=\"form-field-container\">\n <span matPrefix *ngIf=\"field.prefix\"> {{ field.prefix}} &nbsp;</span>\n <input matInput [type]=\"field.textboxType\" [id]=\"field.id\" [formControlName]=\"field.id\" [placeholder]=\"field.getLabel()\" [pattern]=\"field.regexValidator || ''\"\n [readonly]=\"field.displayOnly\" [ngClass]=\"{'display-only': field.displayOnly}\">\n <span matSuffix *ngIf=\"field.suffix\"> &nbsp;{{ field.suffix }} </span>\n <mat-hint *ngIf=\"field.description\"> {{ field.description }} </mat-hint>\n <mat-error *ngIf=\"form.controls[field.id].hasError('pattern')\"> {{field.regexErrorMessage}} </mat-error>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <div class=\"form-field-container checkbox\">\n <mat-checkbox [formControlName]=\"field.id\" [id]=\"field.id\" ngControlDefault></mat-checkbox>\n <div class=\"checkbox-placeholder\"> {{field.label}}</div>\n <mat-error *ngIf=\"showCheckboxError(field.id)\" class=\"checkboxError\"> *Required </mat-error>\n </div>\n <div class=\"checkbox-description\" *ngIf=\"field.description\">{{ field.description }}</div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'textarea'\">\n <mat-form-field class=\"form-field-container\">\n <textarea matInput [formControlName]=\"field.id\" [placeholder]=\"field.getLabel()\" [id]=\"field.id\"></textarea>\n <mat-hint *ngIf=\"field.description\"> {{ field.description }} </mat-hint>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'file'\">\n <div class=\"form-field-container\">\n <file-group-uploader [uploadUrl]=\"field.uploadUrl\" [label]=\"field.getLabel()\" [description]=\"field.description\" [formGroup]=\"form\" [formControlName]=\"field.id\"\n [numFiles]=\"field.numFiles\" class=\"form-field-container\"></file-group-uploader>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'vbcuser'\">\n <mat-form-field class=\"form-field-container\">\n <mat-select matInput [formControlName]=\"field.id\" [id]=\"field.id\" [placeholder]=\"field.getLabel()\">\n <mat-option *ngFor=\"let option of field.options\" [value]=\"option.value\" [disabled]=\"option.disabled\">{{ option.label }}</mat-option>\n </mat-select>\n <mat-hint *ngIf=\"field.description\"> {{ field.description }} </mat-hint>\n </mat-form-field>\n </ng-container>\n </div>\n</ng-container>\n",
1081 styles: [".form-field-container{font-size:16px;width:100%;margin:10px 0}.checkbox{display:-webkit-box;display:flex;padding:5px 0;color:rgba(0,0,0,.54);margin-top:24px}.checkbox .checkbox-placeholder{margin-left:10px}.checkbox-description{margin-top:-14px;margin-left:32px;color:rgba(0,0,0,.54);font-size:12px}.for-office-use-only{position:relative}.office-text{font-size:8px;position:absolute;right:5px}.display-only{color:rgba(0,0,0,.38)}.checkboxError{padding-left:16px}"]
1082 }] }
1083 ];
1084 FieldComponent.propDecorators = {
1085 field: [{ type: Input }],
1086 form: [{ type: Input }]
1087 };
1088 return FieldComponent;
1089}());
1090if (false) {
1091 /** @type {?} */
1092 FieldComponent.prototype.field;
1093 /** @type {?} */
1094 FieldComponent.prototype.form;
1095}
1096
1097/**
1098 * @fileoverview added by tsickle
1099 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1100 */
1101var FieldService = /** @class */ (function () {
1102 function FieldService() {
1103 }
1104 /**
1105 * @param {?} field
1106 * @return {?}
1107 */
1108 FieldService.prototype.createFormControl = /**
1109 * @param {?} field
1110 * @return {?}
1111 */
1112 function (field) {
1113 if (field.required) {
1114 return new FormControl(field.value, Validators.required);
1115 }
1116 else {
1117 return new FormControl(field.value);
1118 }
1119 };
1120 /**
1121 * @param {?} formFields
1122 * @param {?} subscriptions
1123 * @return {?}
1124 */
1125 FieldService.prototype.toFormGroup = /**
1126 * @param {?} formFields
1127 * @param {?} subscriptions
1128 * @return {?}
1129 */
1130 function (formFields, subscriptions) {
1131 var _this = this;
1132 /** @type {?} */
1133 var group = {};
1134 formFields.forEach((/**
1135 * @param {?} field
1136 * @return {?}
1137 */
1138 function (field) {
1139 /** @type {?} */
1140 var formControl;
1141 if (field.controlType === 'checkbox') {
1142 formControl = new FormControl(field.value);
1143 }
1144 else {
1145 formControl = _this.createFormControl(field);
1146 }
1147 group[field.id] = formControl;
1148 if (subscriptions) {
1149 subscriptions.push(formControl.valueChanges.subscribe((/**
1150 * @param {?} value
1151 * @return {?}
1152 */
1153 function (value) { return (field.value = value); })));
1154 }
1155 }));
1156 return new FormGroup(group);
1157 };
1158 FieldService.decorators = [
1159 { type: Injectable }
1160 ];
1161 return FieldService;
1162}());
1163
1164/**
1165 * @fileoverview added by tsickle
1166 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1167 */
1168var VaHeaderContainerComponent = /** @class */ (function () {
1169 function VaHeaderContainerComponent(translateService) {
1170 this.translateService = translateService;
1171 this.loaded = true;
1172 this.showEnableAddon = false;
1173 this.prerequisiteSelected = new EventEmitter();
1174 this.actionSelected = new EventEmitter();
1175 this.primaryPricingActionSelected = new EventEmitter();
1176 this.pricingActionSelected = new EventEmitter();
1177 }
1178 /**
1179 * @return {?}
1180 */
1181 VaHeaderContainerComponent.prototype.onActionSelected = /**
1182 * @return {?}
1183 */
1184 function () {
1185 this.actionSelected.emit();
1186 };
1187 /**
1188 * @return {?}
1189 */
1190 VaHeaderContainerComponent.prototype.onPrerequisiteSelected = /**
1191 * @return {?}
1192 */
1193 function () {
1194 this.prerequisiteSelected.emit();
1195 };
1196 /**
1197 * @param {?} billedProduct
1198 * @return {?}
1199 */
1200 VaHeaderContainerComponent.prototype.showPricingModel = /**
1201 * @param {?} billedProduct
1202 * @return {?}
1203 */
1204 function (billedProduct) {
1205 return billedProduct && [BillingModel.Tiered, BillingModel.Stairstep].includes(billedProduct.billingModel);
1206 };
1207 /**
1208 * @param {?} billingModel
1209 * @return {?}
1210 */
1211 VaHeaderContainerComponent.prototype.getPricingModelTooltips = /**
1212 * @param {?} billingModel
1213 * @return {?}
1214 */
1215 function (billingModel) {
1216 switch (billingModel) {
1217 case BillingModel.Stairstep:
1218 return this.translateService.stream('FRONTEND.STORE.PRICE_APPLIES_PER_UNIT');
1219 case BillingModel.Tiered:
1220 return this.translateService.stream('FRONTEND.STORE.PRICE_APPLIES_TO_ALL_UNITS');
1221 default:
1222 return of('');
1223 }
1224 };
1225 VaHeaderContainerComponent.decorators = [
1226 { type: Component, args: [{
1227 selector: 'va-header-container',
1228 template: "<div class=\"header-container\">\n <div class=\"product-overview\">\n <div class=\"product-id\">\n\n <va-icon [iconUrl]=\"iconUrl\" [name]=\"title\" [diameter]=\"120\"></va-icon>\n\n <div class=\"product-id-text\">\n\n <h1 [ngClass]=\"{'stencil-title stencil-shimmer': !title, 'product-title': title}\">\n {{ title }}\n </h1>\n\n <span [ngClass]=\"{'stencil-tagline stencil-shimmer': !title && !tagline, 'tagline': tagline}\">\n {{ tagline }}\n </span>\n\n <div *ngIf=\"prerequisite\" class=\"prerequisite\">\n <span class=\"requires-text\">{{ 'FRONTEND.STORE.REQUIRES' | translate }}</span>\n <span>{{ prerequisite }}</span>\n </div>\n\n <mat-chip-list>\n <mat-chip *ngFor=\"let chip of chipLabels\">{{ chip }}</mat-chip>\n </mat-chip-list>\n\n </div>\n </div>\n\n <div class=\"pricing\">\n\n <button *ngIf=\"showAction && !showEnableAddon\" mat-raised-button class=\"app-enable-button\" [disabled]=\"!actionEnabled\" (click)=\"onActionSelected()\">\n {{ actionLabel }}\n </button>\n\n <button *ngIf=\"showEnableAddon && !showAction\" mat-raised-button class=\"app-enable-button\" [disabled]=\"!showEnableAddon\" (click)=\"onActionSelected()\">\n {{ actionLabel }}\n </button>\n\n <div *ngIf=\"prerequisiteLabel && !showEnableAddon\" class=\"addon-enable\" (click)=\"onPrerequisiteSelected()\">\n {{ 'FRONTEND.STORE.ENABLED_WITH_PREREQUISITE' | translate: {prerequisite: prerequisiteLabel } }}\n </div>\n\n <div *ngIf=\"showPricing\" class=\"price-box\">\n <div *ngIf=\"pricing?.prices?.length\" class=\"wholesale-price\">{{ pricingLabel }}\n <div *ngIf=\"showPricingModel(billedProduct) && hasVerifiedContract\"\n class=\"pricing-model\"\n [matTooltip]=\"getPricingModelTooltips(billedProduct.billingModel) | async\">({{ billedProduct.billingModel }})\n </div>\n </div>\n <va-pricing [pricing]=\"pricing\"\n [billedProduct]=\"billedProduct\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [loaded]=\"loaded\"></va-pricing>\n </div>\n\n <p *ngIf=\"pricingActionEnabled\" class=\"pricing-action-container\">\n <a (click)=\"primaryPricingActionSelected.emit()\">{{ primaryPricingActionLabel }}</a>\n <a (click)=\"pricingActionSelected.emit()\">{{ pricingActionLabel }}</a>\n </p>\n\n </div>\n\n </div>\n</div>\n",
1229 styles: [":host{font-size:16px}.product-title{font-size:24px}.product-overview{display:-webkit-box;display:flex;flex-wrap:wrap;border-bottom:1px solid #e0e0e0}.product-overview h1{margin:0;font-weight:400;line-height:1.2}.product-overview mat-chip{margin-bottom:3px}.product-id{display:-webkit-box;display:flex;width:100%;padding:24px;-webkit-box-flex:1;flex-grow:1}.product-id va-icon{margin-right:20px}@media screen and (max-width:600px){.product-id va-icon ::ng-deep .va-icon-container{width:40px!important;height:40px!important}.product-id va-icon ::ng-deep .va-icon-container span{line-height:40px!important;font-size:15px!important}}.product-id .product-id-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center}.product-id span{overflow:hidden}.product-id .tagline{color:#616161;margin:.5em 0 1em;font-size:16px}@media screen and (min-width:600px){.product-title{font-size:32px}.product-id .tagline{font-size:20px}.product-id{width:66%;padding-right:20px}}.product-id .prerequisite{margin:.5em 0 1em;font-size:14px}.product-id .requires-text{color:#9e9e9e}.inline-link{display:-webkit-inline-box!important;display:inline-flex!important;color:#1e88e5;cursor:pointer;padding-top:5px}.pricing{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;width:100%;padding:0 24px 24px;color:#616161}@media screen and (min-width:600px){.pricing{width:34%;padding-top:24px;padding-left:20px}}.pricing span{display:block}.pricing span:nth-child(2){margin:.5em 0 1em}.pricing .price{font-size:24px;font-weight:700;line-height:1;color:#4caf50}.pricing .price-box{padding-top:10px}.pricing .pricing-action-container{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;margin:8px 0}.pricing .pricing-action-container mat-icon{vertical-align:middle;margin-right:6px}.pricing .pricing-action-container a{cursor:pointer;margin:5px 0}.pricing .pricing-model{display:inline-block;font-size:.8rem;color:#9e9e9e;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.app-enable-button{height:inherit;color:#fff;background-color:#4caf50;font-size:20px;padding:14px 16px;line-height:1}.addon-enable{height:inherit;background-color:#e0e0e0;font-size:14px;padding:14px 16px;line-height:1;color:#1e88e5;cursor:pointer;text-align:center}.wholesale-price{margin-top:0;padding-bottom:8px;margin-bottom:4px;border-bottom:1px solid #e0e0e0}.stencil-title{height:32px;width:200px;margin-bottom:5px!important}.stencil-tagline{height:32px;width:250px}"]
1230 }] }
1231 ];
1232 /** @nocollapse */
1233 VaHeaderContainerComponent.ctorParameters = function () { return [
1234 { type: TranslateService }
1235 ]; };
1236 VaHeaderContainerComponent.propDecorators = {
1237 iconUrl: [{ type: Input }],
1238 title: [{ type: Input }],
1239 tagline: [{ type: Input }],
1240 prerequisite: [{ type: Input }],
1241 chipLabels: [{ type: Input }],
1242 pricing: [{ type: Input }],
1243 billedProduct: [{ type: Input }],
1244 loaded: [{ type: Input }],
1245 hasVerifiedContract: [{ type: Input }],
1246 pricingLabel: [{ type: Input }],
1247 primaryPricingActionLabel: [{ type: Input }],
1248 pricingActionLabel: [{ type: Input }],
1249 pricingActionEnabled: [{ type: Input }],
1250 actionEnabled: [{ type: Input }],
1251 actionLabel: [{ type: Input }],
1252 showAction: [{ type: Input }],
1253 showPricing: [{ type: Input }],
1254 showEnableAddon: [{ type: Input }],
1255 prerequisiteLabel: [{ type: Input }],
1256 prerequisiteSelected: [{ type: Output }],
1257 actionSelected: [{ type: Output }],
1258 primaryPricingActionSelected: [{ type: Output }],
1259 pricingActionSelected: [{ type: Output }]
1260 };
1261 return VaHeaderContainerComponent;
1262}());
1263if (false) {
1264 /** @type {?} */
1265 VaHeaderContainerComponent.prototype.iconUrl;
1266 /** @type {?} */
1267 VaHeaderContainerComponent.prototype.title;
1268 /** @type {?} */
1269 VaHeaderContainerComponent.prototype.tagline;
1270 /** @type {?} */
1271 VaHeaderContainerComponent.prototype.prerequisite;
1272 /** @type {?} */
1273 VaHeaderContainerComponent.prototype.chipLabels;
1274 /** @type {?} */
1275 VaHeaderContainerComponent.prototype.pricing;
1276 /** @type {?} */
1277 VaHeaderContainerComponent.prototype.billedProduct;
1278 /** @type {?} */
1279 VaHeaderContainerComponent.prototype.loaded;
1280 /** @type {?} */
1281 VaHeaderContainerComponent.prototype.hasVerifiedContract;
1282 /** @type {?} */
1283 VaHeaderContainerComponent.prototype.pricingLabel;
1284 /** @type {?} */
1285 VaHeaderContainerComponent.prototype.primaryPricingActionLabel;
1286 /** @type {?} */
1287 VaHeaderContainerComponent.prototype.pricingActionLabel;
1288 /** @type {?} */
1289 VaHeaderContainerComponent.prototype.pricingActionEnabled;
1290 /** @type {?} */
1291 VaHeaderContainerComponent.prototype.actionEnabled;
1292 /** @type {?} */
1293 VaHeaderContainerComponent.prototype.actionLabel;
1294 /** @type {?} */
1295 VaHeaderContainerComponent.prototype.showAction;
1296 /** @type {?} */
1297 VaHeaderContainerComponent.prototype.showPricing;
1298 /** @type {?} */
1299 VaHeaderContainerComponent.prototype.showEnableAddon;
1300 /** @type {?} */
1301 VaHeaderContainerComponent.prototype.prerequisiteLabel;
1302 /** @type {?} */
1303 VaHeaderContainerComponent.prototype.prerequisiteSelected;
1304 /** @type {?} */
1305 VaHeaderContainerComponent.prototype.actionSelected;
1306 /** @type {?} */
1307 VaHeaderContainerComponent.prototype.primaryPricingActionSelected;
1308 /** @type {?} */
1309 VaHeaderContainerComponent.prototype.pricingActionSelected;
1310 /**
1311 * @type {?}
1312 * @private
1313 */
1314 VaHeaderContainerComponent.prototype.translateService;
1315}
1316
1317/**
1318 * @fileoverview added by tsickle
1319 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1320 */
1321var VaHeaderContainerModule = /** @class */ (function () {
1322 function VaHeaderContainerModule(translateService, currentLang$, defaultLang$) {
1323 this.translateService = translateService;
1324 if (!this.translateService.translations.hasOwnProperty('en')) {
1325 this.translateService.reloadLang('en');
1326 }
1327 if (!this.translateService.translations.hasOwnProperty('cs')) {
1328 this.translateService.reloadLang('cs');
1329 }
1330 this.translateService.setTranslation('en', En.en, true);
1331 this.translateService.setTranslation('cs', Cs.cs, true);
1332 if (currentLang$) {
1333 currentLang$.subscribe((/**
1334 * @param {?} currentLang
1335 * @return {?}
1336 */
1337 function (currentLang) { return translateService.use(currentLang); }));
1338 }
1339 if (defaultLang$) {
1340 defaultLang$.subscribe((/**
1341 * @param {?} defaultLang
1342 * @return {?}
1343 */
1344 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
1345 }
1346 }
1347 VaHeaderContainerModule.decorators = [
1348 { type: NgModule, args: [{
1349 imports: [
1350 CommonModule,
1351 MatIconModule,
1352 VaPricingModule,
1353 VaIconModule,
1354 MatChipsModule,
1355 MatButtonModule,
1356 MatTooltipModule,
1357 TranslateModule.forChild()
1358 ],
1359 declarations: [VaHeaderContainerComponent],
1360 exports: [VaHeaderContainerComponent]
1361 },] }
1362 ];
1363 /** @nocollapse */
1364 VaHeaderContainerModule.ctorParameters = function () { return [
1365 { type: TranslateService },
1366 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
1367 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
1368 ]; };
1369 return VaHeaderContainerModule;
1370}());
1371if (false) {
1372 /**
1373 * @type {?}
1374 * @private
1375 */
1376 VaHeaderContainerModule.prototype.translateService;
1377}
1378
1379/**
1380 * @fileoverview added by tsickle
1381 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1382 */
1383var OrderFormSectionData = /** @class */ (function () {
1384 function OrderFormSectionData() {
1385 }
1386 return OrderFormSectionData;
1387}());
1388if (false) {
1389 /** @type {?} */
1390 OrderFormSectionData.prototype.parentForm;
1391 /** @type {?} */
1392 OrderFormSectionData.prototype.titleText;
1393 /** @type {?} */
1394 OrderFormSectionData.prototype.subtitleText;
1395 /** @type {?} */
1396 OrderFormSectionData.prototype.descriptionText;
1397 /** @type {?} */
1398 OrderFormSectionData.prototype.iconUrl;
1399 /** @type {?} */
1400 OrderFormSectionData.prototype.primarySection;
1401 /** @type {?} */
1402 OrderFormSectionData.prototype.subsections;
1403}
1404
1405/**
1406 * @fileoverview added by tsickle
1407 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1408 */
1409var OrderFormSectionComponent = /** @class */ (function () {
1410 function OrderFormSectionComponent() {
1411 }
1412 /**
1413 * @return {?}
1414 */
1415 OrderFormSectionComponent.prototype.ngOnInit = /**
1416 * @return {?}
1417 */
1418 function () {
1419 // The first section should always be expanded.
1420 /** @type {?} */
1421 var topSection = this.getTopSection();
1422 if (topSection) {
1423 topSection.startOpen = true;
1424 }
1425 };
1426 /**
1427 * @return {?}
1428 */
1429 OrderFormSectionComponent.prototype.getTopSection = /**
1430 * @return {?}
1431 */
1432 function () {
1433 if (!this.data) {
1434 return null;
1435 }
1436 if (this.data.primarySection) {
1437 return this.data.primarySection;
1438 }
1439 if (this.data.subsections && this.data.subsections.length > 0) {
1440 return this.data.subsections[0];
1441 }
1442 return null;
1443 };
1444 OrderFormSectionComponent.decorators = [
1445 { type: Component, args: [{
1446 selector: 'va-order-form-section',
1447 template: "<div>\n <mat-card class=\"va-order-form-section-header mat-card\">\n <div class=\"product-overview\">\n <div class=\"product-id\">\n <va-icon [iconUrl]=\"data.iconUrl\" [name]=\"data.titleText\" [diameter]=\"45\"></va-icon>\n <div class=\"product-id-text\">\n <h1 class=\"product-title\">{{ data.titleText }}</h1>\n <span *ngIf=\"data.subtitleText\" class=\"tagline\">{{ data.subtitleText }}</span>\n </div>\n </div>\n <div class=\"description\" *ngIf=\"data.descriptionText\">\n <span>{{ data.descriptionText }}</span>\n </div>\n </div>\n </mat-card>\n <va-dropdown-form-section class=\"va-primary-form-section\" *ngIf=\"data.primarySection\"\n [titleText]=\"data.primarySection.titleText\"\n [editingHint]=\"data.primarySection.editingHint\"\n [displayAutoDescription]=\"data.primarySection.displayAutoDescription\"\n [descriptionText]=\"data.primarySection.descriptionText\"\n [displayAutoTitle]=\"data.primarySection.displayAutoTitle\"\n [prepopulatedData]=\"data.primarySection.prepopulatedData\"\n [parentForm]=\"data.parentForm\"\n [fields]=\"data.primarySection.fields\"\n [startOpen]=\"data.primarySection.startOpen\"\n [expandable]=\"data.primarySection.expandable\">\n </va-dropdown-form-section>\n <ng-container *ngIf=\"data.subsections?.length > 0\">\n <va-dropdown-form-section class=\"va-secondary-form-section\" *ngFor=\"let addon of data.subsections\"\n [titleText]=\"addon.titleText\"\n [editingHint]=\"addon.editingHint\"\n [displayAutoDescription]=\"addon.displayAutoDescription\"\n [descriptionText]=\"addon.descriptionText\"\n [displayAutoTitle]=\"addon.displayAutoTitle\"\n [prepopulatedData]=\"addon.prepopulatedData\"\n [parentForm]=\"data.parentForm\"\n [fields]=\"addon.fields\"\n [startOpen]=\"addon.startOpen\"\n [expandable]=\"addon.expandable\">\n </va-dropdown-form-section>\n </ng-container>\n <ng-container *ngIf=\"!data.primarySection && !(data.subsections?.length > 0)\">\n <mat-card class=\"not-expandable-card\">\n <ng-content></ng-content>\n </mat-card>\n </ng-container>\n</div>\n",
1448 styles: [":host{font-size:16px}mat-card.va-order-form-section-header{margin-bottom:0;border-bottom-color:#e0e0e0;border-bottom-width:1px;box-shadow:0 0 1px -2px rgba(0,0,0,.2),0 0 2px 0 rgba(0,0,0,.14),0 0 5px 0 rgba(0,0,0,.12)}.product-title{font-size:16px}va-mat-card{margin-bottom:24px}.product-overview{display:-webkit-box;display:flex;flex-wrap:wrap}.product-overview h1{margin:0;font-weight:700}.product-id{display:-webkit-box;display:flex;width:100%;-webkit-box-flex:1;flex-grow:1}.product-id va-icon{margin-right:20px}@media screen and (max-width:600px){.product-id va-icon ::ng-deep .va-icon-container{width:40px!important;height:40px!important}}.product-id .product-id-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center}.product-id span{display:block;overflow:hidden}.product-id .tagline{color:#616161;margin-top:8px;font-size:16px}@media screen and (min-width:600px){.product-id{width:66%;padding-right:16px}}.description{padding-top:16px;width:100%;color:#616161}"]
1449 }] }
1450 ];
1451 /** @nocollapse */
1452 OrderFormSectionComponent.ctorParameters = function () { return []; };
1453 OrderFormSectionComponent.propDecorators = {
1454 data: [{ type: Input }]
1455 };
1456 return OrderFormSectionComponent;
1457}());
1458if (false) {
1459 /** @type {?} */
1460 OrderFormSectionComponent.prototype.data;
1461}
1462
1463/**
1464 * @fileoverview added by tsickle
1465 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1466 */
1467var DropDownFormSectionData = /** @class */ (function () {
1468 function DropDownFormSectionData() {
1469 /* tslint:disable */
1470 this.expandable = true;
1471 /* tslint:enable */
1472 }
1473 return DropDownFormSectionData;
1474}());
1475if (false) {
1476 /** @type {?} */
1477 DropDownFormSectionData.prototype.prepopulatedData;
1478 /** @type {?} */
1479 DropDownFormSectionData.prototype.startOpen;
1480 /** @type {?} */
1481 DropDownFormSectionData.prototype.parentForm;
1482 /** @type {?} */
1483 DropDownFormSectionData.prototype.displayAutoTitle;
1484 /** @type {?} */
1485 DropDownFormSectionData.prototype.titleText;
1486 /** @type {?} */
1487 DropDownFormSectionData.prototype.displayAutoDescription;
1488 /** @type {?} */
1489 DropDownFormSectionData.prototype.descriptionText;
1490 /** @type {?} */
1491 DropDownFormSectionData.prototype.fields;
1492 /** @type {?} */
1493 DropDownFormSectionData.prototype.editingHint;
1494 /** @type {?} */
1495 DropDownFormSectionData.prototype.expandable;
1496}
1497
1498/**
1499 * @fileoverview added by tsickle
1500 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1501 */
1502/**
1503 * @record
1504 */
1505function OrderLabelsInterface() { }
1506if (false) {
1507 /** @type {?} */
1508 OrderLabelsInterface.prototype.commonForm;
1509}
1510/**
1511 * @record
1512 */
1513function OrderFormInterface() { }
1514if (false) {
1515 /** @type {?} */
1516 OrderFormInterface.prototype.appId;
1517 /** @type {?|undefined} */
1518 OrderFormInterface.prototype.addonId;
1519 /** @type {?|undefined} */
1520 OrderFormInterface.prototype.commonForm;
1521 /** @type {?|undefined} */
1522 OrderFormInterface.prototype.commonFormRequiredFields;
1523 /** @type {?|undefined} */
1524 OrderFormInterface.prototype.customFields;
1525}
1526/**
1527 * @record
1528 */
1529function IncludedCommonFormFieldsInterface() { }
1530if (false) {
1531 /** @type {?|undefined} */
1532 IncludedCommonFormFieldsInterface.prototype.businessName;
1533 /** @type {?|undefined} */
1534 IncludedCommonFormFieldsInterface.prototype.businessAddress;
1535 /** @type {?|undefined} */
1536 IncludedCommonFormFieldsInterface.prototype.businessPhoneNumber;
1537 /** @type {?|undefined} */
1538 IncludedCommonFormFieldsInterface.prototype.businessAccountGroupId;
1539 /** @type {?|undefined} */
1540 IncludedCommonFormFieldsInterface.prototype.businessWebsite;
1541 /** @type {?|undefined} */
1542 IncludedCommonFormFieldsInterface.prototype.salespersonName;
1543 /** @type {?|undefined} */
1544 IncludedCommonFormFieldsInterface.prototype.salespersonPhoneNumber;
1545 /** @type {?|undefined} */
1546 IncludedCommonFormFieldsInterface.prototype.salespersonEmail;
1547 /** @type {?|undefined} */
1548 IncludedCommonFormFieldsInterface.prototype.contactName;
1549 /** @type {?|undefined} */
1550 IncludedCommonFormFieldsInterface.prototype.contactPhoneNumber;
1551 /** @type {?|undefined} */
1552 IncludedCommonFormFieldsInterface.prototype.contactEmail;
1553}
1554/**
1555 * @record
1556 */
1557function CommonFormSectionInterface() { }
1558if (false) {
1559 /** @type {?} */
1560 CommonFormSectionInterface.prototype.fields;
1561 /** @type {?|undefined} */
1562 CommonFormSectionInterface.prototype.sectionName;
1563 /** @type {?|undefined} */
1564 CommonFormSectionInterface.prototype.populatedData;
1565}
1566/**
1567 * @record
1568 */
1569function AddonKeyInterface() { }
1570if (false) {
1571 /** @type {?|undefined} */
1572 AddonKeyInterface.prototype.addonId;
1573 /** @type {?|undefined} */
1574 AddonKeyInterface.prototype.appId;
1575}
1576/**
1577 * @record
1578 */
1579function CommonFormFieldInterface() { }
1580if (false) {
1581 /** @type {?|undefined} */
1582 CommonFormFieldInterface.prototype.productIds;
1583 /** @type {?|undefined} */
1584 CommonFormFieldInterface.prototype.addonKeys;
1585}
1586/**
1587 * @record
1588 */
1589function CommonFieldIdsInterface() { }
1590if (false) {
1591 /** @type {?} */
1592 CommonFieldIdsInterface.prototype.fieldId;
1593 /** @type {?} */
1594 CommonFieldIdsInterface.prototype.required;
1595}
1596/**
1597 * @record
1598 */
1599function CommonFormData() { }
1600if (false) {
1601 /** @type {?|undefined} */
1602 CommonFormData.prototype.contact_email;
1603 /** @type {?|undefined} */
1604 CommonFormData.prototype.contact_name;
1605 /** @type {?|undefined} */
1606 CommonFormData.prototype.contact_phone_number;
1607 /** @type {?|undefined} */
1608 CommonFormData.prototype.business_account_group_id;
1609 /** @type {?|undefined} */
1610 CommonFormData.prototype.business_name;
1611 /** @type {?|undefined} */
1612 CommonFormData.prototype.business_address;
1613 /** @type {?|undefined} */
1614 CommonFormData.prototype.business_phone_number;
1615 /** @type {?|undefined} */
1616 CommonFormData.prototype.business_website;
1617 /** @type {?|undefined} */
1618 CommonFormData.prototype.salesperson_name;
1619 /** @type {?|undefined} */
1620 CommonFormData.prototype.salesperson_email;
1621 /** @type {?|undefined} */
1622 CommonFormData.prototype.salesperson_phone_number;
1623}
1624var ProductOrderFormSectionData = /** @class */ (function (_super) {
1625 __extends(ProductOrderFormSectionData, _super);
1626 function ProductOrderFormSectionData() {
1627 return _super !== null && _super.apply(this, arguments) || this;
1628 }
1629 return ProductOrderFormSectionData;
1630}(OrderFormSectionData));
1631if (false) {
1632 /** @type {?} */
1633 ProductOrderFormSectionData.prototype.productId;
1634 /** @type {?} */
1635 ProductOrderFormSectionData.prototype.subsections;
1636}
1637var AddonDropDownFormSectionData = /** @class */ (function (_super) {
1638 __extends(AddonDropDownFormSectionData, _super);
1639 function AddonDropDownFormSectionData() {
1640 return _super !== null && _super.apply(this, arguments) || this;
1641 }
1642 return AddonDropDownFormSectionData;
1643}(DropDownFormSectionData));
1644if (false) {
1645 /** @type {?} */
1646 AddonDropDownFormSectionData.prototype.productId;
1647 /** @type {?} */
1648 AddonDropDownFormSectionData.prototype.addonId;
1649}
1650/**
1651 * @record
1652 */
1653function ProductInfoInterface() { }
1654if (false) {
1655 /** @type {?} */
1656 ProductInfoInterface.prototype.productId;
1657 /** @type {?|undefined} */
1658 ProductInfoInterface.prototype.name;
1659 /** @type {?|undefined} */
1660 ProductInfoInterface.prototype.tagline;
1661 /** @type {?|undefined} */
1662 ProductInfoInterface.prototype.icon;
1663 /** @type {?|undefined} */
1664 ProductInfoInterface.prototype.addonInfo;
1665}
1666/**
1667 * @record
1668 */
1669function AddonInfoInterface() { }
1670if (false) {
1671 /** @type {?} */
1672 AddonInfoInterface.prototype.addonId;
1673 /** @type {?|undefined} */
1674 AddonInfoInterface.prototype.name;
1675}
1676/**
1677 * @record
1678 */
1679function CustomFieldsAnswers() { }
1680if (false) {
1681 /** @type {?} */
1682 CustomFieldsAnswers.prototype.productID;
1683 /** @type {?|undefined} */
1684 CustomFieldsAnswers.prototype.addonKey;
1685 /** @type {?} */
1686 CustomFieldsAnswers.prototype.customFieldsAnswers;
1687}
1688/**
1689 * @record
1690 */
1691function CustomFieldsAnswer() { }
1692if (false) {
1693 /** @type {?} */
1694 CustomFieldsAnswer.prototype.fieldId;
1695 /** @type {?|undefined} */
1696 CustomFieldsAnswer.prototype.answer;
1697}
1698/**
1699 * @record
1700 */
1701function OrderFormOptionsInterface() { }
1702if (false) {
1703 /** @type {?|undefined} */
1704 OrderFormOptionsInterface.prototype.bypassRequiredQuestions;
1705 /** @type {?|undefined} */
1706 OrderFormOptionsInterface.prototype.readOnly;
1707 /** @type {?|undefined} */
1708 OrderFormOptionsInterface.prototype.showOfficeUseQuestions;
1709}
1710
1711/**
1712 * @fileoverview added by tsickle
1713 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1714 */
1715var OrderFormService = /** @class */ (function () {
1716 function OrderFormService() {
1717 }
1718 /**
1719 * @private
1720 * @param {?} orderForm
1721 * @return {?}
1722 */
1723 OrderFormService.extractRequiredCommonFieldIds = /**
1724 * @private
1725 * @param {?} orderForm
1726 * @return {?}
1727 */
1728 function (orderForm) {
1729 if (!orderForm || !orderForm.commonFormRequiredFields) {
1730 return [];
1731 }
1732 return Object.keys(orderForm.commonFormRequiredFields).filter((/**
1733 * @param {?} k
1734 * @return {?}
1735 */
1736 function (k) { return orderForm.commonFormRequiredFields[k]; }));
1737 };
1738 /**
1739 * @private
1740 * @param {?} orderForms
1741 * @return {?}
1742 */
1743 OrderFormService.buildCommonFieldIds = /**
1744 * @private
1745 * @param {?} orderForms
1746 * @return {?}
1747 */
1748 function (orderForms) {
1749 var _this = this;
1750 /** @type {?} */
1751 var commonFieldIdsMap = new Map();
1752 for (var key in OrderFormService.camelToSnakeCaseMap) {
1753 if (key) {
1754 commonFieldIdsMap.set(key, {
1755 fieldId: key,
1756 required: false,
1757 });
1758 }
1759 }
1760 orderForms.map((/**
1761 * @param {?} orderForm
1762 * @return {?}
1763 */
1764 function (orderForm) {
1765 /** @type {?} */
1766 var requiredCommonFieldIds = _this.extractRequiredCommonFieldIds(orderForm);
1767 requiredCommonFieldIds.map((/**
1768 * @param {?} fieldId
1769 * @return {?}
1770 */
1771 function (fieldId) {
1772 /** @type {?} */
1773 var commonFieldId = commonFieldIdsMap.get(fieldId);
1774 commonFieldId.required = true;
1775 commonFieldIdsMap.set(fieldId, commonFieldId);
1776 }));
1777 }));
1778 return Array.from(commonFieldIdsMap.values());
1779 };
1780 /**
1781 * @private
1782 * @param {?} fieldIds
1783 * @param {?} commonData
1784 * @param {?} labels
1785 * @param {?} options
1786 * @return {?}
1787 */
1788 OrderFormService.fillCommonFormSections = /**
1789 * @private
1790 * @param {?} fieldIds
1791 * @param {?} commonData
1792 * @param {?} labels
1793 * @param {?} options
1794 * @return {?}
1795 */
1796 function (fieldIds, commonData, labels, options) {
1797 /** @type {?} */
1798 var commonFormSections = OrderFormService.buildCommonOrderFormFields(fieldIds, labels, options);
1799 return commonFormSections.map((/**
1800 * @param {?} section
1801 * @return {?}
1802 */
1803 function (section) { return (__assign({}, section, { populatedData: commonData })); }));
1804 };
1805 /**
1806 * @private
1807 * @param {?} fieldIds
1808 * @param {?} labels
1809 * @param {?} options
1810 * @return {?}
1811 */
1812 OrderFormService.buildCommonOrderFormFields = /**
1813 * @private
1814 * @param {?} fieldIds
1815 * @param {?} labels
1816 * @param {?} options
1817 * @return {?}
1818 */
1819 function (fieldIds, labels, options) {
1820 var e_1, _a;
1821 /** @type {?} */
1822 var businessSection = {
1823 sectionName: labels.commonForm.businessSectionTitle || 'Business',
1824 fields: []
1825 };
1826 /** @type {?} */
1827 var salespersonSection = {
1828 sectionName: labels.commonForm.salespersonSectionTitle || 'Salesperson',
1829 fields: []
1830 };
1831 /** @type {?} */
1832 var contactSection = {
1833 sectionName: labels.commonForm.contactSectionTitle || 'Contact',
1834 fields: []
1835 };
1836 try {
1837 for (var fieldIds_1 = __values(fieldIds), fieldIds_1_1 = fieldIds_1.next(); !fieldIds_1_1.done; fieldIds_1_1 = fieldIds_1.next()) {
1838 var field = fieldIds_1_1.value;
1839 /** @type {?} */
1840 var fieldLabel = this.getLabelForFieldId(field.fieldId, labels);
1841 /** @type {?} */
1842 var commonFormField = new TextboxField({
1843 id: OrderFormService.camelToSnakeCaseMap[field.fieldId],
1844 label: fieldLabel,
1845 textboxType: 'text'
1846 });
1847 commonFormField.displayOnly = commonFormField.id === 'business_account_group_id';
1848 commonFormField.disabled = options.readOnly;
1849 if (!options.bypassRequiredQuestions) {
1850 commonFormField.required = field.required;
1851 }
1852 if (field.fieldId.startsWith('contact')) {
1853 contactSection.fields.push(commonFormField);
1854 }
1855 if (field.fieldId.startsWith('business')) {
1856 businessSection.fields.push(commonFormField);
1857 }
1858 if (field.fieldId.startsWith('salesperson')) {
1859 if (!options.showOfficeUseQuestions) {
1860 commonFormField.hidden = true;
1861 }
1862 salespersonSection.fields.push(commonFormField);
1863 }
1864 }
1865 }
1866 catch (e_1_1) { e_1 = { error: e_1_1 }; }
1867 finally {
1868 try {
1869 if (fieldIds_1_1 && !fieldIds_1_1.done && (_a = fieldIds_1.return)) _a.call(fieldIds_1);
1870 }
1871 finally { if (e_1) throw e_1.error; }
1872 }
1873 return [businessSection, contactSection, salespersonSection].filter((/**
1874 * @param {?} section
1875 * @return {?}
1876 */
1877 function (section) {
1878 return section.fields ? section.fields.length > 0 : false;
1879 }));
1880 };
1881 /**
1882 * @private
1883 * @param {?} fieldId
1884 * @param {?} labels
1885 * @return {?}
1886 */
1887 OrderFormService.getLabelForFieldId = /**
1888 * @private
1889 * @param {?} fieldId
1890 * @param {?} labels
1891 * @return {?}
1892 */
1893 function (fieldId, labels) {
1894 return labels.commonForm[fieldId] || '';
1895 };
1896 /**
1897 * @private
1898 * @param {?} parentForm
1899 * @return {?}
1900 */
1901 OrderFormService.buildOrderFormSectionData = /**
1902 * @private
1903 * @param {?} parentForm
1904 * @return {?}
1905 */
1906 function (parentForm) {
1907 /** @type {?} */
1908 var section = new AddonDropDownFormSectionData();
1909 section.displayAutoTitle = true;
1910 section.descriptionText = '';
1911 section.displayAutoDescription = false;
1912 section.parentForm = parentForm;
1913 return section;
1914 };
1915 /**
1916 * @private
1917 * @param {?} customFields
1918 * @param {?} fileUploadUrl
1919 * @param {?} users
1920 * @param {?} answers
1921 * @param {?} options
1922 * @return {?}
1923 */
1924 OrderFormService.buildCustomOrderFormFields = /**
1925 * @private
1926 * @param {?} customFields
1927 * @param {?} fileUploadUrl
1928 * @param {?} users
1929 * @param {?} answers
1930 * @param {?} options
1931 * @return {?}
1932 */
1933 function (customFields, fileUploadUrl, users, answers, options) {
1934 /** @type {?} */
1935 var fieldTypeMap = {
1936 text: TextboxField,
1937 textbox: TextboxField,
1938 dropdown: DropdownField,
1939 checkbox: CheckboxField,
1940 file: FileUploadGroupField,
1941 textarea: TextareaField,
1942 vbcuser: VBCUserField
1943 };
1944 return customFields
1945 .filter((/**
1946 * @param {?} field
1947 * @return {?}
1948 */
1949 function (field) {
1950 return fieldTypeMap[field.type];
1951 }))
1952 .map((/**
1953 * @param {?} field
1954 * @return {?}
1955 */
1956 function (field) {
1957 /** @type {?} */
1958 var fieldClass = fieldTypeMap[field.type];
1959 /** @type {?} */
1960 var result = ((/**
1961 * @return {?}
1962 */
1963 function () {
1964 switch (fieldClass) {
1965 case VBCUserField:
1966 /** @type {?} */
1967 var fieldConfig = (/** @type {?} */ ({
1968 description: field.description,
1969 id: field.id,
1970 required: field.required,
1971 type: field.type,
1972 label: field.label,
1973 forOfficeUseOnly: field.forOfficeUseOnly,
1974 hidden: field.hidden,
1975 users: users // TODO: Get users in this component
1976 }));
1977 return new VBCUserField(fieldConfig);
1978 case FileUploadGroupField:
1979 /** @type {?} */
1980 var uploadField = (/** @type {?} */ (field));
1981 uploadField.uploadUrl = fileUploadUrl;
1982 return new FileUploadGroupField(uploadField);
1983 default:
1984 return new fieldClass(field);
1985 }
1986 }))();
1987 result.id = OrderFormService.encodeCustomFieldId(field.id);
1988 if (!options.showOfficeUseQuestions) {
1989 result.hidden = result.forOfficeUseOnly ? true : result.hidden;
1990 }
1991 result.required = options.bypassRequiredQuestions ? false : result.required;
1992 result.disabled = options.readOnly ? options.readOnly : result.disabled;
1993 if (answers) {
1994 /** @type {?} */
1995 var ca = answers.find((/**
1996 * @param {?} a
1997 * @return {?}
1998 */
1999 function (a) { return a.fieldId === field.id; }));
2000 if (ca) {
2001 try {
2002 result.value = JSON.parse(ca.answer);
2003 }
2004 catch (error) {
2005 result.value = ca.answer;
2006 }
2007 }
2008 }
2009 return result;
2010 }));
2011 };
2012 // Different products can have order form fields with the same fieldID, which will cause problem.
2013 // Please refer to https://github.com/vendasta/business-center-client/pull/1002
2014 // We will prefix the fieldID with uuid, and take it off before we same the order form into session storage
2015 // Different products can have order form fields with the same fieldID, which will cause problem.
2016 // Please refer to https://github.com/vendasta/business-center-client/pull/1002
2017 // We will prefix the fieldID with uuid, and take it off before we same the order form into session storage
2018 /**
2019 * @private
2020 * @param {?} fieldId
2021 * @return {?}
2022 */
2023 OrderFormService.encodeCustomFieldId =
2024 // Different products can have order form fields with the same fieldID, which will cause problem.
2025 // Please refer to https://github.com/vendasta/business-center-client/pull/1002
2026 // We will prefix the fieldID with uuid, and take it off before we same the order form into session storage
2027 /**
2028 * @private
2029 * @param {?} fieldId
2030 * @return {?}
2031 */
2032 function (fieldId) {
2033 /** @type {?} */
2034 var id = uuid();
2035 return id + "#" + fieldId;
2036 };
2037 /**
2038 * @private
2039 * @param {?} fieldId
2040 * @return {?}
2041 */
2042 OrderFormService.decodeCustomFieldId = /**
2043 * @private
2044 * @param {?} fieldId
2045 * @return {?}
2046 */
2047 function (fieldId) {
2048 return fieldId.replace(new RegExp('(.*#)'), '');
2049 };
2050 /**
2051 * @private
2052 * @param {?} fieldType
2053 * @return {?}
2054 */
2055 OrderFormService.mapFieldType = /**
2056 * @private
2057 * @param {?} fieldType
2058 * @return {?}
2059 */
2060 function (fieldType) {
2061 switch (fieldType) {
2062 case 'textbox':
2063 return FieldType.TEXT;
2064 case 'textarea':
2065 return FieldType.TEXTAREA;
2066 case 'checkbox':
2067 return FieldType.CHECKBOX;
2068 case 'dropdown':
2069 return FieldType.DROPDOWN;
2070 case 'file':
2071 return FieldType.FILE;
2072 case 'vbcuser':
2073 return FieldType.VBCUSER;
2074 default:
2075 return FieldType.NOT_SPECIFIED;
2076 }
2077 };
2078 /**
2079 * @private
2080 * @param {?} fieldBase
2081 * @return {?}
2082 */
2083 OrderFormService.orderFieldToSalesOrderField = /**
2084 * @private
2085 * @param {?} fieldBase
2086 * @return {?}
2087 */
2088 function (fieldBase) {
2089 return new Field({
2090 fieldId: OrderFormService.decodeCustomFieldId(fieldBase.id),
2091 fieldType: OrderFormService.mapFieldType(fieldBase.controlType),
2092 label: fieldBase.label,
2093 description: fieldBase.description || '',
2094 prefix: fieldBase.prefix || '',
2095 suffix: fieldBase.suffix || '',
2096 regexValidator: fieldBase.regexValidator || '',
2097 regexErrorMessage: fieldBase.regexErrorMessage || '',
2098 answer: fieldBase.value ? JSON.stringify(fieldBase.value) : 'null'
2099 });
2100 };
2101 /**
2102 * @private
2103 * @param {?} orderFormData
2104 * @return {?}
2105 */
2106 OrderFormService.productOrderFormToCustomFields = /**
2107 * @private
2108 * @param {?} orderFormData
2109 * @return {?}
2110 */
2111 function (orderFormData) {
2112 var _this = this;
2113 /** @type {?} */
2114 var primaryCustomField = new CustomField();
2115 primaryCustomField.productId = orderFormData.productId;
2116 primaryCustomField.fields = orderFormData.primarySection
2117 ? orderFormData.primarySection.fields.map((/**
2118 * @param {?} field
2119 * @return {?}
2120 */
2121 function (field) { return _this.orderFieldToSalesOrderField(field); }))
2122 : [];
2123 /** @type {?} */
2124 var secondaryCustomFields = orderFormData.subsections.map((/**
2125 * @param {?} subsection
2126 * @return {?}
2127 */
2128 function (subsection) {
2129 /** @type {?} */
2130 var customField = new CustomField();
2131 if (subsection.addonId) {
2132 customField.addonKey = new AddonKey({
2133 appId: subsection.productId,
2134 addonId: subsection.addonId
2135 });
2136 }
2137 else {
2138 customField.productId = orderFormData.productId;
2139 }
2140 customField.fields = subsection.fields.map((/**
2141 * @param {?} field
2142 * @return {?}
2143 */
2144 function (field) { return _this.orderFieldToSalesOrderField(field); }));
2145 return customField;
2146 }));
2147 return [].concat(primaryCustomField, secondaryCustomFields);
2148 };
2149 /**
2150 * @param {?} orderForms
2151 * @param {?} commonData
2152 * @param {?} labels
2153 * @param {?} options
2154 * @return {?}
2155 */
2156 OrderFormService.getCommonFormSections = /**
2157 * @param {?} orderForms
2158 * @param {?} commonData
2159 * @param {?} labels
2160 * @param {?} options
2161 * @return {?}
2162 */
2163 function (orderForms, commonData, labels, options) {
2164 /** @type {?} */
2165 var fieldIds = OrderFormService.buildCommonFieldIds(orderForms);
2166 return OrderFormService.fillCommonFormSections(fieldIds, commonData, labels, options);
2167 };
2168 /**
2169 * @param {?} orderForms
2170 * @param {?} products
2171 * @param {?} parentForm
2172 * @param {?} fileUploadUrl
2173 * @param {?} users
2174 * @param {?} answers
2175 * @param {?} options
2176 * @return {?}
2177 */
2178 OrderFormService.getCustomFormSections = /**
2179 * @param {?} orderForms
2180 * @param {?} products
2181 * @param {?} parentForm
2182 * @param {?} fileUploadUrl
2183 * @param {?} users
2184 * @param {?} answers
2185 * @param {?} options
2186 * @return {?}
2187 */
2188 function (orderForms, products, parentForm, fileUploadUrl, users, answers, options) {
2189 /** @type {?} */
2190 var formSections = products.map((/**
2191 * @param {?} product
2192 * @return {?}
2193 */
2194 function (product) {
2195 /** @type {?} */
2196 var subsections = [];
2197 (product.addonInfo || []).map((/**
2198 * @param {?} addon
2199 * @return {?}
2200 */
2201 function (addon) {
2202 /** @type {?} */
2203 var addonOrderForms = orderForms.filter((/**
2204 * @param {?} o
2205 * @return {?}
2206 */
2207 function (o) { return o.addonId === addon.addonId; }));
2208 /** @type {?} */
2209 var addonAnswers = (answers || []).filter((/**
2210 * @param {?} a
2211 * @return {?}
2212 */
2213 function (a) { return a.addonKey &&
2214 a.addonKey.appId === product.productId && a.addonKey.addonId === addon.addonId && a.productID === product.productId; }));
2215 addonOrderForms.map((/**
2216 * @param {?} addonOrderForm
2217 * @param {?} index
2218 * @return {?}
2219 */
2220 function (addonOrderForm, index) {
2221 if (addonOrderForm && addonOrderForm.customFields && addonOrderForm.customFields.length > 0) {
2222 /** @type {?} */
2223 var addonSection = OrderFormService.buildOrderFormSectionData(parentForm);
2224 /** @type {?} */
2225 var addonAnswersForThisSpecificFormIndex = (addonAnswers.length > index) ? addonAnswers[index].customFieldsAnswers : [];
2226 /** @type {?} */
2227 var formFields = OrderFormService.buildCustomOrderFormFields(addonOrderForm.customFields, fileUploadUrl, users, addonAnswersForThisSpecificFormIndex, options);
2228 addonSection.expandable = true;
2229 addonSection.titleText = addon.name;
2230 addonSection.fields = formFields;
2231 addonSection.productId = product.productId;
2232 addonSection.addonId = addon.addonId;
2233 subsections.push(addonSection);
2234 }
2235 }));
2236 }));
2237 /** @type {?} */
2238 var foundOrderForms = orderForms.reduce((/**
2239 * @param {?} orderFormsFound
2240 * @param {?} o
2241 * @return {?}
2242 */
2243 function (orderFormsFound, o) {
2244 if (o.appId === product.productId && !o.addonId) {
2245 orderFormsFound.push(o);
2246 }
2247 return orderFormsFound;
2248 }), []);
2249 var _a = __read(foundOrderForms), primaryOrder = _a[0], otherOrdersForSameProduct = _a.slice(1);
2250 /** @type {?} */
2251 var productHasOrderForm = primaryOrder && primaryOrder.customFields && primaryOrder.customFields.length > 0;
2252 if (subsections.length > 0 || productHasOrderForm) {
2253 /** @type {?} */
2254 var sectionData = new ProductOrderFormSectionData();
2255 sectionData.productId = product.productId;
2256 sectionData.parentForm = parentForm;
2257 sectionData.titleText = product.name;
2258 sectionData.subtitleText = product.tagline;
2259 sectionData.descriptionText = ''; // TODO: build the description string to show which common data this form uses
2260 sectionData.iconUrl = product.icon;
2261 if (productHasOrderForm) {
2262 /** @type {?} */
2263 var section_1 = OrderFormService.buildOrderFormSectionData(parentForm);
2264 section_1.titleText = product.name;
2265 /** @type {?} */
2266 var productAnswers = [];
2267 if (answers) {
2268 productAnswers = answers.filter((/**
2269 * @param {?} a
2270 * @return {?}
2271 */
2272 function (a) { return !a.addonKey && a.productID === product.productId; }));
2273 }
2274 var _b = __read(productAnswers), firstProductAnswers = _b[0], otherProductAnswers_1 = _b.slice(1);
2275 section_1.fields = OrderFormService.buildCustomOrderFormFields(primaryOrder.customFields, fileUploadUrl, users, firstProductAnswers ? firstProductAnswers.customFieldsAnswers : [], options);
2276 sectionData.primarySection = section_1;
2277 otherOrdersForSameProduct.forEach((/**
2278 * @param {?} _
2279 * @param {?} index
2280 * @return {?}
2281 */
2282 function (_, index) {
2283 /**
2284 * Clone the same section to avoid child component from modifying all as if these are all the top section.
2285 * All sections need to be re-created or else they will have the same id and send repeated data as well.
2286 * @type {?}
2287 */
2288 var dupeSection = __assign({}, section_1);
2289 /** @type {?} */
2290 var answersForSpecificForm = (otherProductAnswers_1.length > index) ? otherProductAnswers_1[index].customFieldsAnswers : [];
2291 dupeSection.fields = OrderFormService.buildCustomOrderFormFields(primaryOrder.customFields, fileUploadUrl, users, answersForSpecificForm, options);
2292 subsections.unshift(dupeSection);
2293 }));
2294 }
2295 sectionData.subsections = subsections;
2296 return sectionData;
2297 }
2298 return null;
2299 })).filter((/**
2300 * @param {?} s
2301 * @return {?}
2302 */
2303 function (s) { return !!s; }));
2304 return formSections;
2305 };
2306 /**
2307 * @param {?} extraFields
2308 * @param {?} parentForm
2309 * @param {?} fileUploadUrl
2310 * @param {?} users
2311 * @param {?} answers
2312 * @param {?} options
2313 * @return {?}
2314 */
2315 OrderFormService.getExtraFieldsSection = /**
2316 * @param {?} extraFields
2317 * @param {?} parentForm
2318 * @param {?} fileUploadUrl
2319 * @param {?} users
2320 * @param {?} answers
2321 * @param {?} options
2322 * @return {?}
2323 */
2324 function (extraFields, parentForm, fileUploadUrl, users, answers, options) {
2325 if (!extraFields || extraFields.length < 1) {
2326 return null;
2327 }
2328 /** @type {?} */
2329 var section = OrderFormService.buildOrderFormSectionData(parentForm);
2330 section.fields = OrderFormService.buildCustomOrderFormFields(extraFields, fileUploadUrl, users, answers, options);
2331 return section;
2332 };
2333 /**
2334 * @param {?} customFormSections
2335 * @return {?}
2336 */
2337 OrderFormService.getCustomFieldsData = /**
2338 * @param {?} customFormSections
2339 * @return {?}
2340 */
2341 function (customFormSections) {
2342 /** @type {?} */
2343 var customFormData = customFormSections.reduce((/**
2344 * @param {?} acc
2345 * @param {?} orderFormData
2346 * @return {?}
2347 */
2348 function (acc, orderFormData) {
2349 acc = acc.concat(OrderFormService.productOrderFormToCustomFields(orderFormData));
2350 return acc;
2351 }), []);
2352 return customFormData;
2353 };
2354 /**
2355 * @param {?} commonFormSections
2356 * @return {?}
2357 */
2358 OrderFormService.getCommonFieldsData = /**
2359 * @param {?} commonFormSections
2360 * @return {?}
2361 */
2362 function (commonFormSections) {
2363 /** @type {?} */
2364 var commonFields = [];
2365 if (commonFormSections) {
2366 commonFields = commonFormSections.reduce((/**
2367 * @param {?} acc
2368 * @param {?} group
2369 * @return {?}
2370 */
2371 function (acc, group) {
2372 /** @type {?} */
2373 var fields = group.fields.map((/**
2374 * @param {?} singleField
2375 * @return {?}
2376 */
2377 function (singleField) {
2378 /** @type {?} */
2379 var field = OrderFormService.orderFieldToSalesOrderField(singleField);
2380 if (field.fieldId) {
2381 return new CommonField({
2382 field: field,
2383 productIds: singleField.productIds,
2384 addonKeys: singleField.addonKeys
2385 });
2386 }
2387 }));
2388 return acc.concat(fields);
2389 }), []);
2390 }
2391 return commonFields;
2392 };
2393 /**
2394 * @param {?} extraFieldsSection
2395 * @return {?}
2396 */
2397 OrderFormService.getExtraFieldsData = /**
2398 * @param {?} extraFieldsSection
2399 * @return {?}
2400 */
2401 function (extraFieldsSection) {
2402 /** @type {?} */
2403 var extraFieldsData = [];
2404 if (!!extraFieldsSection) {
2405 extraFieldsData = extraFieldsSection.fields.map((/**
2406 * @param {?} field
2407 * @return {?}
2408 */
2409 function (field) { return OrderFormService.orderFieldToSalesOrderField(field); }));
2410 }
2411 return extraFieldsData;
2412 };
2413 OrderFormService.camelToSnakeCaseMap = {
2414 'contactName': 'contact_name',
2415 'contactEmail': 'contact_email',
2416 'contactPhoneNumber': 'contact_phone_number',
2417 'businessAccountGroupId': 'business_account_group_id',
2418 'businessName': 'business_name',
2419 'businessAddress': 'business_address',
2420 'businessPhoneNumber': 'business_phone_number',
2421 'businessWebsite': 'business_website',
2422 'salespersonName': 'salesperson_name',
2423 'salespersonEmail': 'salesperson_email',
2424 'salespersonPhoneNumber': 'salesperson_phone_number'
2425 };
2426 OrderFormService.decorators = [
2427 { type: Injectable }
2428 ];
2429 /** @nocollapse */
2430 OrderFormService.ctorParameters = function () { return []; };
2431 return OrderFormService;
2432}());
2433if (false) {
2434 /** @type {?} */
2435 OrderFormService.camelToSnakeCaseMap;
2436}
2437
2438/**
2439 * @fileoverview added by tsickle
2440 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2441 */
2442var OrderFormComponent = /** @class */ (function () {
2443 function OrderFormComponent() {
2444 this.dropdownOpen$$ = new BehaviorSubject(false);
2445 this.dropdownOpen$ = this.dropdownOpen$$.asObservable();
2446 }
2447 /**
2448 * @return {?}
2449 */
2450 OrderFormComponent.prototype.ngOnInit = /**
2451 * @return {?}
2452 */
2453 function () {
2454 /** @type {?} */
2455 var options = new OrderFormOptions(this.orderFormOptions || {});
2456 this.commonFormSections = OrderFormService.getCommonFormSections(this.orderForms, this.commonData, this.labels, options);
2457 this.customFormSections = OrderFormService.getCustomFormSections(this.orderForms, this.productInfo, this.parentForm, this.fileUploadUrl, this.users, this.answers, options);
2458 // TODO: Handle MyCorporation OrderForm (handled in a separate component right now)
2459 this.extraFieldsSection = OrderFormService.getExtraFieldsSection(this.extraFields, this.parentForm, this.fileUploadUrl, this.users, this.extraFieldsAnswers, options);
2460 };
2461 /**
2462 * returns the data from common form fields in a format that is usable by sales orders
2463 */
2464 /**
2465 * returns the data from common form fields in a format that is usable by sales orders
2466 * @return {?}
2467 */
2468 OrderFormComponent.prototype.getCommonFormData = /**
2469 * returns the data from common form fields in a format that is usable by sales orders
2470 * @return {?}
2471 */
2472 function () {
2473 return OrderFormService.getCommonFieldsData(this.commonFormSections);
2474 };
2475 /**
2476 * returns the data from custom forms in a format that is usable by sales orders
2477 */
2478 /**
2479 * returns the data from custom forms in a format that is usable by sales orders
2480 * @return {?}
2481 */
2482 OrderFormComponent.prototype.getCustomFormData = /**
2483 * returns the data from custom forms in a format that is usable by sales orders
2484 * @return {?}
2485 */
2486 function () {
2487 return OrderFormService.getCustomFieldsData(this.customFormSections);
2488 };
2489 /**
2490 * returns the data from extra fields in a format that is usable by sales orders
2491 */
2492 /**
2493 * returns the data from extra fields in a format that is usable by sales orders
2494 * @return {?}
2495 */
2496 OrderFormComponent.prototype.getExtraFieldsData = /**
2497 * returns the data from extra fields in a format that is usable by sales orders
2498 * @return {?}
2499 */
2500 function () {
2501 return OrderFormService.getExtraFieldsData(this.extraFieldsSection);
2502 };
2503 /**
2504 * changes the read only state of the sales order form
2505 */
2506 /**
2507 * changes the read only state of the sales order form
2508 * @param {?} readOnly
2509 * @return {?}
2510 */
2511 OrderFormComponent.prototype.changeReadOnly = /**
2512 * changes the read only state of the sales order form
2513 * @param {?} readOnly
2514 * @return {?}
2515 */
2516 function (readOnly) {
2517 this.orderFormOptions.readOnly = readOnly;
2518 readOnly ? this.parentForm.disable() : this.parentForm.enable();
2519 };
2520 /**
2521 * @return {?}
2522 */
2523 OrderFormComponent.prototype.openDropdown = /**
2524 * @return {?}
2525 */
2526 function () {
2527 this.dropdownOpen$$.next(true);
2528 };
2529 OrderFormComponent.decorators = [
2530 { type: Component, args: [{
2531 template: "<form [formGroup]=\"parentForm\">\n <!-- Common Fields -->\n <div *ngIf=\"commonFormSections?.length > 0\" class=\"common-form-container\">\n <mat-card class=\"common-form-header\">\n <mat-card-title class=\"common-form-header-title\">{{ labels.commonForm.headerTitle }}</mat-card-title>\n <div class=\"common-form-header-text\">{{ labels.commonForm.headerText }}</div>\n </mat-card>\n <va-dropdown-form-section\n *ngFor=\"let formSection of commonFormSections\"\n [parentForm]=\"parentForm\"\n [prepopulatedData]=\"formSection.populatedData\"\n [fields]=\"formSection.fields\"\n [titleText]=\"formSection.sectionName\"\n [startOpen]=\"dropdownOpen$ | async\"\n editingHint=\"{{ labels.commonForm.editingHint }}\"\n >\n </va-dropdown-form-section>\n <ng-container *ngIf=\"extraFieldsSection\">\n <va-dropdown-form-section\n [parentForm]=\"parentForm\"\n [prepopulatedData]=\"extraFieldsSection.prepopulatedData\"\n [fields]=\"extraFieldsSection.fields\"\n [displayAutoDescription]=false\n [startOpen]=\"true\"\n [titleText]=\"'FRONTEND.STORE.ADMINISTRATIVE_QUESTIONS' | translate\"\n >\n </va-dropdown-form-section>\n </ng-container>\n </div>\n\n <!--Custom Fields-->\n <div *ngIf=\"customFormSections?.length > 0\" class=\"custom-form-container\">\n <va-order-form-section *ngFor=\"let sectionData of customFormSections\" [data]=\"sectionData\"></va-order-form-section>\n </div>\n</form>\n",
2532 providers: [],
2533 selector: 'va-order-form',
2534 styles: [".common-form-container{margin-bottom:16px}mat-card.common-form-header{margin-bottom:0;border-bottom-color:#fafafa;border-bottom-width:1px;box-shadow:0 0 1px -2px rgba(0,0,0,.2),0 0 2px 0 rgba(0,0,0,.14),0 0 5px 0 rgba(0,0,0,.12)}.common-form-header-text{font-size:15px;color:#9e9e9e}.common-form-header-title{margin-bottom:0;padding-bottom:15px}va-order-form-section{display:block;margin-bottom:16px}"]
2535 }] }
2536 ];
2537 OrderFormComponent.propDecorators = {
2538 commonData: [{ type: Input }],
2539 answers: [{ type: Input }],
2540 parentForm: [{ type: Input }],
2541 fileUploadUrl: [{ type: Input }],
2542 orderForms: [{ type: Input }],
2543 productInfo: [{ type: Input }],
2544 labels: [{ type: Input }],
2545 users: [{ type: Input }],
2546 extraFields: [{ type: Input }],
2547 extraFieldsAnswers: [{ type: Input }],
2548 orderFormOptions: [{ type: Input }]
2549 };
2550 return OrderFormComponent;
2551}());
2552if (false) {
2553 /** @type {?} */
2554 OrderFormComponent.prototype.commonData;
2555 /** @type {?} */
2556 OrderFormComponent.prototype.answers;
2557 /** @type {?} */
2558 OrderFormComponent.prototype.parentForm;
2559 /** @type {?} */
2560 OrderFormComponent.prototype.fileUploadUrl;
2561 /** @type {?} */
2562 OrderFormComponent.prototype.orderForms;
2563 /** @type {?} */
2564 OrderFormComponent.prototype.productInfo;
2565 /** @type {?} */
2566 OrderFormComponent.prototype.labels;
2567 /** @type {?} */
2568 OrderFormComponent.prototype.users;
2569 /** @type {?} */
2570 OrderFormComponent.prototype.extraFields;
2571 /** @type {?} */
2572 OrderFormComponent.prototype.extraFieldsAnswers;
2573 /** @type {?} */
2574 OrderFormComponent.prototype.orderFormOptions;
2575 /** @type {?} */
2576 OrderFormComponent.prototype.commonFormSections;
2577 /** @type {?} */
2578 OrderFormComponent.prototype.customFormSections;
2579 /** @type {?} */
2580 OrderFormComponent.prototype.extraFieldsSection;
2581 /** @type {?} */
2582 OrderFormComponent.prototype.dropdownOpen$$;
2583 /** @type {?} */
2584 OrderFormComponent.prototype.dropdownOpen$;
2585}
2586var OrderFormOptions = /** @class */ (function () {
2587 function OrderFormOptions(i) {
2588 this.bypassRequiredQuestions = !!i.bypassRequiredQuestions;
2589 this.readOnly = !!i.readOnly;
2590 this.showOfficeUseQuestions = !!i.showOfficeUseQuestions;
2591 }
2592 return OrderFormOptions;
2593}());
2594if (false) {
2595 /** @type {?} */
2596 OrderFormOptions.prototype.bypassRequiredQuestions;
2597 /** @type {?} */
2598 OrderFormOptions.prototype.readOnly;
2599 /** @type {?} */
2600 OrderFormOptions.prototype.showOfficeUseQuestions;
2601}
2602
2603/**
2604 * @fileoverview added by tsickle
2605 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2606 */
2607/** @type {?} */
2608var FILES = 'file';
2609/** @type {?} */
2610var DROP_DOWN = 'dropdown';
2611/** @type {?} */
2612var CHECK_BOX = 'checkbox';
2613/** @type {?} */
2614var TEXT_AREA = 'textarea';
2615/** @type {?} */
2616var TEXT_BOX = 'textbox';
2617/** @type {?} */
2618var BUSINESS_USER = 'vbcuser';
2619/**
2620 * @record
2621 */
2622function FieldBaseOptions() { }
2623if (false) {
2624 /** @type {?} */
2625 FieldBaseOptions.prototype.id;
2626 /** @type {?} */
2627 FieldBaseOptions.prototype.label;
2628 /** @type {?|undefined} */
2629 FieldBaseOptions.prototype.required;
2630 /** @type {?|undefined} */
2631 FieldBaseOptions.prototype.description;
2632 /** @type {?|undefined} */
2633 FieldBaseOptions.prototype.type;
2634 /** @type {?|undefined} */
2635 FieldBaseOptions.prototype.prefix;
2636 /** @type {?|undefined} */
2637 FieldBaseOptions.prototype.suffix;
2638 /** @type {?|undefined} */
2639 FieldBaseOptions.prototype.regexValidator;
2640 /** @type {?|undefined} */
2641 FieldBaseOptions.prototype.regexErrorMessage;
2642 /** @type {?|undefined} */
2643 FieldBaseOptions.prototype.disabled;
2644 /** @type {?|undefined} */
2645 FieldBaseOptions.prototype.forOfficeUseOnly;
2646 /** @type {?|undefined} */
2647 FieldBaseOptions.prototype.hidden;
2648 /** @type {?|undefined} */
2649 FieldBaseOptions.prototype.displayOnly;
2650}
2651/**
2652 * @abstract
2653 * @template T
2654 */
2655var /**
2656 * @abstract
2657 * @template T
2658 */
2659FieldBase = /** @class */ (function () {
2660 function FieldBase(options) {
2661 this.id = options.id;
2662 this.label = options.label;
2663 this.required = !!options.required;
2664 this.description = options.description || null;
2665 options.type = options.type === 'text' ? 'textbox' : options.type;
2666 this.controlType = (/** @type {?} */ (options.type));
2667 this.prefix = options.prefix;
2668 this.suffix = options.suffix;
2669 this.regexValidator = options.regexValidator;
2670 this.regexErrorMessage = options.regexErrorMessage;
2671 this.disabled = options.disabled || false;
2672 this.validator = this.validatorBuilder();
2673 this.forOfficeUseOnly = !!options.forOfficeUseOnly;
2674 this.hidden = options.hidden;
2675 this.displayOnly = options.displayOnly;
2676 }
2677 /**
2678 * @return {?}
2679 */
2680 FieldBase.prototype.getLabel = /**
2681 * @return {?}
2682 */
2683 function () {
2684 /** @type {?} */
2685 var fieldLabel = this.label;
2686 if (this.required) {
2687 fieldLabel += ' *';
2688 }
2689 return fieldLabel;
2690 };
2691 /**
2692 * @protected
2693 * @return {?}
2694 */
2695 FieldBase.prototype.validatorBuilder = /**
2696 * @protected
2697 * @return {?}
2698 */
2699 function () {
2700 return (/**
2701 * @param {?} control
2702 * @return {?}
2703 */
2704 function (control) {
2705 return null;
2706 });
2707 };
2708 return FieldBase;
2709}());
2710if (false) {
2711 /** @type {?} */
2712 FieldBase.prototype.value;
2713 /** @type {?} */
2714 FieldBase.prototype.id;
2715 /** @type {?} */
2716 FieldBase.prototype.label;
2717 /** @type {?} */
2718 FieldBase.prototype.required;
2719 /** @type {?} */
2720 FieldBase.prototype.order;
2721 /** @type {?} */
2722 FieldBase.prototype.description;
2723 /** @type {?} */
2724 FieldBase.prototype.controlType;
2725 /** @type {?} */
2726 FieldBase.prototype.prefix;
2727 /** @type {?} */
2728 FieldBase.prototype.suffix;
2729 /** @type {?} */
2730 FieldBase.prototype.regexValidator;
2731 /** @type {?} */
2732 FieldBase.prototype.regexErrorMessage;
2733 /** @type {?} */
2734 FieldBase.prototype.disabled;
2735 /** @type {?} */
2736 FieldBase.prototype.validator;
2737 /** @type {?} */
2738 FieldBase.prototype.forOfficeUseOnly;
2739 /** @type {?} */
2740 FieldBase.prototype.hidden;
2741 /** @type {?} */
2742 FieldBase.prototype.displayOnly;
2743}
2744
2745/**
2746 * @fileoverview added by tsickle
2747 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2748 */
2749var FieldBuilderComponent = /** @class */ (function () {
2750 function FieldBuilderComponent() {
2751 this.removeField = new EventEmitter(null);
2752 }
2753 /**
2754 * @param {?} option
2755 * @param {?} required
2756 * @return {?}
2757 */
2758 FieldBuilderComponent.createDropDownOption = /**
2759 * @param {?} option
2760 * @param {?} required
2761 * @return {?}
2762 */
2763 function (option, required) {
2764 return new FormGroup({
2765 label: new FormControl(option.label || option.value, required ? [Validators.required] : []),
2766 value: new FormControl(option.value),
2767 useValue: new FormControl(!!option.value)
2768 });
2769 };
2770 /**
2771 * @param {?} options
2772 * @return {?}
2773 */
2774 FieldBuilderComponent.createDropDownOptions = /**
2775 * @param {?} options
2776 * @return {?}
2777 */
2778 function (options) {
2779 if (options === null || options === undefined) {
2780 options = [];
2781 }
2782 /** @type {?} */
2783 var orderFormFieldsGroupArray = options.map((/**
2784 * @param {?} option
2785 * @return {?}
2786 */
2787 function (option) { return FieldBuilderComponent.createDropDownOption(option, false); }));
2788 return new FormArray(orderFormFieldsGroupArray);
2789 };
2790 /**
2791 * @param {?} orderFormField
2792 * @return {?}
2793 */
2794 FieldBuilderComponent.createOrderFormFieldGroup = /**
2795 * @param {?} orderFormField
2796 * @return {?}
2797 */
2798 function (orderFormField) {
2799 /** @type {?} */
2800 var orderFormFieldGroup = new FormGroup({
2801 descriptionControl: new FormControl(orderFormField.description, []),
2802 labelControl: new FormControl(orderFormField.label, [Validators.required]),
2803 idControl: new FormControl(orderFormField.id, [Validators.required]),
2804 requiredControl: new FormControl(orderFormField.required || false, []),
2805 uploadUrlControl: new FormControl(orderFormField.uploadUrl, []),
2806 prefixControl: new FormControl(orderFormField.prefix, []),
2807 suffixControl: new FormControl(orderFormField.suffix, []),
2808 regexValidatorControl: new FormControl(orderFormField.regexValidator, regexValidator()),
2809 regexErrorMessageControl: new FormControl(orderFormField.regexErrorMessage, []),
2810 typeControl: new FormControl(getFieldInterface(orderFormField.type), [Validators.required]),
2811 allowMultiples: new FormControl(orderFormField.allowMultiples || false, []),
2812 allowDuplicates: new FormControl(orderFormField.allowDuplicates || false, []),
2813 maxChoices: new FormControl(orderFormField.maxChoices ? orderFormField.maxChoices : 1, [Validators.min(1), numberValidator()]),
2814 forOfficeUseOnly: new FormControl(orderFormField.forOfficeUseOnly || false, [])
2815 });
2816 if (orderFormField.optionsWithLabels) {
2817 /** @type {?} */
2818 var optionsArray = FieldBuilderComponent.createDropDownOptions(orderFormField.optionsWithLabels);
2819 orderFormFieldGroup.addControl('optionsFormArray', optionsArray);
2820 }
2821 else if (orderFormField.options) {
2822 /** @type {?} */
2823 var optionsArray = FieldBuilderComponent.createDropDownOptions(orderFormField.options.map((/**
2824 * @param {?} option
2825 * @return {?}
2826 */
2827 function (option) { return ({ label: option }); })));
2828 orderFormFieldGroup.addControl('optionsFormArray', optionsArray);
2829 }
2830 else {
2831 orderFormFieldGroup.addControl('optionsFormArray', new FormArray([]));
2832 }
2833 return orderFormFieldGroup;
2834 };
2835 /**
2836 * @return {?}
2837 */
2838 FieldBuilderComponent.prototype.ngOnInit = /**
2839 * @return {?}
2840 */
2841 function () {
2842 if (!this.supportedFieldTypes || this.supportedFieldTypes.length < 1) {
2843 this.supportedFieldTypes = FORM_FIELDS;
2844 }
2845 this.initForm();
2846 };
2847 /**
2848 * @return {?}
2849 */
2850 FieldBuilderComponent.prototype.initForm = /**
2851 * @return {?}
2852 */
2853 function () {
2854 // Check to see if form has been initiated
2855 if (!this.orderFormFieldGroup.get('labelControl')) {
2856 this.orderFormFieldGroup =
2857 FieldBuilderComponent.createOrderFormFieldGroup({});
2858 }
2859 };
2860 /**
2861 * @return {?}
2862 */
2863 FieldBuilderComponent.prototype.getOptionsArray = /**
2864 * @return {?}
2865 */
2866 function () {
2867 return (/** @type {?} */ (this.orderFormFieldGroup.get('optionsFormArray')));
2868 };
2869 /**
2870 * @return {?}
2871 */
2872 FieldBuilderComponent.prototype.getCurrentFieldInterface = /**
2873 * @return {?}
2874 */
2875 function () {
2876 /** @type {?} */
2877 var formFieldTypeInterface = ((/** @type {?} */ (this.orderFormFieldGroup.get('typeControl').value)));
2878 return formFieldTypeInterface ? formFieldTypeInterface.id : null;
2879 };
2880 /**
2881 * @param {?} index
2882 * @return {?}
2883 */
2884 FieldBuilderComponent.prototype.removeOption = /**
2885 * @param {?} index
2886 * @return {?}
2887 */
2888 function (index) {
2889 /** @type {?} */
2890 var formArray = this.getOptionsArray();
2891 formArray.removeAt(index);
2892 };
2893 /**
2894 * @return {?}
2895 */
2896 FieldBuilderComponent.prototype.addOption = /**
2897 * @return {?}
2898 */
2899 function () {
2900 /** @type {?} */
2901 var fieldArray = this.getOptionsArray();
2902 fieldArray.push(FieldBuilderComponent.createDropDownOption({ label: '' }, true));
2903 };
2904 /**
2905 * @return {?}
2906 */
2907 FieldBuilderComponent.prototype.getFormValues = /**
2908 * @return {?}
2909 */
2910 function () {
2911 /** @type {?} */
2912 var obj = {};
2913 obj.label = this.orderFormFieldGroup.get('labelControl').value;
2914 obj.id = this.orderFormFieldGroup.get('idControl').value;
2915 /** @type {?} */
2916 var formFieldType = ((/** @type {?} */ (this.orderFormFieldGroup.get('typeControl').value)));
2917 obj.type = formFieldType ? formFieldType.id : null;
2918 // Options will be nested under their own form control in the larger Orderformfield array
2919 /** @type {?} */
2920 var optionsArray = ((/** @type {?} */ (this.orderFormFieldGroup.get('optionsFormArray'))));
2921 if (optionsArray && optionsArray.value) {
2922 obj.options = optionsArray.value.map((/**
2923 * @param {?} option
2924 * @return {?}
2925 */
2926 function (option) { return option.value || option.label; }));
2927 obj.optionsWithLabels = optionsArray.value.map((/**
2928 * @param {?} option
2929 * @return {?}
2930 */
2931 function (option) { return ({ label: option.label, value: option.value }); }));
2932 }
2933 obj.description = this.orderFormFieldGroup.get('descriptionControl').value;
2934 obj.required = this.orderFormFieldGroup.get('requiredControl').value || false;
2935 obj.uploadUrl = this.orderFormFieldGroup.get('uploadUrlControl').value;
2936 obj.prefix = this.orderFormFieldGroup.get('prefixControl').value;
2937 obj.suffix = this.orderFormFieldGroup.get('suffixControl').value;
2938 obj.regexValidator = this.orderFormFieldGroup.get('regexValidatorControl').value;
2939 obj.regexErrorMessage = this.orderFormFieldGroup.get('regexErrorMessageControl').value;
2940 obj.allowMultiples = this.orderFormFieldGroup.get('allowMultiples').value || false;
2941 obj.allowDuplicates = this.orderFormFieldGroup.get('allowDuplicates').value || false;
2942 obj.maxChoices = this.orderFormFieldGroup.get('maxChoices').value || 1;
2943 obj.forOfficeUseOnly = this.orderFormFieldGroup.get('forOfficeUseOnly').value || false;
2944 return obj;
2945 };
2946 FieldBuilderComponent.decorators = [
2947 { type: Component, args: [{
2948 selector: 'va-field-builder',
2949 template: "<div class=\"color-primary grab-mask order-form-field-form-container\" [formGroup]=\"orderFormFieldGroup\">\n <mat-form-field class=\"order-form-mat-form-field\">\n <mat-select matInput formControlName=\"typeControl\" placeholder=\"Type\" required novalidate>\n <mat-option *ngFor=\"let field of supportedFieldTypes\" [value]=\"field\">\n {{ field.name }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"'typeControl.invalid'\">Form Field type is Required</mat-error>\n </mat-form-field>\n <span class=\"options\">\n <mat-checkbox color=\"primary\" [formControlName]=\"'requiredControl'\"> Required</mat-checkbox>\n <mat-checkbox color=\"primary\" [formControlName]=\"'forOfficeUseOnly'\" class=\"underlined\" matTooltip=\"This question will not be shown to end users\"> For Office Use Only</mat-checkbox>\n </span>\n <!-- Options if drop down type is selected -->\n <ng-container *ngIf=\"getCurrentFieldInterface() && getCurrentFieldInterface() === 'dropdown'\">\n <div formArrayName=\"optionsFormArray\" *ngFor=\"let option of getOptionsArray().controls; let i = index;\">\n <div class=\"removable-form-field dropdown-option\">\n <mat-form-field class=\"dropdown-option-label\">\n <input matInput [formControl]=\"option.get('label')\" placeholder=\"Option\">\n </mat-form-field>\n <mat-form-field class=\"dropdown-option-value\" *ngIf=\"option.get('useValue').value\">\n <input matInput [formControl]=\"option.get('value')\" placeholder=\"Value\">\n </mat-form-field>\n <a class=\"dropdown-option-value\" (click)=\"option.get('useValue').setValue(true)\" *ngIf=\"!option.get('useValue').value\">+ Assign Value</a>\n <button mat-icon-button type=\"button\" color=\"primary\" (click)=\"removeOption(i)\">\n <mat-icon aria-label=\"Clear Button\">clear</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"order-form-mat-form-field\">\n <a (click)=\"addOption()\">+ Option</a>\n </div>\n <div class=\"dropdown-config\">\n <mat-checkbox color=\"primary\" [formControlName]=\"'allowMultiples'\"> Allow Multiples</mat-checkbox>\n <ng-container *ngIf=\"orderFormFieldGroup.controls.allowMultiples.value\">\n <mat-checkbox class=\"required-checkbox\" color=\"primary\" [formControlName]=\"'allowDuplicates'\"> Allow Duplicates</mat-checkbox>\n <div>\n <mat-form-field class=\"order-form-mat-form-field\">\n <input matInput formControlName=\"maxChoices\" placeholder=\"Maximum Number of Choices\" required type=\"number\">\n <mat-hint>Must be greater than 0</mat-hint>\n <mat-error *ngIf=\"'maxChoices.invalid'\">Max Choices must be a number larger than 0</mat-error>\n </mat-form-field>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div>\n <mat-form-field class=\"order-form-mat-form-field\">\n <input matInput formControlName=\"labelControl\" placeholder=\"Label\" required novalidate>\n <mat-hint>Keep it short. Recommended: Max 140 characters</mat-hint>\n <mat-error *ngIf=\"'idControl.invalid'\">Label is Required</mat-error>\n </mat-form-field>\n </div>\n <!-- Prefix/suffix if textbox type is selected -->\n <ng-container *ngIf=\"getCurrentFieldInterface() && getCurrentFieldInterface() === 'textbox'\">\n <ng-container *ngIf=\"showSuffixes\">\n <mat-form-field>\n <input matInput formControlName=\"prefixControl\" placeholder=\"Prefix\">\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"suffixControl\" placeholder=\"Suffix\">\n </mat-form-field>\n <div class=\"show-hide-text-button\"><a (click)=\"showSuffixes = !showSuffixes\">Hide Prefix/Suffix</a></div>\n </ng-container>\n <div *ngIf=\"!showSuffixes\" class=\"show-hide-text-button\">\n <a (click)=\"showSuffixes = !showSuffixes\">+ Prefix/Suffix</a>\n <div class=\"hidden-note\">- Values will apply even though currently hidden </div>\n </div>\n </ng-container>\n\n <div>\n <mat-form-field class=\"order-form-mat-form-field\">\n <input matInput formControlName=\"idControl\" placeholder=\"ID\" required>\n <mat-error *ngIf=\"'idControl.invalid'\">Id is Required</mat-error>\n <mat-hint>ID must be unique</mat-hint>\n </mat-form-field>\n </div>\n\n\n <!-- Upload url if file type is selected -->\n <ng-container *ngIf=\"getCurrentFieldInterface() && getCurrentFieldInterface() === 'file'\">\n <mat-form-field>\n <input matInput formControlName=\"uploadUrlControl\" placeholder=\"Upload URL\">\n </mat-form-field>\n </ng-container>\n\n\n <!-- Prefix/suffix if textbox type is selected -->\n <ng-container *ngIf=\"getCurrentFieldInterface() && getCurrentFieldInterface() === 'textbox'\">\n\n <!-- RegexValidator/RegexErrorMessage if textbox type is selected -->\n <ng-container *ngIf=\"showValidators\">\n <mat-form-field>\n <input matInput formControlName=\"regexValidatorControl\" placeholder=\"Regex Validator\">\n <mat-error *ngIf=\"'regexValidatorControl.invalid'\"> Must be a valid regular expression </mat-error>\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"regexErrorMessageControl\" placeholder=\"Regex Error Message\">\n <mat-hint> Error displayed to the user when the regular expression is not matched </mat-hint>\n </mat-form-field>\n <div class=\"show-hide-text-button\">\n <a (click)=\"showValidators = !showValidators\">Hide Validation</a>\n </div>\n </ng-container>\n <div *ngIf=\"!showValidators\" class=\"show-hide-text-button\">\n <a (click)=\"showValidators = !showValidators\">+ Validation</a>\n <div class=\"hidden-note\"> - Values will apply even though currently hidden </div>\n </div>\n </ng-container>\n\n <!-- Optional description -->\n <div class=\"removable-form-field\">\n <mat-form-field>\n <input matInput formControlName=\"descriptionControl\" placeholder=\"Hint text\">\n <mat-hint>A short sentence to show below the field if you absolutely need extra instruction</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"delete-field-section\">\n <button mat-icon-button type=\"button\" color=\"primary\" (click)=\"removeField.emit()\">\n Delete field\n <!-- <mat-icon aria-label=\"Clear Button\">clear</mat-icon> -->\n </button>\n </div>\n</div>\n",
2950 changeDetection: ChangeDetectionStrategy.OnPush,
2951 styles: [".show-hide-text-button{margin-bottom:2em;display:-webkit-box;display:flex}.show-hide-text-button .hidden-note{font-size:10px;margin-left:7px;color:#9e9e9e;-ms-grid-row-align:center;align-self:center}.options{padding-left:15px;width:15%;display:inline-block}.dropdown-option,mat-form-field{width:85%}.delete-field-section{text-align:right}.mat-icon-button{width:auto;color:rgba(0,0,0,.54)!important}.mat-icon-button:hover{color:#c62828!important}.dropdown-config{margin-top:17px}.dropdown-config mat-checkbox{margin-right:16px}.dropdown-option{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.dropdown-option-label{-webkit-box-flex:1;flex:1 1 auto;margin-right:16px}.dropdown-option-value{-webkit-box-flex:0;flex:0 1 33%}.underlined{border-bottom:1px dotted}"]
2952 }] }
2953 ];
2954 FieldBuilderComponent.propDecorators = {
2955 orderFormFieldGroup: [{ type: Input }],
2956 supportedFieldTypes: [{ type: Input }],
2957 removeField: [{ type: Output }]
2958 };
2959 return FieldBuilderComponent;
2960}());
2961if (false) {
2962 /** @type {?} */
2963 FieldBuilderComponent.prototype.orderFormFieldGroup;
2964 /** @type {?} */
2965 FieldBuilderComponent.prototype.supportedFieldTypes;
2966 /** @type {?} */
2967 FieldBuilderComponent.prototype.removeField;
2968 /** @type {?} */
2969 FieldBuilderComponent.prototype.showValidators;
2970 /** @type {?} */
2971 FieldBuilderComponent.prototype.showSuffixes;
2972}
2973// Validation to ensure supplied regex is valid
2974/**
2975 * @return {?}
2976 */
2977function regexValidator() {
2978 return (/**
2979 * @param {?} control
2980 * @return {?}
2981 */
2982 function (control) {
2983 try {
2984 /** @type {?} */
2985 var _ = new RegExp(control.value || '');
2986 }
2987 catch (e) {
2988 return { 'regex': true };
2989 }
2990 return null;
2991 });
2992}
2993/**
2994 * @return {?}
2995 */
2996function numberValidator() {
2997 return (/**
2998 * @param {?} control
2999 * @return {?}
3000 */
3001 function (control) {
3002 /** @type {?} */
3003 var isNumber = /^\d+$/;
3004 if (isNumber.test(control.value)) {
3005 return null;
3006 }
3007 return { 'number': true };
3008 });
3009}
3010/**
3011 * @record
3012 */
3013function FormFieldInterface() { }
3014if (false) {
3015 /** @type {?} */
3016 FormFieldInterface.prototype.id;
3017 /** @type {?} */
3018 FormFieldInterface.prototype.name;
3019}
3020/** @type {?} */
3021var FORM_FIELDS = [
3022 { id: FILES, name: 'Files' }, { id: DROP_DOWN, name: 'Drop Down' },
3023 { id: CHECK_BOX, name: 'Check Box' }, { id: TEXT_AREA, name: 'Text Area' },
3024 { id: TEXT_BOX, name: 'Text Box' }, { id: BUSINESS_USER, name: 'End User' }
3025];
3026/**
3027 * @param {?} formFieldId
3028 * @return {?}
3029 */
3030function getFieldInterface(formFieldId) {
3031 return getFormFieldInterfaceFromId(((/** @type {?} */ (formFieldId))));
3032}
3033/**
3034 * @param {?} id
3035 * @return {?}
3036 */
3037function getFormFieldInterfaceFromId(id) {
3038 return FORM_FIELDS.find((/**
3039 * @param {?} obj
3040 * @return {?}
3041 */
3042 function (obj) { return obj.id === id; }));
3043}
3044
3045/**
3046 * @fileoverview added by tsickle
3047 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3048 */
3049var OrderItemListService = /** @class */ (function () {
3050 function OrderItemListService() {
3051 }
3052 /**
3053 * @param {?} items
3054 * @return {?}
3055 */
3056 OrderItemListService.getPriceSummary = /**
3057 * @param {?} items
3058 * @return {?}
3059 */
3060 function (items) {
3061 if (!items) {
3062 return { items: [], includesUndefinedPricing: false };
3063 }
3064 /** @type {?} */
3065 var includesUndefinedPricing = false;
3066 /** @type {?} */
3067 var summaryItems = items.reduce((/**
3068 * @param {?} currentArray
3069 * @param {?} item
3070 * @return {?}
3071 */
3072 function (currentArray, item) {
3073 if (item.pricing.prices.length <= 0) {
3074 includesUndefinedPricing = true;
3075 return currentArray;
3076 }
3077 item.pricing.prices.map((/**
3078 * @param {?} price
3079 * @return {?}
3080 */
3081 function (price) {
3082 if (!price || price.price < 0) {
3083 includesUndefinedPricing = true;
3084 return;
3085 }
3086 /** @type {?} */
3087 var freq = price.billingFrequency;
3088 /** @type {?} */
3089 var cur = item.pricing.currency;
3090 /** @type {?} */
3091 var existingCurIndex = currentArray.findIndex((/**
3092 * @param {?} summaryItem
3093 * @return {?}
3094 */
3095 function (summaryItem) { return summaryItem.currency === cur; }));
3096 /** @type {?} */
3097 var pricing = {
3098 currency: cur,
3099 prices: []
3100 };
3101 if (existingCurIndex > -1) {
3102 pricing = currentArray[existingCurIndex];
3103 }
3104 /** @type {?} */
3105 var existingFreqIndex = pricing.prices.findIndex((/**
3106 * @param {?} summaryItem
3107 * @return {?}
3108 */
3109 function (summaryItem) { return summaryItem.billingFrequency === freq; }));
3110 /** @type {?} */
3111 var quantifiedPrice = price.price !== null ? price.price * item.quantity : null;
3112 /** @type {?} */
3113 var quantifiedDiscount = (price.discountAmount || 0) * item.quantity;
3114 if (existingFreqIndex > -1) {
3115 pricing.prices[existingFreqIndex] = {
3116 price: pricing.prices[existingFreqIndex].price + quantifiedPrice,
3117 billingFrequency: freq,
3118 discountAmount: pricing.prices[existingFreqIndex].discountAmount + quantifiedDiscount
3119 };
3120 }
3121 else {
3122 pricing.prices.push({
3123 price: quantifiedPrice,
3124 billingFrequency: freq,
3125 discountAmount: quantifiedDiscount
3126 });
3127 }
3128 if (existingCurIndex > -1) {
3129 currentArray[existingCurIndex] = pricing;
3130 }
3131 else {
3132 currentArray.push(pricing);
3133 }
3134 }));
3135 return currentArray;
3136 }), []);
3137 return { items: summaryItems, includesUndefinedPricing: includesUndefinedPricing };
3138 };
3139 return OrderItemListService;
3140}());
3141
3142/**
3143 * @fileoverview added by tsickle
3144 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3145 */
3146var OrderItemListComponent = /** @class */ (function () {
3147 function OrderItemListComponent() {
3148 this.includesUndefinedPricing = false;
3149 }
3150 Object.defineProperty(OrderItemListComponent.prototype, "orderItems", {
3151 set: /**
3152 * @param {?} items
3153 * @return {?}
3154 */
3155 function (items) {
3156 this.items = items || [];
3157 /** @type {?} */
3158 var summary = OrderItemListService.getPriceSummary(items);
3159 this.summaryItems = summary.items;
3160 this.includesUndefinedPricing = summary.includesUndefinedPricing;
3161 },
3162 enumerable: true,
3163 configurable: true
3164 });
3165 /**
3166 * @param {?} price
3167 * @return {?}
3168 */
3169 OrderItemListComponent.prototype.calculateTotalPrice = /**
3170 * @param {?} price
3171 * @return {?}
3172 */
3173 function (price) {
3174 if (price.price === null) {
3175 return null;
3176 }
3177 /** @type {?} */
3178 var totalPrice = price.price - price.discountAmount;
3179 if (!this.taxOptions) {
3180 return totalPrice;
3181 }
3182 /** @type {?} */
3183 var taxTotal = this.taxOptions.reduce((/**
3184 * @param {?} all
3185 * @param {?} tax
3186 * @return {?}
3187 */
3188 function (all, tax) { return all + (tax.percentage * totalPrice); }), 0);
3189 return totalPrice + taxTotal;
3190 };
3191 /**
3192 * @param {?} tax
3193 * @return {?}
3194 */
3195 OrderItemListComponent.prototype.buildTaxLabel = /**
3196 * @param {?} tax
3197 * @return {?}
3198 */
3199 function (tax) {
3200 /** @type {?} */
3201 var taxPercentage = Number(tax.percentage * 100).toFixed(2);
3202 return tax.label + " (" + taxPercentage + "%)";
3203 };
3204 /**
3205 * @return {?}
3206 */
3207 OrderItemListComponent.prototype.isFree = /**
3208 * @return {?}
3209 */
3210 function () {
3211 /** @type {?} */
3212 var summaryTotal = this.summaryItems.reduce((/**
3213 * @param {?} all
3214 * @param {?} item
3215 * @return {?}
3216 */
3217 function (all, item) {
3218 /** @type {?} */
3219 var totalPrices = item.prices.reduce((/**
3220 * @param {?} acc
3221 * @param {?} price
3222 * @return {?}
3223 */
3224 function (acc, price) { return acc + price.price; }), 0);
3225 return all + totalPrices;
3226 }), 0);
3227 return summaryTotal === 0;
3228 };
3229 OrderItemListComponent.decorators = [
3230 { type: Component, args: [{
3231 selector: 'va-order-item-list',
3232 template: "<div class=\"va-order-item-list\">\n <mat-list class=\"product-list\" *ngIf=\"items; else loading\">\n <ng-container *ngFor=\"let item of items\">\n <mat-list-item>\n <div class=\"list-item\">\n <div class=\"left-section\">\n <div class=\"icon-and-name\">\n <div class=\"icon-container\">\n <va-icon [diameter]=\"32\" [iconUrl]=\"item.icon\" [name]=\"item.name\"></va-icon>\n </div>\n <div>\n <div>\n {{ item.name }}\n <va-badge color=\"blue-solid\" *ngIf=\"item.editionName\">\n <span> {{ item.editionName }} </span>\n </va-badge>\n <span *ngIf=\"item.quantity > 1\"> ({{ item.quantity }})</span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"right-section\" *ngIf=\"!hidePricing && item.pricing\">\n <ng-container *ngIf=\"item.pricing.prices?.length > 0\">\n <ng-container *ngFor=\"let price of item.pricing.prices\">\n <div matLine>\n <strong *ngIf=\"!price.discountAmount\">{{ price.price | price: item.pricing.currency }}</strong>\n <ng-container *ngIf=\"price.price && price.discountAmount > 0\">\n <span matTooltipPosition=\"left\" class=\"item-price-before-discount\"\n [matTooltip]=\"price.discountAmount | price: item.pricing.currency\">\n {{ price.price | price: item.pricing.currency }}\n </span>\n <strong>{{ price.price - price.discountAmount | price: item.pricing.currency }}</strong>\n </ng-container>\n </div>\n <div matLine class=\"tertiary-font-color\" *ngIf=\"price.price > 0\">\n {{ price.billingFrequency | formatBillingFrequency }}\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"item.pricing.prices?.length <= 0\">\n <mat-list-item class=\"summary-list-item\">\n <div matLine>\n <strong>{{ null | price: 'CAD' }}</strong>\n </div>\n </mat-list-item>\n </ng-container>\n </div>\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n </ng-container>\n </mat-list>\n\n <div *ngIf=\"!hidePricing\">\n <div *ngIf=\"items; else loading\">\n <div class=\"total-header\">\n {{ 'FRONTEND.STORE.TOTAL' | translate }}\n </div>\n <mat-list class=\"summary-list\">\n <ng-container *ngIf=\"includesUndefinedPricing; else totalIsDefined\">\n <mat-list-item class=\"summary-list-item\">\n <div matLine>\n <strong>{{ null | price: 'CAD' }}</strong>\n </div>\n </mat-list-item>\n </ng-container>\n\n <ng-template #totalIsDefined>\n <ng-container *ngIf=\"isFree(); else totalNotFree\">\n <div class=\"summary-item-group\">\n <mat-list-item class=\"summary-list-item\">\n <div matLine>\n <strong>{{ 0 | price: 'USD' }}</strong>\n </div>\n </mat-list-item>\n </div>\n </ng-container>\n\n <ng-template #totalNotFree>\n <ng-container *ngFor=\"let item of summaryItems\">\n <div class=\"summary-item-group\" *ngFor=\"let price of item.prices\">\n <ng-container *ngIf=\"price.price > 0\">\n <div class=\"tax-calculation\">\n <mat-list-item class=\"summary-list-item tax-item\">\n <div matLine *ngIf=\"taxOptions\">\n <strong>{{ price.price - price.discountAmount | price: item.currency }}</strong>\n </div>\n </mat-list-item>\n <ng-container *ngFor=\"let tax of taxOptions\">\n <mat-list-item class=\"summary-list-item tax-item\">\n <div matLine class=\"tax-label\">\n <span>\n {{ buildTaxLabel(tax) }}\n </span>\n <strong>\n +{{ (price.price - price.discountAmount) * tax.percentage | price: item.currency }}\n </strong>\n </div>\n </mat-list-item>\n </ng-container>\n </div>\n\n <mat-list-item class=\"summary-list-item\" [ngClass]=\"{ 'result-item': (price.price > 0 && taxOptions) }\">\n <div matLine>\n <strong>{{ calculateTotalPrice(price) | price: item.currency }}</strong>\n </div>\n </mat-list-item>\n\n <mat-list-item class=\"summary-list-item\">\n <div matLine class=\"tertiary-font-color\">\n {{ price.billingFrequency | formatBillingFrequency }}\n </div>\n </mat-list-item>\n </ng-container>\n </div>\n </ng-container>\n\n </ng-template>\n </ng-template>\n </mat-list>\n </div>\n </div>\n\n <ng-template #loading>\n <div class=\"stencil-shimmer\"></div>\n </ng-template>\n\n</div>\n",
3233 styles: ["::ng-deep .va-order-item-list .mat-list-item{height:auto!important}::ng-deep .va-order-item-list .mat-list .mat-list-item-content{padding:10px 0!important}::ng-deep .va-order-item-list .mat-list .summary-list-item .mat-list-item-content{padding:0!important}.product-list{padding:0;position:relative}.product-list .list-item{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between;width:100%}.product-list .list-item .left-section .icon-and-name{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.product-list .list-item .left-section .icon-and-name .icon-container{margin-right:16px}.product-list .list-item .right-section{margin-left:1em;text-align:right;align-self:flex-start}.total-header{background-color:#616161;color:#fff;line-height:2;height:2em;font-weight:700;padding-right:14px;text-align:right}.summary-list{padding:8px 0;background-color:#f5f5f5}.summary-list .summary-list-item{padding-right:14px;text-align:right}.summary-list .summary-item-group{padding:10px 0}.summary-list .summary-list-item.tax-item{color:#9e9e9e;font-size:14px}.summary-list .summary-list-item.result-item{text-decoration:overline;padding-top:5px}.summary-list .tax-label{font-size:12px}.tertiary-font-color{color:#212121;font-size:14px!important}.stencil-shimmer{width:100%;min-height:20px;margin-bottom:4px}.item-price-before-discount{font-size:14px;margin-right:8px;color:#9e9e9e;text-decoration:line-through;border-bottom:1px dotted #9e9e9e}"]
3234 }] }
3235 ];
3236 OrderItemListComponent.propDecorators = {
3237 taxOptions: [{ type: Input }],
3238 hidePricing: [{ type: Input }],
3239 orderItems: [{ type: Input }]
3240 };
3241 return OrderItemListComponent;
3242}());
3243if (false) {
3244 /** @type {?} */
3245 OrderItemListComponent.prototype.items;
3246 /** @type {?} */
3247 OrderItemListComponent.prototype.summaryItems;
3248 /** @type {?} */
3249 OrderItemListComponent.prototype.includesUndefinedPricing;
3250 /** @type {?} */
3251 OrderItemListComponent.prototype.taxOptions;
3252 /** @type {?} */
3253 OrderItemListComponent.prototype.hidePricing;
3254}
3255
3256/**
3257 * @fileoverview added by tsickle
3258 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3259 */
3260var PricePipe = /** @class */ (function () {
3261 function PricePipe() {
3262 }
3263 /**
3264 * @param {?} value
3265 * @param {?} currency
3266 * @param {?=} billingFrequency
3267 * @param {?=} isCents
3268 * @param {?=} translateZero
3269 * @param {?=} displaySymbol
3270 * @return {?}
3271 */
3272 PricePipe.prototype.transform = /**
3273 * @param {?} value
3274 * @param {?} currency
3275 * @param {?=} billingFrequency
3276 * @param {?=} isCents
3277 * @param {?=} translateZero
3278 * @param {?=} displaySymbol
3279 * @return {?}
3280 */
3281 function (value, currency, billingFrequency, isCents, translateZero, displaySymbol) {
3282 if (isCents === void 0) { isCents = true; }
3283 if (translateZero === void 0) { translateZero = true; }
3284 if (displaySymbol === void 0) { displaySymbol = true; }
3285 return formatDisplayPrice(value, currency, billingFrequency, isCents, translateZero, displaySymbol);
3286 };
3287 PricePipe.decorators = [
3288 { type: Pipe, args: [{ name: 'price' },] }
3289 ];
3290 return PricePipe;
3291}());
3292var FormatBillingFrequencyPipe = /** @class */ (function () {
3293 function FormatBillingFrequencyPipe() {
3294 }
3295 /**
3296 * @param {?} value
3297 * @return {?}
3298 */
3299 FormatBillingFrequencyPipe.prototype.transform = /**
3300 * @param {?} value
3301 * @return {?}
3302 */
3303 function (value) {
3304 return formatBillingFrequency(value);
3305 };
3306 FormatBillingFrequencyPipe.decorators = [
3307 { type: Pipe, args: [{ name: 'formatBillingFrequency' },] }
3308 ];
3309 return FormatBillingFrequencyPipe;
3310}());
3311
3312/**
3313 * @fileoverview added by tsickle
3314 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3315 */
3316var VaOrderFormModule = /** @class */ (function () {
3317 function VaOrderFormModule(translateService, currentLang$, defaultLang$) {
3318 this.translateService = translateService;
3319 if (!this.translateService.translations.hasOwnProperty('en')) {
3320 this.translateService.reloadLang('en');
3321 }
3322 if (!this.translateService.translations.hasOwnProperty('cs')) {
3323 this.translateService.reloadLang('cs');
3324 }
3325 this.translateService.setTranslation('en', En.en, true);
3326 this.translateService.setTranslation('cs', Cs.cs, true);
3327 if (currentLang$) {
3328 currentLang$.subscribe((/**
3329 * @param {?} currentLang
3330 * @return {?}
3331 */
3332 function (currentLang) { return translateService.use(currentLang); }));
3333 }
3334 if (defaultLang$) {
3335 defaultLang$.subscribe((/**
3336 * @param {?} defaultLang
3337 * @return {?}
3338 */
3339 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
3340 }
3341 }
3342 VaOrderFormModule.decorators = [
3343 { type: NgModule, args: [{
3344 imports: [
3345 CommonModule,
3346 FormsModule,
3347 MatButtonModule,
3348 MatCheckboxModule,
3349 MatExpansionModule,
3350 MatIconModule,
3351 MatInputModule,
3352 MatOptionModule,
3353 MatProgressSpinnerModule,
3354 MatSelectModule,
3355 MatCardModule,
3356 MatTooltipModule,
3357 ReactiveFormsModule,
3358 VaFormsModule,
3359 VaHeaderContainerModule,
3360 VaIconModule,
3361 VaFormsModule,
3362 VaBadgeModule,
3363 MatListModule,
3364 TranslateModule.forChild(),
3365 ],
3366 declarations: [
3367 DropDownFormSectionComponent,
3368 FieldComponent,
3369 OrderFormSectionComponent,
3370 OrderFormComponent,
3371 FieldBuilderComponent,
3372 OrderItemListComponent,
3373 PricePipe,
3374 FormatBillingFrequencyPipe,
3375 ],
3376 exports: [
3377 DropDownFormSectionComponent,
3378 FieldComponent,
3379 OrderFormSectionComponent,
3380 OrderFormComponent,
3381 FieldBuilderComponent,
3382 OrderItemListComponent,
3383 ],
3384 providers: [
3385 FieldService,
3386 OrderFormService,
3387 OrderItemListService,
3388 ]
3389 },] }
3390 ];
3391 /** @nocollapse */
3392 VaOrderFormModule.ctorParameters = function () { return [
3393 { type: TranslateService },
3394 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
3395 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
3396 ]; };
3397 return VaOrderFormModule;
3398}());
3399if (false) {
3400 /**
3401 * @type {?}
3402 * @private
3403 */
3404 VaOrderFormModule.prototype.translateService;
3405}
3406
3407/**
3408 * @fileoverview added by tsickle
3409 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3410 */
3411var StoreService = /** @class */ (function () {
3412 function StoreService() {
3413 }
3414 /**
3415 * @param {?} formGroup
3416 * @return {?}
3417 */
3418 StoreService.prototype.markFormsAsTouched = /**
3419 * @param {?} formGroup
3420 * @return {?}
3421 */
3422 function (formGroup) {
3423 for (var key in formGroup.controls) {
3424 if (formGroup.controls[key] instanceof FormGroup) {
3425 this.markFormsAsTouched((/** @type {?} */ (formGroup.controls[key])));
3426 }
3427 else {
3428 ((/** @type {?} */ (formGroup.controls[key]))).markAsTouched();
3429 ((/** @type {?} */ (formGroup.controls[key]))).updateValueAndValidity();
3430 }
3431 }
3432 };
3433 StoreService.decorators = [
3434 { type: Injectable }
3435 ];
3436 return StoreService;
3437}());
3438
3439/**
3440 * @fileoverview added by tsickle
3441 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3442 */
3443var File = /** @class */ (function () {
3444 function File(url) {
3445 this.url = url;
3446 this.url = url;
3447 }
3448 Object.defineProperty(File.prototype, "name", {
3449 get: /**
3450 * @return {?}
3451 */
3452 function () {
3453 return this.url ? this.url.substring(this.url.lastIndexOf('/') + 1, this.url.lastIndexOf('.')) : null;
3454 },
3455 enumerable: true,
3456 configurable: true
3457 });
3458 Object.defineProperty(File.prototype, "icon", {
3459 get: /**
3460 * @return {?}
3461 */
3462 function () {
3463 /** @type {?} */
3464 var ext = this.url ? this.url.substring(this.url.lastIndexOf('.') + 1) : null;
3465 switch (ext) {
3466 case 'pdf':
3467 return 'icon-pdf';
3468 case 'ppt':
3469 return 'icon-ppt';
3470 default:
3471 return 'icon-docs';
3472 }
3473 },
3474 enumerable: true,
3475 configurable: true
3476 });
3477 return File;
3478}());
3479if (false) {
3480 /** @type {?} */
3481 File.prototype.url;
3482}
3483
3484/**
3485 * @fileoverview added by tsickle
3486 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3487 */
3488/**
3489 * @record
3490 */
3491function Pricing() { }
3492if (false) {
3493 /** @type {?} */
3494 Pricing.prototype.currency;
3495 /** @type {?} */
3496 Pricing.prototype.prices;
3497}
3498/**
3499 * @record
3500 */
3501function Price() { }
3502if (false) {
3503 /** @type {?} */
3504 Price.prototype.price;
3505 /** @type {?} */
3506 Price.prototype.frequency;
3507 /** @type {?|undefined} */
3508 Price.prototype.isStartingPrice;
3509}
3510/** @type {?} */
3511var CONTACT_SALES = -1;
3512
3513/**
3514 * @fileoverview added by tsickle
3515 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3516 */
3517var Sellable = /** @class */ (function () {
3518 function Sellable() {
3519 }
3520 Object.defineProperty(Sellable.prototype, "isFree", {
3521 get: /**
3522 * @return {?}
3523 */
3524 function () {
3525 return this.pricing && this.pricing.prices ? this.pricing.prices.some((/**
3526 * @param {?} p
3527 * @return {?}
3528 */
3529 function (p) { return p.price === 0 || p.price === undefined; })) : false;
3530 },
3531 enumerable: true,
3532 configurable: true
3533 });
3534 Object.defineProperty(Sellable.prototype, "shouldContactSales", {
3535 get: /**
3536 * @return {?}
3537 */
3538 function () {
3539 return this.pricing && this.pricing.prices ?
3540 this.pricing.prices.some((/**
3541 * @param {?} p
3542 * @return {?}
3543 */
3544 function (p) { return p.price === null || p.price === CONTACT_SALES; })) ||
3545 this.pricing.prices.length === 0 : true;
3546 },
3547 enumerable: true,
3548 configurable: true
3549 });
3550 /**
3551 * @param {?} inputString
3552 * @return {?}
3553 */
3554 Sellable.getCapitalizeFirstLetter = /**
3555 * @param {?} inputString
3556 * @return {?}
3557 */
3558 function (inputString) {
3559 return inputString ? inputString.charAt(0).toUpperCase() + inputString.slice(1) : null;
3560 };
3561 Object.defineProperty(Sellable.prototype, "formattedPricingList", {
3562 get: /**
3563 * @return {?}
3564 */
3565 function () {
3566 if (this.pricing && this.pricing.prices && this.pricing.prices.length) {
3567 /** @type {?} */
3568 var hasCurrencyAndIsNotUSD = this.pricing.currency && this.pricing.currency !== 'USD';
3569 /** @type {?} */
3570 var currencyStr_1 = hasCurrencyAndIsNotUSD ? this.pricing.currency : '';
3571 /** @type {?} */
3572 var currencySymbol_1 = Sellable.getCurrencySymbol(this.pricing.currency);
3573 return this.pricing.prices.map((/**
3574 * @param {?} price
3575 * @return {?}
3576 */
3577 function (price) {
3578 /** @type {?} */
3579 var frequencyStr = price.frequency ? '/ ' + Sellable.getCapitalizeFirstLetter(price.frequency) : '';
3580 /** @type {?} */
3581 var roundedPrice = ((price.price || 0) / 100.0).toFixed(2);
3582 /** @type {?} */
3583 var startingAtPrefix = price.isStartingPrice ? 'Starting at ' : '';
3584 /** @type {?} */
3585 var priceStr = "" + startingAtPrefix + currencySymbol_1 + roundedPrice + " " + currencyStr_1 + " " + frequencyStr;
3586 return (priceStr.trim().replace(/\s+/g, ' '));
3587 }));
3588 }
3589 else {
3590 return ['Contact Sales'];
3591 }
3592 },
3593 enumerable: true,
3594 configurable: true
3595 });
3596 Object.defineProperty(Sellable.prototype, "priceStrings", {
3597 get: /**
3598 * @return {?}
3599 */
3600 function () {
3601 if (this.shouldContactSales) {
3602 return ['Contact Sales'];
3603 }
3604 if (this.isFree) {
3605 return ['Free'];
3606 }
3607 return this.formattedPricingList;
3608 },
3609 enumerable: true,
3610 configurable: true
3611 });
3612 Object.defineProperty(Sellable.prototype, "formattedWholesalePrice", {
3613 get: /**
3614 * @return {?}
3615 */
3616 function () {
3617 return this.priceStrings.join(' + ');
3618 },
3619 enumerable: true,
3620 configurable: true
3621 });
3622 /**
3623 * @param {?} currency
3624 * @return {?}
3625 */
3626 Sellable.getCurrencySymbol = /**
3627 * @param {?} currency
3628 * @return {?}
3629 */
3630 function (currency) {
3631 /** @type {?} */
3632 var currencySymbol = '$';
3633 switch (currency) {
3634 case 'EUR':
3635 currencySymbol = '\u20AC';
3636 break;
3637 case 'GBP':
3638 currencySymbol = '\u00A3';
3639 break;
3640 case 'CHF':
3641 currencySymbol = 'Fr';
3642 break;
3643 case 'CNY':
3644 currencySymbol = '\u00A5';
3645 break;
3646 case 'JPY':
3647 currencySymbol = '\u00A5';
3648 break;
3649 case 'CZK':
3650 currencySymbol = 'K\u010d';
3651 break;
3652 case 'INR':
3653 currencySymbol = '\u20B9';
3654 break;
3655 case 'KHR':
3656 currencySymbol = '\u17DB';
3657 break;
3658 case 'KRW':
3659 currencySymbol = '\u20A9';
3660 break;
3661 case 'NOK':
3662 currencySymbol = 'kr';
3663 break;
3664 case 'SEK':
3665 currencySymbol = 'kr';
3666 break;
3667 case 'RUB':
3668 currencySymbol = '\u20BD';
3669 break;
3670 case 'TRY':
3671 currencySymbol = '\u20BA';
3672 break;
3673 case 'ZAR':
3674 currencySymbol = 'R';
3675 break;
3676 default:
3677 currencySymbol = '$';
3678 break;
3679 }
3680 return currencySymbol;
3681 };
3682 return Sellable;
3683}());
3684if (false) {
3685 /** @type {?} */
3686 Sellable.prototype.pricing;
3687}
3688
3689/**
3690 * @fileoverview added by tsickle
3691 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3692 */
3693// @dynamic
3694var
3695// @dynamic
3696CaseTransform = /** @class */ (function () {
3697 function CaseTransform() {
3698 }
3699 /**
3700 * @param {?} value
3701 * @return {?}
3702 */
3703 CaseTransform.snakeToCamelCase = /**
3704 * @param {?} value
3705 * @return {?}
3706 */
3707 function (value) {
3708 return value ? value.replace(new RegExp(/_/g), ' ').replace(/\b\w/g, (/**
3709 * @param {?} l
3710 * @return {?}
3711 */
3712 function (l) { return l.toUpperCase(); }))
3713 .replace(/\b\w/, (/**
3714 * @param {?} l
3715 * @return {?}
3716 */
3717 function (l) { return l.toLowerCase(); })).replace(/\s/g, '') : value;
3718 };
3719 /**
3720 * @param {?} value
3721 * @return {?}
3722 */
3723 CaseTransform.lowerToTitleCase = /**
3724 * @param {?} value
3725 * @return {?}
3726 */
3727 function (value) {
3728 // Code taken from https://github.com/gouch/to-title-case to support the proper spec.
3729 /** @type {?} */
3730 var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
3731 return value ? value.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, (/**
3732 * @param {?} match
3733 * @param {?} index
3734 * @param {?} title
3735 * @return {?}
3736 */
3737 function (match, index, title) {
3738 if (index > 0 && index + match.length !== title.length &&
3739 match.search(smallWords) > -1 && title.charAt(index - 2) !== ':' &&
3740 (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') &&
3741 title.charAt(index - 1).search(/[^\s-]/) < 0) {
3742 return match.toLowerCase();
3743 }
3744 if (match.substr(1).search(/[A-Z]|\../) > -1) {
3745 return match;
3746 }
3747 return match.charAt(0).toUpperCase() + match.substr(1);
3748 })) : value;
3749 };
3750 ;
3751 return CaseTransform;
3752}());
3753
3754/**
3755 * @fileoverview added by tsickle
3756 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3757 */
3758/** @type {?} */
3759var COLOR_CODES = [
3760 '#EF5350', '#42A5F5', '#66BB6A', '#FFA726', '#AB47BC', '#FFCA28', '#EC407A', '#26C6DA',
3761 '#FF7B57'
3762];
3763/** @type {?} */
3764var DEFAULT_COLOR = '#808080';
3765var Product = /** @class */ (function (_super) {
3766 __extends(Product, _super);
3767 function Product(data) {
3768 var _this = _super.call(this) || this;
3769 _this.addons = [];
3770 data = data || {};
3771 _this.pricing = data.pricing;
3772 _this.productId = data.productId;
3773 _this.editionId = data.editionId;
3774 _this.editionName = data.editionName;
3775 _this.name = data.name;
3776 _this.description = data.description;
3777 _this.tagline = data.tagline;
3778 _this.iconUrl = data.iconUrl;
3779 _this.entryUrl = data.entryUrl;
3780 _this.screenshotUrls = data.screenshotUrls;
3781 _this.pdfUploadUrls = data.pdfUploadUrls;
3782 _this.lmiCategories = data.lmiCategories;
3783 _this.keySellingPoints = data.keySellingPoints;
3784 _this.faqs = data.faqs;
3785 _this.wholesalePrice = data.wholesalePrice;
3786 _this.currency = data.currency;
3787 _this.billingFrequency = data.billingFrequency;
3788 _this.isArchived = data.isArchived;
3789 _this.addons = data.addons;
3790 _this.restrictions = data.restrictions;
3791 _this.billingId = data.billingId;
3792 if (data.hasOwnProperty('pdfUploadUrls')) {
3793 _this.files = _this.pdfUploadUrls ? _this.pdfUploadUrls.map((/**
3794 * @param {?} url
3795 * @return {?}
3796 */
3797 function (url) { return new File(url); })) : null;
3798 }
3799 return _this;
3800 }
3801 /**
3802 * @param {?} data
3803 * @return {?}
3804 */
3805 Product.fromApi = /**
3806 * @param {?} data
3807 * @return {?}
3808 */
3809 function (data) {
3810 /** @type {?} */
3811 var newProduct = {};
3812 data = data || {};
3813 for (var key in data) {
3814 if (data.hasOwnProperty(key)) {
3815 /** @type {?} */
3816 var newKey = CaseTransform.snakeToCamelCase(key);
3817 newProduct[newKey] = data[key];
3818 }
3819 }
3820 return new Product(newProduct);
3821 };
3822 Object.defineProperty(Product.prototype, "iconStyle", {
3823 get: /**
3824 * @return {?}
3825 */
3826 function () {
3827 return this.iconUrl ? "url(\"" + this.iconUrl + "\") no-repeat center / 100% 100%" : null;
3828 },
3829 enumerable: true,
3830 configurable: true
3831 });
3832 Object.defineProperty(Product.prototype, "iconColor", {
3833 get: /**
3834 * @return {?}
3835 */
3836 function () {
3837 // determine an icon color for a product with no icon by using the product name
3838 if (!this.name) {
3839 return DEFAULT_COLOR;
3840 }
3841 /** @type {?} */
3842 var nameSum = 0;
3843 for (var i = 0; i < this.name.length; i++) {
3844 nameSum += this.name[i].charCodeAt(0);
3845 }
3846 /** @type {?} */
3847 var index = nameSum % COLOR_CODES.length;
3848 return COLOR_CODES[index];
3849 },
3850 enumerable: true,
3851 configurable: true
3852 });
3853 /**
3854 * @return {?}
3855 */
3856 Product.prototype.getLmiCategoryNames = /**
3857 * @return {?}
3858 */
3859 function () {
3860 /** @type {?} */
3861 var lmiCategories = this.lmiCategories || [];
3862 return lmiCategories.map((/**
3863 * @param {?} lmiCategory
3864 * @return {?}
3865 */
3866 function (lmiCategory) { return CaseTransform.lowerToTitleCase(lmiCategory.toLowerCase().replace(/_/g, ' ')); }));
3867 };
3868 return Product;
3869}(Sellable));
3870if (false) {
3871 /** @type {?} */
3872 Product.prototype.productId;
3873 /** @type {?} */
3874 Product.prototype.editionId;
3875 /** @type {?} */
3876 Product.prototype.editionName;
3877 /** @type {?} */
3878 Product.prototype.name;
3879 /** @type {?} */
3880 Product.prototype.description;
3881 /** @type {?} */
3882 Product.prototype.tagline;
3883 /** @type {?} */
3884 Product.prototype.iconUrl;
3885 /** @type {?} */
3886 Product.prototype.entryUrl;
3887 /** @type {?} */
3888 Product.prototype.screenshotUrls;
3889 /** @type {?} */
3890 Product.prototype.pdfUploadUrls;
3891 /** @type {?} */
3892 Product.prototype.lmiCategories;
3893 /** @type {?} */
3894 Product.prototype.keySellingPoints;
3895 /** @type {?} */
3896 Product.prototype.faqs;
3897 /** @type {?} */
3898 Product.prototype.wholesalePrice;
3899 /** @type {?} */
3900 Product.prototype.currency;
3901 /** @type {?} */
3902 Product.prototype.billingFrequency;
3903 /** @type {?} */
3904 Product.prototype.billingId;
3905 /** @type {?} */
3906 Product.prototype.isArchived;
3907 /** @type {?} */
3908 Product.prototype.addons;
3909 /** @type {?} */
3910 Product.prototype.files;
3911 /** @type {?} */
3912 Product.prototype.restrictions;
3913 /** @type {?} */
3914 Product.prototype.trialConfiguration;
3915}
3916var ProductWithParent = /** @class */ (function (_super) {
3917 __extends(ProductWithParent, _super);
3918 function ProductWithParent(data) {
3919 var _this = _super.call(this, data) || this;
3920 _this.parentId = data.parentId;
3921 _this.parentName = data.parentName;
3922 _this.parentIconUrl = data.parentIconUrl;
3923 _this.multipleActivations = data.multipleActivations || false;
3924 return _this;
3925 }
3926 /**
3927 * @param {?} data
3928 * @return {?}
3929 */
3930 ProductWithParent.fromApi = /**
3931 * @param {?} data
3932 * @return {?}
3933 */
3934 function (data) {
3935 /** @type {?} */
3936 var newProduct = {};
3937 data = data || {};
3938 for (var key in data) {
3939 if (data.hasOwnProperty(key)) {
3940 /** @type {?} */
3941 var newKey = CaseTransform.snakeToCamelCase(key);
3942 newProduct[newKey] = data[key];
3943 }
3944 }
3945 return new ProductWithParent(newProduct);
3946 };
3947 return ProductWithParent;
3948}(Product));
3949if (false) {
3950 /** @type {?} */
3951 ProductWithParent.prototype.parentId;
3952 /** @type {?} */
3953 ProductWithParent.prototype.parentName;
3954 /** @type {?} */
3955 ProductWithParent.prototype.parentIconUrl;
3956 /** @type {?} */
3957 ProductWithParent.prototype.multipleActivations;
3958}
3959/**
3960 * @record
3961 */
3962function TrialConfigurationInterface() { }
3963if (false) {
3964 /** @type {?} */
3965 TrialConfigurationInterface.prototype.trialEnabled;
3966 /** @type {?} */
3967 TrialConfigurationInterface.prototype.trialDuration;
3968}
3969
3970/**
3971 * @fileoverview added by tsickle
3972 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3973 */
3974var AddonDetailsComponent = /** @class */ (function () {
3975 function AddonDetailsComponent() {
3976 this.hasVerifiedContract = false;
3977 this.loaded = true;
3978 this.showPricing = true;
3979 this.showEnableAddon = false;
3980 this.actionEnabled = false;
3981 this.prerequisiteSelected = new EventEmitter();
3982 this.actionSelected = new EventEmitter();
3983 }
3984 /**
3985 * @return {?}
3986 */
3987 AddonDetailsComponent.prototype.onPrerequisiteSelected = /**
3988 * @return {?}
3989 */
3990 function () {
3991 this.prerequisiteSelected.emit();
3992 };
3993 /**
3994 * @return {?}
3995 */
3996 AddonDetailsComponent.prototype.onActionSelected = /**
3997 * @return {?}
3998 */
3999 function () {
4000 this.actionSelected.emit();
4001 };
4002 /**
4003 * @param {?} product
4004 * @param {?} addon
4005 * @return {?}
4006 */
4007 AddonDetailsComponent.prototype.getPricing = /**
4008 * @param {?} product
4009 * @param {?} addon
4010 * @return {?}
4011 */
4012 function (product, addon) {
4013 return {
4014 currency: product.currency,
4015 prices: [
4016 {
4017 price: addon.price,
4018 frequency: addon.billingFrequency ? addon.billingFrequency : 'Monthly'
4019 }
4020 ]
4021 };
4022 };
4023 Object.defineProperty(AddonDetailsComponent.prototype, "pricingLabel", {
4024 get: /**
4025 * @return {?}
4026 */
4027 function () {
4028 return this.reseller ? 'Wholesale Pricing' : 'Pricing';
4029 },
4030 enumerable: true,
4031 configurable: true
4032 });
4033 AddonDetailsComponent.decorators = [
4034 { type: Component, args: [{
4035 selector: 'addon-details',
4036 template: "<div class=\"addon-page\">\n <va-header-container [iconUrl]=\"addon.icon\"\n [title]=\"addon.title\"\n [tagline]=\"addon.tagline\"\n [chipLabels]=\"product.getLmiCategoryNames()\"\n [pricing]=\"getPricing(product, addon)\"\n [pricingLabel]=\"pricingLabel\"\n [prerequisiteLabel]=\"product.name\"\n [billedProduct]=\"billedProduct\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [loaded]=\"loaded\"\n [showPricing]=\"showPricing\"\n [actionLabel]=\"'Enable Add-on'\"\n [showEnableAddon]=\"showEnableAddon\"\n (actionSelected)=\"onActionSelected()\"\n (prerequisiteSelected)=\"onPrerequisiteSelected()\">\n </va-header-container>\n\n <div class=\"addon-details addon-content\">\n <ng-container *ngIf=\"reseller\">\n <div class=\"left-column\">\n <div *ngIf=\"addon.resellerMarketing?.description || addon.resellerMarketing?.keySellingPoints\">\n <va-selling-info [description]=\"addon.resellerMarketing?.description\"\n [keySellingPoints]=\"addon.resellerMarketing?.keySellingPoints\"></va-selling-info>\n </div>\n <section *ngIf=\"addon.resellerMarketing?.faqs?.length > 0 && addon.resellerMarketing?.faqs[0].question\">\n <h2 class=\"va-addon-title\">FAQs</h2>\n <va-faqs [faqs]=\"addon.resellerMarketing?.faqs\"></va-faqs>\n </section>\n </div>\n <div class=\"right-column\">\n <section *ngIf=\"addon.restrictions?.country?.whitelist\">\n <supported-countries [countryCodes]=\"addon.restrictions.country.whitelist\"></supported-countries>\n </section>\n <section *ngIf=\"addon.screenshots?.length > 0\">\n <h2 class=\"va-addon-title\">Gallery</h2>\n <va-image-gallery [imageUrls]=\"addon.screenshots\"></va-image-gallery>\n </section>\n <section *ngIf=\"addon.resellerMarketing?.files?.length > 0\">\n <h2 class=\"va-addon-title\">Files</h2>\n <va-files [files]=\"addon.resellerMarketingFiles\"></va-files>\n </section>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!reseller\">\n <div class=\"left-column\">\n <div *ngIf=\"addon.endUserMarketing?.description || addon.endUserMarketing?.keySellingPoints\">\n <va-selling-info [description]=\"addon.endUserMarketing?.description\"\n [keySellingPoints]=\"addon.endUserMarketing?.keySellingPoints\"></va-selling-info>\n </div>\n <section *ngIf=\"addon.endUserMarketing?.faqs?.length > 0 && addon.endUserMarketing?.faqs[0].question\">\n <h2 class=\"va-addon-title\">FAQs</h2>\n <va-faqs [faqs]=\"addon.endUserMarketing?.faqs\"></va-faqs>\n </section>\n </div>\n\n <div class=\"right-column\">\n <section *ngIf=\"addon.restrictions?.country?.whitelist?.length > 0\">\n <supported-countries [countryCodes]=\"addon.restrictions.country.whitelist\"></supported-countries>\n </section>\n <section *ngIf=\"addon.screenshots?.length > 0\">\n <h2 class=\"va-addon-title\">Gallery</h2>\n <va-image-gallery [imageUrls]=\"addon.screenshots\"></va-image-gallery>\n </section>\n <section *ngIf=\"addon.endUserMarketing?.files?.length > 0\">\n <h2 class=\"va-addon-title\">Files</h2>\n <va-files [files]=\"addon.endUserMarketingFiles\"></va-files>\n </section>\n </div>\n </ng-container>\n </div>\n\n</div>\n",
4037 styles: [":host{display:block;font-size:14px;line-height:1.4}:host *{box-sizing:border-box}.va-addon-title{font-size:32px;font-weight:300;margin-top:0;color:#212121}@media screen and (min-width:600px){.va-addon-title{font-size:32px}}img{max-width:100%}va-icon{display:inline-block}.addon-page{position:relative;margin:0 auto 20px;background:#fff;box-shadow:0 3px 10px rgba(33,33,33,.3);overflow:hidden;font-size:16px;color:#212121}.addon-page .item-amount{color:#999;font-size:14px;text-align:right;margin:0 24px 8px}section{padding:24px}.left-column{width:66%}@media screen and (max-width:600px){.left-column{width:100%}}.right-column{width:34%}.addon-content{display:-webkit-box;display:flex}@media screen and (max-width:600px){.right-column{width:100%}.addon-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}"]
4038 }] }
4039 ];
4040 AddonDetailsComponent.propDecorators = {
4041 product: [{ type: Input }],
4042 addon: [{ type: Input }],
4043 reseller: [{ type: Input }],
4044 billedProduct: [{ type: Input }],
4045 hasVerifiedContract: [{ type: Input }],
4046 loaded: [{ type: Input }],
4047 showPricing: [{ type: Input }],
4048 showEnableAddon: [{ type: Input }],
4049 actionEnabled: [{ type: Input }],
4050 prerequisiteSelected: [{ type: Output }],
4051 actionSelected: [{ type: Output }]
4052 };
4053 return AddonDetailsComponent;
4054}());
4055if (false) {
4056 /** @type {?} */
4057 AddonDetailsComponent.prototype.product;
4058 /** @type {?} */
4059 AddonDetailsComponent.prototype.addon;
4060 /** @type {?} */
4061 AddonDetailsComponent.prototype.reseller;
4062 /** @type {?} */
4063 AddonDetailsComponent.prototype.billedProduct;
4064 /** @type {?} */
4065 AddonDetailsComponent.prototype.hasVerifiedContract;
4066 /** @type {?} */
4067 AddonDetailsComponent.prototype.loaded;
4068 /** @type {?} */
4069 AddonDetailsComponent.prototype.showPricing;
4070 /** @type {?} */
4071 AddonDetailsComponent.prototype.showEnableAddon;
4072 /** @type {?} */
4073 AddonDetailsComponent.prototype.actionEnabled;
4074 /** @type {?} */
4075 AddonDetailsComponent.prototype.prerequisiteSelected;
4076 /** @type {?} */
4077 AddonDetailsComponent.prototype.actionSelected;
4078}
4079
4080/**
4081 * @fileoverview added by tsickle
4082 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4083 */
4084var VaFilesComponent = /** @class */ (function () {
4085 function VaFilesComponent() {
4086 }
4087 VaFilesComponent.decorators = [
4088 { type: Component, args: [{
4089 selector: 'va-files',
4090 template: "\n <div class=\"va-files file-list-container\" *ngFor=\"let file of files\">\n <mat-icon class=\"file-icon\">insert_drive_file</mat-icon>\n <a [href]=\"file.url\" target=\"_blank\">{{ file.name }}</a>\n </div>",
4091 styles: [".va-files{display:-webkit-inline-box;display:inline-flex;margin-bottom:16px}.va-files a{color:#212121;font-size:16px;font-weight:700;-ms-grid-row-align:center;align-self:center;padding-left:8px;text-decoration:none}.va-files .file-icon{vertical-align:middle}.va-files .file-list-container{display:-webkit-box;display:flex}"]
4092 }] }
4093 ];
4094 VaFilesComponent.propDecorators = {
4095 files: [{ type: Input }]
4096 };
4097 return VaFilesComponent;
4098}());
4099if (false) {
4100 /** @type {?} */
4101 VaFilesComponent.prototype.files;
4102}
4103
4104/**
4105 * @fileoverview added by tsickle
4106 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4107 */
4108var VaFilesModule = /** @class */ (function () {
4109 function VaFilesModule() {
4110 }
4111 VaFilesModule.decorators = [
4112 { type: NgModule, args: [{
4113 imports: [
4114 CommonModule,
4115 MatIconModule
4116 ],
4117 declarations: [VaFilesComponent],
4118 exports: [VaFilesComponent]
4119 },] }
4120 ];
4121 return VaFilesModule;
4122}());
4123
4124/**
4125 * @fileoverview added by tsickle
4126 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4127 */
4128var VaFaqsComponent = /** @class */ (function () {
4129 function VaFaqsComponent() {
4130 this.openFaqs = [];
4131 }
4132 /**
4133 * @param {?} index
4134 * @return {?}
4135 */
4136 VaFaqsComponent.prototype.toggleFaq = /**
4137 * @param {?} index
4138 * @return {?}
4139 */
4140 function (index) {
4141 if (this.openFaqs.indexOf(index) >= 0) {
4142 this.openFaqs.splice(this.openFaqs.indexOf(index), 1); // Remove
4143 }
4144 else {
4145 this.openFaqs.push(index); // Insert
4146 }
4147 };
4148 /**
4149 * @param {?} index
4150 * @return {?}
4151 */
4152 VaFaqsComponent.prototype.isFaqOpen = /**
4153 * @param {?} index
4154 * @return {?}
4155 */
4156 function (index) {
4157 return this.openFaqs.indexOf(index) >= 0;
4158 };
4159 /**
4160 * @param {?} index
4161 * @return {?}
4162 */
4163 VaFaqsComponent.prototype.faqIcon = /**
4164 * @param {?} index
4165 * @return {?}
4166 */
4167 function (index) {
4168 return this.isFaqOpen(index) ? 'keyboard_arrow_up' : 'keyboard_arrow_down';
4169 };
4170 VaFaqsComponent.decorators = [
4171 { type: Component, args: [{
4172 selector: 'va-faqs',
4173 template: "\n <div class=\"va-faq\" *ngFor=\"let faq of faqs; let i = index;\">\n <div class=\"question\" (click)=\"toggleFaq(i)\">\n <span>{{ faq.question }}</span>\n <mat-icon>{{ faqIcon(i) }}</mat-icon>\n </div>\n <span class=\"answer\" [ngClass]=\"{'show': isFaqOpen(i) }\" [innerHtml]=\"faq.answer | vaSanitize\"></span>\n </div>",
4174 styles: [".va-faq{font-size:16px;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:start;justify-content:flex-start;padding:12px 0;border-bottom:1px solid #e0e0e0}.va-faq:first-of-type{border-top:1px solid #e0e0e0}.va-faq .question{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;color:#212121;cursor:pointer}.va-faq .answer{color:#616161;height:0;overflow:hidden}.va-faq .show{padding-top:12px;height:inherit}"]
4175 }] }
4176 ];
4177 VaFaqsComponent.propDecorators = {
4178 faqs: [{ type: Input }]
4179 };
4180 return VaFaqsComponent;
4181}());
4182if (false) {
4183 /** @type {?} */
4184 VaFaqsComponent.prototype.faqs;
4185 /** @type {?} */
4186 VaFaqsComponent.prototype.openFaqs;
4187}
4188
4189/**
4190 * @fileoverview added by tsickle
4191 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4192 */
4193var VaFaqsModule = /** @class */ (function () {
4194 function VaFaqsModule() {
4195 }
4196 VaFaqsModule.decorators = [
4197 { type: NgModule, args: [{
4198 imports: [CommonModule, MatIconModule, VaSafeHtmlModule],
4199 declarations: [VaFaqsComponent],
4200 exports: [VaFaqsComponent]
4201 },] }
4202 ];
4203 return VaFaqsModule;
4204}());
4205
4206/**
4207 * @fileoverview added by tsickle
4208 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4209 */
4210var VaSellingInfoComponent = /** @class */ (function () {
4211 function VaSellingInfoComponent() {
4212 }
4213 Object.defineProperty(VaSellingInfoComponent.prototype, "filterDescription", {
4214 get: /**
4215 * @return {?}
4216 */
4217 function () {
4218 /** @type {?} */
4219 var desc = this.description.replace(/max-width:\d*[^\"]/i, 'max-width:100%');
4220 if ((desc.indexOf('"max-width:100%"') === -1) && (desc.indexOf('<iframe ') !== -1)) {
4221 /** @type {?} */
4222 var index = desc.indexOf('<iframe ') + 7;
4223 return desc.substr(0, index) + ' style="max-width:100%"' + desc.substr(index);
4224 }
4225 return String(desc);
4226 },
4227 enumerable: true,
4228 configurable: true
4229 });
4230 VaSellingInfoComponent.decorators = [
4231 { type: Component, args: [{
4232 selector: 'va-selling-info',
4233 template: "\n <section *ngIf=\"description\" class=\"resize\" [innerHtml]=\"filterDescription | vaSafeHtml\"></section>\n <section *ngIf=\"keySellingPoints && keySellingPoints.length > 0\" class=\"key-selling-points\">\n <div *ngFor=\"let ksp of keySellingPoints\" class=\"key-selling-point\">\n <mat-icon>check_circle</mat-icon>\n {{ ksp }}\n </div>\n </section>\n ",
4234 styles: ["section{padding:24px}section ::ng-deep>:first-child{margin-top:0;padding-top:0}#description *{max-width:100%!important}.key-selling-point{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding-bottom:24px;font-size:16px}@media screen and (max-width:600px){.resize{font-size:16px}.key-selling-point{-webkit-box-align:start;align-items:flex-start}}.key-selling-point:last-of-type{padding-bottom:0}.key-selling-point mat-icon{color:#4caf50;font-size:32px;width:32px;height:32px;margin-right:20px}"]
4235 }] }
4236 ];
4237 VaSellingInfoComponent.propDecorators = {
4238 description: [{ type: Input }],
4239 keySellingPoints: [{ type: Input }]
4240 };
4241 return VaSellingInfoComponent;
4242}());
4243if (false) {
4244 /** @type {?} */
4245 VaSellingInfoComponent.prototype.description;
4246 /** @type {?} */
4247 VaSellingInfoComponent.prototype.keySellingPoints;
4248}
4249
4250/**
4251 * @fileoverview added by tsickle
4252 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4253 */
4254var VaSellingInfoModule = /** @class */ (function () {
4255 function VaSellingInfoModule() {
4256 }
4257 VaSellingInfoModule.decorators = [
4258 { type: NgModule, args: [{
4259 imports: [CommonModule, MatIconModule, VaSafeHtmlModule],
4260 declarations: [VaSellingInfoComponent],
4261 exports: [VaSellingInfoComponent]
4262 },] }
4263 ];
4264 return VaSellingInfoModule;
4265}());
4266
4267/**
4268 * @fileoverview added by tsickle
4269 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4270 */
4271var SupportedCountriesComponent = /** @class */ (function () {
4272 function SupportedCountriesComponent() {
4273 }
4274 SupportedCountriesComponent.decorators = [
4275 { type: Component, args: [{
4276 selector: 'supported-countries',
4277 template: "\n <span class=\"supported-text\"> Supported Countries: </span>\n <div class=\"flags\">\n <span *ngFor=\"let countryCode of countryCodes\" matTooltip=\"{{countryCode}}\" matTooltipPosition=\"below\"\n class=\"flag-icon flag-icon-{{countryCode.toLowerCase()}}\">\n </span>\n </div>\n ",
4278 styles: [".flag-icon{margin-right:10px}.supported-text{margin-right:3px}.flags{display:inline-block}"]
4279 }] }
4280 ];
4281 SupportedCountriesComponent.propDecorators = {
4282 countryCodes: [{ type: Input }]
4283 };
4284 return SupportedCountriesComponent;
4285}());
4286if (false) {
4287 /** @type {?} */
4288 SupportedCountriesComponent.prototype.countryCodes;
4289}
4290
4291/**
4292 * @fileoverview added by tsickle
4293 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4294 */
4295var RestrictionsModule = /** @class */ (function () {
4296 function RestrictionsModule() {
4297 }
4298 RestrictionsModule.decorators = [
4299 { type: NgModule, args: [{
4300 imports: [CommonModule, MatTooltipModule],
4301 declarations: [SupportedCountriesComponent],
4302 exports: [SupportedCountriesComponent]
4303 },] }
4304 ];
4305 return RestrictionsModule;
4306}());
4307
4308/**
4309 * @fileoverview added by tsickle
4310 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4311 */
4312var AddonModule = /** @class */ (function () {
4313 function AddonModule() {
4314 }
4315 AddonModule.decorators = [
4316 { type: NgModule, args: [{
4317 imports: [
4318 CommonModule,
4319 VaListModule,
4320 VaImageGalleryModule,
4321 VaIconModule,
4322 VaPricingModule,
4323 VaFilesModule,
4324 VaFaqsModule,
4325 VaSellingInfoModule,
4326 VaHeaderContainerModule,
4327 VaSafeHtmlModule,
4328 MatProgressSpinnerModule$1,
4329 VaBreadcrumbsModule,
4330 RestrictionsModule
4331 ],
4332 exports: [AddonDetailsComponent],
4333 declarations: [AddonDetailsComponent],
4334 providers: [],
4335 entryComponents: []
4336 },] }
4337 ];
4338 return AddonModule;
4339}());
4340
4341/**
4342 * @fileoverview added by tsickle
4343 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4344 */
4345var DetailsStencilComponent = /** @class */ (function () {
4346 function DetailsStencilComponent() {
4347 }
4348 DetailsStencilComponent.decorators = [
4349 { type: Component, args: [{
4350 selector: 'details-stencil',
4351 template: "\n <div class=\"details\">\n\n <mat-card class=\"details-header\">\n <div class=\"details-column-0\">\n <div class=\"details-column-0-1\">\n <div class=\"details-icon stencil-shimmer\"></div>\n </div>\n <div class=\"details-column-0-2\">\n <div class=\"details-title stencil-shimmer\"></div>\n <div class=\"details-title stencil-shimmer\"></div>\n </div>\n </div>\n <div class=\"details-column-1\">\n <div class=\"details-column-1-0 stencil-shimmer\"></div>\n <div class=\"details-column-1-1 stencil-shimmer\"></div>\n </div>\n </mat-card>\n\n <mat-card>\n <div class=\"details-box-large stencil-shimmer\"></div>\n </mat-card>\n\n <mat-card class=\"details-body\">\n <div class=\"details-body-column-0\" >\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n <div class=\"details-icon-small stencil-shimmer\"></div>\n </div>\n <div class=\"details-body-column-1\">\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n <div class=\"details-line stencil-shimmer\"></div>\n </div>\n <div class=\"details-body-column-2\">\n <div class=\"details-box stencil-shimmer\"></div>\n <div class=\"details-box stencil-shimmer\"></div>\n <div class=\"details-box stencil-shimmer\"></div>\n <div class=\"details-box stencil-shimmer\"></div>\n <div class=\"details-box stencil-shimmer\"></div>\n </div>\n </mat-card>\n\n </div>\n ",
4352 styles: [".details{position:relative;margin:0 auto 20px;background:#fff;box-shadow:0 3px 10px rgba(33,33,33,.3);overflow:hidden;font-size:16px}.details-header{display:-webkit-box;display:flex;height:180px}.details-column-0{display:-webkit-box;display:flex;width:66%}@media screen and (max-width:600px){.details-column-0{width:100%}}.details-column-0-1{display:-webkit-box;display:flex;width:25%;min-width:120px}@media screen and (max-width:600px){.details-column-0-1{width:50%}}.details-icon{height:120px;width:120px;border-radius:50%}.details-title{margin:20px 0 20px 20px;height:32px;width:250px}@media screen and (max-width:600px){.details-title{width:120px}}.details-column-1{width:34%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}@media screen and (max-width:1100px){.details-column-1{width:0}}.details-column-1-0{height:32px;margin:10px 0}.details-column-1-1{height:70px}@media screen and (max-width:600px){.details-column-1-0{width:0;margin:0}.details-column-1-1{height:0}}.details-box-large{display:-webkit-box;display:flex;width:650px;height:150px}@media screen and (max-width:1100px){.details-box-large{width:100%}}.details-body{display:-webkit-box;display:flex;height:500px;width:100%}.details-body-column-0{width:10%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}@media screen and (max-width:600px){.details-body-column-0{width:0%}}.details-body-column-1{width:56%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}@media screen and (max-width:600px){.details-body-column-1{width:100%}}.details-icon-small{margin-bottom:24px;display:-webkit-box;display:flex;height:32px;width:32px;border-radius:50%}.details-line{margin-bottom:24px;height:32px;width:400px}@media screen and (max-width:600px){.details-line{width:100%;margin-right:10px}}.details-body-column-2{width:34%;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}@media screen and (max-width:1100px){.details-body-column-2{width:0}}.details-box{height:70px;margin-bottom:10px}@media screen and (max-width:600px){.details-box{width:0;margin:0}}"]
4353 }] }
4354 ];
4355 return DetailsStencilComponent;
4356}());
4357
4358/**
4359 * @fileoverview added by tsickle
4360 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4361 */
4362var CardStencilComponent = /** @class */ (function () {
4363 function CardStencilComponent() {
4364 }
4365 CardStencilComponent.decorators = [
4366 { type: Component, args: [{
4367 selector: 'card-stencil',
4368 template: "\n <div class=\"card-stencil-container\">\n <mat-card class=\"card-stencil\">\n <div class=\"card-stencil-header stencil-shimmer\"></div>\n <div class=\"card-stencil-footer\">\n <div class=\"card-stencil-circle stencil-shimmer\"></div>\n <div>\n <div class=\"card-stencil-line-large stencil-shimmer\"></div>\n <div class=\"card-stencil-line-medium stencil-shimmer\"></div>\n </div>\n </div>\n </mat-card>\n </div>\n ",
4369 styles: [".card-stencil-container{position:relative;width:100%;padding-bottom:100%;margin-bottom:-45%}.card-stencil{position:absolute;width:100%;height:55%;padding:0;margin-bottom:0}.card-stencil-header{display:-webkit-box;display:flex;height:60%}.card-stencil-footer{display:-webkit-box;display:flex;height:40%;-webkit-box-align:center;align-items:center}.card-stencil-circle{margin:0 16px;height:60px;width:60px;border-radius:50%}@media screen and (max-width:650px){.card-stencil-circle{width:45px;height:45px}}.card-stencil-line-large{height:20px;width:200px;margin-bottom:10px}@media screen and (max-width:650px){.card-stencil-line-large{width:100px;height:10px}}.card-stencil-line-medium{height:20px;width:160px}@media screen and (max-width:650px){.card-stencil-line-medium{width:80px;height:10px}}"]
4370 }] }
4371 ];
4372 return CardStencilComponent;
4373}());
4374
4375/**
4376 * @fileoverview added by tsickle
4377 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4378 */
4379var CardListStencilComponent = /** @class */ (function () {
4380 function CardListStencilComponent() {
4381 this.numCards = 3;
4382 this.cards = [];
4383 }
4384 /**
4385 * @return {?}
4386 */
4387 CardListStencilComponent.prototype.ngOnInit = /**
4388 * @return {?}
4389 */
4390 function () {
4391 for (var n = 0; n < this.numCards; n++) {
4392 this.cards.push(n);
4393 }
4394 };
4395 CardListStencilComponent.decorators = [
4396 { type: Component, args: [{
4397 selector: 'card-stencil-list',
4398 template: "\n <div class=\"row row-gutters\">\n <div *ngFor=\"let _ of cards\" class=\"col-flex\">\n <card-stencil></card-stencil>\n </div>\n </div>\n ",
4399 styles: ["\n .row {\n display: flex;\n flex-wrap: wrap;\n }\n\n .row + .row-gutters {\n margin-top: 0;\n }\n\n .row-gutters {\n margin-top: -20px;\n margin-left: -20px;\n }\n\n .row-gutters > .col-flex {\n padding-top: 20px;\n padding-left: 20px;\n }\n\n .col-flex {\n position: relative;\n max-width: 100%;\n box-sizing: border-box;\n flex: 0 0 auto;\n width: 100%;\n }\n\n @media screen and (min-width: 480px) {\n .col-flex {\n width: 50%;\n }\n }\n\n @media screen and (min-width: 1200px) {\n\n .col-flex {\n width: 33.333333%;\n }\n }\n\n "]
4400 }] }
4401 ];
4402 CardListStencilComponent.propDecorators = {
4403 numCards: [{ type: Input }]
4404 };
4405 return CardListStencilComponent;
4406}());
4407if (false) {
4408 /** @type {?} */
4409 CardListStencilComponent.prototype.numCards;
4410 /** @type {?} */
4411 CardListStencilComponent.prototype.cards;
4412}
4413
4414/**
4415 * @fileoverview added by tsickle
4416 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4417 */
4418var SearchBarStencilComponent = /** @class */ (function () {
4419 function SearchBarStencilComponent() {
4420 }
4421 SearchBarStencilComponent.decorators = [
4422 { type: Component, args: [{
4423 selector: 'search-bar-stencil',
4424 template: "\n <div class=\"search-bar-stencil-container\">\n <div class=\"search-bar-stencil-line stencil-shimmer\">\n <div class=\"search-bar-stencil-icon\"></div>\n </div>\n </div>\n ",
4425 styles: ["\n .search-bar-stencil-container {\n height: 52px;\n display: flex;\n align-content: center;\n background-color: white;\n border-radius: 2px;\n }\n .search-bar-stencil-line {\n height: 30px;\n width: 350px;\n margin: auto 10px;\n display: flex;\n justify-content: flex-end;\n }\n .search-bar-stencil-icon {\n background-color: white;\n width: 20px;\n height: 20px;\n margin: auto 5px;\n }\n "]
4426 }] }
4427 ];
4428 return SearchBarStencilComponent;
4429}());
4430
4431/**
4432 * @fileoverview added by tsickle
4433 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4434 */
4435var ListStencilComponent = /** @class */ (function () {
4436 function ListStencilComponent() {
4437 this.showHeader = true;
4438 this.numRows = 3;
4439 this.rowHeight = '51px'; // defaults to height of partner center business tab height (95px for marketplace)
4440 // defaults to height of partner center business tab height (95px for marketplace)
4441 this.sidePadding = '17px'; // defaults to padding on partner center business padding (38px for marketplace)
4442 // defaults to padding on partner center business padding (38px for marketplace)
4443 this.rows = []; // this is to turn the number of rows into an arbitrary list so we can loop through them
4444 }
4445 /**
4446 * @return {?}
4447 */
4448 ListStencilComponent.prototype.ngOnInit = /**
4449 * @return {?}
4450 */
4451 function () {
4452 for (var n = 0; n < this.numRows; n++) {
4453 this.rows.push(n);
4454 }
4455 // if you think this is gross i agree
4456 // if you think this is gross and actually have a solution hit me up otherwise just enjoy the magic.
4457 // determine the height of each row for the table
4458 this.listItemRowStyles = {
4459 'height': "" + this.rowHeight,
4460 'padding': "0 " + this.sidePadding
4461 };
4462 };
4463 ListStencilComponent.decorators = [
4464 { type: Component, args: [{
4465 selector: 'list-stencil',
4466 template: "\n <mat-card class=\"list-container\">\n <div *ngIf=\"showHeader\" class=\"list-header stencil-shimmer\" style=\"\"></div>\n <div *ngFor=\"let _ of rows\">\n <div class=\"list-item-row\" [ngStyle]=\"listItemRowStyles\">\n <div class=\"stencil-shimmer\" style=\"margin: 0; padding: 0; width: 100%; height: 80%;\"></div>\n </div>\n </div>\n </mat-card>\n ",
4467 styles: ["\n .list-container { padding: 0; }\n .list-header { height: 40px; }\n .list-item-row { height: 50px; display: flex; justify-content: space-between; align-items: center; }\n "]
4468 }] }
4469 ];
4470 ListStencilComponent.propDecorators = {
4471 showHeader: [{ type: Input }],
4472 numRows: [{ type: Input }],
4473 rowHeight: [{ type: Input }],
4474 sidePadding: [{ type: Input }]
4475 };
4476 return ListStencilComponent;
4477}());
4478if (false) {
4479 /** @type {?} */
4480 ListStencilComponent.prototype.showHeader;
4481 /** @type {?} */
4482 ListStencilComponent.prototype.numRows;
4483 /** @type {?} */
4484 ListStencilComponent.prototype.rowHeight;
4485 /** @type {?} */
4486 ListStencilComponent.prototype.sidePadding;
4487 /** @type {?} */
4488 ListStencilComponent.prototype.rows;
4489 /** @type {?} */
4490 ListStencilComponent.prototype.listItemRowStyles;
4491}
4492
4493/**
4494 * @fileoverview added by tsickle
4495 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4496 */
4497var StencilsModule = /** @class */ (function () {
4498 function StencilsModule() {
4499 }
4500 StencilsModule.decorators = [
4501 { type: NgModule, args: [{
4502 imports: [CommonModule, MatCardModule, MatIconModule, MatInputModule, MatSelectModule, MatExpansionModule, MatCheckboxModule],
4503 declarations: [DetailsStencilComponent, CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent],
4504 exports: [DetailsStencilComponent, CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent]
4505 },] }
4506 ];
4507 return StencilsModule;
4508}());
4509
4510/**
4511 * @fileoverview added by tsickle
4512 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4513 */
4514var VaAddonListComponent = /** @class */ (function () {
4515 function VaAddonListComponent(billingService, cdr) {
4516 this.billingService = billingService;
4517 this.cdr = cdr;
4518 this.showPricing = true;
4519 this._hasVerifiedContract = null;
4520 this._canAccessContractPricing = null;
4521 this.addonSelected = new EventEmitter();
4522 this.billedProductsMap = new Map();
4523 this.billedProductLoaded = new Map();
4524 this.subscriptions = [];
4525 }
4526 Object.defineProperty(VaAddonListComponent.prototype, "addons", {
4527 set: /**
4528 * @param {?} addons
4529 * @return {?}
4530 */
4531 function (addons) {
4532 this._addons = addons;
4533 this.populateBilledProduct();
4534 },
4535 enumerable: true,
4536 configurable: true
4537 });
4538 Object.defineProperty(VaAddonListComponent.prototype, "hasVerifiedContract", {
4539 set: /**
4540 * @param {?} value
4541 * @return {?}
4542 */
4543 function (value) {
4544 this._hasVerifiedContract = value;
4545 this.populateBilledProduct();
4546 },
4547 enumerable: true,
4548 configurable: true
4549 });
4550 Object.defineProperty(VaAddonListComponent.prototype, "canAccessContractPricing", {
4551 set: /**
4552 * @param {?} value
4553 * @return {?}
4554 */
4555 function (value) {
4556 this._canAccessContractPricing = value;
4557 this.populateBilledProduct();
4558 },
4559 enumerable: true,
4560 configurable: true
4561 });
4562 /**
4563 * @return {?}
4564 */
4565 VaAddonListComponent.prototype.ngOnInit = /**
4566 * @return {?}
4567 */
4568 function () {
4569 this.populateBilledProduct();
4570 };
4571 /**
4572 * @return {?}
4573 */
4574 VaAddonListComponent.prototype.populateBilledProduct = /**
4575 * @return {?}
4576 */
4577 function () {
4578 var _this = this;
4579 if (this.displayContractPricing()) {
4580 /** @type {?} */
4581 var billingIDs = this._addons.map((/**
4582 * @param {?} a
4583 * @return {?}
4584 */
4585 function (a) {
4586 _this.billedProductsMap.set(a.addonId, null);
4587 _this.billedProductLoaded.set(a.addonId, false);
4588 return a.billingId;
4589 }));
4590 this.subscriptions.push(this.billingService.getMultiProductPricing(this.partnerID, billingIDs).subscribe((/**
4591 * @param {?} pricing
4592 * @return {?}
4593 */
4594 function (pricing) {
4595 _this._addons.forEach((/**
4596 * @param {?} addon
4597 * @return {?}
4598 */
4599 function (addon) {
4600 /** @type {?} */
4601 var addonPricing = pricing[addon.billingId];
4602 if (!addonPricing) {
4603 return;
4604 }
4605 /** @type {?} */
4606 var billedProduct = buildBilledProductFromProductPricingAndAddon(addon, addonPricing);
4607 _this.billedProductsMap.set(addon.addonId, billedProduct);
4608 _this.billedProductLoaded.set(addon.addonId, true);
4609 }));
4610 _this.cdr.detectChanges();
4611 })));
4612 }
4613 };
4614 /**
4615 * @param {?} addonId
4616 * @return {?}
4617 */
4618 VaAddonListComponent.prototype.onClick = /**
4619 * @param {?} addonId
4620 * @return {?}
4621 */
4622 function (addonId) {
4623 this.addonSelected.emit(addonId);
4624 };
4625 /**
4626 * @param {?} object
4627 * @return {?}
4628 */
4629 VaAddonListComponent.prototype.instanceOfPricing = /**
4630 * @param {?} object
4631 * @return {?}
4632 */
4633 function (object) {
4634 if (typeof object === 'number') {
4635 return false;
4636 }
4637 return object.currency !== undefined && object.prices !== undefined;
4638 };
4639 /**
4640 * @param {?} addon
4641 * @return {?}
4642 */
4643 VaAddonListComponent.prototype.getDisplayPricing = /**
4644 * @param {?} addon
4645 * @return {?}
4646 */
4647 function (addon) {
4648 /** @type {?} */
4649 var price = addon.price;
4650 if (price && this.instanceOfPricing(price)) {
4651 return price;
4652 }
4653 return {
4654 currency: addon.currency,
4655 prices: [
4656 {
4657 price: addon.price,
4658 frequency: addon.billingFrequency ? addon.billingFrequency : 'Monthly'
4659 }
4660 ]
4661 };
4662 };
4663 /**
4664 * @return {?}
4665 */
4666 VaAddonListComponent.prototype.noData = /**
4667 * @return {?}
4668 */
4669 function () {
4670 return isNullOrUndefined(this._hasVerifiedContract) || isNullOrUndefined(this._canAccessContractPricing);
4671 };
4672 /**
4673 * @return {?}
4674 */
4675 VaAddonListComponent.prototype.displayContractPricing = /**
4676 * @return {?}
4677 */
4678 function () {
4679 return this._canAccessContractPricing && this._hasVerifiedContract;
4680 };
4681 /**
4682 * @param {?} addon
4683 * @return {?}
4684 */
4685 VaAddonListComponent.prototype.isBilledProductLoaded = /**
4686 * @param {?} addon
4687 * @return {?}
4688 */
4689 function (addon) {
4690 if (this.noData()) {
4691 return false;
4692 }
4693 if (this.displayContractPricing()) {
4694 /** @type {?} */
4695 var value = this.billedProductLoaded.get(addon.addonId);
4696 return value ? value : false;
4697 }
4698 return true;
4699 };
4700 /**
4701 * @return {?}
4702 */
4703 VaAddonListComponent.prototype.ngOnDestroy = /**
4704 * @return {?}
4705 */
4706 function () {
4707 this.subscriptions.forEach((/**
4708 * @param {?} subscription
4709 * @return {?}
4710 */
4711 function (subscription) { return subscription.unsubscribe(); }));
4712 };
4713 VaAddonListComponent.decorators = [
4714 { type: Component, args: [{
4715 selector: 'va-addon-list',
4716 template: "<mat-list *ngIf=\"_addons\" class=\"addon-list\">\n <mat-divider></mat-divider>\n <ng-container *ngFor=\"let addon of _addons\">\n <mat-list-item (click)=\"onClick(addon.addonId)\">\n <div class=\"addon-icon-title\">\n <img *ngIf=\"addon.icon;else noIcon\" class=\"addon-icon\" [src]=\"addon.icon\" mat-list-avatar/>\n <ng-template #noIcon>\n <mat-icon class=\"addon-default-icon\" mat-list-icon>add_circle</mat-icon>\n </ng-template>\n <div class=\"addon-title-tagline\">\n <p class=\"addon-title\" matLine>{{ addon.title }} </p>\n <p class=\"addon-tagline\" matLine>{{ addon.tagline }}</p>\n </div>\n </div>\n <div *ngIf=\"showPricing\" class=\"price-section\">\n <va-pricing\n [pricing]=\"getDisplayPricing(addon)\"\n [highlightPrice]=\"false\"\n [hasVerifiedContract]=\"_hasVerifiedContract\"\n [billedProduct]=\"billedProductsMap.get(addon.addonId)\"\n [loaded]=\"isBilledProductLoaded(addon)\">\n </va-pricing>\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n </ng-container>\n</mat-list>\n",
4717 styles: [":host{display:block}h2+:host{margin:-8px 0}:host ::ng-deep .mat-list-item.mat-2-line{height:auto!important}:host ::ng-deep .mat-list .mat-list-item .mat-list-item-content{padding:8px;-webkit-box-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}@media screen and (min-width:800px){:host ::ng-deep .mat-list .mat-list-item .mat-list-item-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}}.addon-list{position:relative}.addon-default-icon{margin:0 5px;color:#4caf50}.addon-icon{width:32px;height:32px}.addon-icon-title{-webkit-box-flex:1;flex-grow:1;display:-webkit-box;display:flex;width:100%}@media screen and (min-width:800px){.addon-icon-title{width:auto}}.addon-title-tagline{padding:0 16px 10px 8px;-webkit-box-flex:1;flex-grow:1}.addon-title-tagline .addon-title{color:#212121;font-size:16px;line-height:1.2;margin:6px 0;white-space:normal}.addon-title-tagline .addon-tagline{color:#616161;font-size:14px;margin:0;white-space:normal}.price-section{min-width:10em;margin-top:6px;flex-shrink:0}mat-list-item:hover{background-color:#fafafa!important;cursor:pointer!important}"]
4718 }] }
4719 ];
4720 /** @nocollapse */
4721 VaAddonListComponent.ctorParameters = function () { return [
4722 { type: BillingService },
4723 { type: ChangeDetectorRef }
4724 ]; };
4725 VaAddonListComponent.propDecorators = {
4726 addons: [{ type: Input, args: ['addons',] }],
4727 showPricing: [{ type: Input }],
4728 partnerID: [{ type: Input }],
4729 hasVerifiedContract: [{ type: Input, args: ['hasVerifiedContract',] }],
4730 canAccessContractPricing: [{ type: Input, args: ['canAccessContractPricing',] }],
4731 addonSelected: [{ type: Output }]
4732 };
4733 return VaAddonListComponent;
4734}());
4735if (false) {
4736 /** @type {?} */
4737 VaAddonListComponent.prototype._addons;
4738 /** @type {?} */
4739 VaAddonListComponent.prototype.showPricing;
4740 /** @type {?} */
4741 VaAddonListComponent.prototype.partnerID;
4742 /** @type {?} */
4743 VaAddonListComponent.prototype._hasVerifiedContract;
4744 /** @type {?} */
4745 VaAddonListComponent.prototype._canAccessContractPricing;
4746 /** @type {?} */
4747 VaAddonListComponent.prototype.addonSelected;
4748 /** @type {?} */
4749 VaAddonListComponent.prototype.billedProductsMap;
4750 /**
4751 * @type {?}
4752 * @private
4753 */
4754 VaAddonListComponent.prototype.billedProductLoaded;
4755 /**
4756 * @type {?}
4757 * @private
4758 */
4759 VaAddonListComponent.prototype.subscriptions;
4760 /**
4761 * @type {?}
4762 * @private
4763 */
4764 VaAddonListComponent.prototype.billingService;
4765 /**
4766 * @type {?}
4767 * @private
4768 */
4769 VaAddonListComponent.prototype.cdr;
4770}
4771
4772/**
4773 * @fileoverview added by tsickle
4774 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4775 */
4776var VaAddonListModule = /** @class */ (function () {
4777 function VaAddonListModule() {
4778 }
4779 VaAddonListModule.decorators = [
4780 { type: NgModule, args: [{
4781 imports: [
4782 BillingModule,
4783 CommonModule,
4784 MatIconModule,
4785 MatListModule$1,
4786 MatDividerModule,
4787 VaPricingModule
4788 ],
4789 declarations: [VaAddonListComponent],
4790 exports: [VaAddonListComponent]
4791 },] }
4792 ];
4793 return VaAddonListModule;
4794}());
4795
4796/**
4797 * @fileoverview added by tsickle
4798 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4799 */
4800/**
4801 * @record
4802 */
4803function HeimdallServiceTokenInterface() { }
4804if (false) {
4805 /**
4806 * @param {?} category
4807 * @param {?} action
4808 * @param {?} label
4809 * @param {?=} value
4810 * @param {?=} dimensions
4811 * @return {?}
4812 */
4813 HeimdallServiceTokenInterface.prototype.track = function (category, action, label, value, dimensions) { };
4814}
4815/** @type {?} */
4816var HeimdallServiceToken = new InjectionToken('HeimdallService');
4817var HeimdallClient = /** @class */ (function () {
4818 function HeimdallClient(userEvents) {
4819 this.userEvents = userEvents;
4820 }
4821 /**
4822 * @param {?} category
4823 * @param {?} action
4824 * @param {?} label
4825 * @param {?=} value
4826 * @param {?=} dimensions
4827 * @return {?}
4828 */
4829 HeimdallClient.prototype.track = /**
4830 * @param {?} category
4831 * @param {?} action
4832 * @param {?} label
4833 * @param {?=} value
4834 * @param {?=} dimensions
4835 * @return {?}
4836 */
4837 function (category, action, label, value, dimensions) {
4838 this.userEvents.track(category, action, label, value, dimensions);
4839 };
4840 HeimdallClient.decorators = [
4841 { type: Injectable }
4842 ];
4843 /** @nocollapse */
4844 HeimdallClient.ctorParameters = function () { return [
4845 { type: undefined, decorators: [{ type: Inject, args: [HeimdallServiceToken,] }] }
4846 ]; };
4847 return HeimdallClient;
4848}());
4849if (false) {
4850 /**
4851 * @type {?}
4852 * @private
4853 */
4854 HeimdallClient.prototype.userEvents;
4855}
4856var HeimdallClientModule = /** @class */ (function () {
4857 function HeimdallClientModule() {
4858 }
4859 HeimdallClientModule.decorators = [
4860 { type: NgModule, args: [{
4861 providers: [HeimdallClient]
4862 },] }
4863 ];
4864 return HeimdallClientModule;
4865}());
4866
4867/**
4868 * @fileoverview added by tsickle
4869 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4870 */
4871/** @type {?} */
4872var STOREFRONT_FILTER_NAME = 'Store Filters';
4873/**
4874 * @record
4875 */
4876function StorefrontCategory() { }
4877if (false) {
4878 /** @type {?} */
4879 StorefrontCategory.prototype.id;
4880 /** @type {?} */
4881 StorefrontCategory.prototype.name;
4882 /** @type {?} */
4883 StorefrontCategory.prototype.packageIds;
4884}
4885var StorefrontComponent = /** @class */ (function () {
4886 function StorefrontComponent(userEvents, filterService, translateService) {
4887 this.userEvents = userEvents;
4888 this.filterService = filterService;
4889 this.translateService = translateService;
4890 this.useCustomCase = false;
4891 this.categorySelected = new EventEmitter();
4892 this.packageIdSelected = new EventEmitter();
4893 this.getDataForCategory = new EventEmitter();
4894 this.categories$$ = new BehaviorSubject([]);
4895 this.packagesMap$$ = new BehaviorSubject(new Map());
4896 this.searchTerm$$ = new BehaviorSubject('');
4897 this.selectedCateoryId$$ = new BehaviorSubject('');
4898 if (!this.translateService.translations.hasOwnProperty('en')) {
4899 this.translateService.reloadLang('en');
4900 }
4901 if (!this.translateService.translations.hasOwnProperty('cs')) {
4902 this.translateService.reloadLang('cs');
4903 }
4904 this.translateService.setTranslation('en', En.en, true);
4905 this.translateService.setTranslation('cs', Cs.cs, true);
4906 }
4907 Object.defineProperty(StorefrontComponent.prototype, "categories", {
4908 set: /**
4909 * @param {?} value
4910 * @return {?}
4911 */
4912 function (value) {
4913 this.categories$$.next(value || []);
4914 },
4915 enumerable: true,
4916 configurable: true
4917 });
4918 Object.defineProperty(StorefrontComponent.prototype, "categoryIdToStoreItemListMap", {
4919 set: /**
4920 * @param {?} value
4921 * @return {?}
4922 */
4923 function (value) {
4924 this.packagesMap$$.next(value || new Map());
4925 },
4926 enumerable: true,
4927 configurable: true
4928 });
4929 /**
4930 * @return {?}
4931 */
4932 StorefrontComponent.prototype.ngOnInit = /**
4933 * @return {?}
4934 */
4935 function () {
4936 var _this = this;
4937 /** @type {?} */
4938 var lmiCategoryCheckboxList = LMI_CATEGORIES.map((/**
4939 * @param {?} category
4940 * @return {?}
4941 */
4942 function (category) {
4943 return new CheckboxFilterField({
4944 name: category.name,
4945 id: category.categoryId,
4946 value: false,
4947 condition: (/**
4948 * @param {?} item
4949 * @return {?}
4950 */
4951 function (item) {
4952 /** @type {?} */
4953 var lmiCategories = [];
4954 if (item.lmiCategories) {
4955 lmiCategories = item.lmiCategories.map((/**
4956 * @param {?} cat
4957 * @return {?}
4958 */
4959 function (cat) {
4960 return Categories[cat].toLowerCase();
4961 }));
4962 }
4963 return lmiCategories.indexOf(category.categoryId) > -1;
4964 })
4965 });
4966 }));
4967 /** @type {?} */
4968 var lmiCategoryFilterSection = new FilterSection({
4969 title: 'LMI Category',
4970 type: 'or',
4971 fields: lmiCategoryCheckboxList
4972 });
4973 this.lmiCategoryFilter = new Filters(STOREFRONT_FILTER_NAME, [
4974 lmiCategoryFilterSection
4975 ]);
4976 this.filters$ = this.categories$$.pipe(map((/**
4977 * @param {?} categories
4978 * @return {?}
4979 */
4980 function (categories) {
4981 /** @type {?} */
4982 var tabbedFilterField = new TabbedFilterField({
4983 name: '',
4984 value: null,
4985 id: 'categorytab',
4986 options: categories
4987 });
4988 /** @type {?} */
4989 var filters = new Filters(STOREFRONT_FILTER_NAME, [
4990 new FilterSection({
4991 title: 'Categories',
4992 type: 'or',
4993 fields: [tabbedFilterField]
4994 }),
4995 lmiCategoryFilterSection
4996 ]);
4997 return filters;
4998 })));
4999 this.filterService.setFilters(this.lmiCategoryFilter);
5000 this.searchTermSubscription = this.searchTerm$$.asObservable().pipe(debounceTime(300), distinctUntilChanged()).subscribe((/**
5001 * @param {?} searchTerm
5002 * @return {?}
5003 */
5004 function (searchTerm) { return _this.userEvents.track('store', 'search-input', '', 1, { 'searchTerm': searchTerm }); }));
5005 /** @type {?} */
5006 var selectedLMIFilters$ = this.filterService.filters.fieldValuesObservable.pipe(startWith([]), map((/**
5007 * @return {?}
5008 */
5009 function () {
5010 return _this.lmiCategoryFilter.fields.filter((/**
5011 * @param {?} item
5012 * @return {?}
5013 */
5014 function (item) { return item.value; }));
5015 })));
5016 this.showLMIFilter$ = selectedLMIFilters$.pipe(filter((/**
5017 * @param {?} selectedLMIFilters
5018 * @return {?}
5019 */
5020 function (selectedLMIFilters) { return !!selectedLMIFilters; })), take(1), map((/**
5021 * @param {?} selectedLMIFilters
5022 * @return {?}
5023 */
5024 function (selectedLMIFilters) { return selectedLMIFilters.length > 0; })));
5025 this.filteredItems$ = combineLatest(this.packagesMap$$, this.searchTerm$$, this.selectedCateoryId$$, selectedLMIFilters$).pipe(map((/**
5026 * @param {?} __0
5027 * @return {?}
5028 */
5029 function (_a) {
5030 var _b = __read(_a, 4), packages = _b[0], searchTerm = _b[1], selectedCategoryId = _b[2], selectedLMIFilters = _b[3];
5031 /** @type {?} */
5032 var storeItems = [];
5033 if (packages.size) {
5034 storeItems = (selectedCategoryId ? packages.get(selectedCategoryId) : packages.get(Array.from(packages.keys())[0]));
5035 }
5036 storeItems = storeItems ? _this.lmiCategoryFilter.applyFilters(storeItems) : [];
5037 return searchTerm ? storeItems.filter((/**
5038 * @param {?} item
5039 * @return {?}
5040 */
5041 function (item) { return item.name.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1; })) : storeItems;
5042 })));
5043 };
5044 /**
5045 * @return {?}
5046 */
5047 StorefrontComponent.prototype.ngOnDestroy = /**
5048 * @return {?}
5049 */
5050 function () {
5051 this.searchTermSubscription.unsubscribe();
5052 };
5053 /**
5054 * @param {?} term
5055 * @return {?}
5056 */
5057 StorefrontComponent.prototype.onSearchTermChanged = /**
5058 * @param {?} term
5059 * @return {?}
5060 */
5061 function (term) {
5062 this.searchTerm$$.next(term);
5063 };
5064 /**
5065 * @param {?} filterField
5066 * @return {?}
5067 */
5068 StorefrontComponent.prototype.onFieldValueChanged = /**
5069 * @param {?} filterField
5070 * @return {?}
5071 */
5072 function (filterField) {
5073 if (!(filterField instanceof TabbedFilterField)) {
5074 return;
5075 }
5076 this.selectedCateoryId$$.next(filterField.value.id);
5077 this.categorySelected.emit((/** @type {?} */ (filterField.value)));
5078 /** @type {?} */
5079 var currentStoreItemsForSelectCategory = this.packagesMap$$.getValue().get(filterField.value.id);
5080 if (!(currentStoreItemsForSelectCategory && currentStoreItemsForSelectCategory.length)) {
5081 this.getDataForCategory.emit((/** @type {?} */ (filterField.value)));
5082 }
5083 };
5084 /**
5085 * @param {?} item
5086 * @return {?}
5087 */
5088 StorefrontComponent.prototype.storeItemClicked = /**
5089 * @param {?} item
5090 * @return {?}
5091 */
5092 function (item) {
5093 this.packageIdSelected.emit(item.id);
5094 };
5095 StorefrontComponent.decorators = [
5096 { type: Component, args: [{
5097 selector: 'va-storefront',
5098 template: "<va-filter-container\n [filters]=\"filters$ | async\"\n (searchTermChanged)=\"onSearchTermChanged($event)\"\n (fieldValueChanged)=\"onFieldValueChanged($event)\"\n [theme]=\"'plain'\"\n [filterIsOpen]=\"showLMIFilter$ | async\"\n [useCustomCase]=\"useCustomCase\"\n >\n <va-store\n [items]=\"filteredItems$ | async\"\n [searchable]=\"false\"\n (itemClicked)=\"storeItemClicked($event)\"\n content>\n </va-store>\n</va-filter-container>\n",
5099 styles: [".public-store-container{padding:20px}va-store{margin-top:20px;display:block}@media only screen and (device-width:375px) and (-webkit-device-pixel-ratio:2){::ng-deep va-filter-tabbed{width:280px}::ng-deep .filter-container .toolbar.toolbar{background:0 0}}@media only screen and (device-width:414px) and (-webkit-device-pixel-ratio:3){::ng-deep va-filter-tabbed{width:280px}::ng-deep .filter-container .toolbar.toolbar{background:0 0}}"]
5100 }] }
5101 ];
5102 /** @nocollapse */
5103 StorefrontComponent.ctorParameters = function () { return [
5104 { type: undefined, decorators: [{ type: Inject, args: [HeimdallServiceToken,] }] },
5105 { type: FilterService },
5106 { type: TranslateService }
5107 ]; };
5108 StorefrontComponent.propDecorators = {
5109 categories: [{ type: Input }],
5110 categoryIdToStoreItemListMap: [{ type: Input }],
5111 useCustomCase: [{ type: Input }],
5112 categorySelected: [{ type: Output }],
5113 packageIdSelected: [{ type: Output }],
5114 getDataForCategory: [{ type: Output }]
5115 };
5116 return StorefrontComponent;
5117}());
5118if (false) {
5119 /** @type {?} */
5120 StorefrontComponent.prototype.useCustomCase;
5121 /** @type {?} */
5122 StorefrontComponent.prototype.categorySelected;
5123 /** @type {?} */
5124 StorefrontComponent.prototype.packageIdSelected;
5125 /** @type {?} */
5126 StorefrontComponent.prototype.getDataForCategory;
5127 /**
5128 * @type {?}
5129 * @private
5130 */
5131 StorefrontComponent.prototype.categories$$;
5132 /**
5133 * @type {?}
5134 * @private
5135 */
5136 StorefrontComponent.prototype.packagesMap$$;
5137 /**
5138 * @type {?}
5139 * @private
5140 */
5141 StorefrontComponent.prototype.searchTerm$$;
5142 /**
5143 * @type {?}
5144 * @private
5145 */
5146 StorefrontComponent.prototype.selectedCateoryId$$;
5147 /**
5148 * @type {?}
5149 * @private
5150 */
5151 StorefrontComponent.prototype.lmiCategoryFilter;
5152 /** @type {?} */
5153 StorefrontComponent.prototype.filters$;
5154 /** @type {?} */
5155 StorefrontComponent.prototype.filteredItems$;
5156 /** @type {?} */
5157 StorefrontComponent.prototype.searchTermSubscription;
5158 /** @type {?} */
5159 StorefrontComponent.prototype.showLMIFilter$;
5160 /**
5161 * @type {?}
5162 * @private
5163 */
5164 StorefrontComponent.prototype.userEvents;
5165 /**
5166 * @type {?}
5167 * @private
5168 */
5169 StorefrontComponent.prototype.filterService;
5170 /**
5171 * @type {?}
5172 * @private
5173 */
5174 StorefrontComponent.prototype.translateService;
5175}
5176
5177/**
5178 * @fileoverview added by tsickle
5179 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5180 */
5181var StoreModule = /** @class */ (function () {
5182 function StoreModule(translateService, currentLang$, defaultLang$) {
5183 this.translateService = translateService;
5184 if (!this.translateService.translations.hasOwnProperty('en')) {
5185 this.translateService.reloadLang('en');
5186 }
5187 if (!this.translateService.translations.hasOwnProperty('cs')) {
5188 this.translateService.reloadLang('cs');
5189 }
5190 this.translateService.setTranslation('en', En.en, true);
5191 this.translateService.setTranslation('cs', Cs.cs, true);
5192 if (currentLang$) {
5193 currentLang$.subscribe((/**
5194 * @param {?} currentLang
5195 * @return {?}
5196 */
5197 function (currentLang) { return translateService.use(currentLang); }));
5198 }
5199 if (defaultLang$) {
5200 defaultLang$.subscribe((/**
5201 * @param {?} defaultLang
5202 * @return {?}
5203 */
5204 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
5205 }
5206 }
5207 StoreModule.decorators = [
5208 { type: NgModule, args: [{
5209 imports: [CommonModule, UIKitModule, MatCardModule, MatIconModule, MatInputModule, FormsModule, ReactiveFormsModule,
5210 MatSelectModule, MatExpansionModule, MatCheckboxModule, StoreCardModule, VaOrderFormModule, AddonModule, StencilsModule,
5211 VaPricingModule, VaAddonListModule, HeimdallClientModule, TranslateModule.forChild()],
5212 declarations: [StoreComponent, StorefrontComponent],
5213 providers: [StoreService, FilterService],
5214 exports: [StoreComponent, StoreCardModule, VaOrderFormModule, StencilsModule, StorefrontComponent]
5215 },] }
5216 ];
5217 /** @nocollapse */
5218 StoreModule.ctorParameters = function () { return [
5219 { type: TranslateService },
5220 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
5221 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
5222 ]; };
5223 return StoreModule;
5224}());
5225if (false) {
5226 /**
5227 * @type {?}
5228 * @private
5229 */
5230 StoreModule.prototype.translateService;
5231}
5232
5233/**
5234 * @fileoverview added by tsickle
5235 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5236 */
5237/**
5238 * @record
5239 */
5240function LmiCategory() { }
5241if (false) {
5242 /** @type {?} */
5243 LmiCategory.prototype.name;
5244 /** @type {?} */
5245 LmiCategory.prototype.categoryId;
5246}
5247/** @type {?} */
5248var LMI_CATEGORIES = [
5249 { name: 'Listings', categoryId: 'listings' },
5250 { name: 'Social', categoryId: 'social' },
5251 { name: 'Reputation', categoryId: 'reputation' },
5252 { name: 'SEO', categoryId: 'seo' },
5253 { name: 'Website', categoryId: 'website' },
5254 { name: 'Advertising', categoryId: 'advertising' },
5255 { name: 'Content & Experience', categoryId: 'content_and_experience' }
5256];
5257/** @type {?} */
5258var LMI_CATEGORY_MAP = LMI_CATEGORIES.reduce((/**
5259 * @param {?} previous
5260 * @param {?} current
5261 * @return {?}
5262 */
5263function (previous, current) {
5264 previous[current.categoryId] = current;
5265 return previous;
5266}), {});
5267/** @type {?} */
5268var LMI_CATEGORIES_BY_NAME = LMI_CATEGORIES.reduce((/**
5269 * @param {?} previous
5270 * @param {?} current
5271 * @return {?}
5272 */
5273function (previous, current) {
5274 previous[current.name] = current;
5275 return previous;
5276}), {});
5277
5278/**
5279 * @fileoverview added by tsickle
5280 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5281 */
5282var VaSalespersonDetailsComponent = /** @class */ (function () {
5283 function VaSalespersonDetailsComponent() {
5284 this.showGetItNow = true;
5285 this.getItNow = new EventEmitter();
5286 }
5287 /**
5288 * @return {?}
5289 */
5290 VaSalespersonDetailsComponent.prototype.onGetItNowSelected = /**
5291 * @return {?}
5292 */
5293 function () {
5294 this.getItNow.emit(this.salesperson);
5295 };
5296 Object.defineProperty(VaSalespersonDetailsComponent.prototype, "iconUrl", {
5297 get: /**
5298 * @return {?}
5299 */
5300 function () {
5301 return this.salesperson && this.salesperson.photoUrlSecure ?
5302 this.salesperson.photoUrlSecure :
5303 'https://vbc-frontend.storage-download.googleapis.com/salesperson-details/default_sales_person.jpg';
5304 },
5305 enumerable: true,
5306 configurable: true
5307 });
5308 Object.defineProperty(VaSalespersonDetailsComponent.prototype, "name", {
5309 get: /**
5310 * @return {?}
5311 */
5312 function () {
5313 return this.salesperson && this.salesperson.formattedName ?
5314 this.salesperson.formattedName : '';
5315 },
5316 enumerable: true,
5317 configurable: true
5318 });
5319 Object.defineProperty(VaSalespersonDetailsComponent.prototype, "title", {
5320 get: /**
5321 * @return {?}
5322 */
5323 function () {
5324 return this.salesperson && this.salesperson.jobTitle ?
5325 this.salesperson.jobTitle : '';
5326 },
5327 enumerable: true,
5328 configurable: true
5329 });
5330 Object.defineProperty(VaSalespersonDetailsComponent.prototype, "email", {
5331 get: /**
5332 * @return {?}
5333 */
5334 function () {
5335 return this.salesperson && this.salesperson.email ?
5336 this.salesperson.email : '';
5337 },
5338 enumerable: true,
5339 configurable: true
5340 });
5341 Object.defineProperty(VaSalespersonDetailsComponent.prototype, "cityAndState", {
5342 get: /**
5343 * @return {?}
5344 */
5345 function () {
5346 return this.salesperson && this.salesperson.city && this.salesperson.state ?
5347 this.salesperson.city + ', ' + this.salesperson.state : '';
5348 },
5349 enumerable: true,
5350 configurable: true
5351 });
5352 VaSalespersonDetailsComponent.decorators = [
5353 { type: Component, args: [{
5354 selector: 'va-salesperson-details',
5355 template: "<div class=\"container\">\n <div class=\"salesperson-contact-info\">\n\n <div class=\"salesperson-image\" *ngIf=\"salesperson\">\n <va-icon [iconUrl]=\"iconUrl\" [diameter]=\"60\"></va-icon>\n </div>\n\n <div>\n <div class=\"salesperson-name\">{{ name }}</div>\n <div>{{ title }}</div>\n <div>{{ cityAndState }}</div>\n <div><a href=\"mailto:{{ email }}\">{{ email }}</a></div>\n </div>\n\n <div *ngIf=\"!salesperson\" class=\"generic-contact\">\n Contact {{ brandName ? \"your \" + brandName : \"a\" }} representative today!\n </div>\n\n <div class=\"pricing\">\n <va-pricing [pricing]=\"packagePricing\" wrapFrequency=\"true\"></va-pricing>\n <div class=\"cta get-it-now-bottom-button\">\n <button mat-button *ngIf=\"salesperson && showGetItNow\" (click)=\"onGetItNowSelected()\" class=\"now-button\">\n Get it Now\n </button>\n </div>\n </div>\n </div>\n</div>\n",
5356 styles: ["a{color:#1e88e5;text-decoration:none}.container{width:100%;margin:0 auto;background-color:#fff;box-shadow:1px 1px 1px 0 rgba(0,0,0,.2)}.salesperson-image{margin-right:20px}.salesperson-contact-info{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:24px;font-size:14px;color:#9e9e9e}@media screen and (max-width:600px){.salesperson-contact-info{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;display:inline-block}}.salesperson-name{font-size:20px;font-weight:700;color:#212121}.generic-contact{margin-left:20px}.pricing{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-flex:1;flex-grow:1;-webkit-box-pack:end;justify-content:flex-end}.pricing ::ng-deep .price-box{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.pricing ::ng-deep .price-number{margin-right:4px}@media screen and (min-width:600px){.pricing{padding-left:16px}}.pricing va-pricing{margin-right:20px}.now-button{font-size:14px;color:#fff;background-color:#4caf50}"]
5357 }] }
5358 ];
5359 VaSalespersonDetailsComponent.propDecorators = {
5360 salesperson: [{ type: Input }],
5361 packagePricing: [{ type: Input }],
5362 brandName: [{ type: Input }],
5363 showGetItNow: [{ type: Input }],
5364 getItNow: [{ type: Output }]
5365 };
5366 return VaSalespersonDetailsComponent;
5367}());
5368if (false) {
5369 /** @type {?} */
5370 VaSalespersonDetailsComponent.prototype.salesperson;
5371 /** @type {?} */
5372 VaSalespersonDetailsComponent.prototype.packagePricing;
5373 /** @type {?} */
5374 VaSalespersonDetailsComponent.prototype.brandName;
5375 /** @type {?} */
5376 VaSalespersonDetailsComponent.prototype.showGetItNow;
5377 /** @type {?} */
5378 VaSalespersonDetailsComponent.prototype.getItNow;
5379}
5380
5381/**
5382 * @fileoverview added by tsickle
5383 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5384 */
5385var VaSalespersonDetailsModule = /** @class */ (function () {
5386 function VaSalespersonDetailsModule() {
5387 }
5388 VaSalespersonDetailsModule.decorators = [
5389 { type: NgModule, args: [{
5390 imports: [
5391 CommonModule,
5392 MatButtonModule,
5393 MatIconModule,
5394 VaIconModule,
5395 VaPricingModule,
5396 ],
5397 declarations: [
5398 VaSalespersonDetailsComponent
5399 ],
5400 exports: [
5401 VaSalespersonDetailsComponent
5402 ],
5403 entryComponents: [
5404 VaSalespersonDetailsComponent
5405 ]
5406 },] }
5407 ];
5408 return VaSalespersonDetailsModule;
5409}());
5410
5411/**
5412 * @fileoverview added by tsickle
5413 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5414 */
5415var Package = /** @class */ (function (_super) {
5416 __extends(Package, _super);
5417 function Package() {
5418 return _super !== null && _super.apply(this, arguments) || this;
5419 }
5420 // the order the product / addons in the package
5421 /**
5422 * @param {?} data
5423 * @return {?}
5424 */
5425 Package.fromApi =
5426 // the order the product / addons in the package
5427 /**
5428 * @param {?} data
5429 * @return {?}
5430 */
5431 function (data) {
5432 /** @type {?} */
5433 var newPackage = new Package();
5434 if (!data.pricing && data.selling_price) {
5435 data.pricing = {
5436 currency: data.currency,
5437 prices: [{
5438 price: data.selling_price * 100,
5439 frequency: data.billingFrequency,
5440 isStartingPrice: false,
5441 }]
5442 };
5443 }
5444 Object.assign(newPackage, data);
5445 if (!newPackage.name) {
5446 newPackage.name = 'Untitled';
5447 }
5448 if (data.created) {
5449 newPackage.createdDate = new Date(data.created);
5450 }
5451 if (data.updated) {
5452 newPackage.updatedDate = new Date(data.updated);
5453 }
5454 return newPackage;
5455 };
5456 Object.defineProperty(Package.prototype, "isPackageFree", {
5457 get: /**
5458 * @return {?}
5459 */
5460 function () {
5461 return this.isFree;
5462 },
5463 enumerable: true,
5464 configurable: true
5465 });
5466 return Package;
5467}(Sellable));
5468if (false) {
5469 /** @type {?} */
5470 Package.prototype.solution_id;
5471 /** @type {?} */
5472 Package.prototype.partner_id;
5473 /** @type {?} */
5474 Package.prototype.market_id;
5475 /** @type {?} */
5476 Package.prototype.name;
5477 /** @type {?} */
5478 Package.prototype.icon;
5479 /** @type {?} */
5480 Package.prototype.status;
5481 /** @type {?} */
5482 Package.prototype.tagline;
5483 /** @type {?} */
5484 Package.prototype.header_image_url;
5485 /** @type {?} */
5486 Package.prototype.content;
5487 /** @type {?} */
5488 Package.prototype.products;
5489 /** @type {?} */
5490 Package.prototype.addon_keys;
5491 /** @type {?} */
5492 Package.prototype.hide_product_icons_and_names;
5493 /** @type {?} */
5494 Package.prototype.hide_product_details;
5495 /** @type {?} */
5496 Package.prototype.createdDate;
5497 /** @type {?} */
5498 Package.prototype.updatedDate;
5499 /** @type {?} */
5500 Package.prototype.productOrder;
5501}
5502
5503/**
5504 * @fileoverview added by tsickle
5505 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5506 */
5507/**
5508 * @param {?} combined
5509 * @param {?} order
5510 * @return {?}
5511 */
5512function orderProductsAndAddons(combined, order) {
5513 if (!order || order.length === 0) {
5514 return combined || [];
5515 }
5516 if (!combined || combined.length === 0) {
5517 return [];
5518 }
5519 /** @type {?} */
5520 var itemMap = (combined || []).reduce((/**
5521 * @param {?} m
5522 * @param {?} curr
5523 * @return {?}
5524 */
5525 function (m, curr) {
5526 m.set(getUniqueProductAddonId(curr), curr);
5527 return m;
5528 }), new Map());
5529 /** @type {?} */
5530 var combinedIdList = combined.map(getUniqueProductAddonId);
5531 /** @type {?} */
5532 var finalOrderedIds = combineProductOrderWithContainedProducts(order, combinedIdList);
5533 /** @type {?} */
5534 var orderedList = (/** @type {?} */ (finalOrderedIds.reduce((/**
5535 * @param {?} items
5536 * @param {?} id
5537 * @return {?}
5538 */
5539 function (items, id) {
5540 items.push(itemMap.get(id));
5541 return items;
5542 }), [])));
5543 return orderedList.filter(filterUniqueAndDefined);
5544}
5545/**
5546 * @param {?} elem
5547 * @param {?} pos
5548 * @param {?} arr
5549 * @return {?}
5550 */
5551function filterUniqueAndDefined(elem, pos, arr) {
5552 return elem && arr.indexOf(elem) === pos;
5553}
5554/**
5555 * @param {?} productOrder
5556 * @param {?} itemIds
5557 * @return {?}
5558 */
5559function combineProductOrderWithContainedProducts(productOrder, itemIds) {
5560 if (itemIds == null || itemIds.length === 0) {
5561 return [];
5562 }
5563 if (!productOrder || productOrder.length === 0) {
5564 return itemIds.filter(filterUniqueAndDefined);
5565 }
5566 return productOrder
5567 .filter((/**
5568 * @param {?} elem
5569 * @return {?}
5570 */
5571 function (elem) { return itemIds.indexOf(elem) >= 0; }))
5572 .concat(itemIds)
5573 .filter(filterUniqueAndDefined);
5574}
5575/**
5576 * @param {?} thing
5577 * @return {?}
5578 */
5579function getUniqueProductAddonId(thing) {
5580 return thing['addonId'] || thing['productId'];
5581}
5582
5583/**
5584 * @fileoverview added by tsickle
5585 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5586 */
5587var VaPackageDetailsComponent = /** @class */ (function () {
5588 function VaPackageDetailsComponent() {
5589 this.showActionButton = true;
5590 this.showPricing = true;
5591 this.actionLabel = 'Get It Now';
5592 this.getItNow = new EventEmitter();
5593 this.standAloneProducts$$ = new BehaviorSubject([]);
5594 this.products$ = new BehaviorSubject([]);
5595 this.addons$ = new BehaviorSubject([]);
5596 this.pkg$ = new ReplaySubject(1);
5597 this.itemSelectedEvent$ = new ReplaySubject(1);
5598 this.combinedItemsList$ = combineLatest(this.products$, this.addons$, (/**
5599 * @param {?} products
5600 * @param {?} addons
5601 * @return {?}
5602 */
5603 function (products, addons) {
5604 return (/** @type {?} */ ([].concat(products || []).concat(addons || [])));
5605 }));
5606 this.orderedItemsList$ = combineLatest(this.combinedItemsList$, this.pkg$, (/**
5607 * @param {?} combined
5608 * @param {?} pkg
5609 * @return {?}
5610 */
5611 function (combined, pkg) {
5612 return orderProductsAndAddons(combined, pkg ? pkg.productOrder || [] : []);
5613 }));
5614 /** @type {?} */
5615 var nonEmptyCombinedItemsList = this.combinedItemsList$.pipe(skipWhile((/**
5616 * @param {?} items
5617 * @return {?}
5618 */
5619 function (items) { return !items || items.length === 0; })), shareReplay(1));
5620 // Need to map to an index because that's how product selection works.
5621 /** @type {?} */
5622 var initialSelectedItem$ = nonEmptyCombinedItemsList.pipe(map((/**
5623 * @param {?} _
5624 * @return {?}
5625 */
5626 function (_) { return 0; })), take(1));
5627 /** @type {?} */
5628 var mergedSelection = merge(initialSelectedItem$, this.itemSelectedEvent$);
5629 this.selectedItem$ = combineLatest(mergedSelection, this.orderedItemsList$).pipe(map((/**
5630 * @param {?} __0
5631 * @return {?}
5632 */
5633 function (_a) {
5634 var _b = __read(_a, 2), index = _b[0], items = _b[1];
5635 return items[index];
5636 })));
5637 this.lmiCategories$ = this.products$.pipe(skipWhile((/**
5638 * @param {?} products
5639 * @return {?}
5640 */
5641 function (products) { return !products || products.length === 0; })), map((/**
5642 * @param {?} products
5643 * @return {?}
5644 */
5645 function (products) {
5646 return VaPackageDetailsComponent.getLmiCategories(products);
5647 })));
5648 this.productNameForSingleAddon$ = nonEmptyCombinedItemsList.pipe(map((/**
5649 * @param {?} items
5650 * @return {?}
5651 */
5652 function (items) {
5653 return VaPackageDetailsComponent.getProductNameForSingleAddon(items);
5654 })));
5655 this.displayTagName$ = combineLatest(this.pkg$, this.combinedItemsList$).pipe(map((/**
5656 * @param {?} __0
5657 * @return {?}
5658 */
5659 function (_a) {
5660 var _b = __read(_a, 2), pkg = _b[0], items = _b[1];
5661 return VaPackageDetailsComponent.getDisplayTagline(pkg, items);
5662 })));
5663 }
5664 Object.defineProperty(VaPackageDetailsComponent.prototype, "standAloneProducts", {
5665 set: /**
5666 * @param {?} standAloneProducts
5667 * @return {?}
5668 */
5669 function (standAloneProducts) {
5670 this.standAloneProducts$$.next(standAloneProducts);
5671 },
5672 enumerable: true,
5673 configurable: true
5674 });
5675 Object.defineProperty(VaPackageDetailsComponent.prototype, "products", {
5676 set: /**
5677 * @param {?} products
5678 * @return {?}
5679 */
5680 function (products) {
5681 this.products$.next(products);
5682 },
5683 enumerable: true,
5684 configurable: true
5685 });
5686 Object.defineProperty(VaPackageDetailsComponent.prototype, "addons", {
5687 set: /**
5688 * @param {?} addons
5689 * @return {?}
5690 */
5691 function (addons) {
5692 this.addons$.next(addons);
5693 },
5694 enumerable: true,
5695 configurable: true
5696 });
5697 Object.defineProperty(VaPackageDetailsComponent.prototype, "pkg", {
5698 set: /**
5699 * @param {?} pkg
5700 * @return {?}
5701 */
5702 function (pkg) {
5703 this.pkg$.next(pkg);
5704 },
5705 enumerable: true,
5706 configurable: true
5707 });
5708 /**
5709 * @param {?} products
5710 * @return {?}
5711 */
5712 VaPackageDetailsComponent.getLmiCategories = /**
5713 * @param {?} products
5714 * @return {?}
5715 */
5716 function (products) {
5717 /** @type {?} */
5718 var lmiCategories = [];
5719 if (products) {
5720 products.forEach((/**
5721 * @param {?} product
5722 * @return {?}
5723 */
5724 function (product) {
5725 lmiCategories = lmiCategories.concat(product.getLmiCategoryNames());
5726 }));
5727 }
5728 return new Set(lmiCategories);
5729 };
5730 /**
5731 * @param {?} pkg
5732 * @param {?} items
5733 * @return {?}
5734 */
5735 VaPackageDetailsComponent.getDisplayTagline = /**
5736 * @param {?} pkg
5737 * @param {?} items
5738 * @return {?}
5739 */
5740 function (pkg, items) {
5741 if (pkg && pkg.tagline) {
5742 return pkg.tagline;
5743 }
5744 else if (items && items.length === 1) {
5745 // Single product / addon package.
5746 return items[0].tagline || '';
5747 }
5748 return '';
5749 };
5750 /**
5751 * @param {?} items
5752 * @return {?}
5753 */
5754 VaPackageDetailsComponent.getProductNameForSingleAddon = /**
5755 * @param {?} items
5756 * @return {?}
5757 */
5758 function (items) {
5759 if (items && items.length === 1 && items[0] instanceof Addon) {
5760 /** @type {?} */
5761 var addon = (/** @type {?} */ (items[0]));
5762 return addon.productName;
5763 }
5764 };
5765 /**
5766 * @param {?} i
5767 * @return {?}
5768 */
5769 VaPackageDetailsComponent.prototype.selectItem = /**
5770 * @param {?} i
5771 * @return {?}
5772 */
5773 function (i) {
5774 this.itemSelectedEvent$.next(i);
5775 };
5776 /**
5777 * @return {?}
5778 */
5779 VaPackageDetailsComponent.prototype.emitGetItNow = /**
5780 * @return {?}
5781 */
5782 function () {
5783 this.getItNow.emit();
5784 };
5785 VaPackageDetailsComponent.decorators = [
5786 { type: Component, args: [{
5787 selector: 'va-package-details',
5788 template: "<div *ngIf=\"pkg$ | async as pkg\" class=\"page\">\n <va-header-container [iconUrl]=\"pkg.icon\"\n [title]=\"pkg.name\"\n [tagline]=\"displayTagName$ | async\"\n [prerequisite]=\"productNameForSingleAddon$ | async\"\n [chipLabels]=\"lmiCategories$ | async\"\n [pricing]=\"pkg.pricing\"\n [pricingLabel]=\"'Pricing'\"\n [showAction]=\"showActionButton\"\n [showPricing]=\"showPricing\"\n [actionLabel]=\"actionLabel\"\n [actionEnabled]=true\n (actionSelected)=\"emitGetItNow()\"\n ></va-header-container>\n <ng-container *ngIf=\"pkg?.content\">\n <va-selling-info [description]=\"pkg.content\"></va-selling-info>\n </ng-container>\n\n <va-products-nav [items]=\"orderedItemsList$ | async\"\n [hideItemsNav]=\"pkg?.hide_product_icons_and_names\"\n (itemSelected)=\"selectItem($event)\"></va-products-nav>\n\n <ng-container *ngIf=\"selectedItem$ | async as selectedItem\">\n <div *ngIf=\"!pkg?.hide_product_details\" class=\"package-content\">\n <div class=\"left-column\">\n <section\n *ngIf=\"(selectedItem.endUserMarketing?.description || selectedItem.endUserMarketing?.keySellingPoints) ||\n (selectedItem.description || selectedItem.keySellingPoints)\">\n <va-selling-info [description]=\"selectedItem.endUserMarketing?.description || selectedItem.description\"\n [keySellingPoints]=\"selectedItem.endUserMarketing?.keySellingPoints || selectedItem.keySellingPoints\"></va-selling-info>\n </section>\n\n <section *ngIf=\"(selectedItem.endUserMarketing?.faqs?.length > 0\n && selectedItem.endUserMarketing?.faqs[0].question) || selectedItem.faqs?.length > 0\">\n <h2 class=\"va-component-title\">FAQs</h2>\n <va-faqs [faqs]=\"selectedItem.endUserMarketing?.faqs || selectedItem.faqs\"></va-faqs>\n </section>\n </div>\n\n <div class=\"right-column\">\n <section *ngIf=\"selectedItem.screenshotUrls?.length > 0 || selectedItem.screenshots?.length > 0\">\n <h2 class=\"va-component-title\">Gallery</h2>\n <va-image-gallery [imageUrls]=\"selectedItem.screenshotUrls || selectedItem.screenshots\"></va-image-gallery>\n </section>\n\n <section *ngIf=\"selectedItem.endUserMarketing?.files?.length > 0 || selectedItem.files?.length > 0\">\n <h2 class=\"va-component-title\">Files</h2>\n <va-files [files]=\"selectedItem.endUserMarketingFiles || selectedItem.files\"></va-files>\n </section>\n </div>\n </div>\n </ng-container>\n</div>\n",
5789 styles: [":host{display:block;font-size:14px;line-height:1.4}:host *{box-sizing:border-box}.va-component-title{font-size:24px;font-weight:300;margin-top:0}@media screen and (min-width:600px){.va-component-title{font-size:32px}}img{max-width:100%}va-icon{display:inline-block}.page{position:relative;margin:0 auto 20px;background:#fff;color:#212121;box-shadow:0 3px 10px rgba(33,33,33,.3);overflow:hidden;font-size:16px}.page .item-amount{color:#9e9e9e;font-size:14px;text-align:right;margin:0 24px 8px}section{padding:24px}.left-column{width:66%}@media screen and (max-width:600px){.left-column{width:100%}}.right-column{width:34%}.package-content{display:-webkit-box;display:flex}@media screen and (max-width:600px){.right-column{width:100%}.package-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}"]
5790 }] }
5791 ];
5792 /** @nocollapse */
5793 VaPackageDetailsComponent.ctorParameters = function () { return []; };
5794 VaPackageDetailsComponent.propDecorators = {
5795 showActionButton: [{ type: Input }],
5796 showPricing: [{ type: Input }],
5797 actionLabel: [{ type: Input }],
5798 getItNow: [{ type: Output }],
5799 standAloneProducts: [{ type: Input }],
5800 products: [{ type: Input }],
5801 addons: [{ type: Input }],
5802 pkg: [{ type: Input }]
5803 };
5804 return VaPackageDetailsComponent;
5805}());
5806if (false) {
5807 /** @type {?} */
5808 VaPackageDetailsComponent.prototype.showActionButton;
5809 /** @type {?} */
5810 VaPackageDetailsComponent.prototype.showPricing;
5811 /** @type {?} */
5812 VaPackageDetailsComponent.prototype.actionLabel;
5813 /** @type {?} */
5814 VaPackageDetailsComponent.prototype.getItNow;
5815 /** @type {?} */
5816 VaPackageDetailsComponent.prototype.standAloneProducts$$;
5817 /** @type {?} */
5818 VaPackageDetailsComponent.prototype.products$;
5819 /** @type {?} */
5820 VaPackageDetailsComponent.prototype.addons$;
5821 /** @type {?} */
5822 VaPackageDetailsComponent.prototype.pkg$;
5823 /** @type {?} */
5824 VaPackageDetailsComponent.prototype.itemSelectedEvent$;
5825 /** @type {?} */
5826 VaPackageDetailsComponent.prototype.selectedItem$;
5827 /** @type {?} */
5828 VaPackageDetailsComponent.prototype.combinedItemsList$;
5829 /** @type {?} */
5830 VaPackageDetailsComponent.prototype.orderedItemsList$;
5831 /** @type {?} */
5832 VaPackageDetailsComponent.prototype.lmiCategories$;
5833 /** @type {?} */
5834 VaPackageDetailsComponent.prototype.productNameForSingleAddon$;
5835 /** @type {?} */
5836 VaPackageDetailsComponent.prototype.displayTagName$;
5837}
5838
5839/**
5840 * @fileoverview added by tsickle
5841 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5842 */
5843var VaProductsNavComponent = /** @class */ (function () {
5844 function VaProductsNavComponent() {
5845 this.itemSelected = new EventEmitter();
5846 this.selectedIndex = 0;
5847 this.pageMarker = 0;
5848 }
5849 /**
5850 * @param {?} index
5851 * @return {?}
5852 */
5853 VaProductsNavComponent.prototype.onItemSelected = /**
5854 * @param {?} index
5855 * @return {?}
5856 */
5857 function (index) {
5858 this.selectedIndex = index;
5859 this.itemSelected.emit(index);
5860 };
5861 /**
5862 * @param {?} slides
5863 * @return {?}
5864 */
5865 VaProductsNavComponent.prototype.moveSlides = /**
5866 * @param {?} slides
5867 * @return {?}
5868 */
5869 function (slides) {
5870 /** @type {?} */
5871 var sliderWidth = Math.round(slides.offsetWidth / slides.children[0].clientWidth);
5872 /** @type {?} */
5873 var numSlides = Math.ceil(slides.children.length / sliderWidth);
5874 if (numSlides === 0) {
5875 return;
5876 }
5877 /** @type {?} */
5878 var pageWidth = slides.offsetWidth;
5879 /** @type {?} */
5880 var move = 0;
5881 if (this.pageMarker === -1) {
5882 this.pageMarker = numSlides - 1; // go to end
5883 move = pageWidth * this.pageMarker;
5884 slides.style.left = "-" + move + "px";
5885 }
5886 else if (this.pageMarker >= numSlides) {
5887 slides.style.left = '0px';
5888 this.pageMarker = 0; // reset
5889 }
5890 else {
5891 move = pageWidth * this.pageMarker;
5892 slides.style.left = "-" + move + "px";
5893 }
5894 };
5895 /**
5896 * @param {?} slides
5897 * @return {?}
5898 */
5899 VaProductsNavComponent.prototype.pageNext = /**
5900 * @param {?} slides
5901 * @return {?}
5902 */
5903 function (slides) {
5904 this.pageMarker++;
5905 this.moveSlides(slides);
5906 };
5907 /**
5908 * @param {?} slides
5909 * @return {?}
5910 */
5911 VaProductsNavComponent.prototype.pagePrev = /**
5912 * @param {?} slides
5913 * @return {?}
5914 */
5915 function (slides) {
5916 this.pageMarker--;
5917 this.moveSlides(slides);
5918 };
5919 VaProductsNavComponent.decorators = [
5920 { type: Component, args: [{
5921 selector: 'va-products-nav',
5922 template: "<p *ngIf=\"items?.length > 1\" class=\"item-amount\">{{ 'FRONTEND.STORE.CONTAINS_NUM_ITEMS' | translate: {itemCount: items.length} }}</p>\n<div class=\"wrapper\">\n <nav *ngIf=\"items && !hideItemsNav\" (swipeleft)=\"pageNext(slides)\" (swiperight)=\"pagePrev(slides)\">\n <div [ngClass]=\"{'hide-arrows': items && items.length < 5}\">\n <span class=\"prev\" (click)=\"pagePrev(slides)\"><mat-icon>keyboard_arrow_left</mat-icon></span>\n <span class=\"next\" (click)=\"pageNext(slides)\"><mat-icon>keyboard_arrow_right</mat-icon></span>\n </div>\n <ul class=\"slides\" #slides>\n <li *ngFor=\"let item of items; index as i;\" (click)=\"onItemSelected(i)\">\n <a [ngClass]=\"{'active': i === selectedIndex}\">\n <span class=\"icon-area\">\n <va-icon [iconUrl]=\"item.icon || item.iconUrl\" [name]=\"item.name || item.title\" [diameter]=\"80\"></va-icon>\n <va-icon *ngIf=\"item.addonId\" class=\"addon-indicator\" [iconUrl]=\"item.productIcon\" [name]=\"item.productName\" [diameter]=\"24\"></va-icon>\n </span>\n <p>{{ item.name || item.title }}</p>\n <div *ngIf=\"item.addonId\">\n <span class=\"requires-text\">{{ 'FRONTEND.STORE.REQUIRES' | translate }}</span>\n <span>{{item.productName}}</span>\n </div>\n </a>\n </li>\n </ul>\n </nav>\n</div>\n",
5923 styles: ["nav{position:relative;width:350px;margin:0 auto;background:#fff;border:1px solid #e0e0e0;border-width:1px 0;overflow:hidden}nav ul{display:-webkit-box;display:flex;flex-wrap:nowrap;list-style:none;margin:0 50px;padding:0;position:relative;left:0;-webkit-transition:left .3s;transition:left .3s;word-break:break-word}nav li{min-width:100%;-webkit-box-flex:1;flex:1 0 25%;text-align:center;font-size:14px}nav li:first-child a{border-right:1px solid #e0e0e0}nav a{position:relative;display:block;height:100%;padding:20px;text-decoration:none;color:#212121;-webkit-transition:background .3s;transition:background .3s;-webkit-box-align:center;align-items:center;border-right:1px solid #e0e0e0;cursor:pointer}nav a:hover{background-color:rgba(255,255,255,.6)}nav a.active{background-color:#fff}nav a.active:after{content:'';display:block;position:absolute;bottom:-1px;left:0;width:100%;height:1px;background-color:#fff}nav p{margin-bottom:0}nav .icon img{width:80px;min-width:80px;height:80px}nav .next,nav .prev{position:absolute;height:100%;width:50px;top:0;background:rgba(33,33,33,.1);cursor:pointer;text-align:center;opacity:1;-webkit-transition:opacity .3s;transition:opacity .3s;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;z-index:1}nav .next:not(.disabled):hover,nav .prev:not(.disabled):hover{background:rgba(33,33,33,.3)}nav .prev{left:0}nav .next{right:0}nav .disabled{cursor:default;opacity:0}@media screen and (min-width:600px){nav{width:auto;overflow:initial}nav li{min-width:0;width:25%;-webkit-box-flex:0;flex-grow:0}nav .hide-arrows{display:none}nav .hide-arrows+.slides{margin:0}}va-icon{display:inline-block}.item-amount{color:#9e9e9e;font-size:14px;text-align:right;margin:0 24px 8px}.wrapper{overflow:hidden}.requires-text{color:#9e9e9e}.icon-area{position:relative;display:inline-block}.addon-indicator{position:absolute;border:2px solid #fff;border-radius:50%;bottom:-2px;right:-2px}"]
5924 }] }
5925 ];
5926 VaProductsNavComponent.propDecorators = {
5927 items: [{ type: Input }],
5928 hideItemsNav: [{ type: Input }],
5929 itemSelected: [{ type: Output }]
5930 };
5931 return VaProductsNavComponent;
5932}());
5933if (false) {
5934 /** @type {?} */
5935 VaProductsNavComponent.prototype.items;
5936 /** @type {?} */
5937 VaProductsNavComponent.prototype.hideItemsNav;
5938 /** @type {?} */
5939 VaProductsNavComponent.prototype.itemSelected;
5940 /** @type {?} */
5941 VaProductsNavComponent.prototype.selectedIndex;
5942 /** @type {?} */
5943 VaProductsNavComponent.prototype.pageMarker;
5944}
5945
5946/**
5947 * @fileoverview added by tsickle
5948 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5949 */
5950var ProductsNavV2Component = /** @class */ (function () {
5951 function ProductsNavV2Component() {
5952 this.itemSelected = new EventEmitter();
5953 this.selected_id = '';
5954 this.pageMarker = 0;
5955 }
5956 /**
5957 * @param {?} id
5958 * @return {?}
5959 */
5960 ProductsNavV2Component.prototype.onItemSelected = /**
5961 * @param {?} id
5962 * @return {?}
5963 */
5964 function (id) {
5965 this.selected_id = id;
5966 this.itemSelected.emit(id);
5967 };
5968 /**
5969 * @param {?} slides
5970 * @return {?}
5971 */
5972 ProductsNavV2Component.prototype.moveSlides = /**
5973 * @param {?} slides
5974 * @return {?}
5975 */
5976 function (slides) {
5977 /** @type {?} */
5978 var sliderWidth = Math.round(slides.offsetWidth / slides.children[0].clientWidth);
5979 /** @type {?} */
5980 var numSlides = Math.ceil(slides.children.length / sliderWidth);
5981 if (numSlides === 0) {
5982 return;
5983 }
5984 /** @type {?} */
5985 var pageWidth = slides.offsetWidth;
5986 /** @type {?} */
5987 var move = 0;
5988 if (this.pageMarker === -1) {
5989 this.pageMarker = numSlides - 1; // go to end
5990 move = pageWidth * this.pageMarker;
5991 slides.style.left = "-" + move + "px";
5992 }
5993 else if (this.pageMarker >= numSlides) {
5994 slides.style.left = '0px';
5995 this.pageMarker = 0; // reset
5996 }
5997 else {
5998 move = pageWidth * this.pageMarker;
5999 slides.style.left = "-" + move + "px";
6000 }
6001 };
6002 /**
6003 * @param {?} slides
6004 * @return {?}
6005 */
6006 ProductsNavV2Component.prototype.pageNext = /**
6007 * @param {?} slides
6008 * @return {?}
6009 */
6010 function (slides) {
6011 this.pageMarker++;
6012 this.moveSlides(slides);
6013 };
6014 /**
6015 * @param {?} slides
6016 * @return {?}
6017 */
6018 ProductsNavV2Component.prototype.pagePrev = /**
6019 * @param {?} slides
6020 * @return {?}
6021 */
6022 function (slides) {
6023 this.pageMarker--;
6024 this.moveSlides(slides);
6025 };
6026 ProductsNavV2Component.decorators = [
6027 { type: Component, args: [{
6028 selector: 'va-products-nav-v2',
6029 template: "<p *ngIf=\"items?.length > 1\" class=\"item-amount\">{{ 'FRONTEND.STORE.CONTAINS_NUM_ITEMS' | translate: {itemCount: items.length} }}</p>\n<div class=\"wrapper\">\n <nav *ngIf=\"items && !hideItemsNav\" (swipeleft)=\"pageNext(slides)\" (swiperight)=\"pagePrev(slides)\">\n <div [ngClass]=\"{'hide-arrows': items && items.length < 5}\">\n <span class=\"prev\" (click)=\"pagePrev(slides)\"><mat-icon>keyboard_arrow_left</mat-icon></span>\n <span class=\"next\" (click)=\"pageNext(slides)\"><mat-icon>keyboard_arrow_right</mat-icon></span>\n </div>\n <ul class=\"slides\" #slides>\n <li *ngFor=\"let lineItem of items;\" (click)=\"onItemSelected(lineItem?.item?.id)\">\n <a [ngClass]=\"{'active': lineItem?.item?.id === selected_id}\">\n <span class=\"icon-area\">\n <va-icon [iconUrl]=\"lineItem?.item?.icon\" [name]=\"lineItem?.item?.name\" [diameter]=\"80\"></va-icon>\n <va-icon *ngIf=\"lineItem?.parent?.id\" class=\"addon-indicator\" [iconUrl]=\"lineItem?.parent?.icon\" [name]=\"lineItem?.parent?.name\"\n [diameter]=\"24\"></va-icon>\n </span>\n <div class=\"name-container\">\n <div>{{ lineItem?.item?.name }}</div>\n <div *ngIf=\"lineItem?.item?.editionName\" class=\"edition-name\">{{ lineItem.item.editionName }}</div>\n </div>\n <div *ngIf=\"lineItem?.parent?.id\">\n <span class=\"requires-text\">{{ 'FRONTEND.STORE.REQUIRES' | translate }} </span>\n <span>{{lineItem?.parent.name}}</span>\n </div>\n </a>\n </li>\n </ul>\n </nav>\n</div>\n",
6030 styles: [".name-container{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.name-container va-badge{margin-top:12px;margin-left:6px}nav{position:relative;width:350px;margin:0 auto;background:#fff;border:1px solid #e0e0e0;border-width:1px 0;overflow:hidden}nav ul{display:-webkit-box;display:flex;flex-wrap:nowrap;list-style:none;margin:0 50px;padding:0;position:relative;left:0;-webkit-transition:left .3s;transition:left .3s;word-break:break-word}nav li{min-width:100%;-webkit-box-flex:1;flex:1 0 25%;text-align:center;font-size:14px}nav li:first-child a{border-right:1px solid #e0e0e0}nav a{position:relative;display:block;height:100%;padding:20px;text-decoration:none;color:#212121;-webkit-transition:background .3s;transition:background .3s;-webkit-box-align:center;align-items:center;border-right:1px solid #e0e0e0;cursor:pointer}nav a:hover{background-color:rgba(255,255,255,.6)}nav a.active{background-color:#fff}nav a.active:after{content:'';display:block;position:absolute;bottom:-1px;left:0;width:100%;height:1px;background-color:#fff}nav p{margin-bottom:0}nav .icon img{width:80px;min-width:80px;height:80px}nav .next,nav .prev{position:absolute;height:100%;width:50px;top:0;background:rgba(33,33,33,.1);cursor:pointer;text-align:center;opacity:1;-webkit-transition:opacity .3s;transition:opacity .3s;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;z-index:1}nav .next:not(.disabled):hover,nav .prev:not(.disabled):hover{background:rgba(33,33,33,.3)}nav .prev{left:0}nav .next{right:0}nav .disabled{cursor:default;opacity:0}@media screen and (min-width:600px){nav{width:auto;overflow:initial}nav li{min-width:0;width:25%;-webkit-box-flex:0;flex-grow:0}nav .hide-arrows{display:none}nav .hide-arrows+.slides{margin:0}}va-icon{display:inline-block}.item-amount{color:#9e9e9e;font-size:14px;text-align:right;margin:0 24px 8px}.wrapper{overflow:hidden}.requires-text{color:#9e9e9e}.icon-area{position:relative;display:inline-block}.addon-indicator{position:absolute;border:2px solid #fff;border-radius:50%;bottom:-2px;right:-2px}.edition-name{color:#9e9e9e;font-style:italic;text-align:center;width:100%;font-size:16px;margin-bottom:4px}"]
6031 }] }
6032 ];
6033 ProductsNavV2Component.propDecorators = {
6034 items: [{ type: Input }],
6035 hideItemsNav: [{ type: Input }],
6036 itemSelected: [{ type: Output }]
6037 };
6038 return ProductsNavV2Component;
6039}());
6040if (false) {
6041 /** @type {?} */
6042 ProductsNavV2Component.prototype.items;
6043 /** @type {?} */
6044 ProductsNavV2Component.prototype.hideItemsNav;
6045 /** @type {?} */
6046 ProductsNavV2Component.prototype.itemSelected;
6047 /** @type {?} */
6048 ProductsNavV2Component.prototype.selected_id;
6049 /** @type {?} */
6050 ProductsNavV2Component.prototype.pageMarker;
6051}
6052
6053/**
6054 * @fileoverview added by tsickle
6055 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6056 */
6057var VaProductsNavModule = /** @class */ (function () {
6058 function VaProductsNavModule(translateService, currentLang$, defaultLang$) {
6059 this.translateService = translateService;
6060 if (!this.translateService.translations.hasOwnProperty('en')) {
6061 this.translateService.reloadLang('en');
6062 }
6063 if (!this.translateService.translations.hasOwnProperty('cs')) {
6064 this.translateService.reloadLang('cs');
6065 }
6066 this.translateService.setTranslation('en', En.en, true);
6067 this.translateService.setTranslation('cs', Cs.cs, true);
6068 if (currentLang$) {
6069 currentLang$.subscribe((/**
6070 * @param {?} currentLang
6071 * @return {?}
6072 */
6073 function (currentLang) { return translateService.use(currentLang); }));
6074 }
6075 if (defaultLang$) {
6076 defaultLang$.subscribe((/**
6077 * @param {?} defaultLang
6078 * @return {?}
6079 */
6080 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
6081 }
6082 }
6083 VaProductsNavModule.decorators = [
6084 { type: NgModule, args: [{
6085 imports: [
6086 CommonModule,
6087 MatIconModule,
6088 VaIconModule,
6089 VaBadgeModule,
6090 TranslateModule.forChild()
6091 ],
6092 declarations: [VaProductsNavComponent, ProductsNavV2Component],
6093 exports: [VaProductsNavComponent, ProductsNavV2Component]
6094 },] }
6095 ];
6096 /** @nocollapse */
6097 VaProductsNavModule.ctorParameters = function () { return [
6098 { type: TranslateService },
6099 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
6100 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
6101 ]; };
6102 return VaProductsNavModule;
6103}());
6104if (false) {
6105 /**
6106 * @type {?}
6107 * @private
6108 */
6109 VaProductsNavModule.prototype.translateService;
6110}
6111
6112/**
6113 * @fileoverview added by tsickle
6114 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6115 */
6116var VaPackageDetailsModule = /** @class */ (function () {
6117 function VaPackageDetailsModule() {
6118 }
6119 VaPackageDetailsModule.decorators = [
6120 { type: NgModule, args: [{
6121 imports: [
6122 VaImageGalleryModule, CommonModule, MatIconModule, VaSafeHtmlModule, VaIconModule,
6123 VaPricingModule, MatButtonModule, VaFilesModule, VaFaqsModule, VaSellingInfoModule,
6124 VaHeaderContainerModule, VaAddonListModule, VaProductsNavModule
6125 ],
6126 declarations: [VaPackageDetailsComponent],
6127 exports: [VaPackageDetailsComponent],
6128 entryComponents: [VaPackageDetailsComponent]
6129 },] }
6130 ];
6131 return VaPackageDetailsModule;
6132}());
6133
6134/**
6135 * @fileoverview added by tsickle
6136 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6137 */
6138var PackageDetails = /** @class */ (function () {
6139 function PackageDetails() {
6140 }
6141 Object.defineProperty(PackageDetails.prototype, "isPackageFree", {
6142 get: /**
6143 * @return {?}
6144 */
6145 function () {
6146 /** @type {?} */
6147 var isFreeHelper = (/**
6148 * @param {?} prices
6149 * @return {?}
6150 */
6151 function (prices) {
6152 return prices ? prices.some((/**
6153 * @param {?} p
6154 * @return {?}
6155 */
6156 function (p) { return p.price === 0 || p.price === undefined; })) : false;
6157 });
6158 return this.pricing && isFreeHelper(this.pricing.prices);
6159 },
6160 enumerable: true,
6161 configurable: true
6162 });
6163 return PackageDetails;
6164}());
6165if (false) {
6166 /** @type {?} */
6167 PackageDetails.prototype.solution_id;
6168 /** @type {?} */
6169 PackageDetails.prototype.partner_id;
6170 /** @type {?} */
6171 PackageDetails.prototype.market_id;
6172 /** @type {?} */
6173 PackageDetails.prototype.name;
6174 /** @type {?} */
6175 PackageDetails.prototype.icon;
6176 /** @type {?} */
6177 PackageDetails.prototype.status;
6178 /** @type {?} */
6179 PackageDetails.prototype.tagline;
6180 /** @type {?} */
6181 PackageDetails.prototype.header_image_url;
6182 /** @type {?} */
6183 PackageDetails.prototype.content;
6184 /** @type {?} */
6185 PackageDetails.prototype.hide_product_icons_and_names;
6186 /** @type {?} */
6187 PackageDetails.prototype.hide_product_details;
6188 /** @type {?} */
6189 PackageDetails.prototype.createdDate;
6190 /** @type {?} */
6191 PackageDetails.prototype.updatedDate;
6192 /** @type {?} */
6193 PackageDetails.prototype.pricing;
6194 /** @type {?} */
6195 PackageDetails.prototype.line_items;
6196 /** @type {?} */
6197 PackageDetails.prototype.market_action;
6198}
6199/**
6200 * @param {?} data
6201 * @param {?} products
6202 * @return {?}
6203 */
6204function convertToPackageDetails(data, products) {
6205 if (!data) {
6206 return undefined;
6207 }
6208 /** @type {?} */
6209 var newPackage = new PackageDetails();
6210 if (!data.pricing) {
6211 data.pricing = Pricing$1.fromProto({
6212 currency: undefined,
6213 prices: [{
6214 price: 0,
6215 frequency: undefined,
6216 isStartingPrice: false,
6217 }]
6218 });
6219 }
6220 Object.assign(newPackage, data);
6221 if (!newPackage.name) {
6222 newPackage.name = 'Untitled';
6223 }
6224 if (data.created) {
6225 newPackage.createdDate = new Date(data.created);
6226 }
6227 if (data.updated) {
6228 newPackage.updatedDate = new Date(data.updated);
6229 }
6230 if (data.lineItems) {
6231 newPackage.line_items = convertProtoLineItemsToStoreLineItems(data.lineItems, products);
6232 }
6233 if (typeof data.pricing.currency === 'number') {
6234 newPackage.pricing.currency = Currency[data.pricing.currency];
6235 }
6236 return newPackage;
6237}
6238/**
6239 * @param {?} protoLineItems
6240 * @param {?} products
6241 * @return {?}
6242 */
6243function convertProtoLineItemsToStoreLineItems(protoLineItems, products) {
6244 if (!protoLineItems || !protoLineItems.lineItems || protoLineItems.lineItems.length === 0 || !products || products.length === 0) {
6245 return [];
6246 }
6247 return protoLineItems.lineItems.map((/**
6248 * @param {?} lineItem
6249 * @return {?}
6250 */
6251 function (lineItem) {
6252 /** @type {?} */
6253 var product = products.find((/**
6254 * @param {?} p
6255 * @return {?}
6256 */
6257 function (p) { return p.productId === lineItem.id; }));
6258 /** @type {?} */
6259 var parent;
6260 if (!!lineItem.parentId) {
6261 parent = products.find((/**
6262 * @param {?} p
6263 * @return {?}
6264 */
6265 function (p) { return p.productId === lineItem.parentId; }));
6266 }
6267 return convertProtoLineItemToStoreLineItem(lineItem, product, parent);
6268 }));
6269}
6270/**
6271 * @param {?} protoLineItem
6272 * @param {?} product
6273 * @param {?=} parentProduct
6274 * @return {?}
6275 */
6276function convertProtoLineItemToStoreLineItem(protoLineItem, product, parentProduct) {
6277 if (!product || !protoLineItem) {
6278 return undefined;
6279 }
6280 /** @type {?} */
6281 var files = [];
6282 if (product.pdfUploadUrls && product.pdfUploadUrls.length > 0) {
6283 files = product.pdfUploadUrls.map((/**
6284 * @param {?} url
6285 * @return {?}
6286 */
6287 function (url) { return new File(url); }));
6288 }
6289 /** @type {?} */
6290 var lineItem = (/** @type {?} */ ({
6291 item: {
6292 id: protoLineItem.id,
6293 editionId: protoLineItem.editionId,
6294 icon: product.iconUrl,
6295 name: product.name,
6296 editionName: '',
6297 description: product.description,
6298 keySellingPoints: product.keySellingPoints,
6299 faqs: product.faqs,
6300 files: files,
6301 screenshotUrls: product.screenshotUrls,
6302 lmiCategories: [],
6303 },
6304 quantity: protoLineItem.quantity,
6305 parent: {}
6306 }));
6307 if (protoLineItem.parentId && parentProduct) {
6308 lineItem.parent = {
6309 id: protoLineItem.parentId,
6310 editionId: '',
6311 icon: parentProduct.iconUrl,
6312 name: parentProduct.name,
6313 editionName: '',
6314 };
6315 }
6316 return lineItem;
6317}
6318
6319/**
6320 * @fileoverview added by tsickle
6321 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6322 */
6323var VaPackageDetailsV2Component = /** @class */ (function () {
6324 function VaPackageDetailsV2Component(translateService, currentLang$) {
6325 var _this = this;
6326 this.translateService = translateService;
6327 this.showActionButton = true;
6328 this.showPricing = true;
6329 this.actionLabel = 'FRONTEND.STORE.GET_IT_NOW';
6330 this.getItNow = new EventEmitter();
6331 this.pkg$$ = new ReplaySubject(1);
6332 this.itemSelectedEvent$$ = new BehaviorSubject('');
6333 if (!this.translateService.translations.hasOwnProperty('en')) {
6334 this.translateService.reloadLang('en');
6335 }
6336 if (!this.translateService.translations.hasOwnProperty('cs')) {
6337 this.translateService.reloadLang('cs');
6338 }
6339 this.translateService.setTranslation('en', En.en, true);
6340 this.translateService.setTranslation('cs', Cs.cs, true);
6341 if (currentLang$) {
6342 currentLang$.subscribe((/**
6343 * @param {?} currentLang
6344 * @return {?}
6345 */
6346 function (currentLang) { return _this.translateService.use(currentLang); }));
6347 }
6348 this.orderedLineItems$ = this.pkg$$.pipe(map((/**
6349 * @param {?} pkg
6350 * @return {?}
6351 */
6352 function (pkg) { return pkg.line_items; })), filter((/**
6353 * @param {?} items
6354 * @return {?}
6355 */
6356 function (items) { return !!items || items.length === 0; })), shareReplay(1));
6357 this.productNameForSingleAddon$ = this.orderedLineItems$.pipe(map((/**
6358 * @param {?} items
6359 * @return {?}
6360 */
6361 function (items) { return _this.getParentsNameForItem(items); })));
6362 this.selectedItem$ = combineLatest([this.itemSelectedEvent$$, this.orderedLineItems$]).pipe(map((/**
6363 * @param {?} __0
6364 * @return {?}
6365 */
6366 function (_a) {
6367 var _b = __read(_a, 2), id = _b[0], lineItems = _b[1];
6368 return lineItems.find((/**
6369 * @param {?} lineItem
6370 * @return {?}
6371 */
6372 function (lineItem) { return lineItem.item.id === id; }));
6373 })));
6374 this.lmiCategories$ = this.orderedLineItems$.pipe(map((/**
6375 * @param {?} lis
6376 * @return {?}
6377 */
6378 function (lis) {
6379 /** @type {?} */
6380 var lmiMap = (lis || []).reduce((/**
6381 * @param {?} prev
6382 * @param {?} li
6383 * @return {?}
6384 */
6385 function (prev, li) {
6386 if (li && li.item) {
6387 (li.item.lmiCategories || []).forEach((/**
6388 * @param {?} lmi
6389 * @return {?}
6390 */
6391 function (lmi) { return prev.set(lmi, lmi); }));
6392 }
6393 return prev;
6394 }), new Map());
6395 /** @type {?} */
6396 var lmiCats = [];
6397 lmiMap.forEach((/**
6398 * @param {?} v
6399 * @param {?} k
6400 * @return {?}
6401 */
6402 function (v, k) {
6403 lmiCats.push(k);
6404 }));
6405 return lmiCats;
6406 })));
6407 // Set the initial selected Item
6408 this.orderedLineItems$.pipe(map((/**
6409 * @param {?} lineItems
6410 * @return {?}
6411 */
6412 function (lineItems) { return lineItems[0]; })), tap((/**
6413 * @param {?} lineItem
6414 * @return {?}
6415 */
6416 function (lineItem) { return _this.selectItem(lineItem && lineItem.item ? lineItem.item.id : ''); })), take(1)).subscribe();
6417 }
6418 Object.defineProperty(VaPackageDetailsV2Component.prototype, "pkg", {
6419 set: /**
6420 * @param {?} pkg
6421 * @return {?}
6422 */
6423 function (pkg) {
6424 this.pkg$$.next(pkg);
6425 },
6426 enumerable: true,
6427 configurable: true
6428 });
6429 /**
6430 * @param {?} id
6431 * @return {?}
6432 */
6433 VaPackageDetailsV2Component.prototype.selectItem = /**
6434 * @param {?} id
6435 * @return {?}
6436 */
6437 function (id) {
6438 this.itemSelectedEvent$$.next(id);
6439 };
6440 /**
6441 * @return {?}
6442 */
6443 VaPackageDetailsV2Component.prototype.emitGetItNow = /**
6444 * @return {?}
6445 */
6446 function () {
6447 this.getItNow.emit();
6448 };
6449 /**
6450 * @param {?} items
6451 * @return {?}
6452 */
6453 VaPackageDetailsV2Component.prototype.getParentsNameForItem = /**
6454 * @param {?} items
6455 * @return {?}
6456 */
6457 function (items) {
6458 if (items && items.length === 1 && items[0]) {
6459 return items[0].parent.name;
6460 }
6461 };
6462 VaPackageDetailsV2Component.decorators = [
6463 { type: Component, args: [{
6464 selector: 'va-package-details-v2',
6465 template: "<div *ngIf=\"pkg$$ | async as pkg\" class=\"page\">\n <va-header-container [iconUrl]=\"pkg.icon\"\n [title]=\"pkg.name\"\n [tagline]=\"pkg.tagline\"\n [prerequisite]=\"productNameForSingleAddon$ | async\"\n [chipLabels]=\"lmiCategories$ | async\"\n [pricing]=\"pkg.pricing\"\n [pricingLabel]=\"'FRONTEND.STORE.PRICING' | translate\"\n [showAction]=\"showActionButton\"\n [showPricing]=\"showPricing\"\n [actionLabel]=\"actionLabel | translate\"\n [actionEnabled]=true\n (actionSelected)=\"emitGetItNow()\"\n ></va-header-container>\n\n <ng-container *ngIf=\"pkg?.content\">\n <va-selling-info [description]=\"pkg.content\"></va-selling-info>\n </ng-container>\n\n <va-products-nav-v2 [items]=\"orderedLineItems$ | async\"\n [hideItemsNav]=\"pkg?.hide_product_icons_and_names\"\n (itemSelected)=\"selectItem($event)\"></va-products-nav-v2>\n\n <ng-container *ngIf=\"selectedItem$ | async as selectedItem\">\n <div *ngIf=\"!pkg?.hide_product_details\" class=\"package-content\">\n <div class=\"left-column\">\n <section *ngIf=\"selectedItem?.item?.description || selectedItem?.item?.keySellingPoints\">\n <va-selling-info [description]=\"selectedItem?.item?.description\"\n [keySellingPoints]=\"selectedItem?.item?.keySellingPoints\"></va-selling-info>\n </section>\n\n <section *ngIf=\"selectedItem?.item?.faqs?.length > 0 && selectedItem?.item?.faqs[0].question\">\n <h2 class=\"va-component-title\">{{ 'FRONTEND.STORE.FAQS' | translate }}</h2>\n <va-faqs [faqs]=\"selectedItem.item.faqs\"></va-faqs>\n </section>\n </div>\n\n <div class=\"right-column\">\n <section *ngIf=\"selectedItem?.item?.screenshotUrls?.length > 0\">\n <h2 class=\"va-component-title\">{{ 'FRONTEND.STORE.GALLERY' | translate }}</h2>\n <va-image-gallery [imageUrls]=\"selectedItem.item.screenshotUrls\"></va-image-gallery>\n </section>\n\n <section *ngIf=\"selectedItem?.item?.files?.length > 0\">\n <h2 class=\"va-component-title\">{{ 'FRONTEND.STORE.FILES' | translate }}</h2>\n <va-files [files]=\"selectedItem.item.files\"></va-files>\n </section>\n </div>\n </div>\n </ng-container>\n</div>\n",
6466 styles: [":host{display:block;font-size:14px;line-height:1.4}:host *{box-sizing:border-box}.va-component-title{font-size:24px;font-weight:300;margin-top:0}@media screen and (min-width:600px){.va-component-title{font-size:32px}}img{max-width:100%}va-icon{display:inline-block}.page{position:relative;margin:0 auto 20px;background:#fff;color:#212121;box-shadow:0 3px 10px rgba(33,33,33,.3);overflow:hidden;font-size:16px}.page .item-amount{color:#9e9e9e;font-size:14px;text-align:right;margin:0 24px 8px}section{padding:24px}.left-column{width:66%}@media screen and (max-width:600px){.left-column{width:100%}}.right-column{width:34%}.package-content{display:-webkit-box;display:flex}@media screen and (max-width:600px){.right-column{width:100%}.package-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}"]
6467 }] }
6468 ];
6469 /** @nocollapse */
6470 VaPackageDetailsV2Component.ctorParameters = function () { return [
6471 { type: TranslateService },
6472 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] }
6473 ]; };
6474 VaPackageDetailsV2Component.propDecorators = {
6475 showActionButton: [{ type: Input }],
6476 showPricing: [{ type: Input }],
6477 actionLabel: [{ type: Input }],
6478 pkg: [{ type: Input }],
6479 getItNow: [{ type: Output }]
6480 };
6481 return VaPackageDetailsV2Component;
6482}());
6483if (false) {
6484 /** @type {?} */
6485 VaPackageDetailsV2Component.prototype.showActionButton;
6486 /** @type {?} */
6487 VaPackageDetailsV2Component.prototype.showPricing;
6488 /** @type {?} */
6489 VaPackageDetailsV2Component.prototype.actionLabel;
6490 /** @type {?} */
6491 VaPackageDetailsV2Component.prototype.getItNow;
6492 /** @type {?} */
6493 VaPackageDetailsV2Component.prototype.pkg$$;
6494 /** @type {?} */
6495 VaPackageDetailsV2Component.prototype.itemSelectedEvent$$;
6496 /** @type {?} */
6497 VaPackageDetailsV2Component.prototype.selectedItem$;
6498 /** @type {?} */
6499 VaPackageDetailsV2Component.prototype.orderedLineItems$;
6500 /** @type {?} */
6501 VaPackageDetailsV2Component.prototype.productNameForSingleAddon$;
6502 /** @type {?} */
6503 VaPackageDetailsV2Component.prototype.lmiCategories$;
6504 /**
6505 * @type {?}
6506 * @private
6507 */
6508 VaPackageDetailsV2Component.prototype.translateService;
6509}
6510
6511/**
6512 * @fileoverview added by tsickle
6513 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6514 */
6515var VaPackageDetailsV2Module = /** @class */ (function () {
6516 function VaPackageDetailsV2Module(translateService, currentLang$, defaultLang$) {
6517 this.translateService = translateService;
6518 if (!this.translateService.translations.hasOwnProperty('en')) {
6519 this.translateService.reloadLang('en');
6520 }
6521 if (!this.translateService.translations.hasOwnProperty('cs')) {
6522 this.translateService.reloadLang('cs');
6523 }
6524 this.translateService.setTranslation('en', En.en, true);
6525 this.translateService.setTranslation('cs', Cs.cs, true);
6526 if (currentLang$) {
6527 currentLang$.subscribe((/**
6528 * @param {?} currentLang
6529 * @return {?}
6530 */
6531 function (currentLang) { return translateService.use(currentLang); }));
6532 }
6533 if (defaultLang$) {
6534 defaultLang$.subscribe((/**
6535 * @param {?} defaultLang
6536 * @return {?}
6537 */
6538 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
6539 }
6540 }
6541 VaPackageDetailsV2Module.decorators = [
6542 { type: NgModule, args: [{
6543 imports: [
6544 VaImageGalleryModule,
6545 CommonModule,
6546 MatIconModule,
6547 VaSafeHtmlModule,
6548 VaIconModule,
6549 VaPricingModule,
6550 MatButtonModule,
6551 VaFilesModule,
6552 VaFaqsModule,
6553 VaSellingInfoModule,
6554 VaHeaderContainerModule,
6555 VaAddonListModule,
6556 VaProductsNavModule,
6557 TranslateModule.forChild()
6558 ],
6559 declarations: [VaPackageDetailsV2Component],
6560 exports: [VaPackageDetailsV2Component],
6561 entryComponents: [VaPackageDetailsV2Component]
6562 },] }
6563 ];
6564 /** @nocollapse */
6565 VaPackageDetailsV2Module.ctorParameters = function () { return [
6566 { type: TranslateService },
6567 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
6568 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
6569 ]; };
6570 return VaPackageDetailsV2Module;
6571}());
6572if (false) {
6573 /**
6574 * @type {?}
6575 * @private
6576 */
6577 VaPackageDetailsV2Module.prototype.translateService;
6578}
6579
6580/**
6581 * @fileoverview added by tsickle
6582 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6583 */
6584/**
6585 * @record
6586 */
6587function SalesPackage() { }
6588if (false) {
6589 /** @type {?} */
6590 SalesPackage.prototype.formattedPrices;
6591 /** @type {?} */
6592 SalesPackage.prototype.packageId;
6593 /** @type {?} */
6594 SalesPackage.prototype.name;
6595 /** @type {?} */
6596 SalesPackage.prototype.icon;
6597 /** @type {?} */
6598 SalesPackage.prototype.productIds;
6599 /** @type {?} */
6600 SalesPackage.prototype.products;
6601 /** @type {?} */
6602 SalesPackage.prototype.addonsWithNoParent;
6603 /** @type {?} */
6604 SalesPackage.prototype.totalAddons;
6605 /** @type {?|undefined} */
6606 SalesPackage.prototype.activationStatus;
6607}
6608/**
6609 * @record
6610 */
6611function SalesProduct() { }
6612if (false) {
6613 /** @type {?} */
6614 SalesProduct.prototype.formattedPrices;
6615 /** @type {?} */
6616 SalesProduct.prototype.productId;
6617 /** @type {?} */
6618 SalesProduct.prototype.name;
6619 /** @type {?} */
6620 SalesProduct.prototype.icon;
6621 /** @type {?} */
6622 SalesProduct.prototype.tagline;
6623 /** @type {?|undefined} */
6624 SalesProduct.prototype.activationStatus;
6625 /** @type {?|undefined} */
6626 SalesProduct.prototype.editionId;
6627 /** @type {?|undefined} */
6628 SalesProduct.prototype.editionName;
6629 /** @type {?} */
6630 SalesProduct.prototype.addons;
6631 /** @type {?|undefined} */
6632 SalesProduct.prototype.parentInfo;
6633}
6634/**
6635 * @record
6636 */
6637function ProductParentInfo() { }
6638if (false) {
6639 /** @type {?} */
6640 ProductParentInfo.prototype.parentId;
6641 /** @type {?} */
6642 ProductParentInfo.prototype.parentName;
6643 /** @type {?} */
6644 ProductParentInfo.prototype.parentIconUrl;
6645 /** @type {?} */
6646 ProductParentInfo.prototype.multipleActivations;
6647}
6648/**
6649 * @record
6650 */
6651function SalesAddon() { }
6652if (false) {
6653 /** @type {?} */
6654 SalesAddon.prototype.parentId;
6655 /** @type {?} */
6656 SalesAddon.prototype.addonId;
6657 /** @type {?} */
6658 SalesAddon.prototype.name;
6659 /** @type {?} */
6660 SalesAddon.prototype.icon;
6661 /** @type {?} */
6662 SalesAddon.prototype.tagline;
6663 /** @type {?} */
6664 SalesAddon.prototype.parentName;
6665 /** @type {?} */
6666 SalesAddon.prototype.parentIcon;
6667 /** @type {?} */
6668 SalesAddon.prototype.multipleActivations;
6669 /** @type {?|undefined} */
6670 SalesAddon.prototype.activationStatus;
6671}
6672/**
6673 * @record
6674 */
6675function PackageItemActivationStatus() { }
6676if (false) {
6677 /** @type {?} */
6678 PackageItemActivationStatus.prototype.packageItemId;
6679 /** @type {?} */
6680 PackageItemActivationStatus.prototype.status;
6681}
6682/** @enum {number} */
6683var ActivationStatus = {
6684 SUCCESS: 0,
6685 WARNING: 1,
6686 ERROR: 2,
6687};
6688ActivationStatus[ActivationStatus.SUCCESS] = 'SUCCESS';
6689ActivationStatus[ActivationStatus.WARNING] = 'WARNING';
6690ActivationStatus[ActivationStatus.ERROR] = 'ERROR';
6691/**
6692 * @record
6693 */
6694function StatusNotificationItem() { }
6695if (false) {
6696 /** @type {?} */
6697 StatusNotificationItem.prototype.icon;
6698 /** @type {?} */
6699 StatusNotificationItem.prototype.text;
6700 /** @type {?} */
6701 StatusNotificationItem.prototype.status;
6702}
6703/**
6704 * @param {?} packages
6705 * @param {?} products
6706 * @param {?} addons
6707 * @return {?}
6708 */
6709function buildSalesPackages(packages, products, addons) {
6710 if (!packages || packages.length < 1) {
6711 return [];
6712 }
6713 return packages.map((/**
6714 * @param {?} pkg
6715 * @return {?}
6716 */
6717 function (pkg) { return buildSalesPackageFromPackage(pkg, products, addons); }));
6718}
6719/**
6720 * @param {?} pkg
6721 * @param {?} products
6722 * @param {?} addons
6723 * @return {?}
6724 */
6725function buildSalesPackageFromPackage(pkg, products, addons) {
6726 if (!pkg) {
6727 return null;
6728 }
6729 /** @type {?} */
6730 var salesProducts = buildSalesProducts(pkg, products, addons);
6731 // Addons can be in a package even if the parent product is not, this will create salesAddons with no parent
6732 /** @type {?} */
6733 var addonsWithNoParent = buildSalesAddonsWithNoParent(pkg, products, addons);
6734 return createSalesPackage(pkg, salesProducts, addonsWithNoParent);
6735}
6736/**
6737 * @param {?} pkg
6738 * @param {?} products
6739 * @param {?} addons
6740 * @return {?}
6741 */
6742function buildSalesProducts(pkg, products, addons) {
6743 if (!(products && products.length && pkg.products && pkg.products.length)) {
6744 return [];
6745 }
6746 /** @type {?} */
6747 var productMap = new Map();
6748 products.forEach((/**
6749 * @param {?} product
6750 * @return {?}
6751 */
6752 function (product) { return productMap.set(product.productId, product); }));
6753 return pkg.products
6754 .map((/**
6755 * @param {?} productId
6756 * @return {?}
6757 */
6758 function (productId) {
6759 /** @type {?} */
6760 var productMatch = productMap.get(productId);
6761 /** @type {?} */
6762 var addonsInPackage = coerceAddonsForAddonKeys(addons, pkg.addon_keys);
6763 return productMatch ? buildSalesProductFromProduct(productMatch, addonsInPackage) : null;
6764 }))
6765 .filter((/**
6766 * @param {?} productItem
6767 * @return {?}
6768 */
6769 function (productItem) { return productItem; }));
6770}
6771/**
6772 * @param {?} addons
6773 * @param {?} addonKeys
6774 * @return {?}
6775 */
6776function coerceAddonsForAddonKeys(addons, addonKeys) {
6777 if (!addons || addons.length === 0 || !addonKeys || addonKeys.length === 0) {
6778 return [];
6779 }
6780 return addons.reduce((/**
6781 * @param {?} addonsArray
6782 * @param {?} addon
6783 * @return {?}
6784 */
6785 function (addonsArray, addon) {
6786 /** @type {?} */
6787 var key = addonKeys.find((/**
6788 * @param {?} k
6789 * @return {?}
6790 */
6791 function (k) { return k.addonId === addon.addonId; }));
6792 if (key) {
6793 /** @type {?} */
6794 var quantity = key.quantity || 1;
6795 for (var i = 0; i < quantity; i++) {
6796 addonsArray.push(addon);
6797 }
6798 }
6799 return addonsArray;
6800 }), []);
6801}
6802/**
6803 * @param {?} pkg
6804 * @param {?} products
6805 * @param {?} addons
6806 * @return {?}
6807 */
6808function buildSalesAddonsWithNoParent(pkg, products, addons) {
6809 if (!addons || addons.length < 1 || !pkg.addon_keys) {
6810 return [];
6811 }
6812 /** @type {?} */
6813 var productMap = new Map();
6814 products.forEach((/**
6815 * @param {?} product
6816 * @return {?}
6817 */
6818 function (product) { return productMap.set(product.productId, product); }));
6819 /** @type {?} */
6820 var addonsMap = new Map();
6821 addons.forEach((/**
6822 * @param {?} addon
6823 * @return {?}
6824 */
6825 function (addon) { return addonsMap.set(addon.addonId, addon); }));
6826 /** @type {?} */
6827 var addonsWithNoParent = pkg.addon_keys.reduce((/**
6828 * @param {?} addonArray
6829 * @param {?} addonKey
6830 * @return {?}
6831 */
6832 function (addonArray, addonKey) {
6833 if (pkg.products && pkg.products.some((/**
6834 * @param {?} productId
6835 * @return {?}
6836 */
6837 function (productId) { return productId === addonKey.appId; }))) {
6838 return addonArray || [];
6839 }
6840 /** @type {?} */
6841 var parentProduct = productMap.get(addonKey.appId);
6842 /** @type {?} */
6843 var parentName = parentProduct ? parentProduct.name : null;
6844 /** @type {?} */
6845 var parentIcon = parentProduct ? parentProduct.iconUrl : null;
6846 /** @type {?} */
6847 var quantity = addonKey.quantity || 1;
6848 /** @type {?} */
6849 var addon = addonsMap.get(addonKey.addonId);
6850 for (var i = 0; i < quantity; i++) {
6851 addonArray.push(createSalesAddon(addon, parentName, parentIcon));
6852 }
6853 return addonArray;
6854 }), []);
6855 return addonsWithNoParent;
6856}
6857/**
6858 * @param {?} product
6859 * @param {?} addons
6860 * @return {?}
6861 */
6862function buildSalesProductFromProduct(product, addons) {
6863 if (!product) {
6864 return null;
6865 }
6866 if (!addons || addons.length < 1) {
6867 return createSalesProduct(product, null);
6868 }
6869 /** @type {?} */
6870 var productAddons = addons.filter((/**
6871 * @param {?} addon
6872 * @return {?}
6873 */
6874 function (addon) { return addon.appId === product.productId; }));
6875 /** @type {?} */
6876 var salesAddons = createSalesAddons(productAddons);
6877 return createSalesProduct(product, salesAddons);
6878}
6879/**
6880 * @param {?} pkg
6881 * @param {?} salesProducts
6882 * @param {?} addonsWithNoParent
6883 * @return {?}
6884 */
6885function createSalesPackage(pkg, salesProducts, addonsWithNoParent) {
6886 var e_1, _a;
6887 /** @type {?} */
6888 var totalAddons = 0;
6889 try {
6890 for (var _b = __values(pkg.addon_keys || []), _c = _b.next(); !_c.done; _c = _b.next()) {
6891 var key = _c.value;
6892 totalAddons += key.quantity || 1;
6893 }
6894 }
6895 catch (e_1_1) { e_1 = { error: e_1_1 }; }
6896 finally {
6897 try {
6898 if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
6899 }
6900 finally { if (e_1) throw e_1.error; }
6901 }
6902 return {
6903 formattedPrices: pkg.priceStrings.join(', '),
6904 packageId: pkg.solution_id,
6905 name: pkg.name,
6906 icon: pkg.icon,
6907 productIds: pkg.products,
6908 products: salesProducts || [],
6909 addonsWithNoParent: addonsWithNoParent || [],
6910 totalAddons: totalAddons
6911 };
6912}
6913/**
6914 * @param {?} product
6915 * @param {?} salesAddons
6916 * @return {?}
6917 */
6918function createSalesProduct(product, salesAddons) {
6919 /** @type {?} */
6920 var parentInfo;
6921 if (product instanceof ProductWithParent) {
6922 parentInfo = {
6923 parentId: product.parentId,
6924 parentName: product.parentName,
6925 parentIconUrl: product.parentIconUrl,
6926 multipleActivations: product.multipleActivations || false,
6927 };
6928 }
6929 return {
6930 formattedPrices: product.priceStrings.join(', '),
6931 productId: product.productId,
6932 name: product.name,
6933 tagline: product.tagline || '',
6934 icon: product.iconUrl,
6935 addons: salesAddons || [],
6936 editionId: product.editionId,
6937 editionName: product.editionName,
6938 parentInfo: parentInfo,
6939 };
6940}
6941/**
6942 * @param {?} addons
6943 * @return {?}
6944 */
6945function createSalesAddons(addons) {
6946 return addons.map((/**
6947 * @param {?} addon
6948 * @return {?}
6949 */
6950 function (addon) { return createSalesAddon(addon); }));
6951}
6952/**
6953 * @param {?} addon
6954 * @param {?=} parentName
6955 * @param {?=} parentIcon
6956 * @return {?}
6957 */
6958function createSalesAddon(addon, parentName, parentIcon) {
6959 return {
6960 parentId: addon.appId,
6961 addonId: addon.addonId,
6962 name: addon.title,
6963 tagline: addon.tagline || '',
6964 icon: addon.icon || '',
6965 multipleActivations: addon.multipleActivations,
6966 parentIcon: parentIcon || '',
6967 parentName: parentName || ''
6968 };
6969}
6970/**
6971 * @param {?} pkg
6972 * @param {?} products
6973 * @param {?} addons
6974 * @param {?} activationStatus
6975 * @return {?}
6976 */
6977function createSalesPackageWithStatus(pkg, products, addons, activationStatus) {
6978 return {
6979 formattedPrices: pkg.formattedPrices,
6980 packageId: pkg.packageId,
6981 name: pkg.name,
6982 icon: pkg.icon,
6983 productIds: pkg.productIds,
6984 products: products || [],
6985 addonsWithNoParent: addons || [],
6986 activationStatus: activationStatus || null,
6987 totalAddons: pkg.totalAddons
6988 };
6989}
6990/**
6991 * @param {?} product
6992 * @param {?} addons
6993 * @param {?} activationStatus
6994 * @return {?}
6995 */
6996function createSalesProductWithStatus(product, addons, activationStatus) {
6997 return {
6998 formattedPrices: product.formattedPrices,
6999 productId: product.productId,
7000 name: product.name,
7001 editionId: product.editionId,
7002 editionName: product.editionName,
7003 tagline: product.tagline,
7004 icon: product.icon,
7005 addons: addons || [],
7006 activationStatus: activationStatus || null,
7007 parentInfo: product.parentInfo || null,
7008 };
7009}
7010/**
7011 * @param {?} addon
7012 * @param {?} activationStatus
7013 * @return {?}
7014 */
7015function createSalesAddonWithStatus(addon, activationStatus) {
7016 return {
7017 parentId: addon.parentId,
7018 addonId: addon.addonId,
7019 name: addon.name,
7020 tagline: addon.tagline,
7021 icon: addon.icon,
7022 parentIcon: addon.parentIcon,
7023 parentName: addon.parentName,
7024 multipleActivations: addon.multipleActivations,
7025 activationStatus: activationStatus || null
7026 };
7027}
7028/**
7029 * @param {?} salesPackages
7030 * @param {?} statuses
7031 * @return {?}
7032 */
7033function addStatusesToSalesPackages(salesPackages, statuses) {
7034 if (!statuses || statuses.length === 0) {
7035 return salesPackages;
7036 }
7037 return salesPackages.map((/**
7038 * @param {?} salesPackage
7039 * @return {?}
7040 */
7041 function (salesPackage) {
7042 /** @type {?} */
7043 var newProducts = salesPackage.products.map((/**
7044 * @param {?} product
7045 * @return {?}
7046 */
7047 function (product) { return addStatusesToSalesProduct(product, statuses); }));
7048 /** @type {?} */
7049 var newAddonsWithNoParent = salesPackage.addonsWithNoParent.map((/**
7050 * @param {?} addon
7051 * @return {?}
7052 */
7053 function (addon) {
7054 /** @type {?} */
7055 var status = findStatus(statuses, addon.addonId);
7056 return addStatusesToSalesAddon(addon, status);
7057 }));
7058 /** @type {?} */
7059 var productStatuses = newProducts
7060 .map((/**
7061 * @param {?} product
7062 * @return {?}
7063 */
7064 function (product) { return product.activationStatus.status; }));
7065 /** @type {?} */
7066 var addonStatuses = newProducts
7067 .map((/**
7068 * @param {?} product
7069 * @return {?}
7070 */
7071 function (product) { return product.addons ? product.addons.map((/**
7072 * @param {?} addon
7073 * @return {?}
7074 */
7075 function (addon) { return addon.activationStatus.status; })) : []; }))
7076 .reduce((/**
7077 * @param {?} statusList
7078 * @param {?} reducedList
7079 * @return {?}
7080 */
7081 function (statusList, reducedList) { return reducedList.concat(statusList); }), []);
7082 /** @type {?} */
7083 var addonsWithNoParentStatuses = newAddonsWithNoParent
7084 .map((/**
7085 * @param {?} addon
7086 * @return {?}
7087 */
7088 function (addon) { return addon.activationStatus ? addon.activationStatus.status : null; }));
7089 /** @type {?} */
7090 var allStatuses = __spread(productStatuses, addonStatuses, addonsWithNoParentStatuses);
7091 /** @type {?} */
7092 var packageStatus = convertNumberToActivationStatus(Math.max.apply(Math, __spread(allStatuses)));
7093 /** @type {?} */
7094 var statusNotification = createStatusNotificationItemForPackage(packageStatus);
7095 return createSalesPackageWithStatus(salesPackage, newProducts, newAddonsWithNoParent, statusNotification);
7096 }));
7097}
7098/**
7099 * @param {?} product
7100 * @param {?} statuses
7101 * @return {?}
7102 */
7103function addStatusesToSalesProduct(product, statuses) {
7104 if (!statuses || statuses.length === 0) {
7105 return product;
7106 }
7107 /** @type {?} */
7108 var productStatus = findStatus(statuses, product.productId);
7109 /** @type {?} */
7110 var statusNotification = createStatusNotificationItemForPackageItem(productStatus);
7111 if (!product.addons) {
7112 return createSalesProductWithStatus(product, null, statusNotification);
7113 }
7114 /** @type {?} */
7115 var newSalesAddons = product.addons.map((/**
7116 * @param {?} addon
7117 * @return {?}
7118 */
7119 function (addon) {
7120 /** @type {?} */
7121 var addonStatus = findStatus(statuses, addon.addonId);
7122 return addStatusesToSalesAddon(addon, addonStatus);
7123 }));
7124 return createSalesProductWithStatus(product, newSalesAddons, statusNotification);
7125}
7126/**
7127 * @param {?} addon
7128 * @param {?} status
7129 * @return {?}
7130 */
7131function addStatusesToSalesAddon(addon, status) {
7132 /** @type {?} */
7133 var addonStatusNotification = createStatusNotificationItemForPackageItem(status);
7134 return createSalesAddonWithStatus(addon, addonStatusNotification);
7135}
7136/**
7137 * @param {?} statuses
7138 * @param {?} id
7139 * @return {?}
7140 */
7141function findStatus(statuses, id) {
7142 if (!statuses || statuses.length <= 0) {
7143 return null;
7144 }
7145 /** @type {?} */
7146 var statusIndex = statuses.findIndex((/**
7147 * @param {?} s
7148 * @return {?}
7149 */
7150 function (s) {
7151 return s.packageItemId === id;
7152 }));
7153 if (statusIndex < 0) {
7154 return null;
7155 }
7156 /** @type {?} */
7157 var status = statuses[statusIndex].status;
7158 statuses.splice(statusIndex, 1);
7159 return status;
7160}
7161/**
7162 * @param {?} status
7163 * @return {?}
7164 */
7165function createStatusNotificationItemForPackageItem(status) {
7166 switch (status) {
7167 case ActivationStatus.SUCCESS:
7168 return { icon: 'check_circle', status: status, text: 'Activated' };
7169 case ActivationStatus.WARNING:
7170 return { icon: 'warning', status: status, text: 'Already Activated' };
7171 default:
7172 return { icon: 'error', status: status, text: 'Activation Errors' };
7173 }
7174}
7175/**
7176 * @param {?} status
7177 * @return {?}
7178 */
7179function createStatusNotificationItemForPackage(status) {
7180 switch (status) {
7181 case ActivationStatus.SUCCESS:
7182 return { icon: 'check_circle', status: status, text: 'Activated' };
7183 case ActivationStatus.WARNING:
7184 return { icon: 'warning', status: status, text: 'Activation Warnings' };
7185 default:
7186 return { icon: 'error', status: status, text: 'Activation Errors Occured' };
7187 }
7188}
7189/**
7190 * @param {?} number
7191 * @return {?}
7192 */
7193function convertNumberToActivationStatus(number) {
7194 switch (number) {
7195 case 0:
7196 return ActivationStatus.SUCCESS;
7197 case 1:
7198 return ActivationStatus.WARNING;
7199 default:
7200 return ActivationStatus.ERROR;
7201 }
7202}
7203
7204/**
7205 * @fileoverview added by tsickle
7206 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7207 */
7208/** @enum {string} */
7209var ListIndent = {
7210 INDENT_ZERO: 'indent-zero',
7211 INDENT_ONE: 'indent-one',
7212 INDENT_TWO: 'indent-two',
7213};
7214var VaPackageDropdownItemComponent = /** @class */ (function () {
7215 function VaPackageDropdownItemComponent() {
7216 this.enableDropdown = false;
7217 this.indent = ListIndent.INDENT_ZERO;
7218 this.itemToggled = new EventEmitter();
7219 }
7220 /**
7221 * @return {?}
7222 */
7223 VaPackageDropdownItemComponent.prototype.ngOnInit = /**
7224 * @return {?}
7225 */
7226 function () {
7227 };
7228 /**
7229 * @return {?}
7230 */
7231 VaPackageDropdownItemComponent.prototype.toggleItem = /**
7232 * @return {?}
7233 */
7234 function () {
7235 this.itemToggled.emit(null);
7236 };
7237 /**
7238 * @param {?} status
7239 * @return {?}
7240 */
7241 VaPackageDropdownItemComponent.prototype.isActivatedStatus = /**
7242 * @param {?} status
7243 * @return {?}
7244 */
7245 function (status) {
7246 return status === ActivationStatus.SUCCESS;
7247 };
7248 /**
7249 * @param {?} status
7250 * @return {?}
7251 */
7252 VaPackageDropdownItemComponent.prototype.isWarningStatus = /**
7253 * @param {?} status
7254 * @return {?}
7255 */
7256 function (status) {
7257 return status === ActivationStatus.WARNING;
7258 };
7259 /**
7260 * @param {?} status
7261 * @return {?}
7262 */
7263 VaPackageDropdownItemComponent.prototype.isErrorStatus = /**
7264 * @param {?} status
7265 * @return {?}
7266 */
7267 function (status) {
7268 return status === ActivationStatus.ERROR;
7269 };
7270 VaPackageDropdownItemComponent.decorators = [
7271 { type: Component, args: [{
7272 selector: 'va-package-dropdown-item',
7273 template: "<mat-list-item [ngClass]=\"indent\" class=\"va-dropdown-list-item\">\n <va-icon *ngIf=\"!secondaryIconUrl && !secondaryIconName; else dualIcon\" mat-list-avatar [name]=\"title\" [iconUrl]=\"iconUrl\" [diameter]=\"40\"></va-icon>\n <h3 mat-line class=\"va-dropdown-list-item__title\">{{ title }}\n <va-badge *ngIf=\"titleBadge\" small color=\"blue-solid\" class=\"va-dropdown-list-item__title-badge\">{{ titleBadge }}</va-badge>\n <span *ngIf=\"titleDescriptor\" class=\"va-dropdown-list-item__title-descriptor\">{{ titleDescriptor }}</span>\n </h3>\n <p class=\"package-dropdown-font\" mat-line>{{subtitle}}</p>\n\n <span *ngIf=\"!statusItem\" class=\"va-dropdown-list-item__layout\">\n <p class=\"va-dropdown-list-item__layout va-dropdown-list-item__notice\">{{ description }}</p>\n <ng-container *ngIf=\"enableDropdown; then dropdownButton\"></ng-container>\n </span>\n\n <span *ngIf=\"statusItem\" class=\"va-dropdown-list-item__layout va-dropdown-list-item__status\">\n <div [ngClass]=\"{\n 'activated': isActivatedStatus(statusItem.status),\n 'warning': isWarningStatus(statusItem.status),\n 'error': isErrorStatus(statusItem.status)}\">\n <mat-icon>{{statusItem.icon}}</mat-icon>\n </div>\n <p class=\"va-dropdown-list-item__notice\"\n [ngClass]=\"{\n 'activated': isActivatedStatus(statusItem.status),\n 'warning': isWarningStatus(statusItem.status),\n 'error': isErrorStatus(statusItem.status)}\">\n {{ statusItem.text }}\n </p>\n <ng-container *ngIf=\"enableDropdown; then dropdownButton\"></ng-container>\n </span>\n</mat-list-item>\n\n\n<ng-template #dropdownButton>\n <button *ngIf=\"enableDropdown\" mat-icon-button type=\"button\" (click)=\"toggleItem()\">\n <mat-icon mat-list-icon\n class=\"dropdown-icon\"\n [ngClass]=\"{'dropdown-icon-rotate-up': !toggleValue, 'dropdown-icon-rotate-down': toggleValue}\">\n keyboard_arrow_down\n </mat-icon>\n </button>\n</ng-template>\n\n<ng-template #dualIcon>\n <div class=\"dual-icon\">\n <va-icon mat-list-avatar [iconUrl]=\"iconUrl\" [name]=\"title\" [diameter]=\"40\"></va-icon>\n <va-icon mat-list-avatar class=\"secondary-icon\" [iconUrl]=\"secondaryIconUrl\" [diameter]=\"20\" [name]=\"secondaryIconName\"></va-icon>\n </div>\n</ng-template>\n",
7274 styles: [".va-dropdown-list-item{border-bottom:1px solid rgba(0,0,0,.12)}mat-list-item .va-dropdown-list-item__title{font-weight:700}.va-dropdown-list-item__title-badge{padding-bottom:4px}.indent-one{padding-left:30px}.va-dropdown-list-item__title-descriptor{font-size:11px;font-weight:700;font-style:italic}.indent-two{padding-left:30px}.indent-two .mat-list-avatar{margin-left:40px}.dual-icon{position:relative;display:inline-block;-webkit-box-ordinal-group:0;order:-1;margin-right:16px}.dual-icon .secondary-icon{position:absolute;border-radius:50%;bottom:-24px;right:-24px}.va-dropdown-list-item__layout{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.va-dropdown-list-item__layout .va-dropdown-list-item__notice{width:-webkit-max-content;width:-moz-max-content;width:max-content;font-style:italic}@media screen and (max-width:500px){.va-dropdown-list-item__layout p{display:none}}.va-dropdown-list-item__layout mat-icon{padding:0}.va-dropdown-list-item__layout button{padding:0;min-width:0}.va-dropdown-list-item__layout button .dropdown-icon{color:rgba(0,0,0,.54)}.va-dropdown-list-item__layout button .dropdown-icon-rotate-down{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:.4s;transition:.4s;pointer-events:none}.va-dropdown-list-item__layout button .dropdown-icon-rotate-up{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transition:.4s;transition:.4s;pointer-events:none}.va-dropdown-list-item__status{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.va-dropdown-list-item__status p{padding-left:6px;font-size:14px;white-space:nowrap}.va-dropdown-list-item__status .activated{color:#4caf50}.va-dropdown-list-item__status .warning{color:#ffa000}.va-dropdown-list-item__status .error{color:#c62828}", ".package-dropdown-font,.product-dropdown-font{color:rgba(0,0,0,.54);font-size:14px;font-weight:400}.package-list-container{border-top:1px solid rgba(0,0,0,.12);padding:0}.package-list-container mat-list{padding:0}.package-dropdown-stencil-display{display:-webkit-box;display:flex;width:100%;-webkit-box-flex:1;flex-grow:1}.package-dropdown-stencil-display va-icon{margin-right:20px}.package-dropdown-stencil-display .stencil-text{width:inherit;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center}.package-dropdown-stencil-display .stencil-text .stencil-title{height:32px;width:40%;margin-bottom:5px!important;margin-top:0!important}.package-dropdown-stencil-display .stencil-text .stencil-tagline{height:32px;width:inherit}.product-or-addon-list{background-color:rgba(0,0,0,.04);overflow:hidden}"]
7275 }] }
7276 ];
7277 VaPackageDropdownItemComponent.propDecorators = {
7278 title: [{ type: Input }],
7279 titleBadge: [{ type: Input }],
7280 titleDescriptor: [{ type: Input }],
7281 iconUrl: [{ type: Input }],
7282 secondaryIconUrl: [{ type: Input }],
7283 secondaryIconName: [{ type: Input }],
7284 subtitle: [{ type: Input }],
7285 statusItem: [{ type: Input }],
7286 enableDropdown: [{ type: Input }],
7287 indent: [{ type: Input }],
7288 toggleValue: [{ type: Input }],
7289 description: [{ type: Input }],
7290 itemToggled: [{ type: Output }]
7291 };
7292 return VaPackageDropdownItemComponent;
7293}());
7294if (false) {
7295 /** @type {?} */
7296 VaPackageDropdownItemComponent.prototype.title;
7297 /** @type {?} */
7298 VaPackageDropdownItemComponent.prototype.titleBadge;
7299 /** @type {?} */
7300 VaPackageDropdownItemComponent.prototype.titleDescriptor;
7301 /** @type {?} */
7302 VaPackageDropdownItemComponent.prototype.iconUrl;
7303 /** @type {?} */
7304 VaPackageDropdownItemComponent.prototype.secondaryIconUrl;
7305 /** @type {?} */
7306 VaPackageDropdownItemComponent.prototype.secondaryIconName;
7307 /** @type {?} */
7308 VaPackageDropdownItemComponent.prototype.subtitle;
7309 /** @type {?} */
7310 VaPackageDropdownItemComponent.prototype.statusItem;
7311 /** @type {?} */
7312 VaPackageDropdownItemComponent.prototype.enableDropdown;
7313 /** @type {?} */
7314 VaPackageDropdownItemComponent.prototype.indent;
7315 /** @type {?} */
7316 VaPackageDropdownItemComponent.prototype.toggleValue;
7317 /** @type {?} */
7318 VaPackageDropdownItemComponent.prototype.description;
7319 /** @type {?} */
7320 VaPackageDropdownItemComponent.prototype.itemToggled;
7321}
7322
7323/**
7324 * @fileoverview added by tsickle
7325 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7326 */
7327/**
7328 * @record
7329 */
7330function OrderLengthsForToggling() { }
7331if (false) {
7332 /** @type {?} */
7333 OrderLengthsForToggling.prototype.packages;
7334 /** @type {?} */
7335 OrderLengthsForToggling.prototype.products;
7336}
7337var VaPackageDropdownComponent = /** @class */ (function () {
7338 function VaPackageDropdownComponent() {
7339 // controls whether only one dropdown can be expanded at a time
7340 this.singularDropdown = false;
7341 // hides pricing
7342 this.hidePricing = false;
7343 this.packageProductIndent = ListIndent.INDENT_ONE;
7344 this.packageAddonWithoutProductIndent = ListIndent.INDENT_ONE;
7345 this.packageAddonWithProductIndent = ListIndent.INDENT_TWO;
7346 this.productAddonIndent = ListIndent.INDENT_ONE;
7347 this.packages$$ = new ReplaySubject(1);
7348 this.products$$ = new ReplaySubject(1);
7349 this.standAloneProducts$$ = new ReplaySubject(1);
7350 this.statuses$$ = new BehaviorSubject([]);
7351 this.addons$$ = new ReplaySubject(1);
7352 this.orderItemLengths$$ = new BehaviorSubject((/** @type {?} */ ({
7353 packages: 0,
7354 products: 0
7355 })));
7356 this.packageToggles = [];
7357 this.productToggles = [];
7358 }
7359 Object.defineProperty(VaPackageDropdownComponent.prototype, "packages", {
7360 // packages in dropdown
7361 set:
7362 // packages in dropdown
7363 /**
7364 * @param {?} packages
7365 * @return {?}
7366 */
7367 function (packages) {
7368 this.packages$$.next(packages);
7369 },
7370 enumerable: true,
7371 configurable: true
7372 });
7373 Object.defineProperty(VaPackageDropdownComponent.prototype, "products", {
7374 // products within given packages
7375 set:
7376 // products within given packages
7377 /**
7378 * @param {?} products
7379 * @return {?}
7380 */
7381 function (products) {
7382 this.products$$.next(products);
7383 },
7384 enumerable: true,
7385 configurable: true
7386 });
7387 Object.defineProperty(VaPackageDropdownComponent.prototype, "standAloneProducts", {
7388 // products not associated with a package
7389 set:
7390 // products not associated with a package
7391 /**
7392 * @param {?} standAloneProducts
7393 * @return {?}
7394 */
7395 function (standAloneProducts) {
7396 this.standAloneProducts$$.next(standAloneProducts);
7397 },
7398 enumerable: true,
7399 configurable: true
7400 });
7401 Object.defineProperty(VaPackageDropdownComponent.prototype, "statuses", {
7402 // statuses for all products and addons
7403 set:
7404 // statuses for all products and addons
7405 /**
7406 * @param {?} statuses
7407 * @return {?}
7408 */
7409 function (statuses) {
7410 this.statuses$$.next(statuses);
7411 },
7412 enumerable: true,
7413 configurable: true
7414 });
7415 Object.defineProperty(VaPackageDropdownComponent.prototype, "addons", {
7416 // addons within given packages
7417 set:
7418 // addons within given packages
7419 /**
7420 * @param {?} addons
7421 * @return {?}
7422 */
7423 function (addons) {
7424 this.addons$$.next(addons);
7425 },
7426 enumerable: true,
7427 configurable: true
7428 });
7429 /**
7430 * @return {?}
7431 */
7432 VaPackageDropdownComponent.prototype.ngOnInit = /**
7433 * @return {?}
7434 */
7435 function () {
7436 var _this = this;
7437 /** @type {?} */
7438 var packages$ = this.packages$$.pipe(filter((/**
7439 * @param {?} packages
7440 * @return {?}
7441 */
7442 function (packages) { return packages !== null; })));
7443 /** @type {?} */
7444 var products$ = this.products$$.pipe(filter((/**
7445 * @param {?} products
7446 * @return {?}
7447 */
7448 function (products) { return products !== null; })));
7449 /** @type {?} */
7450 var addons$ = this.addons$$.pipe(filter((/**
7451 * @param {?} addons
7452 * @return {?}
7453 */
7454 function (addons) { return addons !== null; })));
7455 /** @type {?} */
7456 var salesPackage$ = zip(packages$, products$, addons$).pipe(tap((/**
7457 * @param {?} __0
7458 * @return {?}
7459 */
7460 function (_a) {
7461 var _b = __read(_a, 3), packages = _b[0], products = _b[1], _ = _b[2];
7462 _this.orderItemLengths$$.next((/** @type {?} */ ({
7463 packages: packages.length,
7464 products: products.length
7465 })));
7466 })), map((/**
7467 * @param {?} __0
7468 * @return {?}
7469 */
7470 function (_a) {
7471 var _b = __read(_a, 3), packages = _b[0], products = _b[1], addons = _b[2];
7472 return buildSalesPackages(packages, products, addons);
7473 })));
7474 this.salesPackages$ = combineLatest(salesPackage$, this.statuses$$).pipe(map((/**
7475 * @param {?} __0
7476 * @return {?}
7477 */
7478 function (_a) {
7479 var _b = __read(_a, 2), salesPackages = _b[0], statuses = _b[1];
7480 return addStatusesToSalesPackages(salesPackages, statuses);
7481 })), startWith([]));
7482 this.salesProducts$ = combineLatest(this.standAloneProducts$$, this.statuses$$).pipe(filter((/**
7483 * @param {?} __0
7484 * @return {?}
7485 */
7486 function (_a) {
7487 var _b = __read(_a, 2), products = _b[0], _ = _b[1];
7488 return products !== null;
7489 })), map((/**
7490 * @param {?} __0
7491 * @return {?}
7492 */
7493 function (_a) {
7494 var _b = __read(_a, 2), products = _b[0], statuses = _b[1];
7495 return products.map((/**
7496 * @param {?} p
7497 * @return {?}
7498 */
7499 function (p) {
7500 /** @type {?} */
7501 var addons = p.addons || null;
7502 /** @type {?} */
7503 var salesProducts = buildSalesProductFromProduct(p, addons);
7504 return addStatusesToSalesProduct(salesProducts, statuses);
7505 }));
7506 })), startWith([]));
7507 this.templateData$ = combineLatest(this.salesPackages$, this.salesProducts$).pipe(map((/**
7508 * @param {?} __0
7509 * @return {?}
7510 */
7511 function (_a) {
7512 var _b = __read(_a, 2), packages = _b[0], products = _b[1];
7513 return ({ packages: packages, products: products });
7514 })));
7515 };
7516 /**
7517 * @return {?}
7518 */
7519 VaPackageDropdownComponent.prototype.openAllDropdowns = /**
7520 * @return {?}
7521 */
7522 function () {
7523 for (var x = 0; x < this.orderItemLengths$$.getValue().packages; x++) {
7524 this.packageToggles[x] = true;
7525 }
7526 for (var x = 0; x < this.orderItemLengths$$.getValue().products; x++) {
7527 this.productToggles[x] = true;
7528 }
7529 };
7530 /**
7531 * @param {?} indexToToggle
7532 * @return {?}
7533 */
7534 VaPackageDropdownComponent.prototype.togglePackage = /**
7535 * @param {?} indexToToggle
7536 * @return {?}
7537 */
7538 function (indexToToggle) {
7539 if (this.singularDropdown) {
7540 /** @type {?} */
7541 var openedIndex = this.packageToggles.findIndex((/**
7542 * @param {?} value
7543 * @return {?}
7544 */
7545 function (value) { return value === true; }));
7546 if (openedIndex !== indexToToggle) {
7547 this.packageToggles[openedIndex] = false;
7548 }
7549 /** @type {?} */
7550 var productOpenedIndex = this.productToggles.findIndex((/**
7551 * @param {?} value
7552 * @return {?}
7553 */
7554 function (value) { return value === true; }));
7555 if (productOpenedIndex > -1) {
7556 this.productToggles[productOpenedIndex] = false;
7557 }
7558 }
7559 this.packageToggles[indexToToggle] = !this.packageToggles[indexToToggle];
7560 };
7561 /**
7562 * @param {?} indexToToggle
7563 * @return {?}
7564 */
7565 VaPackageDropdownComponent.prototype.toggleProduct = /**
7566 * @param {?} indexToToggle
7567 * @return {?}
7568 */
7569 function (indexToToggle) {
7570 if (this.singularDropdown) {
7571 /** @type {?} */
7572 var openedIndex = this.productToggles.findIndex((/**
7573 * @param {?} value
7574 * @return {?}
7575 */
7576 function (value) { return value === true; }));
7577 if (openedIndex !== indexToToggle) {
7578 this.productToggles[openedIndex] = false;
7579 }
7580 /** @type {?} */
7581 var packageOpenedIndex = this.packageToggles.findIndex((/**
7582 * @param {?} value
7583 * @return {?}
7584 */
7585 function (value) { return value === true; }));
7586 if (packageOpenedIndex > -1) {
7587 this.packageToggles[packageOpenedIndex] = false;
7588 }
7589 }
7590 this.productToggles[indexToToggle] = !this.productToggles[indexToToggle];
7591 };
7592 /**
7593 * @param {?} product
7594 * @return {?}
7595 */
7596 VaPackageDropdownComponent.prototype.standAloneProductDescription = /**
7597 * @param {?} product
7598 * @return {?}
7599 */
7600 function (product) {
7601 if (product.addons && product.addons.length > 0) {
7602 /** @type {?} */
7603 var description = "Contains " + product.addons.length;
7604 description = product.addons.length === 1 ? description + " Addon" : description + " Addons";
7605 return description;
7606 }
7607 return '';
7608 };
7609 /**
7610 * @param {?} product
7611 * @return {?}
7612 */
7613 VaPackageDropdownComponent.prototype.standAloneProductWithParentDescription = /**
7614 * @param {?} product
7615 * @return {?}
7616 */
7617 function (product) {
7618 if (!product.parentInfo) {
7619 return '';
7620 }
7621 return "(Requires " + product.parentInfo.parentName + ")";
7622 };
7623 /**
7624 * @param {?} pkg
7625 * @return {?}
7626 */
7627 VaPackageDropdownComponent.prototype.packageDescription = /**
7628 * @param {?} pkg
7629 * @return {?}
7630 */
7631 function (pkg) {
7632 /** @type {?} */
7633 var hasProducts = pkg.products && pkg.products.length > 0;
7634 if (!hasProducts && pkg.totalAddons === 0) {
7635 return 'No Items in Package';
7636 }
7637 /** @type {?} */
7638 var description = '';
7639 /** @type {?} */
7640 var hasOneProduct = pkg.products && pkg.products.length === 1;
7641 if (hasProducts || pkg.totalAddons > 0) {
7642 description = 'Contains ';
7643 }
7644 if (hasProducts) {
7645 description = description + " " + pkg.products.length;
7646 description = hasOneProduct ? description + " Product" : description + " Products";
7647 }
7648 if (hasProducts && pkg.totalAddons > 0) {
7649 description = description + " & " + pkg.totalAddons;
7650 description = pkg.totalAddons === 1 ? description + " Addon" : description + " Addons";
7651 }
7652 return description;
7653 };
7654 VaPackageDropdownComponent.decorators = [
7655 { type: Component, args: [{
7656 selector: 'va-package-dropdown',
7657 animations: [
7658 trigger('listAnimationStart', [
7659 state('void', style({ height: '0px' })),
7660 state('*', style({ height: '*' })),
7661 transition('void => *', [animate('0.25s ease')]),
7662 transition('* => void', [animate('0.25s ease')])
7663 ])
7664 ],
7665 template: "<ng-container *ngIf=\"templateData$ | async as data\">\n <mat-card class=\"package-list-container\" *ngIf=\"data.products?.length > 0 || data.packages?.length > 0 else loading\">\n <mat-list>\n <div class=\"package-list\" *ngFor=\"let package of data.packages; let packageIndex = index\">\n\n <va-package-dropdown-item\n [title]=\"package.name\"\n [iconUrl]=\"package.icon\"\n [subtitle]=\"hidePricing ? '' : package.formattedPrices\"\n [statusItem]=\"package.activationStatus\"\n [description]=\"packageDescription(package)\"\n [enableDropdown]=\"package.products?.length > 0 || package.addonsWithNoParent?.length > 0\"\n [toggleValue]=\"packageToggles[packageIndex]\"\n (itemToggled)=\"togglePackage(packageIndex)\"\n ></va-package-dropdown-item>\n\n <mat-list class=\"product-or-addon-list package-dropdown-font\" *ngIf=\"packageToggles[packageIndex]\"\n [@listAnimationStart]>\n <div *ngFor=\"let product of package.products\">\n <va-package-dropdown-item\n [title]=\"product.name\"\n [subtitle]=\"product.tagline\"\n [titleBadge]=\"product.editionName\"\n [iconUrl]=\"product.icon\"\n [statusItem]=\"product.activationStatus\"\n [indent]=\"packageProductIndent\"\n ></va-package-dropdown-item>\n\n <va-package-dropdown-item\n *ngFor=\"let addon of product.addons\"\n [title]=\"addon.name\"\n [subtitle]=\"addon.tagline\"\n [iconUrl]=\"addon.icon\"\n [statusItem]=\"addon.activationStatus\"\n [indent]=\"packageAddonWithProductIndent\"\n ></va-package-dropdown-item>\n </div>\n\n <va-package-dropdown-item\n *ngFor=\"let addon of package.addonsWithNoParent\"\n [title]=\"addon.name\"\n [titleDescriptor]=\"'FRONTEND.STORE.REQUIRES_DESCRIPTOR' | translate: {requirementName: addon.parentName}\"\n [subtitle]=\"addon.tagline\"\n [iconUrl]=\"addon.icon\"\n [secondaryIconUrl]=\"addon.parentIcon\"\n [secondaryIconName]=\"addon.parentName\"\n [statusItem]=\"addon.activationStatus\"\n [indent]=\"packageAddonWithoutProductIndent\"\n ></va-package-dropdown-item>\n </mat-list>\n </div>\n\n <div class=\"product-list\" *ngFor=\"let product of data.products; let productIndex = index\">\n <va-package-dropdown-item\n [title]=\"product.name\"\n [titleBadge]=\"product.editionName\"\n [titleDescriptor]=\"standAloneProductWithParentDescription(product)\"\n [iconUrl]=\"product.icon\"\n [subtitle]=\"hidePricing ? '' : product.formattedPrices\"\n [secondaryIconUrl]=\"product.parentInfo?.parentIconUrl\"\n [secondaryIconName]=\"product.parentInfo?.parentName\"\n [statusItem]=\"product.activationStatus\"\n [description]=\"standAloneProductDescription(product)\"\n [enableDropdown]=\"product.addons?.length > 0\"\n [toggleValue]=\"productToggles[productIndex]\"\n (itemToggled)=\"toggleProduct(productIndex)\"\n ></va-package-dropdown-item>\n\n <mat-list class=\"product-or-addon-list product-dropdown-font\" *ngIf=\"productToggles[productIndex]\"\n [@listAnimationStart]>\n <va-package-dropdown-item\n *ngFor=\"let addon of product.addons\"\n [title]=\"addon.name\"\n [subtitle]=\"addon.tagline\"\n [iconUrl]=\"addon.icon\"\n [statusItem]=\"addon.activationStatus\"\n [indent]=\"productAddonIndent\"\n ></va-package-dropdown-item>\n </mat-list>\n </div>\n\n </mat-list>\n </mat-card>\n</ng-container>\n\n<ng-template #loading>\n <mat-card>\n <div class=\"package-dropdown-stencil-display\">\n <va-icon [iconUrl]=\"\"></va-icon>\n <div class=\"stencil-text\">\n <h1 class=\"stencil-title stencil-shimmer\"></h1>\n <span class=\"stencil-tagline stencil-shimmer\"></span>\n </div>\n </div>\n </mat-card>\n</ng-template>\n",
7666 styles: [".package-dropdown-font,.product-dropdown-font{color:rgba(0,0,0,.54);font-size:14px;font-weight:400}.package-list-container{border-top:1px solid rgba(0,0,0,.12);padding:0}.package-list-container mat-list{padding:0}.package-dropdown-stencil-display{display:-webkit-box;display:flex;width:100%;-webkit-box-flex:1;flex-grow:1}.package-dropdown-stencil-display va-icon{margin-right:20px}.package-dropdown-stencil-display .stencil-text{width:inherit;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center}.package-dropdown-stencil-display .stencil-text .stencil-title{height:32px;width:40%;margin-bottom:5px!important;margin-top:0!important}.package-dropdown-stencil-display .stencil-text .stencil-tagline{height:32px;width:inherit}.product-or-addon-list{background-color:rgba(0,0,0,.04);overflow:hidden}"]
7667 }] }
7668 ];
7669 VaPackageDropdownComponent.propDecorators = {
7670 packages: [{ type: Input }],
7671 products: [{ type: Input }],
7672 standAloneProducts: [{ type: Input }],
7673 statuses: [{ type: Input }],
7674 addons: [{ type: Input }],
7675 singularDropdown: [{ type: Input }],
7676 hidePricing: [{ type: Input }]
7677 };
7678 return VaPackageDropdownComponent;
7679}());
7680if (false) {
7681 /** @type {?} */
7682 VaPackageDropdownComponent.prototype.singularDropdown;
7683 /** @type {?} */
7684 VaPackageDropdownComponent.prototype.hidePricing;
7685 /** @type {?} */
7686 VaPackageDropdownComponent.prototype.packageProductIndent;
7687 /** @type {?} */
7688 VaPackageDropdownComponent.prototype.packageAddonWithoutProductIndent;
7689 /** @type {?} */
7690 VaPackageDropdownComponent.prototype.packageAddonWithProductIndent;
7691 /** @type {?} */
7692 VaPackageDropdownComponent.prototype.productAddonIndent;
7693 /** @type {?} */
7694 VaPackageDropdownComponent.prototype.packages$$;
7695 /** @type {?} */
7696 VaPackageDropdownComponent.prototype.products$$;
7697 /** @type {?} */
7698 VaPackageDropdownComponent.prototype.standAloneProducts$$;
7699 /** @type {?} */
7700 VaPackageDropdownComponent.prototype.statuses$$;
7701 /** @type {?} */
7702 VaPackageDropdownComponent.prototype.addons$$;
7703 /** @type {?} */
7704 VaPackageDropdownComponent.prototype.orderItemLengths$$;
7705 /** @type {?} */
7706 VaPackageDropdownComponent.prototype.templateData$;
7707 /** @type {?} */
7708 VaPackageDropdownComponent.prototype.salesPackages$;
7709 /** @type {?} */
7710 VaPackageDropdownComponent.prototype.salesProducts$;
7711 /** @type {?} */
7712 VaPackageDropdownComponent.prototype.packageToggles;
7713 /** @type {?} */
7714 VaPackageDropdownComponent.prototype.productToggles;
7715}
7716
7717/**
7718 * @fileoverview added by tsickle
7719 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7720 */
7721var VaPackageDropdownModule = /** @class */ (function () {
7722 function VaPackageDropdownModule(translateService, currentLang$, defaultLang$) {
7723 this.translateService = translateService;
7724 if (!this.translateService.translations.hasOwnProperty('en')) {
7725 this.translateService.reloadLang('en');
7726 }
7727 if (!this.translateService.translations.hasOwnProperty('cs')) {
7728 this.translateService.reloadLang('cs');
7729 }
7730 this.translateService.setTranslation('en', En.en, true);
7731 this.translateService.setTranslation('cs', Cs.cs, true);
7732 if (currentLang$) {
7733 currentLang$.subscribe((/**
7734 * @param {?} currentLang
7735 * @return {?}
7736 */
7737 function (currentLang) { return translateService.use(currentLang); }));
7738 }
7739 if (defaultLang$) {
7740 defaultLang$.subscribe((/**
7741 * @param {?} defaultLang
7742 * @return {?}
7743 */
7744 function (defaultLang) { return translateService.setDefaultLang(defaultLang); }));
7745 }
7746 }
7747 VaPackageDropdownModule.decorators = [
7748 { type: NgModule, args: [{
7749 imports: [
7750 CommonModule,
7751 MatButtonModule,
7752 MatCardModule,
7753 MatListModule$1,
7754 MatIconModule,
7755 VaIconModule,
7756 VaBadgeModule,
7757 TranslateModule.forChild()
7758 ],
7759 declarations: [VaPackageDropdownComponent, VaPackageDropdownItemComponent],
7760 exports: [VaPackageDropdownComponent],
7761 entryComponents: [VaPackageDropdownComponent]
7762 },] }
7763 ];
7764 /** @nocollapse */
7765 VaPackageDropdownModule.ctorParameters = function () { return [
7766 { type: TranslateService },
7767 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['CURRENT_LANG',] }] },
7768 { type: Observable, decorators: [{ type: Optional }, { type: Inject, args: ['DEFAULT_LANG',] }] }
7769 ]; };
7770 return VaPackageDropdownModule;
7771}());
7772if (false) {
7773 /**
7774 * @type {?}
7775 * @private
7776 */
7777 VaPackageDropdownModule.prototype.translateService;
7778}
7779
7780/**
7781 * @fileoverview added by tsickle
7782 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7783 */
7784var VaProductDetailsComponent = /** @class */ (function () {
7785 function VaProductDetailsComponent() {
7786 this.hasVerifiedContract = false;
7787 this.canAccessContractPricing = false;
7788 this.showActionButton = false;
7789 this.showPricing = false;
7790 this.showPricingAction = false;
7791 this.loaded = true;
7792 this.enableClicked = new EventEmitter();
7793 this.addonSelected = new EventEmitter();
7794 this.primaryPricingActionSelected = new EventEmitter();
7795 this.pricingActionSelected = new EventEmitter();
7796 }
7797 /**
7798 * @return {?}
7799 */
7800 VaProductDetailsComponent.prototype.getAddons = /**
7801 * @return {?}
7802 */
7803 function () {
7804 if (!this._addons) {
7805 this._addons = this.product.addons.map((/**
7806 * @param {?} addon
7807 * @return {?}
7808 */
7809 function (addon) { return Addon.fromApi(addon); }));
7810 }
7811 return this._addons;
7812 };
7813 /**
7814 * @return {?}
7815 */
7816 VaProductDetailsComponent.prototype.getActionLabel = /**
7817 * @return {?}
7818 */
7819 function () {
7820 if (this.product.isArchived) {
7821 return 'Enable';
7822 }
7823 return 'Enabled';
7824 };
7825 Object.defineProperty(VaProductDetailsComponent.prototype, "price", {
7826 get: /**
7827 * @return {?}
7828 */
7829 function () {
7830 // NOTE: wholesalePrice = 0 means free, wholesalePrice = null || -1 means "contact sales"
7831 /** @type {?} */
7832 var prices = [];
7833 if (this.product.wholesalePrice !== CONTACT_SALES && this.product.wholesalePrice != null) {
7834 prices = [{
7835 price: this.product.wholesalePrice,
7836 frequency: this.product.billingFrequency
7837 }];
7838 }
7839 return {
7840 currency: this.product.currency,
7841 prices: prices
7842 };
7843 },
7844 enumerable: true,
7845 configurable: true
7846 });
7847 /**
7848 * @param {?} addonId
7849 * @return {?}
7850 */
7851 VaProductDetailsComponent.prototype.onAddonSelected = /**
7852 * @param {?} addonId
7853 * @return {?}
7854 */
7855 function (addonId) {
7856 this.addonSelected.emit(addonId);
7857 };
7858 VaProductDetailsComponent.decorators = [
7859 { type: Component, args: [{
7860 selector: 'va-product-details',
7861 template: "<div class=\"page\">\n <va-header-container [iconUrl]=\"product.iconUrl\"\n [title]=\"product.name\"\n [tagline]=\"product.tagline\"\n [chipLabels]=\"product.getLmiCategoryNames()\"\n [pricing]=\"price\"\n [pricingLabel]=\"'Wholesale Price'\"\n [primaryPricingActionLabel]=\"primaryPricingActionLabel\"\n [pricingActionLabel]=\"pricingActionLabel\"\n [pricingActionEnabled]=\"showPricingAction\"\n [actionLabel]=\"getActionLabel()\"\n [actionEnabled]=\"product.isArchived\"\n [showAction]=\"showActionButton\"\n [showPricing]=\"showPricing\"\n [billedProduct]=\"billedProduct\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [loaded]=\"loaded\"\n (primaryPricingActionSelected)=\"primaryPricingActionSelected.emit()\"\n (pricingActionSelected)=\"pricingActionSelected.emit()\"\n (actionSelected)=\"enableClicked.emit()\">\n </va-header-container>\n <div class=\"product-details product-content\">\n <div class=\"left-column\">\n <ng-container *ngIf=\"product.description || product.keySellingPoints\">\n <va-selling-info [description]=\"product.description\"\n [keySellingPoints]=\"product.keySellingPoints\"></va-selling-info>\n </ng-container>\n <section *ngIf=\"product.addons?.length > 0\">\n <h2 class=\"va-component-title\">Add-Ons</h2>\n <va-addon-list (addonSelected)=\"onAddonSelected($event)\"\n [addons]=\"getAddons()\"\n [showPricing]=\"showPricing\"\n [hasVerifiedContract]=\"hasVerifiedContract\"\n [canAccessContractPricing]=\"canAccessContractPricing\"\n [partnerID]=\"partnerID\">\n </va-addon-list>\n </section>\n\n <section *ngIf=\"product.faqs?.length > 0\">\n <h2 class=\"va-component-title\">FAQs</h2>\n <va-faqs [faqs]=\"product.faqs\"></va-faqs>\n </section>\n </div>\n\n <div class=\"right-column\">\n <section *ngIf=\"product.restrictions?.country?.whitelist?.length > 0\">\n <supported-countries [countryCodes]=\"product.restrictions.country.whitelist\"></supported-countries>\n </section>\n\n <section *ngIf=\"product.screenshotUrls?.length > 0\">\n <h2 class=\"va-component-title\">Gallery</h2>\n <va-image-gallery [imageUrls]=\"product.screenshotUrls\"></va-image-gallery>\n </section>\n\n <section *ngIf=\"product.files?.length > 0\">\n <h2 class=\"va-component-title\">Files</h2>\n <va-files [files]=\"product.files\"></va-files>\n </section>\n </div>\n </div>\n</div>\n",
7862 styles: [":host{display:block;font-size:14px;line-height:1.4}:host *{box-sizing:border-box}.va-component-title{font-size:24px;font-weight:300;margin-top:0}@media screen and (min-width:600px){.va-component-title{font-size:32px}}img{max-width:100%}va-icon{display:inline-block}.sales-person-details{max-height:430px;overflow:hidden}.page{position:relative;margin:0 auto 20px;background:#fff;color:#212121;box-shadow:0 3px 10px rgba(33,33,33,.3);overflow:hidden;font-size:16px}.page .item-amount{color:#9e9e9e;font-size:14px;text-align:right;margin:0 24px 8px}section{padding:24px}.left-column{width:66%}@media screen and (max-width:600px){.left-column{width:100%}}.right-column{width:34%}.product-content{display:-webkit-box;display:flex}@media screen and (max-width:600px){.right-column{width:100%}.product-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}}"]
7863 }] }
7864 ];
7865 VaProductDetailsComponent.propDecorators = {
7866 product: [{ type: Input }],
7867 billedProduct: [{ type: Input }],
7868 hasVerifiedContract: [{ type: Input }],
7869 canAccessContractPricing: [{ type: Input }],
7870 showActionButton: [{ type: Input }],
7871 showPricing: [{ type: Input }],
7872 primaryPricingActionLabel: [{ type: Input }],
7873 pricingActionLabel: [{ type: Input }],
7874 showPricingAction: [{ type: Input }],
7875 loaded: [{ type: Input }],
7876 partnerID: [{ type: Input }],
7877 enableClicked: [{ type: Output }],
7878 addonSelected: [{ type: Output }],
7879 primaryPricingActionSelected: [{ type: Output }],
7880 pricingActionSelected: [{ type: Output }]
7881 };
7882 return VaProductDetailsComponent;
7883}());
7884if (false) {
7885 /** @type {?} */
7886 VaProductDetailsComponent.prototype.product;
7887 /** @type {?} */
7888 VaProductDetailsComponent.prototype.billedProduct;
7889 /** @type {?} */
7890 VaProductDetailsComponent.prototype.hasVerifiedContract;
7891 /** @type {?} */
7892 VaProductDetailsComponent.prototype.canAccessContractPricing;
7893 /** @type {?} */
7894 VaProductDetailsComponent.prototype.showActionButton;
7895 /** @type {?} */
7896 VaProductDetailsComponent.prototype.showPricing;
7897 /** @type {?} */
7898 VaProductDetailsComponent.prototype.primaryPricingActionLabel;
7899 /** @type {?} */
7900 VaProductDetailsComponent.prototype.pricingActionLabel;
7901 /** @type {?} */
7902 VaProductDetailsComponent.prototype.showPricingAction;
7903 /** @type {?} */
7904 VaProductDetailsComponent.prototype.loaded;
7905 /** @type {?} */
7906 VaProductDetailsComponent.prototype.partnerID;
7907 /** @type {?} */
7908 VaProductDetailsComponent.prototype.enableClicked;
7909 /** @type {?} */
7910 VaProductDetailsComponent.prototype.addonSelected;
7911 /** @type {?} */
7912 VaProductDetailsComponent.prototype.primaryPricingActionSelected;
7913 /** @type {?} */
7914 VaProductDetailsComponent.prototype.pricingActionSelected;
7915 /**
7916 * @type {?}
7917 * @private
7918 */
7919 VaProductDetailsComponent.prototype._addons;
7920}
7921
7922/**
7923 * @fileoverview added by tsickle
7924 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7925 */
7926var VaProductDetailsModule = /** @class */ (function () {
7927 function VaProductDetailsModule() {
7928 }
7929 VaProductDetailsModule.decorators = [
7930 { type: NgModule, args: [{
7931 imports: [
7932 VaImageGalleryModule,
7933 CommonModule,
7934 VaIconModule,
7935 VaPricingModule, VaFilesModule, VaFaqsModule, VaSellingInfoModule,
7936 VaHeaderContainerModule, VaSafeHtmlModule, VaAddonListModule, RestrictionsModule
7937 ],
7938 declarations: [VaProductDetailsComponent],
7939 exports: [VaProductDetailsComponent],
7940 entryComponents: [VaProductDetailsComponent]
7941 },] }
7942 ];
7943 return VaProductDetailsModule;
7944}());
7945
7946/**
7947 * @fileoverview added by tsickle
7948 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7949 */
7950var ResellerItem = /** @class */ (function () {
7951 function ResellerItem(data) {
7952 this.quantity = 1;
7953 data = data || {};
7954 Object.assign(this, data);
7955 }
7956 return ResellerItem;
7957}());
7958if (false) {
7959 /** @type {?} */
7960 ResellerItem.prototype.appId;
7961 /** @type {?} */
7962 ResellerItem.prototype.addonId;
7963 /** @type {?} */
7964 ResellerItem.prototype.name;
7965 /** @type {?} */
7966 ResellerItem.prototype.icon;
7967 /** @type {?} */
7968 ResellerItem.prototype.tagline;
7969 /** @type {?} */
7970 ResellerItem.prototype.headerImage;
7971 /** @type {?} */
7972 ResellerItem.prototype.currency;
7973 /** @type {?} */
7974 ResellerItem.prototype.price;
7975 /** @type {?} */
7976 ResellerItem.prototype.billingFrequency;
7977 /** @type {?} */
7978 ResellerItem.prototype.lmiCategories;
7979 /** @type {?} */
7980 ResellerItem.prototype.enabled;
7981 /** @type {?} */
7982 ResellerItem.prototype.isCustom;
7983 /** @type {?} */
7984 ResellerItem.prototype.orderForm;
7985 /** @type {?} */
7986 ResellerItem.prototype.quantity;
7987 /** @type {?} */
7988 ResellerItem.prototype.allowMultipleActivations;
7989 /** @type {?} */
7990 ResellerItem.prototype.usesCustomizationForm;
7991 /** @type {?} */
7992 ResellerItem.prototype.usesActivationSpecificEntryUrl;
7993 /** @type {?} */
7994 ResellerItem.prototype.entryUrl;
7995 /** @type {?} */
7996 ResellerItem.prototype.restrictions;
7997 /** @type {?} */
7998 ResellerItem.prototype.activationRequiresApproval;
7999 /** @type {?} */
8000 ResellerItem.prototype.billingId;
8001 /** @type {?} */
8002 ResellerItem.prototype.usesEditions;
8003 /** @type {?} */
8004 ResellerItem.prototype.editionIds;
8005 /** @type {?} */
8006 ResellerItem.prototype.suggestedRetailPrice;
8007 /** @type {?} */
8008 ResellerItem.prototype.editionId;
8009 /** @type {?} */
8010 ResellerItem.prototype.trialConfiguration;
8011 /** @type {?} */
8012 ResellerItem.prototype.integration;
8013}
8014
8015/**
8016 * @fileoverview added by tsickle
8017 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8018 */
8019var CheckboxField = /** @class */ (function (_super) {
8020 __extends(CheckboxField, _super);
8021 function CheckboxField() {
8022 var _this = _super !== null && _super.apply(this, arguments) || this;
8023 _this.controlType = 'checkbox';
8024 return _this;
8025 }
8026 return CheckboxField;
8027}(FieldBase));
8028if (false) {
8029 /** @type {?} */
8030 CheckboxField.prototype.controlType;
8031}
8032
8033/**
8034 * @fileoverview added by tsickle
8035 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8036 */
8037/**
8038 * @record
8039 */
8040function Option() { }
8041if (false) {
8042 /** @type {?} */
8043 Option.prototype.value;
8044 /** @type {?} */
8045 Option.prototype.label;
8046 /** @type {?|undefined} */
8047 Option.prototype.disabled;
8048}
8049/**
8050 * @record
8051 */
8052function DropDownFieldOptions() { }
8053if (false) {
8054 /** @type {?} */
8055 DropDownFieldOptions.prototype.options;
8056 /** @type {?|undefined} */
8057 DropDownFieldOptions.prototype.allowMultiples;
8058 /** @type {?|undefined} */
8059 DropDownFieldOptions.prototype.allowDuplicates;
8060 /** @type {?|undefined} */
8061 DropDownFieldOptions.prototype.maxChoices;
8062}
8063var DropdownField = /** @class */ (function (_super) {
8064 __extends(DropdownField, _super);
8065 function DropdownField(options) {
8066 var _this = _super.call(this, options) || this;
8067 _this.controlType = 'dropdown';
8068 _this.options = [];
8069 if (!!options.options && options.options.length > 0) {
8070 // Because this typeof guard is on the element and not the array as a whole typescript doesn't recognize it as a valid type assertion
8071 // The ts-ignore's are required because of this
8072 if (typeof options.options[0] === 'string') {
8073 if (options.allowMultiples) {
8074 // @ts-ignore
8075 _this.options = options.options.map((/**
8076 * @param {?} o
8077 * @return {?}
8078 */
8079 function (o) { return ({ value: o, name: o }); }));
8080 }
8081 else {
8082 // @ts-ignore
8083 _this.options = options.options.map((/**
8084 * @param {?} o
8085 * @return {?}
8086 */
8087 function (o) { return ({ value: o, label: o }); }));
8088 }
8089 }
8090 else {
8091 if (options.allowMultiples) {
8092 // @ts-ignore
8093 _this.options = options.options.map((/**
8094 * @param {?} o
8095 * @return {?}
8096 */
8097 function (o) { return ({ value: o.value, name: o.label }); }));
8098 }
8099 else {
8100 // @ts-ignore
8101 _this.options = options.options;
8102 }
8103 }
8104 }
8105 _this.allowMultiples = !!options.allowMultiples;
8106 _this.allowDuplicates = !!options.allowDuplicates;
8107 _this.maxChoices = options.maxChoices ? options.maxChoices : 1;
8108 _this.validator = _this.validatorBuilder();
8109 return _this;
8110 }
8111 /**
8112 * @protected
8113 * @return {?}
8114 */
8115 DropdownField.prototype.validatorBuilder = /**
8116 * @protected
8117 * @return {?}
8118 */
8119 function () {
8120 /** @type {?} */
8121 var maxChoices = this.maxChoices;
8122 return (/**
8123 * @param {?} control
8124 * @return {?}
8125 */
8126 function (control) {
8127 if (Array.isArray(control.value) && maxChoices && control.value.length > maxChoices) {
8128 return { overMaxChoices: true };
8129 }
8130 });
8131 };
8132 return DropdownField;
8133}(FieldBase));
8134if (false) {
8135 /** @type {?} */
8136 DropdownField.prototype.controlType;
8137 /** @type {?} */
8138 DropdownField.prototype.options;
8139 /** @type {?} */
8140 DropdownField.prototype.allowMultiples;
8141 /** @type {?} */
8142 DropdownField.prototype.allowDuplicates;
8143 /** @type {?} */
8144 DropdownField.prototype.maxChoices;
8145}
8146
8147/**
8148 * @fileoverview added by tsickle
8149 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8150 */
8151/** @type {?} */
8152var DEFAULT_NUM_FILES = 5;
8153/**
8154 * @record
8155 */
8156function FileUploadGroupFieldOptions() { }
8157if (false) {
8158 /** @type {?} */
8159 FileUploadGroupFieldOptions.prototype.fileType;
8160 /** @type {?} */
8161 FileUploadGroupFieldOptions.prototype.uploadUrl;
8162 /** @type {?} */
8163 FileUploadGroupFieldOptions.prototype.numFiles;
8164}
8165var FileUploadGroupField = /** @class */ (function (_super) {
8166 __extends(FileUploadGroupField, _super);
8167 function FileUploadGroupField(options) {
8168 var _this = _super.call(this, options) || this;
8169 _this.controlType = 'file';
8170 if (!options.uploadUrl) {
8171 throw new Error('uploadUrl is required.');
8172 }
8173 _this.fileType = options.fileType || 'image';
8174 _this.numFiles = options.numFiles || DEFAULT_NUM_FILES;
8175 _this.uploadUrl = options.uploadUrl;
8176 _this.value = [];
8177 return _this;
8178 }
8179 return FileUploadGroupField;
8180}(FieldBase));
8181if (false) {
8182 /** @type {?} */
8183 FileUploadGroupField.prototype.controlType;
8184 /** @type {?} */
8185 FileUploadGroupField.prototype.fileType;
8186 /** @type {?} */
8187 FileUploadGroupField.prototype.uploadUrl;
8188 /** @type {?} */
8189 FileUploadGroupField.prototype.numFiles;
8190}
8191
8192/**
8193 * @fileoverview added by tsickle
8194 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8195 */
8196var TextareaField = /** @class */ (function (_super) {
8197 __extends(TextareaField, _super);
8198 function TextareaField() {
8199 var _this = _super !== null && _super.apply(this, arguments) || this;
8200 _this.controlType = 'textarea';
8201 return _this;
8202 }
8203 return TextareaField;
8204}(FieldBase));
8205if (false) {
8206 /** @type {?} */
8207 TextareaField.prototype.controlType;
8208}
8209
8210/**
8211 * @fileoverview added by tsickle
8212 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8213 */
8214/**
8215 * @record
8216 */
8217function TextBoxFieldOptions() { }
8218if (false) {
8219 /** @type {?} */
8220 TextBoxFieldOptions.prototype.textboxType;
8221 /** @type {?|undefined} */
8222 TextBoxFieldOptions.prototype.prefix;
8223 /** @type {?|undefined} */
8224 TextBoxFieldOptions.prototype.suffix;
8225 /** @type {?|undefined} */
8226 TextBoxFieldOptions.prototype.displayOnly;
8227}
8228var TextboxField = /** @class */ (function (_super) {
8229 __extends(TextboxField, _super);
8230 function TextboxField(options) {
8231 var _this = _super.call(this, options) || this;
8232 _this.controlType = 'textbox';
8233 _this.textboxType = options.textboxType || 'text';
8234 _this.prefix = options.prefix || '';
8235 _this.suffix = options.suffix || '';
8236 _this.regexValidator = options.regexValidator || '';
8237 _this.regexErrorMessage = options.regexErrorMessage || '';
8238 _this.displayOnly = options.displayOnly || false;
8239 return _this;
8240 }
8241 return TextboxField;
8242}(FieldBase));
8243if (false) {
8244 /** @type {?} */
8245 TextboxField.prototype.controlType;
8246 /** @type {?} */
8247 TextboxField.prototype.textboxType;
8248 /** @type {?} */
8249 TextboxField.prototype.prefix;
8250 /** @type {?} */
8251 TextboxField.prototype.suffix;
8252 /** @type {?} */
8253 TextboxField.prototype.regexValidator;
8254 /** @type {?} */
8255 TextboxField.prototype.regexErrorMessage;
8256 /** @type {?} */
8257 TextboxField.prototype.displayOnly;
8258}
8259
8260/**
8261 * @fileoverview added by tsickle
8262 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8263 */
8264/**
8265 * @record
8266 */
8267function User() { }
8268if (false) {
8269 /** @type {?} */
8270 User.prototype.userId;
8271 /** @type {?} */
8272 User.prototype.email;
8273 /** @type {?|undefined} */
8274 User.prototype.firstName;
8275 /** @type {?|undefined} */
8276 User.prototype.lastName;
8277}
8278/**
8279 * @record
8280 */
8281function VBCUserFieldOptions() { }
8282if (false) {
8283 /** @type {?} */
8284 VBCUserFieldOptions.prototype.users;
8285}
8286var VBCUserField = /** @class */ (function (_super) {
8287 __extends(VBCUserField, _super);
8288 function VBCUserField(options) {
8289 var _this = _super.call(this, {
8290 id: options.id,
8291 label: options.label,
8292 required: options.required,
8293 description: options.description,
8294 options: getOptions(options.users),
8295 disabled: options.disabled,
8296 forOfficeUseOnly: options.forOfficeUseOnly
8297 }) || this;
8298 _this.controlType = 'vbcuser';
8299 return _this;
8300 }
8301 return VBCUserField;
8302}(DropdownField));
8303if (false) {
8304 /** @type {?} */
8305 VBCUserField.prototype.controlType;
8306}
8307/**
8308 * @param {?} vbcUsers
8309 * @return {?}
8310 */
8311function getOptions(vbcUsers) {
8312 if (vbcUsers && vbcUsers.length > 0) {
8313 vbcUsers.sort(compareUsersByEmail);
8314 return vbcUsers.map((/**
8315 * @param {?} user
8316 * @return {?}
8317 */
8318 function (user) {
8319 /** @type {?} */
8320 var labelString = createLabelString(user.firstName, user.lastName, user.email);
8321 if (user.userId && user.email && user.firstName && user.lastName) {
8322 return {
8323 label: labelString,
8324 value: JSON.stringify({ firstName: user.firstName, lastName: user.lastName, email: user.email, id: user.userId })
8325 };
8326 }
8327 return { label: labelString, value: '', disabled: true };
8328 }));
8329 }
8330 return [{ label: 'No Users — Please add one to this account', value: '', disabled: true }];
8331}
8332/**
8333 * @param {?} a
8334 * @param {?} b
8335 * @return {?}
8336 */
8337function compareUsersByEmail(a, b) {
8338 if (a == null) {
8339 return -1;
8340 }
8341 if (b == null) {
8342 return 1;
8343 }
8344 return a.email.localeCompare(b.email);
8345}
8346/**
8347 * @param {?} firstName
8348 * @param {?} lastName
8349 * @param {?} email
8350 * @return {?}
8351 */
8352function createLabelString(firstName, lastName, email) {
8353 /** @type {?} */
8354 var returnString = '';
8355 returnString += firstName ? firstName + ' ' : '';
8356 returnString += lastName ? lastName + ' ' : '';
8357 returnString += email ? "(" + email + ")" : '';
8358 return returnString;
8359}
8360
8361/**
8362 * @fileoverview added by tsickle
8363 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8364 */
8365
8366/**
8367 * @fileoverview added by tsickle
8368 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8369 */
8370
8371/**
8372 * @fileoverview added by tsickle
8373 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8374 */
8375
8376/**
8377 * @fileoverview added by tsickle
8378 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
8379 */
8380
8381export { ActivationStatus, AddonDetailsComponent, AddonDropDownFormSectionData, AddonModule, BUSINESS_USER, CHECK_BOX, CONTACT_SALES, CardListStencilComponent, CardStencilComponent, CaseTransform, CheckboxField, DROP_DOWN, DetailsStencilComponent, DropDownFormSectionComponent, DropDownFormSectionData, DropdownField, FILES, FORM_FIELDS, FieldBase, FieldBuilderComponent, FieldComponent, FieldService, File, FileUploadGroupField, HeimdallServiceToken, LMI_CATEGORIES, LMI_CATEGORIES_BY_NAME, LMI_CATEGORY_MAP, ListStencilComponent, OrderFormComponent, OrderFormSectionComponent, OrderFormSectionData, Package, PackageDetails, Product, ProductOrderFormSectionData, ProductWithParent, ProductsNavV2Component, ResellerItem, RestrictionsModule, STOREFRONT_FILTER_NAME, SearchBarStencilComponent, StencilsModule, StoreCardComponent, StoreCardModule, StoreComponent, StoreModule, StoreService, StorefrontComponent, TEXT_AREA, TEXT_BOX, TextareaField, TextboxField, VBCUserField, VaAddonListComponent, VaAddonListModule, VaFaqsComponent, VaFaqsModule, VaFilesComponent, VaFilesModule, VaHeaderContainerComponent, VaHeaderContainerModule, VaOrderFormModule, VaPackageDetailsComponent, VaPackageDetailsModule, VaPackageDetailsV2Component, VaPackageDetailsV2Module, VaPackageDropdownComponent, VaPackageDropdownModule, VaPricingComponent, VaPricingModule, VaProductDetailsComponent, VaProductDetailsModule, VaProductsNavComponent, VaProductsNavModule, VaSalespersonDetailsComponent, VaSalespersonDetailsModule, VaSellingInfoComponent, VaSellingInfoModule, combineProductOrderWithContainedProducts, convertToPackageDetails, getUniqueProductAddonId, orderProductsAndAddons, HeimdallClient as ɵb, HeimdallClientModule as ɵc, HighlightPricingComponent as ɵd, TablePricingComponent as ɵe, OrderItemListComponent as ɵf, PricePipe as ɵg, FormatBillingFrequencyPipe as ɵh, OrderFormService as ɵi, OrderItemListService as ɵj, SupportedCountriesComponent as ɵk, VaPackageDetailsV2Component as ɵl, Sellable as ɵm, VaPackageDropdownItemComponent as ɵn };
8382//# sourceMappingURL=vendasta-store.js.map