An error occurred while processing the template.
The following has evaluated to null or missing: ==> isExcluded [in template "10154#10192#153417688" at line 866, column 23] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${isExcluded} [in template "10154#10192#153417688" at line 866, column 21] ----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
5<#assign url404 = '/error/404.html'>
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
7<#assign currentEnvironment = 'prod' >
8<#assign prcaURL = propsUtil.get('elan.prca.url')>
9
10<#assign lc= qstringmap["ecdma-lc"]?first>
11<#assign lc = htmlUtil.escape(lc)>
12<#assign lc = htmlUtil.escapeJS(lc)>
13
14<#assign prefix = "00000" >
15<#assign lcWithPrefix = prefix + lc >
16<#assign withPrefixLength = lcWithPrefix?length >
17<#assign startHere = withPrefixLength - 5>
18<#assign lc = lcWithPrefix?substring(startHere)>
19
20
21<#if qstringmap["ecid"]?has_content>
22 <#assign ecidExt = qstringmap["ecid"]?first>
23 <#assign ecidExt = htmlUtil.escape(ecidExt)>
24 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
25 <#assign ecidExt = "&ecid=" + ecidExt>
26<#else>
27 <#assign ecidExt="">
28</#if>
29<#if oadURL?contains("uat-")>
30 <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
31 <#assign currentEnvironment = 'uat' >
32<#else>
33 <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
34</#if>
35 <script>
36 //console.log('%ccurrentEnvironment: ', 'font-weight: bold; color: green;', '${currentEnvironment}');
37 </script>
38<#assign campaignId = "" >
39<#assign useprcaValue = "" >
40<#assign ecidExt="">
41<#if qstringmap["ecid"]?has_content>
42 <#assign campaignId = qstringmap["ecid"]?first >
43 <#assign campaignId = htmlUtil.escape(campaignId)>
44 <#assign campaignId = htmlUtil.escapeJS(campaignId)>
45
46 <#assign ecidExt = qstringmap["ecid"]?first>
47 <#assign ecidExt = htmlUtil.escape(ecidExt)>
48 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
49 <#assign ecidExt = "&ecid=" + ecidExt>
50</#if>
51
52<#assign dcoSourceCode = "">
53<#assign dcoSourceCodeQueryParameter = "">
54
55<#if qstringmap["sourcecode"]?has_content>
56 <#assign dcoSourceCode = qstringmap["sourcecode"]?first>
57 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
58 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
59 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
60<#elseif qstringmap["sourceCode"]?has_content>
61 <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
62 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
63 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
64 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
65</#if>
66
67<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
68<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
69<#assign clientProfile = clientProfileList?first>
70<#assign partnerName = clientProfile.getMarketingNameLong()>
71<#assign pbu = clientProfile.getPbu()>
72<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
73<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
74
75<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu + '&' + lc)>
76<#assign temp = []>
77<#assign consumerCards = []>
78<#assign businessCards = []>
79<#assign offerTypeList = []>
80<#assign index = 0>
81<#assign consumerOfferTypes = ["101", "103", "108", "109", "115", "104", "141", "147", "138", "154"]>
82<#assign businessOfferTypes = ["128", "121", "143", "144"]>
83<#list fiCardsData as fib>
84 <#assign useprcaValue = fib.useprca!"">
85 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
86 <#assign offerTypeList = offerTypeList + [fib.offerType]>
87 <#if (consumerOfferTypes?seq_contains(fib.offerType))>
88 <#assign consumerCards = consumerCards + fiCardsData[index..index]>
89 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
90 <#assign businessCards = businessCards + fiCardsData[index..index]>
91 </#if>
92 <#assign temp = temp + fiCardsData[index..index]>
93 </#if>
94 <#assign index = index + 1>
95</#list>
96
97<#assign fiCardsData = temp>
98 <script>
99 //console.log("fi card data count", ${fiCardsData?size})
100</script>
101
102<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')>
103<#if (clientdata?size > 0)>
104 <#assign backgroundColor = clientdata[0].backgroundHexColor>
105</#if>
106
107<#if (fiCardsData?size > 0)>
108 <style>
109 .excludeModal__overlay {
110 position: fixed;
111 top: 0;
112 left: 0;
113 right: 0;
114 bottom: 0;
115 background: rgba(0,0,0,0.6);
116 display: flex;
117 justify-content: center;
118 align-items: center;
119 }
120
121 .excludeModal__container {
122 background-color: #fff;
123 padding: 30px;
124 min-width: 500px;
125 max-width: 500px;
126 max-height: 100vh;
127 border-radius: 4px;
128 overflow-y: auto;
129 box-sizing: border-box;
130 }
131
132 .excludeModal__header {
133 display: flex;
134 justify-content: space-between;
135 align-items: center;
136 }
137
138 .modal .excludeModal__container .excludeModal__title {
139 margin-top: 0;
140 margin-bottom: 0;
141 font-weight: 600;
142 font-size: 20px;
143 line-height: 1.25;
144 color: #00449e;
145 box-sizing: border-box;
146 }
147
148 .excludeModal__close {
149 background: transparent;
150 border: 1px solid white;
151 padding: 4px 8px;
152 float: right;
153 }
154
155 .excludeModal__close:hover {
156 border: 1px solid black;
157 }
158
159 .excludeModal__close:before { content: "\2715"; }
160
161 @keyframes mmfadeIn {
162 from { opacity: 0; }
163 to { opacity: 1; }
164 }
165
166 @keyframes mmfadeOut {
167 from { opacity: 1; }
168 to { opacity: 0; }
169 }
170
171 @keyframes mmslideIn {
172 from { transform: translateY(15%); }
173 to { transform: translateY(0); }
174 }
175
176 @keyframes mmslideOut {
177 from { transform: translateY(0); }
178 to { transform: translateY(-10%); }
179 }
180
181 .micromodal-slide {
182 display: none;
183 }
184
185 .micromodal-slide.is-open {
186 display: block;
187 }
188
189 .micromodal-slide[aria-hidden="false"] .excludeModal__overlay {
190 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
191 }
192
193 .micromodal-slide[aria-hidden="false"] .excludeModal__container {
194 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
195 }
196
197 .micromodal-slide[aria-hidden="true"] .excludeModal__overlay {
198 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
199 }
200
201 .micromodal-slide[aria-hidden="true"] .excludeModal__container {
202 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
203 }
204
205 .micromodal-slide .excludeModal__container,
206 .micromodal-slide .excludeModal__overlay {
207 will-change: transform;
208 }
209 </style>
210 <#if url?contains("index")>
211 <#assign isExcluded = 0>
212 <#assign offerId = "">
213 <#assign sourceCode = "">
214 <#assign cardArtImage = "">
215 <#assign productUrlHero = "">
216 <#assign product = "">
217 <#assign cardIndex = 0>
218 <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)>
219 <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109"))>
220 <#list consumerCards as card>
221 <#if (card.offerType=="108") || (card.offerType=="109")>
222 <#assign isExcluded = 0>
223 <#if card.dmaexclude??>
224 <#assign isExcluded = card.dmaexclude?number!0>
225 </#if>
226 <#assign offerId = card.offerId>
227 <#assign sourceCode = card.sourceCode>
228 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
229 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
230
231 <#assign productUrlHero="consumer-platinum2103">
232 <#assign product="Platinum">
233 <#assign cardIndex = 1>
234 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&' + sourceCode)>
235 <#if (scrapedData?size > 0)>
236 <#list scrapedData as sItem>
237 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
238 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
239 <#break>
240 </#if>
241 </#list>
242 <script>
243 $(document).ready(function () {
244 var aprText = "${apr}";
245 //console.log('aprText: ${aprText!''}');
246 if (aprText) {
247 $(".apr-full-text").html(aprText);
248 try {
249 var matches= aprText.match(/\d+(\.\d+)?%?/g);
250 var billing_cycle = matches[1];
251 var apr_min = apr_min = matches[2];
252 var apr_max = apr_max = matches[3];
253 //console.log('billing_cycle', billing_cycle);
254 //console.log('apr_min', apr_min);
255 //console.log('apr_max', apr_max);
256 if (billing_cycle) {
257 //console.log($(".scraped-billing-cycle"));
258 $(".scraped-billing-cycle").html(billing_cycle);
259 }
260 if (apr_min) {
261 $(".scraped-apr-min").html(apr_min);
262 }
263 if (apr_max) {
264 $('.scraped-apr-max').html(apr_max);
265 }
266
267 } catch (e) {
268 console.log(e);
269 }
270 }
271 });
272 </script>
273 </#if>
274 <script>
275 $(document).ready(function () {
276 $(".see-terms").replaceWith('<a href="${oadURL_TC}?step=display&offerId=${card.offerId}&locationCode=${lc}" target="_blank"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions</a>');
277 });
278 </script>
279 </#if>
280 </#list>
281 <#else>
282 <#assign isExcluded = 0>
283 <#if consumerCards[0].dmaexclude??>
284 <#assign isExcluded = consumerCards[0].dmaexclude?number!0>
285 </#if>
286 <#assign displayedCard = consumerCards[0]>
287 <#assign offerId = displayedCard.offerId>
288 <#assign sourceCode = displayedCard.sourceCode>
289 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
290 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
291 <#if (displayedCard.offerType=="108" || displayedCard.offerType=="109")>
292 <#assign productUrlHero="consumer-platinum">
293 <#assign product="Platinum">
294 <#assign cardIndex = 1>
295 <#elseif (displayedCard.offerType=="104")>
296 <#assign productUrlHero = "max-cash">
297 <#assign product="Max Cash Preferred">
298 <#assign cardIndex = 0>
299 <#elseif (displayedCard.offerType=="115")>
300 <#assign productUrlHero = "secured">
301 <#assign product="Secured">
302 <#assign cardIndex = 2>
303 </#if>
304 </#if>
305 <#if product?has_content && product != "">
306 <#assign card_text = product + " Card">
307 </#if>
308 </#if>
309 <#if (class.getData() == "landing-business" && businessCards?size > 0)>
310 <#if (offerTypeList?seq_contains("128")) >
311 <#list businessCards as card>
312 <#if (card.offerType=="128")>
313 <#assign isExcluded = 0>
314 <#if card.dmaexclude??>
315 <#assign isExcluded = card.dmaexclude?number!0>
316 </#if>
317 <#assign offerId = card.offerId>
318 <#assign sourceCode = card.sourceCode>
319 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
320 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
321
322 <#assign productUrlHero="business-cash-preferred">
323 <#assign product="Business Cash Preferred">
324 <#assign cardIndex = 1>
325 </#if>
326 </#list>
327 <#else>
328 <#assign isExcluded = 0>
329 <#if businessCards[0].dmaexclude??>
330 <#assign isExcluded = businessCards[0].dmaexclude?number!0>
331 </#if>
332 <#assign displayedCard = businessCards[0]>
333 <#assign offerId = displayedCard.offerId>
334 <#assign sourceCode = displayedCard.sourceCode>
335 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
336 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
337 <#if (displayedCard.offerType=="143")>
338 <#assign productUrlHero="business-real-rewards">
339 <#assign product="Business Real Rewards">
340 <#assign cardIndex = 2>
341 <#elseif (displayedCard.offerType=="144")>
342 <#assign productUrlHero="smart-business-rewards">
343 <#assign product="Smart Business Rewards">
344 <#assign cardIndex = 0>
345 <#elseif (displayedCard.offerType=="121")>
346 <#assign productUrlHero = "business-platinum">
347 <#assign product="Business">
348 <#assign cardIndex = 3>
349 </#if>
350 </#if>
351 <#if product?has_content && product != "">
352 <#assign card_text = product + " Card">
353 </#if>
354 </#if>
355 <div class="hero-container product-${productUrlHero} tier3-hero-${class.getData()}">
356 <div class="hero-main">
357 <div class="hero-main-container">
358 <div class="hero-main-offer">
359 <div class="offer-detail">
360 <div class="offer-detail-cardArt cardArtImg">
361 <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}"
362 class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
363 <#-- <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!'' }"
364 class="jn-img-responsive">-->
365 <p>${card_text!''}</p>
366 </div>
367 <div class="offer-detail-text text-color-default hide-desktop">
368 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
369 </div>
370 <#if isExcluded == 0>
371 <#if useprcaValue == "1">
372 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post">
373 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
374 <input id='offerId' type="hidden" name="offerId" value="${offerId}">
375 <input type="hidden" name="preparerType" value="customer">
376 </form>
377 <a
378 class="jn-button hide-desktop btn"
379 data-button-name="cta-button-top"
380 data-product-name="${productUrlHero!''}"
381 href="#"
382 offerId="${offerId!''}"
383 onclick="submitForm(event)"
384 >
385 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
386 </a>
387
388
389
390 <#else>
391 <a
392 class="jn-button hide-desktop btn"
393 data-button-name="cta-button-top"
394 data-product-name="${productUrlHero!''}"
395 href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
396 >
397 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
398 </a>
399 </#if>
400
401 <#else>
402 <a
403 class="jn-button hide-desktop btn"
404 data-button-name="cta-button-top"
405 data-product-name="${productUrlHero!''}"
406 data-micromodal-trigger="modal-index-hero"
407 href="javascript:void(0);"
408 >
409 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
410 </a>
411 </#if>
412 </div>
413 <div class="offer-header">
414 <div class="offer-text-top">
415 ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}
416 </div>
417 <div class="offer-text-bottom hide-mobile">
418 <div class="offer-detail-text text-color-default ">
419 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
420 </div>
421
422 <#if isExcluded == 0>
423 <#if useprcaValue == "1">
424 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post">
425 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
426 <input id='offerId' type="hidden" name="offerId" value="${offerId!''}">
427 <input type="hidden" name="preparerType" value="customer">
428 </form>
429 <a
430 class="jn-button"
431 data-button-name="cta-button-top"
432 data-product-name="${productUrlHero!''}"
433 href="#"
434 offerId="${offerId!''}"
435 onclick="submitForm(event)"
436 >
437 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
438 </a>
439
440 <#else>
441 <a
442 class="jn-button"
443 data-button-name="cta-button-top"
444 data-product-name="${productUrlHero!''}"
445 href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
446 >
447 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
448 </a>
449 </#if>
450 <#else>
451 <a
452 class="jn-button"
453 data-button-name="cta-button-top"
454 data-product-name="${productUrlHero!''}"
455 data-micromodal-trigger="modal-index-hero"
456 href="javascript:void(0);"
457 >
458 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
459 </a>
460 </#if>
461 </div>
462 </div>
463 </div>
464 </div>
465 </div>
466 </div>
467
468 <div aria-hidden="true" class="modal micromodal-slide" id="modal-index-hero" >
469 <div class="excludeModal__overlay" data-micromodal-close tabindex="-1">
470 <div
471 aria-modal="true"
472 aria-labelledby="modal-index-hero-title"
473 class="excludeModal__container"
474 role="dialog"
475 >
476 <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button>
477 <header class="excludeModal__header">
478 <h2 class="excludeModal__title" id="modal-index-hero-title">
479 <#if productTitle.getSiblings()[cardIndex].excludedMessage?? >
480 ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""}
481 </#if>
482 </h2>
483 </header>
484 </div>
485 </div>
486 </div>
487 <#else>
488 <#assign hasBalanceTransferCalculator = false>
489 <#list fiCardsData as fib>
490 <#switch fib.offerType>
491 <#case "101">
492 <#assign cardIndex = 3 >
493 <#assign productUrlHero = "consumer-edr">
494 <#assign product="Everyday Rewards+">
495 <#assign hasBalanceTransferCalculator = false>
496 <#break>
497 <#case "103">
498 <#assign cardIndex = 3 >
499 <#assign productUrlHero = "consumer-edr">
500 <#assign product="Everyday Rewards+">
501 <#assign hasBalanceTransferCalculator = false>
502 <#break>
503 <#case "104">
504 <#assign cardIndex = 0 >
505 <#assign productUrlHero="max-cash">
506 <#assign product="Max Cash Preferred">
507 <#assign hasBalanceTransferCalculator = false>
508 <#break>
509 <#case "108">
510 <#assign cardIndex = 1 >
511 <#assign productUrlHero = "consumer-platinum">
512 <#assign product="Platinum">
513 <#assign hasBalanceTransferCalculator = true>
514 <#break>
515 <#case "109">
516 <#assign cardIndex = 1 >
517 <#assign productUrlHero = "consumer-platinum">
518 <#assign product="Platinum">
519 <#assign hasBalanceTransferCalculator = true>
520 <#break>
521 <#case "141">
522 <#assign cardIndex = 4 >
523 <#assign productUrlHero = "college-real-rewards">
524 <#assign product = "College Real Rewards" >
525 <#assign hasBalanceTransferCalculator = false>
526 <#break>
527 <#case "147">
528 <#assign cardIndex = 5 >
529 <#assign productUrlHero = "max-cash-secured">
530 <#assign product = "Max Cash Secured" >
531 <#assign hasBalanceTransferCalculator = false>
532 <#break>
533 <#case "115">
534 <#assign cardIndex = 2 >
535 <#assign productUrlHero = "secured">
536 <#assign product="Secured">
537 <#assign hasBalanceTransferCalculator = false>
538 <#break>
539 <#case "138">
540 <#assign cardIndex = 6 >
541 <#assign productUrlHero = "travel-rewards-plus">
542 <#assign product="Travel Rewards+">
543 <#assign hasBalanceTransferCalculator = false>
544 <#break>
545 <#case "154">
546 <#assign cardIndex = 7 >
547 <#assign productUrlHero = "reserve-rewards-plus">
548 <#assign product="Reserve Rewards+">
549 <#assign hasBalanceTransferCalculator = false>
550 <#break>
551 <#case "128">
552 <#assign cardIndex = 1 >
553 <#assign productUrlHero = "business-cash-preferred">
554 <#assign product="Business Cash Preferred">
555 <#assign hasBalanceTransferCalculator = false>
556 <#break>
557 <#case "143">
558 <#assign cardIndex = 2 >
559 <#assign productUrlHero = "business-real-rewards">
560 <#assign product="Business Real Rewards">
561 <#assign hasBalanceTransferCalculator = false>
562 <#break>
563 <#case "144">
564 <#assign cardIndex = 0 >
565 <#assign productUrlHero = "smart-business-rewards">
566 <#assign product="Smart Business Rewards">
567 <#assign hasBalanceTransferCalculator = false>
568 <#break>
569 <#case "121">
570 <#assign cardIndex = 3 >
571 <#assign productUrlHero = "business-platinum">
572 <#assign product="Business">
573 <#assign hasBalanceTransferCalculator = false>
574 <#break>
575 <#default>
576 </#switch>
577 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
578 <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">
579
580 <script>
581 console.log("offerType ${fib.offerType} productUrlHero ${productUrlHero} show calculator ${hasBalanceTransferCalculator?c}")
582 </script>
583
584 <#if url?matches(".*/${productUrlHero}\\?.*")>
585 <#assign isExcluded = 0>
586 <script>
587 console.log("fib.dmaexclude------>"+'${fib.dmaexclude}');
588 </script>
589 <#if fib.dmaexclude??>
590 <#assign isExcluded = fib.dmaexclude?number!0>
591 </#if>
592 <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")>
593
594 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')>
595 <#if (scrapedData?size > 0)>
596 <#list scrapedData as sItem>
597 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
598 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
599 <#break>
600 </#if>
601
602 </#list>
603 <script>
604 $(document).ready(function () {
605 var aprText = "${apr}";
606 //console.log('aprText',aprText);
607 if (aprText) {
608 $(".apr-full-text").html(aprText);
609 try {
610 var matches= aprText.match(/\d+(\.\d+)?%?/g);
611 var billing_cycle = matches[1];
612 var apr_min = apr_min = matches[2];
613 var apr_max = apr_max = matches[3];
614 //console.log('billing_cycle', billing_cycle);
615 //console.log('apr_min', apr_min);
616 //console.log('apr_max', apr_max);
617 if (billing_cycle) {
618 //console.log($(".scraped-billing-cycle"));
619 $(".scraped-billing-cycle").html(billing_cycle);
620 }
621 if (apr_min) {
622 $(".scraped-apr-min").html(apr_min);
623 }
624 if (apr_max) {
625 $('.scraped-apr-max').html(apr_max);
626 }
627
628 } catch (e) {
629 console.log(e);
630 }
631 }
632 });
633 </script>
634 </#if>
635 </#if>
636 <#if product?has_content && product != "">
637 <#assign card_text = product + " Card">
638 </#if>
639 <#assign tc_offerTypes = ['108', '109', '121', '144']>
640 <#assign calculator_offerTypes = ['101', '104', '138', '154', '128', '143', '144']>
641 <div class="hero-container ${class.getData()}">
642 <div class="hero-main">
643 <div class="hero-main-container">
644 <div class="hero-main-offer">
645 <div class="offer-detail">
646 <div class="offer-detail-cardArt cardArtImg">
647 <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}"
648 onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" class="jn-img-responsive">
649 <p>${card_text!''}</p>
650 <#if (hasBalanceTransferCalculator)>
651 <a href="javascript:void(0);" data-micromodal-trigger="modal-2"aria-hidden="true" >See how much you could save with a balance transfer</a>
652 </#if>
653 </div>
654 <div class="offer-detail-text text-color-default hide-desktop">
655 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
656
657 <#if (tc_offerTypes?seq_contains(fib.offerType))>
658 <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">
659 <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions
660 </a>
661 </#if>
662 <#if (calculator_offerTypes?seq_contains(fib.offerType))>
663 <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a>
664 </#if>
665 </div>
666
667 <#if isExcluded == 0>
668 <#if useprcaValue == "1">
669 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId!''}&preparerType=customer" method="post">
670 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
671 <input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}">
672 <input type="hidden" name="preparerType" value="customer">
673 </form>
674
675 <a
676 class="jn-button hide-desktop btn"
677 data-button-name="cta-button-top"
678 data-product-name="${productUrlHero!''}"
679 href="#"
680 offerId="${fib.offerId!''}"
681 onclick="submitForm(event)" >
682 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
683 </a>
684
685 <#else>
686 <a
687 class="jn-button hide-desktop btn"
688 data-button-name="cta-button-top"
689 data-product-name="${productUrlHero!''}"
690 href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
691 >
692 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
693
694 </a>
695 </#if>
696 <#else>
697 <a
698 class="jn-button hide-desktop btn"
699 data-button-name="cta-button-top"
700 data-product-name="${productUrlHero!''}"
701 data-micromodal-trigger="modal-product-hero"
702 href="javascript:void(0);"
703 >
704 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
705 </a>
706 </#if>
707 </div>
708 <div class="offer-header">
709 <div class="offer-text-top">
710 ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}
711 </div>
712 <div class="offer-text-bottom hide-mobile">
713 <div class="offer-detail-text text-color-default ">
714 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
715 <#if (tc_offerTypes?seq_contains(fib.offerType))>
716 <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">
717 <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions
718 </a>
719 </#if>
720 </div>
721
722 <#if isExcluded == 0>
723 <#if useprcaValue == "1">
724 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer" method="post" >
725 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
726 <input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}">
727 <input type="hidden" name="preparerType" value="customer">
728 </form>
729 <a
730 class="jn-button"
731 data-button-name="cta-button-top"
732 data-product-name="${productUrlHero!''}"
733 href="#"
734 offerId="${fib.offerId!''}"
735 onclick="submitForm(event)" >
736 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
737 </a>
738
739 <#else>
740 <a
741 class="jn-button"
742 data-button-name="cta-button-top"
743 data-product-name="${productUrlHero!''}"
744 href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
745 >
746 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
747
748 </a>
749 </#if>
750 <#else>
751 <a
752 class="jn-button"
753 data-button-name="cta-button-top"
754 data-product-name="${productUrlHero!''}"
755 data-micromodal-trigger="modal-product-hero"
756 href="javascript:void(0);"
757 >
758 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
759 </a>
760 </#if>
761 <#if (calculator_offerTypes?seq_contains(fib.offerType))>
762 <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a>
763 </#if>
764 </div>
765 </div>
766
767 </div>
768 </div>
769 </div>
770 </div>
771
772 <div aria-hidden="true" class="modal micromodal-slide" id="modal-product-hero" >
773 <div class="excludeModal__overlay" data-micromodal-close tabindex="-1">
774 <div
775 aria-modal="true"
776 aria-labelledby="modal-prodcut-hero-title"
777 class="excludeModal__container"
778 role="dialog"
779 >
780 <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button>
781 <header class="excludeModal__header">
782 <h2 class="excludeModal__title" id="modal-prodcut-hero-title">
783 <#if productTitle.getSiblings()[cardIndex].excludedMessage?? >
784 ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""}
785 </#if>
786 </h2>
787 </header>
788 </div>
789 </div>
790 </div>
791 <#break />
792 </#if>
793 </#list>
794
795 </#if>
796</#if>
797<!-- https://micromodal.vercel.app/ -->
798<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
799
800<script>
801
802 AUI().ready(function(){
803 //The below script is there to add vertical card art in UAT only so that QA has an easier time auditing. Note that the script only applies to FI SouthState (location code 20419) which is currently the only bank with vertical card art at the moment
804 var locationCodeParam = '${lc}';
805 var currentEnvironmentParam = '${currentEnvironment}';
806 if(locationCodeParam == '20419' && currentEnvironmentParam == 'uat'){
807 Array.prototype.slice.call(document.querySelectorAll('.cardArtImg')).map(function(e){e.firstElementChild.src = "https://39f6f821fa03de239594-9f1c16ccc3b26ce57656bb4af99947b6.ssl.cf2.rackcdn.com/f20cf80a-6aea-46ec-84fc-c2a6583773d9.png"})
808 }
809
810 MicroModal.init();
811 });
812</script>
813<script>
814 if(typeof setHeaderBackground === 'undefined') { let setHeaderBackground = () => {};}
815 setHeaderBackground = () => {
816 // Makes the Header subtitle work if there is two lines of text
817 //product page header
818 var consumerHeader = document.getElementsByClassName("landing-consumer")[0];
819 if(!consumerHeader) {
820 //index page header
821 consumerHeader = document.getElementsByClassName("tier3-hero-landing-consumer")[0];
822 }
823
824 if(consumerHeader) {
825 var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0];
826 var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0];
827 const offerTextTop = consumerHeader.querySelector(".offer-text-top");
828
829 if (consumerOfferHeader.innerText.length >= 76){
830 const gradientHeight = Math.max(offerTextTop.offsetHeight + 40, 200) + "px";
831 //two lines
832 //offerTextTop.style.marginTop = '0px';
833 //document.querySelector('.offer-text-bottom').style.marginTop = '25px';
834 //prevent button and text going into blue section
835 //consumerHeader.querySelector('.offer-text-top h1').style.minHeight = "120px";
836 consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")";
837 }
838 }
839 //product page header
840 var buisnessHeader = document.getElementsByClassName("landing-business")[0];
841 if(!buisnessHeader) {
842 //index page header
843 buisnessHeader = document.getElementsByClassName("tier3-hero-landing-business")[0];
844 }
845
846 if(buisnessHeader) {
847 var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0];
848 var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0];
849
850 if (buisnessOfferHeader.innerText.length >= 48){
851 //two lines
852 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)";
853 }
854 }
855 };
856 /*
857 sometimes this runs before the text height it is refercning is loaded. Resulting in incorect background styles. If only in aui.ready then it flashes incorect styles then goes to correct styles everytime.
858 With the aui.ready and imediate call it normal loads correctly but if it loads before header text it will still flash incorect styles and then be fixed.
859 */
860 setHeaderBackground();
861 AUI().ready(function(){setHeaderBackground();});
862
863
864</script>
865<script>
866 var excluded = '${isExcluded}';
867 var useprcaValue = '${useprcaValue}';
868 var url23 ='${url}';
869 function submitForm(event) {
870 event.preventDefault();
871 var offerId = event.target.getAttribute("offerId");
872 console.log("offerId::::::::::::::"+offerId);
873
874 var lc = document.getElementById('locationCode').value;
875 //var offerId = document.getElementById('offerId').value;
876 //var sourceCode = document.getElementById('sourceCode').value;
877
878 // Construct the URL
879 var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer";
880
881
882 // Set the form action to the constructed URL
883 document.getElementById('applyForm').action = url;
884
885 // Submit the form
886 postCreditcardLearnMore(url);
887 //document.getElementById('applyForm').submit();
888 }
889 function postCreditcardLearnMore(path, method='post') {
890 // Create a form element
891 const form = document.createElement('form');
892 form.method = method;
893 //form.target = '_blank'; // Open in a new tab
894 form.action = path;
895
896 // Add each parameter as a hidden input field
897
898 document.body.appendChild(form);
899 form.submit();
900 }
901
902</script>
An error occurred while processing the template.
The following has evaluated to null or missing: ==> isExcluded [in template "10154#10192#153417688" at line 866, column 23] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${isExcluded} [in template "10154#10192#153417688" at line 866, column 21] ----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/>
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! />
5<#assign url404 = '/error/404.html'>
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
7<#assign currentEnvironment = 'prod' >
8<#assign prcaURL = propsUtil.get('elan.prca.url')>
9
10<#assign lc= qstringmap["ecdma-lc"]?first>
11<#assign lc = htmlUtil.escape(lc)>
12<#assign lc = htmlUtil.escapeJS(lc)>
13
14<#assign prefix = "00000" >
15<#assign lcWithPrefix = prefix + lc >
16<#assign withPrefixLength = lcWithPrefix?length >
17<#assign startHere = withPrefixLength - 5>
18<#assign lc = lcWithPrefix?substring(startHere)>
19
20
21<#if qstringmap["ecid"]?has_content>
22 <#assign ecidExt = qstringmap["ecid"]?first>
23 <#assign ecidExt = htmlUtil.escape(ecidExt)>
24 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
25 <#assign ecidExt = "&ecid=" + ecidExt>
26<#else>
27 <#assign ecidExt="">
28</#if>
29<#if oadURL?contains("uat-")>
30 <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
31 <#assign currentEnvironment = 'uat' >
32<#else>
33 <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
34</#if>
35 <script>
36 //console.log('%ccurrentEnvironment: ', 'font-weight: bold; color: green;', '${currentEnvironment}');
37 </script>
38<#assign campaignId = "" >
39<#assign useprcaValue = "" >
40<#assign ecidExt="">
41<#if qstringmap["ecid"]?has_content>
42 <#assign campaignId = qstringmap["ecid"]?first >
43 <#assign campaignId = htmlUtil.escape(campaignId)>
44 <#assign campaignId = htmlUtil.escapeJS(campaignId)>
45
46 <#assign ecidExt = qstringmap["ecid"]?first>
47 <#assign ecidExt = htmlUtil.escape(ecidExt)>
48 <#assign ecidExt = htmlUtil.escapeJS(ecidExt)>
49 <#assign ecidExt = "&ecid=" + ecidExt>
50</#if>
51
52<#assign dcoSourceCode = "">
53<#assign dcoSourceCodeQueryParameter = "">
54
55<#if qstringmap["sourcecode"]?has_content>
56 <#assign dcoSourceCode = qstringmap["sourcecode"]?first>
57 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
58 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
59 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
60<#elseif qstringmap["sourceCode"]?has_content>
61 <#assign dcoSourceCode = qstringmap["sourceCode"]?first>
62 <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)>
63 <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)>
64 <#assign dcoSourceCodeQueryParameter = "&sourcecode=${dcoSourceCode}">
65</#if>
66
67<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! >
68<#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
69<#assign clientProfile = clientProfileList?first>
70<#assign partnerName = clientProfile.getMarketingNameLong()>
71<#assign pbu = clientProfile.getPbu()>
72<#assign subbu = clientProfile.getSUBBRANDBUNBR()>
73<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!>
74
75<#assign fiCardsData=utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu + '&'+subbu + '&' + lc)>
76<#assign temp = []>
77<#assign consumerCards = []>
78<#assign businessCards = []>
79<#assign offerTypeList = []>
80<#assign index = 0>
81<#assign consumerOfferTypes = ["101", "103", "108", "109", "115", "104", "141", "147", "138", "154"]>
82<#assign businessOfferTypes = ["128", "121", "143", "144"]>
83<#list fiCardsData as fib>
84 <#assign useprcaValue = fib.useprca!"">
85 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
86 <#assign offerTypeList = offerTypeList + [fib.offerType]>
87 <#if (consumerOfferTypes?seq_contains(fib.offerType))>
88 <#assign consumerCards = consumerCards + fiCardsData[index..index]>
89 <#elseif (businessOfferTypes?seq_contains(fib.offerType))>
90 <#assign businessCards = businessCards + fiCardsData[index..index]>
91 </#if>
92 <#assign temp = temp + fiCardsData[index..index]>
93 </#if>
94 <#assign index = index + 1>
95</#list>
96
97<#assign fiCardsData = temp>
98 <script>
99 //console.log("fi card data count", ${fiCardsData?size})
100</script>
101
102<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')>
103<#if (clientdata?size > 0)>
104 <#assign backgroundColor = clientdata[0].backgroundHexColor>
105</#if>
106
107<#if (fiCardsData?size > 0)>
108 <style>
109 .excludeModal__overlay {
110 position: fixed;
111 top: 0;
112 left: 0;
113 right: 0;
114 bottom: 0;
115 background: rgba(0,0,0,0.6);
116 display: flex;
117 justify-content: center;
118 align-items: center;
119 }
120
121 .excludeModal__container {
122 background-color: #fff;
123 padding: 30px;
124 min-width: 500px;
125 max-width: 500px;
126 max-height: 100vh;
127 border-radius: 4px;
128 overflow-y: auto;
129 box-sizing: border-box;
130 }
131
132 .excludeModal__header {
133 display: flex;
134 justify-content: space-between;
135 align-items: center;
136 }
137
138 .modal .excludeModal__container .excludeModal__title {
139 margin-top: 0;
140 margin-bottom: 0;
141 font-weight: 600;
142 font-size: 20px;
143 line-height: 1.25;
144 color: #00449e;
145 box-sizing: border-box;
146 }
147
148 .excludeModal__close {
149 background: transparent;
150 border: 1px solid white;
151 padding: 4px 8px;
152 float: right;
153 }
154
155 .excludeModal__close:hover {
156 border: 1px solid black;
157 }
158
159 .excludeModal__close:before { content: "\2715"; }
160
161 @keyframes mmfadeIn {
162 from { opacity: 0; }
163 to { opacity: 1; }
164 }
165
166 @keyframes mmfadeOut {
167 from { opacity: 1; }
168 to { opacity: 0; }
169 }
170
171 @keyframes mmslideIn {
172 from { transform: translateY(15%); }
173 to { transform: translateY(0); }
174 }
175
176 @keyframes mmslideOut {
177 from { transform: translateY(0); }
178 to { transform: translateY(-10%); }
179 }
180
181 .micromodal-slide {
182 display: none;
183 }
184
185 .micromodal-slide.is-open {
186 display: block;
187 }
188
189 .micromodal-slide[aria-hidden="false"] .excludeModal__overlay {
190 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
191 }
192
193 .micromodal-slide[aria-hidden="false"] .excludeModal__container {
194 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
195 }
196
197 .micromodal-slide[aria-hidden="true"] .excludeModal__overlay {
198 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
199 }
200
201 .micromodal-slide[aria-hidden="true"] .excludeModal__container {
202 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
203 }
204
205 .micromodal-slide .excludeModal__container,
206 .micromodal-slide .excludeModal__overlay {
207 will-change: transform;
208 }
209 </style>
210 <#if url?contains("index")>
211 <#assign isExcluded = 0>
212 <#assign offerId = "">
213 <#assign sourceCode = "">
214 <#assign cardArtImage = "">
215 <#assign productUrlHero = "">
216 <#assign product = "">
217 <#assign cardIndex = 0>
218 <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)>
219 <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109"))>
220 <#list consumerCards as card>
221 <#if (card.offerType=="108") || (card.offerType=="109")>
222 <#assign isExcluded = 0>
223 <#if card.dmaexclude??>
224 <#assign isExcluded = card.dmaexclude?number!0>
225 </#if>
226 <#assign offerId = card.offerId>
227 <#assign sourceCode = card.sourceCode>
228 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
229 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
230
231 <#assign productUrlHero="consumer-platinum2103">
232 <#assign product="Platinum">
233 <#assign cardIndex = 1>
234 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&' + sourceCode)>
235 <#if (scrapedData?size > 0)>
236 <#list scrapedData as sItem>
237 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
238 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
239 <#break>
240 </#if>
241 </#list>
242 <script>
243 $(document).ready(function () {
244 var aprText = "${apr}";
245 //console.log('aprText: ${aprText!''}');
246 if (aprText) {
247 $(".apr-full-text").html(aprText);
248 try {
249 var matches= aprText.match(/\d+(\.\d+)?%?/g);
250 var billing_cycle = matches[1];
251 var apr_min = apr_min = matches[2];
252 var apr_max = apr_max = matches[3];
253 //console.log('billing_cycle', billing_cycle);
254 //console.log('apr_min', apr_min);
255 //console.log('apr_max', apr_max);
256 if (billing_cycle) {
257 //console.log($(".scraped-billing-cycle"));
258 $(".scraped-billing-cycle").html(billing_cycle);
259 }
260 if (apr_min) {
261 $(".scraped-apr-min").html(apr_min);
262 }
263 if (apr_max) {
264 $('.scraped-apr-max').html(apr_max);
265 }
266
267 } catch (e) {
268 console.log(e);
269 }
270 }
271 });
272 </script>
273 </#if>
274 <script>
275 $(document).ready(function () {
276 $(".see-terms").replaceWith('<a href="${oadURL_TC}?step=display&offerId=${card.offerId}&locationCode=${lc}" target="_blank"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions</a>');
277 });
278 </script>
279 </#if>
280 </#list>
281 <#else>
282 <#assign isExcluded = 0>
283 <#if consumerCards[0].dmaexclude??>
284 <#assign isExcluded = consumerCards[0].dmaexclude?number!0>
285 </#if>
286 <#assign displayedCard = consumerCards[0]>
287 <#assign offerId = displayedCard.offerId>
288 <#assign sourceCode = displayedCard.sourceCode>
289 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
290 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
291 <#if (displayedCard.offerType=="108" || displayedCard.offerType=="109")>
292 <#assign productUrlHero="consumer-platinum">
293 <#assign product="Platinum">
294 <#assign cardIndex = 1>
295 <#elseif (displayedCard.offerType=="104")>
296 <#assign productUrlHero = "max-cash">
297 <#assign product="Max Cash Preferred">
298 <#assign cardIndex = 0>
299 <#elseif (displayedCard.offerType=="115")>
300 <#assign productUrlHero = "secured">
301 <#assign product="Secured">
302 <#assign cardIndex = 2>
303 </#if>
304 </#if>
305 <#if product?has_content && product != "">
306 <#assign card_text = product + " Card">
307 </#if>
308 </#if>
309 <#if (class.getData() == "landing-business" && businessCards?size > 0)>
310 <#if (offerTypeList?seq_contains("128")) >
311 <#list businessCards as card>
312 <#if (card.offerType=="128")>
313 <#assign isExcluded = 0>
314 <#if card.dmaexclude??>
315 <#assign isExcluded = card.dmaexclude?number!0>
316 </#if>
317 <#assign offerId = card.offerId>
318 <#assign sourceCode = card.sourceCode>
319 <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png">
320 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg">
321
322 <#assign productUrlHero="business-cash-preferred">
323 <#assign product="Business Cash Preferred">
324 <#assign cardIndex = 1>
325 </#if>
326 </#list>
327 <#else>
328 <#assign isExcluded = 0>
329 <#if businessCards[0].dmaexclude??>
330 <#assign isExcluded = businessCards[0].dmaexclude?number!0>
331 </#if>
332 <#assign displayedCard = businessCards[0]>
333 <#assign offerId = displayedCard.offerId>
334 <#assign sourceCode = displayedCard.sourceCode>
335 <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png">
336 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg">
337 <#if (displayedCard.offerType=="143")>
338 <#assign productUrlHero="business-real-rewards">
339 <#assign product="Business Real Rewards">
340 <#assign cardIndex = 2>
341 <#elseif (displayedCard.offerType=="144")>
342 <#assign productUrlHero="smart-business-rewards">
343 <#assign product="Smart Business Rewards">
344 <#assign cardIndex = 0>
345 <#elseif (displayedCard.offerType=="121")>
346 <#assign productUrlHero = "business-platinum">
347 <#assign product="Business">
348 <#assign cardIndex = 3>
349 </#if>
350 </#if>
351 <#if product?has_content && product != "">
352 <#assign card_text = product + " Card">
353 </#if>
354 </#if>
355 <div class="hero-container product-${productUrlHero} tier3-hero-${class.getData()}">
356 <div class="hero-main">
357 <div class="hero-main-container">
358 <div class="hero-main-offer">
359 <div class="offer-detail">
360 <div class="offer-detail-cardArt cardArtImg">
361 <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}"
362 class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
363 <#-- <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!'' }"
364 class="jn-img-responsive">-->
365 <p>${card_text!''}</p>
366 </div>
367 <div class="offer-detail-text text-color-default hide-desktop">
368 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
369 </div>
370 <#if isExcluded == 0>
371 <#if useprcaValue == "1">
372 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post">
373 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
374 <input id='offerId' type="hidden" name="offerId" value="${offerId}">
375 <input type="hidden" name="preparerType" value="customer">
376 </form>
377 <a
378 class="jn-button hide-desktop btn"
379 data-button-name="cta-button-top"
380 data-product-name="${productUrlHero!''}"
381 href="#"
382 offerId="${offerId!''}"
383 onclick="submitForm(event)"
384 >
385 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
386 </a>
387
388
389
390 <#else>
391 <a
392 class="jn-button hide-desktop btn"
393 data-button-name="cta-button-top"
394 data-product-name="${productUrlHero!''}"
395 href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
396 >
397 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
398 </a>
399 </#if>
400
401 <#else>
402 <a
403 class="jn-button hide-desktop btn"
404 data-button-name="cta-button-top"
405 data-product-name="${productUrlHero!''}"
406 data-micromodal-trigger="modal-index-hero"
407 href="javascript:void(0);"
408 >
409 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
410 </a>
411 </#if>
412 </div>
413 <div class="offer-header">
414 <div class="offer-text-top">
415 ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}
416 </div>
417 <div class="offer-text-bottom hide-mobile">
418 <div class="offer-detail-text text-color-default ">
419 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
420 </div>
421
422 <#if isExcluded == 0>
423 <#if useprcaValue == "1">
424 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer" method="post">
425 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
426 <input id='offerId' type="hidden" name="offerId" value="${offerId!''}">
427 <input type="hidden" name="preparerType" value="customer">
428 </form>
429 <a
430 class="jn-button"
431 data-button-name="cta-button-top"
432 data-product-name="${productUrlHero!''}"
433 href="#"
434 offerId="${offerId!''}"
435 onclick="submitForm(event)"
436 >
437 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
438 </a>
439
440 <#else>
441 <a
442 class="jn-button"
443 data-button-name="cta-button-top"
444 data-product-name="${productUrlHero!''}"
445 href="${oadURL}?locationCode=${lc}&offerId=${offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
446 >
447 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
448 </a>
449 </#if>
450 <#else>
451 <a
452 class="jn-button"
453 data-button-name="cta-button-top"
454 data-product-name="${productUrlHero!''}"
455 data-micromodal-trigger="modal-index-hero"
456 href="javascript:void(0);"
457 >
458 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
459 </a>
460 </#if>
461 </div>
462 </div>
463 </div>
464 </div>
465 </div>
466 </div>
467
468 <div aria-hidden="true" class="modal micromodal-slide" id="modal-index-hero" >
469 <div class="excludeModal__overlay" data-micromodal-close tabindex="-1">
470 <div
471 aria-modal="true"
472 aria-labelledby="modal-index-hero-title"
473 class="excludeModal__container"
474 role="dialog"
475 >
476 <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button>
477 <header class="excludeModal__header">
478 <h2 class="excludeModal__title" id="modal-index-hero-title">
479 <#if productTitle.getSiblings()[cardIndex].excludedMessage?? >
480 ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""}
481 </#if>
482 </h2>
483 </header>
484 </div>
485 </div>
486 </div>
487 <#else>
488 <#assign hasBalanceTransferCalculator = false>
489 <#list fiCardsData as fib>
490 <#switch fib.offerType>
491 <#case "101">
492 <#assign cardIndex = 3 >
493 <#assign productUrlHero = "consumer-edr">
494 <#assign product="Everyday Rewards+">
495 <#assign hasBalanceTransferCalculator = false>
496 <#break>
497 <#case "103">
498 <#assign cardIndex = 3 >
499 <#assign productUrlHero = "consumer-edr">
500 <#assign product="Everyday Rewards+">
501 <#assign hasBalanceTransferCalculator = false>
502 <#break>
503 <#case "104">
504 <#assign cardIndex = 0 >
505 <#assign productUrlHero="max-cash">
506 <#assign product="Max Cash Preferred">
507 <#assign hasBalanceTransferCalculator = false>
508 <#break>
509 <#case "108">
510 <#assign cardIndex = 1 >
511 <#assign productUrlHero = "consumer-platinum">
512 <#assign product="Platinum">
513 <#assign hasBalanceTransferCalculator = true>
514 <#break>
515 <#case "109">
516 <#assign cardIndex = 1 >
517 <#assign productUrlHero = "consumer-platinum">
518 <#assign product="Platinum">
519 <#assign hasBalanceTransferCalculator = true>
520 <#break>
521 <#case "141">
522 <#assign cardIndex = 4 >
523 <#assign productUrlHero = "college-real-rewards">
524 <#assign product = "College Real Rewards" >
525 <#assign hasBalanceTransferCalculator = false>
526 <#break>
527 <#case "147">
528 <#assign cardIndex = 5 >
529 <#assign productUrlHero = "max-cash-secured">
530 <#assign product = "Max Cash Secured" >
531 <#assign hasBalanceTransferCalculator = false>
532 <#break>
533 <#case "115">
534 <#assign cardIndex = 2 >
535 <#assign productUrlHero = "secured">
536 <#assign product="Secured">
537 <#assign hasBalanceTransferCalculator = false>
538 <#break>
539 <#case "138">
540 <#assign cardIndex = 6 >
541 <#assign productUrlHero = "travel-rewards-plus">
542 <#assign product="Travel Rewards+">
543 <#assign hasBalanceTransferCalculator = false>
544 <#break>
545 <#case "154">
546 <#assign cardIndex = 7 >
547 <#assign productUrlHero = "reserve-rewards-plus">
548 <#assign product="Reserve Rewards+">
549 <#assign hasBalanceTransferCalculator = false>
550 <#break>
551 <#case "128">
552 <#assign cardIndex = 1 >
553 <#assign productUrlHero = "business-cash-preferred">
554 <#assign product="Business Cash Preferred">
555 <#assign hasBalanceTransferCalculator = false>
556 <#break>
557 <#case "143">
558 <#assign cardIndex = 2 >
559 <#assign productUrlHero = "business-real-rewards">
560 <#assign product="Business Real Rewards">
561 <#assign hasBalanceTransferCalculator = false>
562 <#break>
563 <#case "144">
564 <#assign cardIndex = 0 >
565 <#assign productUrlHero = "smart-business-rewards">
566 <#assign product="Smart Business Rewards">
567 <#assign hasBalanceTransferCalculator = false>
568 <#break>
569 <#case "121">
570 <#assign cardIndex = 3 >
571 <#assign productUrlHero = "business-platinum">
572 <#assign product="Business">
573 <#assign hasBalanceTransferCalculator = false>
574 <#break>
575 <#default>
576 </#switch>
577 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
578 <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg">
579
580 <script>
581 console.log("offerType ${fib.offerType} productUrlHero ${productUrlHero} show calculator ${hasBalanceTransferCalculator?c}")
582 </script>
583
584 <#if url?matches(".*/${productUrlHero}\\?.*")>
585 <#assign isExcluded = 0>
586 <script>
587 console.log("fib.dmaexclude------>"+'${fib.dmaexclude}');
588 </script>
589 <#if fib.dmaexclude??>
590 <#assign isExcluded = fib.dmaexclude?number!0>
591 </#if>
592 <#if (fib.offerType=="108" || fib.offerType=="109" || fib.offerType == "121")>
593
594 <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', '${fib.offerId}' + '&'+ '${fib.sourceCode}')>
595 <#if (scrapedData?size > 0)>
596 <#list scrapedData as sItem>
597 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
598 <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
599 <#break>
600 </#if>
601
602 </#list>
603 <script>
604 $(document).ready(function () {
605 var aprText = "${apr}";
606 //console.log('aprText',aprText);
607 if (aprText) {
608 $(".apr-full-text").html(aprText);
609 try {
610 var matches= aprText.match(/\d+(\.\d+)?%?/g);
611 var billing_cycle = matches[1];
612 var apr_min = apr_min = matches[2];
613 var apr_max = apr_max = matches[3];
614 //console.log('billing_cycle', billing_cycle);
615 //console.log('apr_min', apr_min);
616 //console.log('apr_max', apr_max);
617 if (billing_cycle) {
618 //console.log($(".scraped-billing-cycle"));
619 $(".scraped-billing-cycle").html(billing_cycle);
620 }
621 if (apr_min) {
622 $(".scraped-apr-min").html(apr_min);
623 }
624 if (apr_max) {
625 $('.scraped-apr-max').html(apr_max);
626 }
627
628 } catch (e) {
629 console.log(e);
630 }
631 }
632 });
633 </script>
634 </#if>
635 </#if>
636 <#if product?has_content && product != "">
637 <#assign card_text = product + " Card">
638 </#if>
639 <#assign tc_offerTypes = ['108', '109', '121', '144']>
640 <#assign calculator_offerTypes = ['101', '104', '138', '154', '128', '143', '144']>
641 <div class="hero-container ${class.getData()}">
642 <div class="hero-main">
643 <div class="hero-main-container">
644 <div class="hero-main-offer">
645 <div class="offer-detail">
646 <div class="offer-detail-cardArt cardArtImg">
647 <img src="${cardArtImage!''}" alt="${partnerName!''}" title="${partnerName!''}"
648 onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" class="jn-img-responsive">
649 <p>${card_text!''}</p>
650 <#if (hasBalanceTransferCalculator)>
651 <a href="javascript:void(0);" data-micromodal-trigger="modal-2"aria-hidden="true" >See how much you could save with a balance transfer</a>
652 </#if>
653 </div>
654 <div class="offer-detail-text text-color-default hide-desktop">
655 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
656
657 <#if (tc_offerTypes?seq_contains(fib.offerType))>
658 <a href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">
659 <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions
660 </a>
661 </#if>
662 <#if (calculator_offerTypes?seq_contains(fib.offerType))>
663 <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a>
664 </#if>
665 </div>
666
667 <#if isExcluded == 0>
668 <#if useprcaValue == "1">
669 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId!''}&preparerType=customer" method="post">
670 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
671 <input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}">
672 <input type="hidden" name="preparerType" value="customer">
673 </form>
674
675 <a
676 class="jn-button hide-desktop btn"
677 data-button-name="cta-button-top"
678 data-product-name="${productUrlHero!''}"
679 href="#"
680 offerId="${fib.offerId!''}"
681 onclick="submitForm(event)" >
682 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
683 </a>
684
685 <#else>
686 <a
687 class="jn-button hide-desktop btn"
688 data-button-name="cta-button-top"
689 data-product-name="${productUrlHero!''}"
690 href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
691 >
692 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
693
694 </a>
695 </#if>
696 <#else>
697 <a
698 class="jn-button hide-desktop btn"
699 data-button-name="cta-button-top"
700 data-product-name="${productUrlHero!''}"
701 data-micromodal-trigger="modal-product-hero"
702 href="javascript:void(0);"
703 >
704 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
705 </a>
706 </#if>
707 </div>
708 <div class="offer-header">
709 <div class="offer-text-top">
710 ${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}
711 </div>
712 <div class="offer-text-bottom hide-mobile">
713 <div class="offer-detail-text text-color-default ">
714 ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}
715 <#if (tc_offerTypes?seq_contains(fib.offerType))>
716 <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${fib.offerId}&locationCode=${lc}" target="_blank">
717 <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions
718 </a>
719 </#if>
720 </div>
721
722 <#if isExcluded == 0>
723 <#if useprcaValue == "1">
724 <form id="applyForm" action="${prcaURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer" method="post" >
725 <input id='locationCode' type="hidden" name="locationCode" value="${lc}">
726 <input id='offerId' type="hidden" name="offerId" value="${fib.offerId!''}">
727 <input type="hidden" name="preparerType" value="customer">
728 </form>
729 <a
730 class="jn-button"
731 data-button-name="cta-button-top"
732 data-product-name="${productUrlHero!''}"
733 href="#"
734 offerId="${fib.offerId!''}"
735 onclick="submitForm(event)" >
736 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
737 </a>
738
739 <#else>
740 <a
741 class="jn-button"
742 data-button-name="cta-button-top"
743 data-product-name="${productUrlHero!''}"
744 href="${oadURL}?locationCode=${lc}&offerId=${fib.offerId}&preparerType=customer${dcoSourceCodeQueryParameter}"
745 >
746 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
747
748 </a>
749 </#if>
750 <#else>
751 <a
752 class="jn-button"
753 data-button-name="cta-button-top"
754 data-product-name="${productUrlHero!''}"
755 data-micromodal-trigger="modal-product-hero"
756 href="javascript:void(0);"
757 >
758 ${productTitle.getSiblings()[cardIndex].ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${product!''} Credit Card </span>
759 </a>
760 </#if>
761 <#if (calculator_offerTypes?seq_contains(fib.offerType))>
762 <a class="whiteLink" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' target="_blank" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a>
763 </#if>
764 </div>
765 </div>
766
767 </div>
768 </div>
769 </div>
770 </div>
771
772 <div aria-hidden="true" class="modal micromodal-slide" id="modal-product-hero" >
773 <div class="excludeModal__overlay" data-micromodal-close tabindex="-1">
774 <div
775 aria-modal="true"
776 aria-labelledby="modal-prodcut-hero-title"
777 class="excludeModal__container"
778 role="dialog"
779 >
780 <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button>
781 <header class="excludeModal__header">
782 <h2 class="excludeModal__title" id="modal-prodcut-hero-title">
783 <#if productTitle.getSiblings()[cardIndex].excludedMessage?? >
784 ${productTitle.getSiblings()[cardIndex].excludedMessage.getData()!""}
785 </#if>
786 </h2>
787 </header>
788 </div>
789 </div>
790 </div>
791 <#break />
792 </#if>
793 </#list>
794
795 </#if>
796</#if>
797<!-- https://micromodal.vercel.app/ -->
798<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
799
800<script>
801
802 AUI().ready(function(){
803 //The below script is there to add vertical card art in UAT only so that QA has an easier time auditing. Note that the script only applies to FI SouthState (location code 20419) which is currently the only bank with vertical card art at the moment
804 var locationCodeParam = '${lc}';
805 var currentEnvironmentParam = '${currentEnvironment}';
806 if(locationCodeParam == '20419' && currentEnvironmentParam == 'uat'){
807 Array.prototype.slice.call(document.querySelectorAll('.cardArtImg')).map(function(e){e.firstElementChild.src = "https://39f6f821fa03de239594-9f1c16ccc3b26ce57656bb4af99947b6.ssl.cf2.rackcdn.com/f20cf80a-6aea-46ec-84fc-c2a6583773d9.png"})
808 }
809
810 MicroModal.init();
811 });
812</script>
813<script>
814 if(typeof setHeaderBackground === 'undefined') { let setHeaderBackground = () => {};}
815 setHeaderBackground = () => {
816 // Makes the Header subtitle work if there is two lines of text
817 //product page header
818 var consumerHeader = document.getElementsByClassName("landing-consumer")[0];
819 if(!consumerHeader) {
820 //index page header
821 consumerHeader = document.getElementsByClassName("tier3-hero-landing-consumer")[0];
822 }
823
824 if(consumerHeader) {
825 var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0];
826 var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0];
827 const offerTextTop = consumerHeader.querySelector(".offer-text-top");
828
829 if (consumerOfferHeader.innerText.length >= 76){
830 const gradientHeight = Math.max(offerTextTop.offsetHeight + 40, 200) + "px";
831 //two lines
832 //offerTextTop.style.marginTop = '0px';
833 //document.querySelector('.offer-text-bottom').style.marginTop = '25px';
834 //prevent button and text going into blue section
835 //consumerHeader.querySelector('.offer-text-top h1').style.minHeight = "120px";
836 consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")";
837 }
838 }
839 //product page header
840 var buisnessHeader = document.getElementsByClassName("landing-business")[0];
841 if(!buisnessHeader) {
842 //index page header
843 buisnessHeader = document.getElementsByClassName("tier3-hero-landing-business")[0];
844 }
845
846 if(buisnessHeader) {
847 var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0];
848 var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0];
849
850 if (buisnessOfferHeader.innerText.length >= 48){
851 //two lines
852 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)";
853 }
854 }
855 };
856 /*
857 sometimes this runs before the text height it is refercning is loaded. Resulting in incorect background styles. If only in aui.ready then it flashes incorect styles then goes to correct styles everytime.
858 With the aui.ready and imediate call it normal loads correctly but if it loads before header text it will still flash incorect styles and then be fixed.
859 */
860 setHeaderBackground();
861 AUI().ready(function(){setHeaderBackground();});
862
863
864</script>
865<script>
866 var excluded = '${isExcluded}';
867 var useprcaValue = '${useprcaValue}';
868 var url23 ='${url}';
869 function submitForm(event) {
870 event.preventDefault();
871 var offerId = event.target.getAttribute("offerId");
872 console.log("offerId::::::::::::::"+offerId);
873
874 var lc = document.getElementById('locationCode').value;
875 //var offerId = document.getElementById('offerId').value;
876 //var sourceCode = document.getElementById('sourceCode').value;
877
878 // Construct the URL
879 var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer";
880
881
882 // Set the form action to the constructed URL
883 document.getElementById('applyForm').action = url;
884
885 // Submit the form
886 postCreditcardLearnMore(url);
887 //document.getElementById('applyForm').submit();
888 }
889 function postCreditcardLearnMore(path, method='post') {
890 // Create a form element
891 const form = document.createElement('form');
892 form.method = method;
893 //form.target = '_blank'; // Open in a new tab
894 form.action = path;
895
896 // Add each parameter as a hidden input field
897
898 document.body.appendChild(form);
899 form.submit();
900 }
901
902</script>