An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417670" at line 19, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417670" at line 19, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() > 
4<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
5<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
6<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
7<#assign url404 = '/error/404.html' > 
8<#assign environment = url?replace('/11t3.*','','r')> 
9 
10<#assign text_to_apply_source = "vanity url" > 
11<#if qstringmap["sms"]?has_content> 
12    <#assign sms = 1 > 
13    <#assign text_to_apply_source = "sms" > 
14</#if> 
15<#if qstringmap["qrCode"]?has_content> 
16    <#assign text_to_apply_source = "qr code" > 
17</#if> 
18 
19<#assign lc = qstringmap["ecdma-lc"]?first>  
20<#assign lc = htmlUtil.escape(lc)> 
21<#assign lc = htmlUtil.escapeJS(lc)> 
22 
23<#assign prefix = "00000" > 
24<#assign lcWithPrefix = prefix + lc > 
25<#assign withPrefixLength = lcWithPrefix?length > 
26<#assign startHere = withPrefixLength - 5> 
27<#assign lc = lcWithPrefix?substring(startHere)> 
28 
29<#if qstringmap["ecid"]?has_content> 
30    <#assign ecidExt = qstringmap["ecid"]?first> 
31    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
32    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
33    <#assign ecidExt = "&ecid=" + ecidExt> 
34 
35 
36    <#assign campaignId = qstringmap["ecid"]?first > 
37    <#assign campaignId = htmlUtil.escape(campaignId)> 
38    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
39<#else> 
40    <#assign ecidExt=""> 
41    <#assign campaignId = "" > 
42</#if> 
43 
44<#assign isFromDCOLink = false> 
45<#assign dcoSourceCode = ''> 
46<#if qstringmap["sourcecode"]?has_content> 
47    <#assign dcoSourceCode = qstringmap["sourcecode"]?first> 
48    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
49    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
50<#elseif qstringmap["sourceCode"]?has_content> 
51    <#assign dcoSourceCode = qstringmap["sourceCode"]?first> 
52    <#assign dcoSourceCode = htmlUtil.escape(dcoSourceCode)> 
53    <#assign dcoSourceCode = htmlUtil.escapeJS(dcoSourceCode)> 
54</#if> 
55 
56<#if dcoSourceCode?has_content> 
57    <#assign isFromDCOLink = true> 
58</#if> 
59 
60<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
61<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
62<#assign clientProfile = clientProfileList?first> 
63<#assign partnerName = clientProfile.getMarketingNameLong()> 
64<#assign pbu = clientProfile.getPbu()> 
65<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
66 
67<#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
68<#assign cdnLogoUrl = (propsUtil.get('rackspace.cdn.web.url'))!> 
69<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+pbu+'&'+subbu)> 
70 
71 <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
72<#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
73<#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
74<script> 
75//console.log('Partner URL', ${partnerUrl}); 
76</script> 
77<#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>     
78    <#assign partnerUrl = 'https://' + partnerUrl> 
79</#if> 
80<script> 
81//console.log('Partner URL', ${partnerUrl}); 
82 
83</script> 
84<#-- Begin: filter duplicated cards--> 
85<#assign temp = []> 
86<#assign offerTypeList = []>   
87<#if (fiCardsData?size > 0)>      
88    <#assign index = 0> 
89    <#list fiCardsData as fib> 
90        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
91            <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
92            <#assign temp = temp + fiCardsData[index..index]>  
93        </#if>   
94        <#assign index = index + 1>               
95    </#list>  
96    <#assign fiCardsData = temp> 
97    <#if (fiCardsData?size > 0)> 
98        <div class="content-container content-container-main" title="${partnerName!''}"> 
99            <#if url?contains("index")> 
100                <#assign product="All Cards"> 
101                <header class="jn-header"> 
102                    <div class="header-logo">  
103 
104                        <#if partnerUrl?has_content> 
105                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
106                                <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
107                            </a> 
108                        <#else> 
109                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
110                        </#if> 
111                    </div>  
112                </header>         
113            <#else> 
114                <header class="jn-header"> 
115                    <#if !isFromDCOLink> 
116                        <div class="back-overview hide-desktop">  
117                            <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a> 
118                        </div>  
119                    </#if> 
120 
121                    <div class="header-main-logo" title="${partnerName!''}"> 
122                        <#if partnerUrl?has_content> 
123                            <a href="${partnerUrl!''}" title="${partnerName!''}"> 
124                                <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo"> 
125                            </a> 
126                        <#else>                            
127                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo">                             
128                        </#if> 
129                    </div> 
130                    <#if !isFromDCOLink> 
131                        <div class="styled-select slate"> 
132                            <nav class="styled-select__dropdown"> 
133                                <div class="back-overview hide-mobile">  
134                                    <a href="${environment}/11t3/index?ecdma-lc=${lc}${ecidExt}">Home</a> 
135                                </div>   
136                                <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false"> 
137                                    <span class="selected-option"></span>  
138                                    <div class="jn-arrow arrow arrow-right"></div> 
139                                </a> 
140                                <a href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false"> 
141                                    <div class="first-line transform transformed1"></div> 
142                                    <div></div> 
143                                    <div class="transform transformed2"></div> 
144                                    <div></div> 
145                                </a> 
146                                <ul> 
147                                    <#list fiCardsData as fib> 
148                                        <#switch fib.offerType> 
149                                            <#case "101"> 
150                                                <#assign productURL = "202302/consumer-edr"> 
151                                                <#assign productName = "Everyday Rewards+"> 
152                                                <#break> 
153                                            <#case "103"> 
154                                                <#assign productURL = "202302/consumer-edr"> 
155                                                <#assign productName = "Everyday Rewards+"> 
156                                                <#break> 
157                                            <#case "104"> 
158                                                <#assign productURL = "max-cash"> 
159                                                <#assign productName = "Max Cash Preferred Card">       
160                                                <#break> 
161                                            <#case "108"> 
162                                                <#assign productURL="202308/consumer-platinum"> 
163                                                <#assign productName="Platinum Card"> 
164                                                <#break> 
165                                            <#case "109"> 
166                                                <#assign productURL="202308/consumer-platinum"> 
167                                                <#assign productName="Platinum Card"> 
168                                                <#break> 
169                                            <#case "115"> 
170                                                <#assign productURL = "secured"> 
171                                                <#assign productName = "Secured Card" > 
172                                                <#break> 
173                                            <#case "138"> 
174                                                <#assign productURL = "202305/travel-rewards-plus"> 
175                                                <#assign productName = "Travel Rewards+" > 
176                                                <#break> 
177                                            <#case "141"> 
178                                                <#assign productURL = "college-real-rewards"> 
179                                                <#assign productName = "College Real Rewards" >     
180                                                <#break> 
181                                            <#case "147"> 
182                                                <#assign productURL = "max-cash-secured"> 
183                                                <#assign productName = "Max Cash Secured Card" >     
184                                                <#break> 
185                                            <#case "154"> 
186                                                <#assign productURL = "202305/reserve-rewards-plus"> 
187                                                <#assign productName = "Reserve Rewards+" > 
188                                                <#break> 
189                                            <#case "121"> 
190                                                <#assign productURL = "202208/business-platinum"> 
191                                                <#assign productName = "Business Card" > 
192                                                <#break> 
193                                            <#case "128"> 
194                                                <#assign productURL = "business-cash-preferred"> 
195                                                <#assign productName = "Business Cash Preferred" > 
196                                                <#break> 
197                                            <#case "143"> 
198                                                <#assign productURL = "business-real-rewards"> 
199                                                <#assign productName = "Business Real Rewards Card" > 
200                                                <#break> 
201                                            <#case "144"> 
202                                                <#assign productURL = "smart-business-rewards"> 
203                                                <#assign productName = "Smart Business Rewards Card" >     
204                                                <#break> 
205                                            <#default>                                                         
206                                        </#switch> 
207                                        <#if url?matches(".*/${productURL}\\?.*")> 
208                                            <li class="selected" data-value="${productName}" selected="selected"><a href="javascript:void(0)">${productName}</a></li> 
209                                        <#else>                                 
210                                            <li class="dropdown-item" data-value="${productName}"> 
211                                                <a href="${environment}/11t3/${productURL}?ecdma-lc=${lc}${ecidExt}"> 
212                                                ${productName}  
213                                                </a> 
214                                            </li>                                    
215                                        </#if> 
216                                    </#list> 
217                                </ul> 
218                            </nav> 
219                             
220                        </div> 
221                    </#if> 
222                </header> 
223                <script> 
224                    function toggleFlyOutMenu() { 
225                        $('.styled-select').toggleClass('show-select'); 
226                        var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded'); 
227                        if(ariaExpanded !== null) { 
228                            var isAriaExpanded; 
229                            if(ariaExpanded === "true") { 
230                                isAriaExpanded = true; 
231                            } else {  
232                                isAriaExpanded = false  
233
234                            $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded); 
235                            $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded); 
236
237
238                    AUI().ready(function () { 
239                        var pageSelected = $('.selected').attr('data-value'); 
240                        $('.jn-hamburger, .dropdown-select').click(function () { 
241                            toggleFlyOutMenu(); 
242                        }); 
243                        $('.styled-select__dropdown').keydown(function(event) { 
244                            var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first(); 
245                            var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last(); 
246 
247                            if(event.keyCode === 9 ) { 
248                                // if they tab outside of the nav close the navigation 
249                                //shift + tab pressed 
250                                if(event.shiftKey && firstNavigationLink.is(document.activeElement)) { 
251                                    toggleFlyOutMenu(); 
252                                } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) { 
253                                    toggleFlyOutMenu(); 
254                                }                             
255
256                        }); 
257                        $('.selected-option').text(pageSelected); 
258                    }); 
259                </script>            
260            </#if> 
261        </div> 
262        <script> 
263                var reportingData = {}; 
264                                                             
265                //document.addEventListener('DOMContentLoaded', function() { 
266                AUI().ready(function () { 
267                    //console.log('inside ready'); 
268                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
269                    var hostName = location.hostname;                                 
270                    function getDomainFromHostname(hostname) { 
271                        var parts = hostname.split('.'); 
272                        return parts.length === 3 ? parts[1] : parts[0]; 
273
274                    var domain = getDomainFromHostname(hostName); 
275                    var partnerName = "${partnerName!''}"; 
276                    var product = "All Cards"; 
277                    var title = ""; 
278                    var metaDesc = ""; 
279                    var m = document.createElement('meta');  
280                    switch(page) { 
281                        case "max-cash-secured": 
282                            product="Max Cash Secured Card"; 
283                            title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card"; 
284                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
285                            break;  
286                        case "max-cash": 
287                            product="Max Cash Preferred Card"; 
288                            title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
289                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
290                            break;                         
291                        case "consumer-platinum": 
292                            product="Platinum Card"; 
293                            title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
294                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card."; 
295                            break; 
296                        case "consumer-edr": 
297                            product="Everyday Rewards+"; 
298                            title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+"; 
299                            break; 
300                        case "secured": 
301                            product="Secured Card"; 
302                            title = "Strengthen your finances | "+partnerName+" Secured Card"; 
303                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
304                            break; 
305                        case "college-real-rewards": 
306                            product="College Real Rewards"; 
307                            title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards"; 
308                            break; 
309                        case "smart-business-rewards": 
310                            product="Smart Business Rewards Card"; 
311                            title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
312                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card."; 
313                            break;                             
314                        case "business-cash-preferred": 
315                            product="Business Cash Preferred"; 
316                            title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred"; 
317                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
318                            break; 
319                        case "business-real-rewards": 
320                            product="Business Real Rewards Card"; 
321                            title = "Earn up to 1.5X points with no caps | "+partnerName+" Business Real Rewards Card"; 
322                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
323                            break; 
324                        case "business-platinum": 
325                            product="Business Card"; 
326                            title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
327                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
328                            break; 
329                        case "travel-rewards-plus": 
330                            product="Travel Rewards+" 
331                            title = partnerName + " | Travel Rewards+ Card"; 
332                            metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories." 
333                            break; 
334                        case "reserve-rewards-plus": 
335                            product="Reserve Rewards+" 
336                            title = partnerName + " | Reserve Rewards+ Card"; 
337                            metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card."; 
338                            break; 
339                        default:   
340                            product = "All Cards";    
341                            title = partnerName + " Credit Card Index Page";                        
342
343                    document.title = title; 
344                    m.name = 'description';  
345                    m.content = metaDesc;  
346                    document.head.appendChild(m); 
347 
348                    var lc = "${lc!'0'}"; 
349 
350                    /* update SiteCatalyst data object */ 
351                        reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
352                        reportingData.page_type = 'product';  
353                        reportingData.site_section = 'credit cards'; 
354                        reportingData.platform = 'microsite'; 
355                        reportingData.campaign_id = '${campaignId}'; 
356                        reportingData.location_code = lc; 
357                        reportingData.partner_name = partnerName; 
358                        reportingData.product = product; 
359                        reportingData.text_to_apply_source = '${text_to_apply_source}'; 
360                        reportingData.visitor_type = 'prospect';         
361                        reportingData.Banker_id = '0'; 
362                        reportingData.Banker_code = '0';        
363 
364 
365                    /* SiteCatalyst  pageView tracking */ 
366                        AUI().ready(function() { 
367                            if (window.publisherFW) { 
368                                //console.log("pageView"); 
369                                window.publisherFW.publishEvent("pageView", reportingData); 
370                            }  
371                        }); 
372 
373                    jQuery('.jn-button, .applyNowLink').on('click', function(e){ 
374                        var buttonName = $(this).data('button-name'); 
375                        var productName = $(this).data('product-name'); 
376                        /* SiteCatalyst  onClick tracking */ 
377                        reportingData.applyButton = buttonName; 
378                        reportingData.product = productName; 
379 
380                            if (window.publisherFW) { 
381                                //console.log('clicked', reportingData); 
382                                window.publisherFW.publishEvent("onClick", reportingData); 
383                            }   
384 
385                    }); 
386 
387                    jQuery('.applyNowLink').on('click', function(e){ 
388                        ga("send", { 
389                            hitType: "event", 
390                            eventAction: "ApplyNow", 
391                            eventCategory: "click", 
392                            eventLabel: "BottomButton" 
393                        }); 
394                    }); 
395             
396                }); 
397        </script>    
398    <#else> 
399        <script> 
400            console.log("Empty card list"); 
401            location.href = '${url404}'; 
402        </script> 
403    </#if>    
404<#else> 
405    <script> 
406        console.log("FI Cards Data empty", "pbu:", "${pbu}", ",subbu:","${subbu}"); 
407        location.href = '${url404}'; 
408    </script> 
409</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417688" at line 10, column 14]

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

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

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#155407401" at line 14, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign environment = url?replace('/index.*','','r')> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign prcaURL = propsUtil.get('elan.prca.url')> 
8 
9<script> 
10var currentUrl = '${url}'; 
11 
12</script> 
13<#assign useprcaValue = "" > 
14<#assign lc = qstringmap["ecdma-lc"]?first>  
15<#assign lc = htmlUtil.escape(lc)> 
16<#assign lc = htmlUtil.escapeJS(lc)> 
17 
18<#assign prefix = "00000" > 
19<#assign lcWithPrefix = prefix + lc > 
20<#assign withPrefixLength = lcWithPrefix?length > 
21<#assign startHere = withPrefixLength - 5> 
22<#assign lc = lcWithPrefix?substring(startHere)> 
23 
24 
25<#if qstringmap["ecid"]?has_content> 
26    <#assign ecidExt = qstringmap["ecid"]?first> 
27    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
28    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
29    <#assign ecidExt = "&ecid=" + ecidExt> 
30<#else> 
31    <#assign ecidExt=""> 
32</#if> 
33 
34<#if oadURL?contains("uat-")> 
35    <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' > 
36<#else> 
37    <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
38</#if> 
39 
40 
41<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
42<#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
43<#assign clientProfile = clientProfileList?first> 
44<#assign partnerName = clientProfile.getMarketingNameLong()> 
45<#assign pbu = clientProfile.getPbu()> 
46<#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
47<#assign cdnCardArtUrl = (propsUtil.get('rackspace.cdn.cardart.url'))!> 
48 
49<#assign synExclusionMessageService = (serviceLocator.findService("com.elan.crc.quicklink.service.SYNExclusionMessageLocalService"))! /> 
50<#assign synExclusionMessageData = synExclusionMessageService.getClientProfileAndSyndicatedExclusionMsg(lc) /> 
51<#assign synExclusionMsg = "" /> 
52<#assign synExclusionMsgURL = "" /> 
53<#assign synExclusionMsgAriaLabel = "" /> 
54 
55<#if synExclusionMessageData?exists && synExclusionMessageData?has_content> 
56    <#assign synExclusionMsgObj = synExclusionMessageData[0]> 
57    <#assign synExclusionMsg = synExclusionMsgObj[4]!"" /> 
58    <#assign synExclusionMsgURL = synExclusionMsgObj[5]!"" /> 
59    <#assign synExclusionMsgAriaLabel = synExclusionMsgObj[6]!"" /> 
60</#if> 
61 
62<#if qstringmap["ecid"]?has_content> 
63    <#assign ecidExt = qstringmap["ecid"]?first> 
64    <#assign ecidExt = htmlUtil.escape(ecidExt)> 
65    <#assign ecidExt = htmlUtil.escapeJS(ecidExt)> 
66    <#assign ecidExt = "&ecid=" + ecidExt> 
67 
68    <#assign campaignId = qstringmap["ecid"]?first > 
69    <#assign campaignId = htmlUtil.escape(campaignId)> 
70    <#assign campaignId = htmlUtil.escapeJS(campaignId)> 
71<#else> 
72    <#assign ecidExt=""> 
73    <#assign campaignId = "" > 
74</#if> 
75 
76<#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu + '&' + lc)>  
77<#-- filter duplicated cards--> 
78<#assign consumerCards = []> 
79<#assign businessCards = []>  
80<#assign offerTypeList = []>  
81<#assign consumerOfferTypes =['101', '104', '108', '109', '115', '141','147', '138', '154']> 
82<#assign businessOfferTypes =['144', '128', '143', '121']>      
83<#assign index = 0> 
84<#list fiCardsData as fib> 
85  <#assign useprcaValue = fib.useprca!"">   
86    <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
87        <#assign offerTypeList = offerTypeList + [fib.offerType]>     
88        <#if consumerOfferTypes?seq_contains(fib.offerType)> 
89            <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
90        <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
91            <#assign businessCards = businessCards + fiCardsData[index..index]> 
92        </#if>                  
93    </#if>  
94    <#assign index = index + 1>                
95</#list>  
96 
97<style> 
98    .excludeModal__overlay { 
99        position: fixed; 
100        top: 0; 
101        left: 0; 
102        right: 0; 
103        bottom: 0; 
104        background: rgba(0,0,0,0.6); 
105        display: flex; 
106        justify-content: center; 
107        align-items: center; 
108
109 
110    .excludeModal__container { 
111        background-color: #fff; 
112        padding: 30px; 
113        min-width: 500px; 
114        max-width: 500px; 
115        max-height: 100vh; 
116        border-radius: 4px; 
117        overflow-y: auto; 
118        box-sizing: border-box; 
119
120 
121    .excludeModal__header { 
122        display: block; 
123        justify-content: space-between; 
124        align-items: center; 
125
126 
127    .modal .excludeModal__container .excludeModal__title { 
128        margin-top: 0; 
129        margin-bottom: 0; 
130        font-weight: 600; 
131        font-size: 20px; 
132        line-height: 1.25; 
133        color: #00449e; 
134        box-sizing: border-box; 
135
136     
137    .excludeModal__close { 
138        background: transparent; 
139        border: 1px solid white; 
140        padding: 4px 8px; 
141        float: right; 
142
143	 
144    .excludeModal__close:hover { 
145        border: 1px solid black; 
146
147 
148    .excludeModal__close:before { content: "\2715"; } 
149 
150    @keyframes mmfadeIn { 
151        from { opacity: 0; } 
152        to { opacity: 1; } 
153
154 
155    @keyframes mmfadeOut { 
156        from { opacity: 1; } 
157        to { opacity: 0; } 
158
159 
160    @keyframes mmslideIn { 
161        from { transform: translateY(15%); } 
162        to { transform: translateY(0); } 
163
164 
165    @keyframes mmslideOut { 
166        from { transform: translateY(0); } 
167        to { transform: translateY(-10%); } 
168
169 
170    .micromodal-slide { 
171        display: none; 
172
173 
174    .micromodal-slide.is-open { 
175        display: block; 
176
177 
178    .micromodal-slide[aria-hidden="false"] .excludeModal__overlay { 
179        animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
180
181 
182    .micromodal-slide[aria-hidden="false"] .excludeModal__container { 
183        animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
184
185 
186    .micromodal-slide[aria-hidden="true"] .excludeModal__overlay { 
187        animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
188
189 
190    .micromodal-slide[aria-hidden="true"] .excludeModal__container { 
191        animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
192
193 
194    .micromodal-slide .excludeModal__container, 
195    .micromodal-slide .excludeModal__overlay { 
196        will-change: transform; 
197
198	 
199	.excludeModal__link { 
200		font-size: 18px !important; 
201		font-weight: bold; 
202		color: #00449e !important; 
203		text-decoration: underline !important; 
204
205	 
206	.excludeModal__link a:hover { 
207		text-decoration: underline !important; 
208
209	 
210	#excludeModalDivLink { 
211		margin-top: 20px; 
212
213</style> 
214 
215<#if ((consumerCards?size > 0) || (businessCards?size > 0))> 
216    <div class="content-container content-container-main jn-consumer-content"> 
217        <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
218            <nav class="jn-primary-nav two-tabs"> 
219                <ul> 
220                    <li title="${partnerName!''} - Personal products"> 
221                        <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
222                    </li> 
223                    <li title="${partnerName!''} - Business products"> 
224                        <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
225                    </li> 
226                </ul> 
227            </nav> 
228        <#else> 
229            <#if (consumerCards?size > 0)> 
230                <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
231                    <ul> 
232                        <li> 
233                            <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
234                        </li> 
235                    </ul> 
236                </nav> 
237            </#if> 
238            <#if (businessCards?size > 0)> 
239                <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
240                    <ul> 
241                        <li> 
242                            <p class="tab-nav" id="businessTab"><span>Business</span></p> 
243                        </li> 
244                    </ul> 
245                </nav> 
246            </#if> 
247        </#if> 
248        <#if (consumerCards?size > 0)> 
249            <div class="tab-more-wrapper">   
250                <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
251                     
252                    <#list consumerCards as fib>    
253                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
254                            <#assign cardArtImageAlt = cdnCardArtUrl + "/" + fib.filename + ".jpg" > 
255                            <#assign hasBalanceTransferCalculator = false> 
256                            <#switch fib.offerType> 
257                                <#case "101"> 
258                                    <#assign productName = "consumer-edr"> 
259                                    <#assign productUrl = "202302/consumer-edr"> 
260                                    <#assign product="Everyday Rewards+"> 
261                                    <#assign cardIndex = 0> 
262                                    <#break> 
263                                <#case "108"> 
264                                    <#assign productName = "consumer-platinum"> 
265                                    <#assign productUrl = "202308/consumer-platinum"> 
266                                    <#assign product="Platinum"> 
267                                    <#assign cardIndex = 2> 
268                                    <#assign hasBalanceTransferCalculator = true> 
269                                    <#break> 
270                                <#case "109"> 
271                                    <#assign productName = "consumer-platinum"> 
272                                    <#assign productUrl = "202308/consumer-platinum"> 
273                                    <#assign product="Platinum"> 
274                                    <#assign cardIndex = 2> 
275                                    <#assign hasBalanceTransferCalculator = true> 
276                                    <#break>                                            
277                                <#case "115"> 
278                                    <#assign productName = "secured"> 
279                                    <#assign productUrl = "secured"> 
280                                    <#assign product="Secured"> 
281                                    <#assign cardIndex = 5> 
282                                    <#break> 
283                                <#case "104"> 
284                                    <#assign productName = "max-cash"> 
285                                    <#assign productUrl = "max-cash"> 
286                                    <#assign product="Max Cash Preferred"> 
287                                    <#assign cardIndex = 1> 
288                                    <#break> 
289                                <#case "147"> 
290                                    <#assign productName = "max-cash-secured"> 
291                                    <#assign productUrl = "max-cash-secured"> 
292                                    <#assign product="Max Cash Secured"> 
293                                    <#assign cardIndex = 4> 
294                                    <#break> 
295                                <#case "141"> 
296                                    <#assign productName = "college-real-rewards"> 
297                                    <#assign productUrl = "college-real-rewards"> 
298                                    <#assign product="College Real Rewards"> 
299                                    <#assign cardIndex = 3> 
300                                    <#break> 
301                                <#case "138"> 
302                                    <#assign productName = "travel-rewards-plus"> 
303                                    <#assign productUrl = "202305/travel-rewards-plus"> 
304                                    <#assign product="Travel Rewards+"> 
305                                    <#assign cardIndex = 10> 
306                                    <#break> 
307                                <#case "154"> 
308                                    <#assign productName = "reserve-rewards-plus"> 
309                                    <#assign productUrl = "202305/reserve-rewards-plus"> 
310                                    <#assign product="Reserve Rewards+"> 
311                                    <#assign cardIndex = 11> 
312                                    <#break> 
313                                <#default> 
314                            </#switch> 
315                            <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
316                            <#assign titleText = titleText?replace('<[^>]+>','','r')> 
317                            <#assign newTag = ""> 
318                            <#if (consumerTitle.getSiblings()[cardIndex].addNewTag?has_content && consumerTitle.getSiblings()[cardIndex].addNewTag.getData() == "true")> 
319                                <#assign newTag = "with-new-tag"> 
320                            </#if> 
321                            <#assign APR=""> 
322                            <#assign AMF=""> 
323                            <#assign BAL=""> 
324                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
325                            <#if (scrapedData?size > 0)> 
326                                <#list scrapedData as sItem> 
327                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
328                                        <#assign APR = sItem.scrapedValue>                                    
329                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
330                                        <#assign AMF = sItem.scrapedValue> 
331                                    <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
332                                        <#assign BAL = sItem.scrapedValue> 
333                                    </#if> 
334                                    <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
335                                        <#break> 
336                                    </#if> 
337                                </#list> 
338                            </#if>                                      
339                            <div class="${newTag} jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
340                                <div class="tag-container"> 
341                                    <div class="tag-corner"> 
342                                        <div class="tag-label">NEW</div> 
343                                    </div> 
344                                </div> 
345                                <div class="consumer-card-heading hide-desktop"> 
346                                    <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
347                                    ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
348                                </div> 
349                                <div class="jn-consumer-card-image"> 
350                                    <img src="${cardArtImage!''}" alt="${partnerName!''} ${product!''} Card" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
351                                    <#assign calculatorConsumerOfferTypes = ["101", "103", "104", "138", "154"] > 
352                                    <#if (calculatorConsumerOfferTypes?seq_contains(fib.offerType))> 
353                                        <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
354                                    </#if> 
355                                    <#if consumerTitle.getSiblings()[cardIndex].cardArtDescription?has_content> 
356                                        <p class="tier3-tabs-card-art-description">${consumerTitle.getSiblings()[cardIndex].cardArtDescription.getData()}</p> 
357                                    </#if> 
358                                    <#if (hasBalanceTransferCalculator)> 
359                                        <a style="display: block; text-align: center; max-width: 285px; margin: auto;" href="javascript:void(0);" data-micromodal-trigger="modal-2">See how much you could save with a balance transfer</a> 
360                                    </#if> 
361                                </div> 
362                                 
363                                <div class="jn-consumer-card-info"> 
364                                    <div class="consumer-card-heading hide-mobile"> 
365                                        <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
366                                        ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
367                                    </div> 
368                                    <div class="jn-additional"> 
369                                            <ul class="${fib.offerType}">    
370                                                <li> 
371                                                    <p> 
372                                                        <#if (fib.offerType == "104")> 
373                                                          <strong>APR for Purchases: </strong> 
374                                                        <#elseif (fib.offerType == "101" || 
375                                                            fib.offerType == "108" || 
376                                                            fib.offerType == "109" || 
377                                                            fib.offerType == "141"  
378                                                        )> 
379                                                            <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
380                                                        <#else> 
381                                                            <strong>APR for Purchases and Balance Transfers: </strong> 
382                                                        </#if> 
383                                                        ${APR!''}  
384                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"> 
385                                                            <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
386                                                        </a> 
387                                                    </p> 
388                                                </li> 
389                                                <#if (fib.offerType == "104")> 
390                                                    <li class="${fib.offerType}"> 
391                                                        <p> 
392                                                            <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
393                                                            ${BAL!''}  
394                                                            <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"> 
395                                                                <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
396                                                            </a> 
397                                                        </p> 
398                                                    </li> 
399                                                </#if>          
400         
401                                                <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
402                                                    <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
403                                                        <li>${marketingInfo.getData()}</li> 
404                                                    </#list> 
405                                                </#if> 
406                                                <li> 
407                                                    <p>Annual Fee: ${AMF!''}  
408                                                        <a  href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}"  target="_blank" class="t_c_link"> 
409                                                            <span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions. 
410                                                        </a> 
411                                                    </p> 
412                                                </li> 
413                                            </ul> 
414                                    </div> 
415                                    <ul class="actions"> 
416                                        <li> 
417                                            <#assign isExcluded = 0> 
418                                            <#if fib.dmaexclude??> 
419                                                <#assign isExcluded = fib.dmaexclude?number!0> 
420                                            </#if>                                           
421                                            <#if isExcluded == 0>  
422											 <#if useprcaValue == "1"> 
423												<a  
424                                                    class="applyNowLink"  
425                                                    data-button-name="apply-now-link"  
426                                                    data-product-name="${productName!''}" 
427                                                    href="#" 
428													offerId="${fib.offerId}" 
429													onclick="submitForm(event)"	 
430
431                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
432                                                </a>											  
433											  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer" method="post"> 
434													<input type="hidden" name="locationCode" value="${lc}" id="locationCode"> 
435													<input type="hidden" name="offerId" value="${fib.offerId}" id="offerId"> 
436													<input type="hidden" name="preparerType" value="customer"> 
437													</form> 
438											<#else> 
439                                                <a  
440                                                    class="applyNowLink"  
441                                                    data-button-name="apply-now-link"  
442                                                    data-product-name="${productName!''}" 
443                                                    href="${oadURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer"  
444
445                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
446                                                </a> 
447											  </#if> 
448                                            <#else> 
449                                                <a  
450                                                    class="applyNowLink"  
451                                                    data-button-name="apply-now-link"  
452                                                    data-product-name="${productName!''}" 
453                                                    data-micromodal-trigger="modal-consumer-tabs-${fib.offerType}" 
454                                                    href="javascript:void(0);" 
455
456                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
457                                                </a> 
458 
459                                            </#if> 
460                                        </li> 
461                                        <li><a href="${environment}/${productUrl}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}<span class="screen-reader-only"> about ${partnerName!''} ${product!''} Card </span></a> 
462                                        </li> 
463                                    </ul> 
464                                </div> 
465                            </div> 
466                    </#list> 
467                </div> 
468            </div> 
469        </#if> 
470        <#if (businessCards?size > 0)>   
471        <div class="tab-more-wrapper">      
472            <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
473                 
474                <#list businessCards as fib> 
475                        <#assign cardArtImage = cdnCardArtUrl + "/"+fib.filename+".png"> 
476                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
477                        <#switch fib.offerType> 
478                            <#case "128"> 
479                                <#assign productName = "business-cash-preferred"> 
480                                <#assign productUrl = "business-cash-preferred"> 
481                                <#assign product="Business Cash Preferred"> 
482                                <#assign cardIndex = 6> 
483                                <#break> 
484                            <#case "121"> 
485                                <#assign productName = "business-platinum"> 
486                                <#assign productUrl = "202208/business-platinum"> 
487                                <#assign product="Business Card"> 
488                                <#assign cardIndex = 7> 
489                                <#break> 
490                            <#case "144"> 
491                                <#assign productName = "smart-business-rewards"> 
492                                <#assign productUrl = "smart-business-rewards"> 
493                                <#assign product="Smart Business Rewards"> 
494                                <#assign cardIndex = 8> 
495                                <#break>                             
496                            <#case "143"> 
497                                <#assign productName = "business-real-rewards"> 
498                                <#assign productUrl = "business-real-rewards"> 
499                                <#assign product="Business Real Rewards"> 
500                                <#assign cardIndex = 9> 
501                                <#break> 
502                             
503                            <#default> 
504                        </#switch> 
505                        <#assign newTag = ""> 
506                        <#if (consumerTitle.getSiblings()[cardIndex].addNewTag?has_content && consumerTitle.getSiblings()[cardIndex].addNewTag.getData() == "true")> 
507                            <#assign newTag = "with-new-tag"> 
508                        </#if> 
509                         
510                        <#assign APR=""> 
511                        <#assign AMF="">                                           
512                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
513                            <#if (scrapedData?size > 0)> 
514                                <#list scrapedData as sItem> 
515                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
516                                        <#assign APR = sItem.scrapedValue> 
517                                    <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
518                                        <#assign AMF = sItem.scrapedValue> 
519                                    </#if> 
520                                    <#if (APR?has_content && AMF?has_content)> 
521                                        <#break> 
522                                    </#if> 
523                                </#list> 
524                            </#if> 
525 
526                        <div class="${newTag} jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
527                            <div class="tag-container"> 
528                                <div class="tag-corner"> 
529                                    <div class="tag-label">NEW</div> 
530                                </div> 
531                            </div> 
532                            <div class="consumer-card-heading hide-desktop"> 
533                                <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
534                                ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
535                            </div> 
536                            <div class="jn-consumer-card-image"> 
537 
538                                <img  
539                                    src="${cardArtImage!''}"  
540                                    alt="${partnerName!''} ${product!''} Card"  
541                                    class="jn-img-responsive"  
542                                    onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'" 
543
544                                <#assign calculatorBizOfferTypes = ["144", "143", "128"] > 
545                                <#if (calculatorBizOfferTypes?seq_contains(fib.offerType))> 
546                                 <a class="reward-calculator-link" target="_blank" onclick='ga("send", "event", "click", "Rewards Calculator", "Outbound Link");' class="whiteLink" href="http://www.myaccountbenefits.com/rewards-calculator?ecdma-lc=${lc}">Calculate Rewards</a> 
547                                </#if> 
548                                <#if consumerTitle.getSiblings()[cardIndex].cardArtDescription?has_content> 
549                                    <p class="tier3-tabs-card-art-description">${consumerTitle.getSiblings()[cardIndex].cardArtDescription.getData()}</p> 
550                                </#if> 
551                            </div> 
552                            <div class="jn-consumer-card-info"> 
553                                <div class="consumer-card-heading hide-mobile"> 
554                                    <div class="consumer-card-heading__subheading">${consumerTitle.getSiblings()[cardIndex].Title.getData()}</div> 
555                                    ${consumerTitle.getSiblings()[cardIndex].headlineText.getData()} 
556                                </div> 
557                                <div class="jn-additional"> 
558                                    <ul class="${fib.offerType}"> 
559                                        <li> 
560                                            <p> 
561                                            <#if (fib.offerType == "144")> 
562                                                <strong>APR for Purchases and Balance Transfers: </strong> 
563                                            <#else> 
564                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
565                                            </#if> 
566                                                ${APR!''} 
567                                                <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions.</a> 
568                                            </p> 
569                                        </li> 
570                                         
571                                        <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
572                                            <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
573                                                <li>${marketingInfo.getData()}</li> 
574                                            </#list> 
575                                        </#if> 
576                                        <li><p>Annual Fee: ${AMF!''} <a 
577                                            href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc}" target="_blank" class="t_c_link"><span class="screen-reader-only">${partnerName!''} ${product!''} Card </span>See terms & conditions.</a></p> 
578                                        </li> 
579                                    </ul> 
580                                </div> 
581                                <ul class="actions"> 
582                                    <li> 
583                                        <#assign isExcluded = 0> 
584                                        <#if fib.dmaexclude??> 
585                                            <#assign isExcluded = fib.dmaexclude?number!0> 
586                                        </#if>                                                                                    
587                                        <#if isExcluded == 0>   
588										 <#if useprcaValue == "1"> 
589												<a  
590                                                    class="applyNowLink"  
591                                                    data-button-name="apply-now-link"  
592                                                    data-product-name="${productName!''}" 
593                                                    href="#" 
594													offerId="${fib.offerId}" 
595													onclick="submitForm(event)"	 
596
597                                                    ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
598                                                </a>											  
599											  <form id="applyForm" action="${prcaURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer" method="post"> 
600													<input type="hidden" name="locationCode" value="${lc}" id="locationCode"> 
601													<input type="hidden" name="offerId" value="${fib.offerId}" id="offerId"> 
602													<input type="hidden" name="preparerType" value="customer"> 
603													</form> 
604											<#else> 
605                                            <a  
606                                                href="${oadURL}?locationCode=${lc}&amp;offerId=${fib.offerId}&amp;preparerType=customer"  
607                                                class="applyNowLink"  
608                                                data-button-name="apply-now-link"  
609                                                data-product-name="${productName!''}" 
610
611                                                ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
612                                            </a> 
613											</#if> 
614                                        <#else> 
615                                            <a  
616                                                class="applyNowLink"  
617                                                data-button-name="apply-now-link"  
618                                                data-product-name="${productName!''}" 
619                                                data-micromodal-trigger="modal-business-tabs-${fib.offerType}" 
620                                                href="javascript:void(0);" 
621
622                                                ${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}<span class="screen-reader-only">for ${partnerName!''} ${product!''} Card </span> 
623                                            </a> 
624 
625                                        </#if> 
626                                    </li> 
627                                    <li><a href="${environment}/${productUrl}?ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}<span class="screen-reader-only"> about ${partnerName!''} ${product!''} Card </span></a></li> 
628                                </ul> 
629                            </div> 
630                        </div> 
631                         
632                </#list> 
633            </div> 
634            </div> 
635        </#if>  
636    </div> 
637 
638    <#if (consumerCards?size > 0)> 
639        <#list consumerCards as fib>  
640            <#assign isExcluded = 0> 
641            <#if fib.dmaexclude??> 
642                <#assign isExcluded = fib.dmaexclude?number!0> 
643            </#if>                                                        
644            <#if isExcluded == 1>     
645                <div aria-hidden="true" class="modal micromodal-slide" id="modal-consumer-tabs-${fib.offerType}" > 
646                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1" > 
647                        <div   
648                            aria-modal="true"  
649                            aria-labelledby="modal-consumer-tabs-title-${fib.offerType}"  
650                            class="excludeModal__container"  
651                            role="dialog" 
652
653                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
654                            <header class="excludeModal__header"> 
655                                <div> 
656									<h2 class="excludeModal__title" id="modal-consumer-tabs-title-${fib.offerType}"> 
657									<#if synExclusionMsg?has_content> 
658										${synExclusionMsg} 
659									<#elseif consumerTitle.getSiblings()[cardIndex].excludedMessage?? > 
660										${consumerTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
661									</#if> 
662									</h2> 
663								 </div> 
664								 <div id="excludeModalDivLink"> 
665									<#if synExclusionMsgURL?has_content> 
666									<p> 
667										<a href="${synExclusionMsgURL}" target="_blank" aria-label="${synExclusionMsgAriaLabel!''}" class="excludeModal__link"> 
668											Learn more 
669										</a> 
670									</p> 
671									</#if> 
672								</div> 
673                            </header> 
674                        </div> 
675                    </div> 
676                </div> 
677            </#if> 
678        </#list> 
679    </#if> 
680 
681    <#if (businessCards?size > 0)>  
682        <#list businessCards as fib> 
683            <#assign isExcluded = 0> 
684            <#if fib.dmaexclude??>   
685                <#assign isExcluded = fib.dmaexclude?number!0> 
686            </#if>                                                    
687            <#if isExcluded == 1>    
688                <div aria-hidden="true" class="modal micromodal-slide" id="modal-business-tabs-${fib.offerType}" > 
689                    <div class="excludeModal__overlay" data-micromodal-close tabindex="-1"> 
690                        <div  
691                            aria-modal="true"  
692                            aria-labelledby="modal-business-tabs-title-${fib.offerType}"  
693                            class="excludeModal__container"  
694                            role="dialog" 
695
696                            <button aria-label="Close modal" class="excludeModal__close" data-micromodal-close></button> 
697                            <header class="excludeModal__header"> 
698                                <div> 
699									<h2 class="excludeModal__title" id="modal-business-tabs-title-${fib.offerType}"> 
700										<#if synExclusionMsg?has_content> 
701											${synExclusionMsg} 
702										<#elseif consumerTitle.getSiblings()[cardIndex].excludedMessage?? > 
703											${consumerTitle.getSiblings()[cardIndex].excludedMessage.getData()!""} 
704										</#if> 
705									</h2> 
706								</div> 
707								<div id="excludeModalDivLink"> 
708								<#if synExclusionMsgURL?has_content> 
709									<p> 
710										<a href="${synExclusionMsgURL}" target="_blank" aria-label="${synExclusionMsgAriaLabel!''}" class="excludeModal__link"> 
711											Learn more 
712										</a> 
713									</p> 
714								</#if> 
715								</div> 
716                            </header> 
717                        </div> 
718                    </div> 
719                </div> 
720            </#if> 
721        </#list> 
722    </#if> 
723 
724    <!-- https://micromodal.vercel.app/ --> 
725    <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
726 
727    <script> 
728		 function submitForm(event) { 
729			event.preventDefault();  
730			 var offerId = event.target.getAttribute("offerId");			 
731			 console.log("offerId::::::::::::::"+offerId); 
732            var lc = document.getElementById('locationCode').value; 
733       // var offerId = document.getElementById('offerId').value;		 
734         
735        // Construct the URL 
736        var url = "${prcaURL}?locationCode=" + lc + "&offerId=" + offerId + "&preparerType=customer"; 
737		 
738		// Set the form action to the constructed URL 
739        document.getElementById('applyForm').action = url; 
740		 
741 
742		postCreditcardLearnMore(url); 
743		//document.getElementById('applyForm').submit(); 
744
745		 
746	function postCreditcardLearnMore(path, method='post') { 
747    // Create a form element 
748    const form = document.createElement('form'); 
749    form.method = method; 
750	//form.target = '_blank'; // Open in a new tab 
751    form.action = path; 
752 
753    // Add each parameter as a hidden input field     
754 
755    document.body.appendChild(form); 
756    form.submit(); 
757
758		 
759        AUI().ready(function() {                      
760            var tabs=$('.tab-nav'); 
761            var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
762            var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
763            var screenWidthMobile = 768; 
764            var screenWidth = window.innerWidth; 
765            var heroCardImgs = document.querySelectorAll('.jn-consumer-card-image img, .cardArtImg img'); 
766            for (var index = 0; index < heroCardImgs.length; index++) { 
767                var heroCardImg = heroCardImgs[index]; 
768                var heroCardSrc = heroCardImg.getAttribute("src"); 
769                if(heroCardSrc != "") { 
770                    resizeImg(heroCardImg); 
771
772
773             
774            if (tabs.length == 1) { 
775                $(tabs).parent().css('margin', '0'); 
776                if ($(consumerSelector).length > 0) { 
777                    hideHeroAndDisclaimer('business'); 
778                    showHeroAndDisclaimer('consumer'); 
779                    changeCardLayout(consumerSelector); 
780                    renumberFootnote("consumer"); 
781                    createMetaTag("consumer"); 
782                }  
783                if ($(businessSelector).length > 0) { 
784                    $(businessSelector).addClass('active'); 
785                    hideHeroAndDisclaimer('consumer'); 
786                    showHeroAndDisclaimer('business'); 
787                    changeCardLayout(businessSelector); 
788                    renumberFootnote("business"); 
789                    createMetaTag("business"); 
790
791            }  
792            if (tabs.length == 2) { 
793                renumberFootnote("consumer"); 
794                renumberFootnote("business"); 
795                createMetaTag("consumer"); 
796                 
797                if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
798                    changeCardLayout(consumerSelector); 
799
800                if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
801                    changeCardLayout(businessSelector); 
802
803                 
804                var tabsNav = document.querySelectorAll('.tab-nav'); 
805                togglePrimaryNav(tabsNav); 
806                 
807                if(window.location.href.indexOf('#business') > -1 ) { 
808                    $(consumerSelector).removeClass('active'); 
809                    $(businessSelector).addClass('active'); 
810                    $('#consumerTab').removeClass('active'); 
811                    $('#businessTab').addClass('active'); 
812                    hideHeroAndDisclaimer('consumer'); 
813                    showHeroAndDisclaimer('business'); 
814                    changeCardLayout(businessSelector); 
815                    renumberFootnote("business"); 
816                    createMetaTag("business"); 
817 
818                    $(tabs).click(function(){ 
819                        if ($(this).attr('id') === "consumerTab") { 
820                            var newUrl = window.location.toString(); 
821                            window.location = newUrl.replace(/#business/, '#consumer'); 
822
823                        if ($(this).attr('id') === "businessTab") { 
824                            var url = window.location.toString(); 
825                            window.location = url.replace(/#consumer/, '#business'); 
826
827                    }); 
828
829                 
830
831        }); 
832 
833        // Primary Nav function      
834        function togglePrimaryNav(elem) { 
835            for (var i = 0; i < elem.length; i++) { 
836                elem[i].addEventListener("click", function(e) { 
837 
838                    var current = this, 
839                        allSections = document.querySelectorAll('[data-id]'), 
840                        section = document.querySelector("[data-id='"+ current.id +"']"); 
841 
842                    for (var a = 0; a < allSections.length; a++) { 
843                        allSections[a].classList.remove('active'); 
844
845                    for (var c = 0; c < elem.length; c++) { 
846                        if (current != elem[c]) { 
847                            elem[c].classList.remove('active'); 
848                        } else { 
849                            current.classList.add('active'); 
850                            section.classList.add('active'); 
851                            hideHeroAndDisclaimer('consumer'); 
852                            hideHeroAndDisclaimer('business'); 
853                            if(current.getAttribute('id') === "consumerTab"){ 
854                                showHeroAndDisclaimer('consumer'); 
855                            } else if(current.getAttribute('id') === "businessTab"){ 
856                                showHeroAndDisclaimer('business'); 
857
858
859
860                    e.preventDefault(); 
861                }); 
862
863
864         
865        function renumberFootnote(type) { 
866            var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
867            var disclaimerSelector = '.tier3-disclaimer-landing-' + type; 
868            var heroSelector = '.tier3-hero-landing-' + type; 
869            var numOfFootnote = $(disclaimerSelector + ' sup').length; 
870            var showList = []; 
871            var hideList=[]; 
872            for (var i = 1; i <= numOfFootnote; i++) { 
873                var cssClass="tag-" + i; 
874                if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
875                    showList.push(i);      
876                } else { 
877                    hideList.push(i); 
878
879            }  
880            /* 
881            for (var i = 1; i < showList.length + 1; i++) { 
882                if(showList[i-1] != i) { 
883                    var className="tag-" + showList[i-1]; 
884                     
885                    //$(heroSelector).find("." +  className).html(i); 
886                    // $(discriptionSelector).find("." +  className).html(i); 
887                    //$(disclaimerSelector).find("." +  className).html(i); 
888
889
890            */ 
891            for (var i = 0; i <hideList.length; i++) { 
892                var cname="tag-" + hideList[i]; 
893                $(disclaimerSelector).find("." + cname).parent().hide(); 
894            }    
895
896         
897        function changeCardLayout(cssSelector) { 
898            var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
899            if(numOfCards == 1) { 
900                $(cssSelector).addClass('one-card'); 
901            } else if (numOfCards == 2) { 
902                $(cssSelector).addClass('two-card'); 
903            }   
904
905 
906        function hideHeroAndDisclaimer(type) { 
907            try { 
908                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('show'); 
909                document.querySelector('.tier3-hero-landing-'+ type).classList.add('hide'); 
910            } catch (e) { 
911                console.log(e); 
912
913 
914            try { 
915                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('show'); 
916                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('hide');  
917            } catch (e) { 
918                console.log(e); 
919
920 
921
922 
923        function showHeroAndDisclaimer(type) { 
924            try { 
925                document.querySelector('.tier3-hero-landing-'+ type).classList.add('show'); 
926                document.querySelector('.tier3-hero-landing-'+ type).classList.remove('hide'); 
927            } catch (e) { 
928                console.log(e); 
929
930             
931            try { 
932                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.add('show'); 
933                document.querySelector('.tier3-disclaimer-landing-'+ type).classList.remove('hide');  
934            } catch (e) { 
935                console.log(e); 
936
937 
938
939 
940        function createMetaTag(type) { 
941            var partnerName = "${partnerName!0}"; 
942            var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
943            var metaDesc =""; 
944            if (type == "consumer") {             
945                if(product_name ==  "consumer-platinum") { 
946                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card."; 
947                } else if(product_name ==  "real-rewards") { 
948                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
949                } else if(product_name ==  "secured") { 
950                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
951                } else if(product_name ==  "max-cash") { 
952                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus."; 
953                } else if(product_name ==  "max-cash-secured") { 
954                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn more on the categories you pick."; 
955                } else if(product_name ==  "travel-rewards-plus") { 
956                    metaDesc = "Apply Today for a "+partnerName+" Credit Card."; 
957                } else if(product_name ==  "reserve-rewards-plus") { 
958                    metaDesc = "Apply Today for a "+partnerName+" Credit Card."; 
959
960 
961            } else if (type == "business") { 
962                if(product_name ==  "business-cashback") {               
963                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
964                } else if(product_name ==  "business-real-rewards") { 
965                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
966                } else if(product_name ==  "business-platinum") { 
967                    metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
968                } else if(product_name ==  "smart-business-rewards") { 
969                    metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card."; 
970
971
972            var m = document.createElement('meta');  
973            m.name = 'description';  
974            m.content = metaDesc;  
975            document.head.appendChild(m); 
976
977         
978        function resizeImg(img) { 
979            img.addEventListener("load", function() { 
980                var cardImgWidth = img.width; 
981                var cardImgHeight = img.height; 
982                if(cardImgWidth > cardImgHeight) { 
983                    img.style.width = "285px"; 
984                } else { 
985                    img.style.width = "150px"; 
986
987            }); 
988
989 
990        AUI().ready(function() { 
991            MicroModal.init(); 
992        }); 
993	 
994    </script>                 
995</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417682" at line 5, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417682" at line 5, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc = qstringmap["ecdma-lc"]?first>   
6<#assign lc = htmlUtil.escape(lc)> 
7<#assign lc = htmlUtil.escapeJS(lc)> 
8 
9<#assign prefix = "00000" > 
10<#assign lcWithPrefix = prefix + lc > 
11<#assign withPrefixLength = lcWithPrefix?length > 
12<#assign startHere = withPrefixLength - 5> 
13<#assign lc = lcWithPrefix?substring(startHere)> 
14<#if lc?has_content> 
15 
16    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
17    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
18    <#assign clientProfile = clientProfileList?first> 
19    <#assign partnerName = clientProfile.getMarketingNameLong()> 
20 
21    <#assign pbu = clientProfile.getPbu()> 
22    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
23 
24    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
25    <#if (fiCardsData?size > 0) > 
26        <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
27 
28        <#if (cardProvider?size > 0)> 
29            <#-- This will be V for visa or M for mastercard. --> 
30            <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
31        <#else> 
32            <script> 
33                console.log("No card provider(Visa/Master Card) found for disclaimer"); 
34            </script> 
35        </#if> 
36 
37        <div class="jn-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer"> 
38            <div class="disclaimer"> 
39                <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))> 
40                    ${disclaimersVisa.getData()} 
41                </#if> 
42                <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) > 
43                    ${disclaimersMasterCard.getData()} 
44                </#if> 
45            </div> 
46        </div> 
47    <#else> 
48        <script> 
49            console.log("card data empty"); 
50        </script> 
51    </#if> 
52<#else> 
53    <script> 
54        console.log("No lc for disclaimer"); 
55    </script> 
56</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417682" at line 5, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417682" at line 5, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4 
5<#assign lc = qstringmap["ecdma-lc"]?first>   
6<#assign lc = htmlUtil.escape(lc)> 
7<#assign lc = htmlUtil.escapeJS(lc)> 
8 
9<#assign prefix = "00000" > 
10<#assign lcWithPrefix = prefix + lc > 
11<#assign withPrefixLength = lcWithPrefix?length > 
12<#assign startHere = withPrefixLength - 5> 
13<#assign lc = lcWithPrefix?substring(startHere)> 
14<#if lc?has_content> 
15 
16    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
17    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
18    <#assign clientProfile = clientProfileList?first> 
19    <#assign partnerName = clientProfile.getMarketingNameLong()> 
20 
21    <#assign pbu = clientProfile.getPbu()> 
22    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
23 
24    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&'+ pbu +'&'+subbu)>  
25    <#if (fiCardsData?size > 0) > 
26        <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)> 
27 
28        <#if (cardProvider?size > 0)> 
29            <#-- This will be V for visa or M for mastercard. --> 
30            <#assign cardProviderAbbreviated = cardProvider[0].cardType> 
31        <#else> 
32            <script> 
33                console.log("No card provider(Visa/Master Card) found for disclaimer"); 
34            </script> 
35        </#if> 
36 
37        <div class="jn-disclaimer tier3-disclaimer-${class.getData()}" title="${partnerName!''} - Disclaimer"> 
38            <div class="disclaimer"> 
39                <#if (disclaimersVisa?has_content && cardProviderAbbreviated?contains("V"))> 
40                    ${disclaimersVisa.getData()} 
41                </#if> 
42                <#if (disclaimersMasterCard?has_content && cardProviderAbbreviated?contains("M")) > 
43                    ${disclaimersMasterCard.getData()} 
44                </#if> 
45            </div> 
46        </div> 
47    <#else> 
48        <script> 
49            console.log("card data empty"); 
50        </script> 
51    </#if> 
52<#else> 
53    <script> 
54        console.log("No lc for disclaimer"); 
55    </script> 
56</#if> 
An error occurred while processing the template.
The following has evaluated to null or missing:
==> qstringmap["ecdma-lc"]  [in template "10154#10192#153417685" at line 3, column 15]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign lc = qstringmap["ecdma-lc"]?f...  [in template "10154#10192#153417685" at line 3, column 1]
----
1<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>  
3<#assign lc = qstringmap["ecdma-lc"]?first> 
4<#assign lc = htmlUtil.escape(lc)> 
5<#assign lc = htmlUtil.escapeJS(lc)> 
6 
7<#if (lc?has_content && lc?length gt 5)> 
8    <#assign lc = lc[0..4] > 
9</#if> 
10<#assign lc = lc?web_safe> 
11<#assign aDateTime = .now> 
12<#assign currentYear = aDateTime?string.yyyy> 
13 
14 
15<div id="footerIdAdPlatinum"> 
16  ${footerContent.getData()} 
17</div> 
18 
19<!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
20<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
21<style> 
22    #opt-out-button, 
23    .modal__btn.learn-more { 
24        background: #0C2074; 
25        border: 1px solid #0C2074; 
26        color: white; 
27        text-transform: uppercase; 
28        text-decoration: none; 
29        font-size: 16px; 
30        padding: 0.5rem 2rem; 
31        display: inline-block; 
32        border-radius: 0; 
33
34    #opt-out-button:hover, 
35    .modal__btn.learn-more:hover { 
36        color: white !important; 
37        border-color: #2C76AF !important; 
38        background-color: #2C76AF !important; 
39
40    .modal .modal__btn.learn-more { 
41        background: white; 
42        border: 1px solid #0C2074; 
43        color: #0C2074; 
44        text-decoration: none; 
45
46    #opt-out-button[disabled="true"] { 
47        background-color: rgba(0,0,0,.15); 
48        color: rgba(0,0,0,.45); 
49        border-color: rgba(0,0,0,.25); 
50
51    #opt-out-button:hover[disabled="true"] { 
52        background-color: rgba(0,0,0,.15) !important; 
53        color: rgba(0,0,0,.45) !important; 
54        border-color: rgba(0,0,0,.25) !important; 
55
56    #opt-out-button:focus { 
57        outline-style: solid; 
58        outline-color: white; 
59        outline-offset: -3px; 
60        outline-width: 1px; 
61
62    .opt-out-link svg { 
63        width: 30px; 
64        height: 14px; 
65        width: auto; 
66        vertical-align: middle; 
67
68    .modal__overlay { 
69        position: fixed; 
70        top: 0; 
71        left: 0; 
72        right: 0; 
73        bottom: 0; 
74        background: rgba(0,0,0,0.6); 
75        display: flex; 
76        justify-content: center; 
77        align-items: center; 
78
79 
80    .modal__container { 
81        background-color: #fff; 
82        padding: 30px; 
83        max-width: 500px; 
84        max-height: 100vh; 
85        border-radius: 4px; 
86        overflow-y: auto; 
87        box-sizing: border-box; 
88
89 
90    .modal__header { 
91        display: flex; 
92        justify-content: space-between; 
93        align-items: center; 
94
95 
96    .modal .modal__container .modal__title { 
97        margin-top: 0; 
98        margin-bottom: 0; 
99        font-weight: 600; 
100        font-size: 20px; 
101        line-height: 1.25; 
102        color: #00449e; 
103        box-sizing: border-box; 
104
105 
106    .modal__close { 
107        background: transparent; 
108        border: 1px solid white; 
109        padding: 4px 8px; 
110
111    .modal__close:hover { 
112        border: 1px solid black; 
113
114 
115    .modal__header .modal__close:before { content: "\2715"; } 
116 
117    .modal__content { 
118        margin-top: 2rem; 
119        margin-bottom: 2rem; 
120        line-height: 1.5; 
121
122 
123    @keyframes mmfadeIn { 
124        from { opacity: 0; } 
125        to { opacity: 1; } 
126
127 
128    @keyframes mmfadeOut { 
129        from { opacity: 1; } 
130        to { opacity: 0; } 
131
132 
133    @keyframes mmslideIn { 
134        from { transform: translateY(15%); } 
135        to { transform: translateY(0); } 
136
137 
138    @keyframes mmslideOut { 
139        from { transform: translateY(0); } 
140        to { transform: translateY(-10%); } 
141
142 
143    .micromodal-slide { 
144        display: none; 
145
146 
147    .micromodal-slide.is-open { 
148        display: block; 
149
150 
151    .micromodal-slide[aria-hidden="false"] .modal__overlay { 
152        animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
153
154 
155    .micromodal-slide[aria-hidden="false"] .modal__container { 
156        animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
157
158 
159    .micromodal-slide[aria-hidden="true"] .modal__overlay { 
160        animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
161
162 
163    .micromodal-slide[aria-hidden="true"] .modal__container { 
164        animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
165
166 
167    .micromodal-slide .modal__container, 
168    .micromodal-slide .modal__overlay { 
169        will-change: transform; 
170
171</style> 
172 
173<div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
174<div class="modal__overlay" tabindex="-1" data-micromodal-close> 
175    <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
176    <header class="modal__header"> 
177        <h2 class="modal__title" id="modal-1-title"> 
178        Your California privacy choices 
179        </h2> 
180        <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
181    </header> 
182    <div class="modal__content" id="modal-1-content"> 
183        <div id="message-no-cookie"> 
184            <p> 
185            We use technologies, such as cookies, that gather information on our website. That information is used for a variety of purposes, such as to understand how visitors interact with our websites, or to serve advertisements on our websites or on other websites. The use of technologies, such as cookies, constitutes a ‘share’ or ‘sale’ of personal information under the California Privacy Rights Act. You can stop the use of certain third-party tracking technologies that are not considered our service providers by clicking on “Opt-Out” below or by broadcasting the global privacy control signal.</p> 
186             
187<p>&nbsp;</p> 
188 
189<p>Note that due to technological limitations, if you visit our website from a different computer or device, or clear cookies on your browser that store your preferences, you will need to return to this screen to opt-out and/or rebroadcast the signal. You can find a description of the types of tracking technologies, and your options with respect to those technologies, by clicking “Learn more” below.</p> 
190    </div> 
191    <div id="message-with-cookie"> 
192        <p>You have successfully opted-out.</p> 
193    </div> 
194    </div> 
195    <div class="modal__footer"> 
196        <a href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a> 
197        <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
198    </div> 
199    </div> 
200</div> 
201</div> 
202<!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
203<!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
204<script> 
205AUI().ready(function() { 
206        //this aui.ready prevents from it not showing cali opt out modal due to getting the node before page finished loading. 
207        const copyrightNode = document.querySelector('#footerIdAdPlatinum .copyright'); 
208        const fdicNode = document.querySelector('#footerIdAdPlatinum .fdic'); 
209        const agreementNode = document.querySelector('#footerIdAdPlatinum .member-agreement'); 
210        agreementNode.innerHTML= '<a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!''}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a>'; 
211        copyrightNode.innerHTML= '<sup>©</sup> Elan Financial Services ' + ${currentYear}; 
212        copyrightNode.classList.add('ecdma-footer-client-name-copyright'); 
213        fdicNode.innerHTML = '<a class="text-color-white" href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>'; 
214        /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */ 
215        fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a href="javascript:void(0);" class="opt-out-link" data-micromodal-trigger="modal-1">Your California privacy choices <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve"><path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#fff"/><path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#06f"/><path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" fill="#fff"/><path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" fill="#06f"/></svg></a></div>'); 
216        /* END CALIFORNIA OPT-OUT MODAL TRIGGER */ 
217 
218        window.getCookieDomain = function() { 
219            var hostname = window.location.hostname.split("."); 
220            return hostname && hostname.slice(hostname.length - 2).join("."); 
221
222        window.setToOptOut = function() { 
223            if (window.getCookie('privacy_optout')) { 
224                    document.getElementById('message-no-cookie').style.display = 'none'; 
225                    document.getElementById('message-with-cookie').style.display = 'block'; 
226                    document.getElementById('opt-out-button').setAttribute('disabled', true) 
227                } else { 
228                    document.getElementById('message-no-cookie').style.display = 'block'; 
229                    document.getElementById('message-with-cookie').style.display = 'none'; 
230
231
232        window.getCookie = function(name) { 
233            var value = '; ' + document.cookie; 
234            var parts = value.split('; ' + name + '='); 
235            if (parts.length === 2) return parts.pop().split(';').shift(); 
236
237        window.californiaOptOut = function() { 
238            if (!window.getCookie('privacy_optout')) { 
239                document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
240                try { 
241                if (window.CustomEvent) { 
242                    window.dispatchEvent(new CustomEvent('privacy_optout')); 
243                } else { 
244                    var privacyOptoutEvent = document.createEvent('Event'); 
245                    privacyOptoutEvent.initEvent('privacy_optout', true, true); 
246                    window.dispatchEvent(privacyOptoutEvent); 
247
248                window.setToOptOut(); 
249                } catch (err) { 
250                console.error(err); 
251
252
253
254        MicroModal.init({ 
255            onShow: window.setToOptOut 
256        }); 
257     
258        // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
259        const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
260        if(isBrowserGpcOptOut === true) { 
261        window.californiaOptOut(); 
262
263    }); 
264</script> 
265<!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->