Hiba jelentkezett a sablon feldolgozása során.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#154098156" at line 8, column 17]

----
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 bCode = qstringmap["bankercod...  [in template "10154#10192#154098156" at line 8, column 1]
----
1<#assign url = 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 
7 
8<#assign bCode= qstringmap["bankercode"]?first> 
9<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
10<#list bData as b>      
11    <#assign lc = b.locationcode > 
12    <#assign rLC = b.reallocationcode > 
13    <#assign mappedLC = b.mappedLocationCode > 
14</#list>  
15<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
16    <#assign ameriprise = true> 
17<#else> 
18    <#assign ameriprise = false> 
19</#if> 
20 
21<#if mappedLC?has_content && !ameriprise> 
22    <#assign lc = mappedLC > 
23</#if> 
24 
25<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)> 
26<#if fiData?first?has_content> 
27    <#assign fi = fiData?first> 
28    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
29        <#assign subbu_special = fi.offerId> 
30    </#if> 
31</#if> 
32 
33 
34<#if lc?has_content> 
35    <#assign prefix = "00000" > 
36    <#assign lcWithPrefix = prefix + lc> 
37    <#assign withPrefixLength = lcWithPrefix?length > 
38    <#assign startHere = withPrefixLength - 5> 
39    <#assign lc = lcWithPrefix?substring(startHere)>   
40    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
41    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
42 
43    <#assign clientProfile = clientProfileList?first> 
44    <#assign partnerName = clientProfile.getMarketingNameLong()> 
45    <#assign pbu = clientProfile.getPbu()> 
46    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>  
47    <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
48    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
49    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
50    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")>             
51        <#assign partnerUrl = 'https://' + partnerUrl> 
52    </#if> 
53 
54    <#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
55    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
56    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
57        <script> 
58        console.log('logo url', '${cdnLogoUrl}${logoFileName}'); 
59    </script> 
60    <#if pbu == "0864054"> 
61        <#assign override = "berkshire"> 
62    <#else> 
63        <#assign override = " "> 
64    </#if> 
65    <#--  this one should be delete for prod  --> 
66                 
67    <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
68    <#assign logoFileName = pbu + "-" + subbu + ".png"> 
69 
70    <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
71    <#if (subbu_special?has_content)> 
72        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
73        <script> 
74            console.log('new subbu', '${subbu_special!''}'); 
75        </script>  
76    <#else> 
77        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
78    </#if> 
79    <#assign temp = []> 
80    <#assign consumerCards = []> 
81    <#assign businessCards = []>  
82    <#assign offerTypeList = []>       
83    <#assign index = 0> 
84    <#assign ameriprise_cards= []> 
85    <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
86    <#assign businessOfferTypes =['144', '128', '143', '121', '123']> 
87    <#list fiCardsData as fib> 
88        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
89            <#assign offerTypeList = offerTypeList + [fib.offerType]> 
90            <#assign temp = temp + fiCardsData[index..index]>    
91            <#if ameriprise> 
92                <#if (fib.offerType == "101" || fib.offerType == "103")> 
93                    <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]> 
94                </#if>                      
95            <#else> 
96                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
97                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
98                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
99                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
100                </#if>             
101            </#if>                 
102        </#if>  
103        <#assign index = index + 1>   
104                     
105    </#list>        
106    <#assign fiCardsData = temp> 
107    <#if ameriprise> 
108        <#assign consumerCards = ameriprise_cards?sort_by("offerType")> 
109    </#if> 
110 
111    <#if (fiCardsData?size > 0)>   
112        <#if (subbu_special?has_content)> 
113            <#assign lc_used = fiCardsData?first.WebLocationCode>   
114        <#else> 
115            <#if ameriprise> 
116                <#assign lc_used = mappedLC>  
117            <#else> 
118                <#assign lc_used = lc>  
119            </#if> 
120        </#if>               
121        <#assign offerId = ""> 
122        <#assign sourceCode = ""> 
123        <#assign cardArtImage = ""> 
124        <#assign productUrl = ""> 
125        <#assign product = ""> 
126        <#assign preparerType = "customer"> 
127        <#assign apr = ""> 
128        <#assign cardIndex = 0>   
129        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
130            <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109")) > 
131                <#list consumerCards as card> 
132                    <#if (card.offerType=="108") || (card.offerType=="109") > 
133                        <#assign offerId = card.offerId> 
134                        <#assign sourceCode = card.sourceCode> 
135                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
136                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
137                        <#assign productUrl="consumer-platinum"> 
138                        <#assign product="Platinum"> 
139                        <#assign cardIndex = 2> 
140                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
141                        <#if (scrapedData?size > 0)> 
142                            <#list scrapedData as sItem> 
143                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
144                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
145                                    <#break> 
146                                </#if> 
147                            </#list> 
148                            <script> 
149                                $(document).ready(function () { 
150                                    var aprText = "${apr}"; 
151                                    if (aprText) { 
152                                        try { 
153                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
154                                            var billing_cycle = matches[1]; 
155                                            var apr_min = apr_min = matches[2]; 
156                                            var apr_max = apr_max = matches[3]; 
157                                            if (billing_cycle) { 
158                                                $(".scraped-billing-cycle").html(billing_cycle); 
159
160                                            if (apr_min) { 
161                                                $(".scraped-apr-min").html(apr_min); 
162
163                                            if (apr_max) { 
164                                                $('.scraped-apr-max').html(apr_max); 
165
166 
167                                        } catch (e) { 
168                                            console.log(e); 
169
170
171                                }); 
172                            </script> 
173                        </#if>  
174                    </#if> 
175                </#list> 
176            <#else> 
177                <#assign displayedCard = consumerCards[0]> 
178                <script> 
179                    console.log('dispalyed card:','${displayedCard.offerType}'); 
180                </script> 
181                <#assign offerId = displayedCard.offerId> 
182                <#assign sourceCode = displayedCard.sourceCode> 
183                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
184                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
185                <#if ameriprise> 
186                    <#if (displayedCard.offerType == "101")> 
187                        <#assign productUrl="ameriprise-premier-visa-signature"> 
188                        <#assign product="Premier Visa Signature"> 
189                        <#assign cardIndex = 0> 
190                    <#elseif (displayedCard.offerType == "103")> 
191                        <#assign productUrl = "ameriprise-visa-signature"> 
192                        <#assign product="Visa Signature"> 
193                        <#assign cardIndex = 1> 
194                    </#if> 
195                <#else> 
196                        <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")> 
197                            <#assign productUrl="real-rewards"> 
198                            <#assign product="Real Rewards"> 
199                            <#assign cardIndex = 1>                           
200                        <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")> 
201                            <#assign productUrl = "consumer-platinum2103"> 
202                            <#assign product="Platinum">    
203                            <#assign cardIndex = 2>    
204                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
205                            <#if (scrapedData?size > 0)> 
206                                <#list scrapedData as sItem> 
207                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
208                                        <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
209                                        <#break> 
210                                    </#if> 
211                                </#list> 
212                                <script> 
213                                    $(document).ready(function () { 
214                                        var aprText = "${apr}"; 
215                                        if (aprText) { 
216                                            try { 
217                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
218                                                var billing_cycle = matches[1]; 
219                                                var apr_min = apr_min = matches[2]; 
220                                                var apr_max = apr_max = matches[3]; 
221                                                if (billing_cycle) { 
222                                                    $(".scraped-billing-cycle").html(billing_cycle); 
223
224                                                if (apr_min) { 
225                                                    $(".scraped-apr-min").html(apr_min); 
226
227                                                if (apr_max) { 
228                                                    $('.scraped-apr-max').html(apr_max); 
229
230 
231                                            } catch (e) { 
232                                                console.log(e); 
233
234
235                                    }); 
236                                </script> 
237                            </#if>                                                     
238                        <#elseif (displayedCard.offerType == "115")> 
239                            <#assign productUrl = "secured"> 
240                            <#assign product="Secured"> 
241                            <#assign cardIndex = 3> 
242                        </#if> 
243                </#if> 
244            </#if> 
245        </#if> 
246        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
247            <#if (offerTypeList?seq_contains("144")) > 
248                <#list businessCards as card> 
249                    <#if (card.offerType=="144")> 
250                        <#assign offerId = card.offerId> 
251                        <#assign sourceCode = card.sourceCode> 
252                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
253                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
254                        <#assign productUrl="smart-business-rewards"> 
255                        <#assign product="Smart Business Rewards"> 
256                        <#assign cardIndex = 0> 
257                    </#if> 
258                </#list> 
259            <#else> 
260                <#assign displayedCard = businessCards[0]> 
261                <#assign offerId = displayedCard.offerId> 
262                <#assign sourceCode = displayedCard.sourceCode> 
263                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
264                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
265 
266                <#if (displayedCard.offerType=="143")> 
267                    <#assign productUrl="business-real-rewards"> 
268                    <#assign product="Business Real Rewards"> 
269                    <#assign cardIndex = 0>    
270                <#elseif (displayedCard.offerType=="128")> 
271                    <#assign productUrl = "business-cashback"> 
272                    <#assign product="Business Cash"> 
273                    <#assign cardIndex = 1>                     
274                <#elseif (displayedCard.offerType=="121")> 
275                    <#assign productUrl = "visa-business"> 
276                    <#assign product="Visa Business"> 
277                    <#assign cardIndex = 3> 
278                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
279                    <#if (scrapedData?size > 0)> 
280                        <#list scrapedData as sItem> 
281                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
282                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
283                                <#break> 
284                            </#if> 
285                        </#list> 
286                        <script> 
287                            $(document).ready(function () { 
288                                var aprText = "${apr}"; 
289                                if (aprText) { 
290                                    try { 
291                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
292                                        var billing_cycle = matches[1]; 
293                                        var apr_min = apr_min = matches[2]; 
294                                        var apr_max = apr_max = matches[3]; 
295                                        if (billing_cycle) { 
296                                            $(".scraped-billing-cycle").html(billing_cycle); 
297
298                                        if (apr_min) { 
299                                            $(".scraped-apr-min").html(apr_min); 
300
301                                        if (apr_max) { 
302                                            $('.scraped-apr-max').html(apr_max); 
303
304 
305                                    } catch (e) { 
306                                        console.log(e); 
307
308
309                            }); 
310                        </script> 
311                    </#if>                       
312                </#if> 
313            </#if> 
314        </#if>    
315        <#if product != ""> 
316            <#if ameriprise> 
317                <#assign card_art_alt =  partnerName + " " + product + " Card"> 
318                <#assign rollover_text =  partnerName + " " + product + " Card"> 
319            <#else> 
320                <#assign card_art_alt = partnerName> 
321                <#assign rollover_text =  partnerName + " " + product + " Credit Card"> 
322                <#assign card_text = product + " Card"> 
323            </#if>  
324        </#if>  
325        <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}"> 
326            <div class="hero-main"> 
327                <div class="hero-main-logo"> 
328                    <#if partnerUrl?has_content> 
329                        <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
330                    <#else> 
331                        <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
332                    </#if> 
333                </div> 
334                <div class="hero-main-container"> 
335                    <div class="hero-main-offer bg-color-white"> 
336                        <div class="offer-header bg-color-black text-color-white text-bold">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
337                        <div class="offer-detail"> 
338                            <div class="offer-detail-head">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
339                            <div class="offer-detail-text text-color-default"> 
340                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
341                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
342                            </div> 
343                            <div class="offer-detail-cardArt">                                                  
344                                <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
345                                <p>${card_text!''}</p> 
346                            </div> 
347                            <#if ameriprise> 
348                                <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
349                            <#else>  
350                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm"> 
351                                    <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
352                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
353                                    <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
354                                        class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
355                                </form> 
356                            </#if> 
357                        </div> 
358                    </div> 
359                </div> 
360            </div> 
361        </div>   
362 
363    </#if> 
364</#if> 
Hiba jelentkezett a sablon feldolgozása során.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#154098159" at line 30, column 17]

----
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 bCode = qstringmap["bankercod...  [in template "10154#10192#154098159" at line 30, 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.getURLCurrent() > 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign url404 = '/error/404.html'> 
6<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
7<#assign prcaURL_TC = 'https://onboarding.elancreditcard.com/gateway/partner/credit-card/begin?locationCode=XXXXX&offerId=XXXXXXXXXX&page=terms' > 
8<#assign environment = url?replace('/index.*','','r')> 
9 
10 
11 
12<#assign text_to_apply_source = "vanity url" > 
13<#if qstringmap["sms"]?has_content> 
14    <#assign sms = 1 > 
15    <#assign text_to_apply_source = "sms" > 
16</#if> 
17<#if qstringmap["qrCode"]?has_content> 
18    <#assign text_to_apply_source = "qr code" > 
19</#if> 
20 
21<#if qstringmap["ecid"]?has_content> 
22    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
23    <#assign campaignId = qstringmap["ecid"]?first > 
24<#else> 
25    <#assign ecidExt=""> 
26    <#assign campaignId = "" > 
27</#if> 
28<#--  check bankercode validity  --> 
29 
30<#assign bCode= qstringmap["bankercode"]?first> 
31 
32<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)> 
33<#if fiData?first?has_content> 
34    <#assign fi = fiData?first> 
35    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
36        <#assign subbu_special = fi.offerId> 
37    </#if> 
38</#if> 
39 
40<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
41<#list bData as b>      
42    <#assign lc = b.locationcode > 
43    <#assign bName = b.branch > 
44    <#assign bPhone = b.businessphone > 
45    <#assign boeid = b.oeid > 
46    <#assign fName = b.firstname?trim > 
47    <#assign lName = b.lastname?trim > 
48    <#assign rLC = b.reallocationcode > 
49    <#assign mappedLC = b.mappedLocationCode > 
50</#list>  
51 
52<#if qstringmap["ecdma-lc"]?has_content> 
53    <#assign lc_url= qstringmap["ecdma-lc"]?first> 
54</#if> 
55 
56<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
57    <#assign ameriprise = true> 
58<#else> 
59    <#assign ameriprise = false> 
60</#if> 
61<#if mappedLC?has_content && !ameriprise> 
62    <#assign lc = mappedLC > 
63</#if> 
64 
65           
66<#if lc?has_content> 
67    <#assign firstNameLength = fName?length > 
68    <#assign lastNameLength = lName?length > 
69    <#if firstNameLength + lastNameLength &gt; 19 > 
70        <#if lastNameLength &gt; 18 > 
71            <#assign bLName = lName?substring(0,18)> 
72        <#else> 
73            <#assign bLName = lName> 
74        </#if> 
75        <#assign maxFirstName = 19 - bLName?length > 
76        <#if firstNameLength &gt; maxFirstName > 
77            <#assign bFName = fName?substring(0,maxFirstName)> 
78        <#else> 
79            <#assign bFName = fName> 
80        </#if> 
81    <#else> 
82        <#assign bFName = fName> 
83        <#assign bLName = lName> 
84    </#if>  
85 
86    <#assign prefix = "00000" > 
87    <#assign lcWithPrefix = prefix + lc > 
88    <#assign withPrefixLength = lcWithPrefix?length > 
89    <#assign startHere = withPrefixLength - 5> 
90    <#assign lc = lcWithPrefix?substring(startHere)>   
91    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
92    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
93    <#if (clientProfileList?first?has_content)> 
94        <#assign clientProfile = clientProfileList?first> 
95        <#assign partnerName = clientProfile.getMarketingNameLong()> 
96        <#assign pbu = clientProfile.getPbu()> 
97        <#assign subbu = clientProfile.getSUBBRANDBUNBR()>          
98        <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>  
99        <#if (subbu_special?has_content)> 
100        <script> 
101            console.log("special subbu:", '${subbu_special}'); 
102        </script> 
103            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
104        <#else> 
105            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
106                    <script> 
107            console.log("subbu:", '${subbu}'); 
108        </script> 
109        </#if> 
110 
111        <#-- Begin: filter cards by sourceCode and offerId and remove duplicated cards--> 
112        <#assign temp = []> 
113        <#assign consumerCards = []> 
114        <#assign businessCards = []>  
115        <#assign offerTypeList = []>  
116        <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
117        <#assign businessOfferTypes =['144', '128', '143', '121', '123']>     
118        <#assign index = 0> 
119        <#list fiCardsData as fib> 
120            <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
121                <#assign offerTypeList = offerTypeList + [fib.offerType]> 
122                <#assign temp = temp + fiCardsData[index..index]>   
123                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
124                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
125                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
126                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
127                </#if>                 
128            </#if>  
129            <#assign index = index + 1>                
130        </#list>  
131 
132 
133        <#assign fiCardsData = temp> 
134 
135        <#if (fiCardsData?size > 0)>   
136            <#if (subbu_special?has_content)> 
137                <#assign lc_used = fiCardsData?first.WebLocationCode>   
138            <#else> 
139                <#if ameriprise> 
140                    <#assign lc_used = lc_url>  
141                <#else> 
142                    <#assign lc_used = mappedLC>  
143                </#if> 
144            </#if>  
145        </#if>  
146 
147        <#if (consumerCards?size > 0 || businessCards?size > 0)>  
148         
149            <div class="content-container content-container-main jn-consumer-content" id="product-display"> 
150                <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
151                    <nav class="jn-primary-nav two-tabs"> 
152                        <ul> 
153                            <li title="${partnerName!''} - Personal products"> 
154                                <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
155                            </li> 
156                            <li title="${partnerName!''} - Business products"> 
157                                <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
158                            </li> 
159                        </ul> 
160                    </nav> 
161                <#else> 
162                    <#if (consumerCards?size > 0)> 
163                        <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
164                            <ul> 
165                                <li> 
166                                    <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
167                                </li> 
168                            </ul> 
169                        </nav> 
170                    </#if> 
171                    <#if (businessCards?size > 0)> 
172                        <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
173                            <ul> 
174                                <li> 
175                                    <p class="tab-nav" id="businessTab"><span>Business</span></p> 
176                                </li> 
177                            </ul> 
178                        </nav> 
179                    </#if> 
180                </#if> 
181                <#if (consumerCards?size > 0)> 
182                <div class="tab-more-wrapper"> 
183                    <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
184                        <#list consumerCards as fib> 
185                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
186                            <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">                         
187                            <#if ameriprise>                                
188                                <#if (fib.offerType == "101")> 
189                                        <#assign productName = "premier-visa-signature"> 
190                                        <#assign product="Premier Visa Signature"> 
191                                        <#assign cardIndex = 0> 
192                                <#elseif (fib.offerType == "103")> 
193                                        <#assign productName = "visa-signature"> 
194                                        <#assign product="Visa Signature"> 
195                                        <#assign cardIndex = 1> 
196                                </#if> 
197                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
198                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
199                            <#else> 
200                                <#switch fib.offerType> 
201                                    <#case "101"> 
202                                        <#assign productName = "real-rewards"> 
203                                        <#assign product="Real Rewards"> 
204                                        <#assign cardIndex = 1> 
205                                        <#break>                                          
206                                    <#case "108"> 
207                                        <#assign productName = "consumer-platinum2103"> 
208                                        <#assign product="Platinum"> 
209                                        <#assign cardIndex = 2> 
210                                         
211                                        <#break> 
212                                    <#case "109"> 
213                                        <#assign productName = "consumer-platinum2103"> 
214                                        <#assign product="Platinum"> 
215                                        <#assign cardIndex = 2> 
216                                        <#break>                                            
217                                    <#case "115"> 
218                                        <#assign productName = "secured"> 
219                                        <#assign product="Secured"> 
220                                        <#assign cardIndex = 3> 
221                                        <#break> 
222                                    <#case "104"> 
223                                        <#assign productName = "max-cash"> 
224                                        <#assign product="Max Cash"> 
225                                        <#assign cardIndex = 0> 
226                                        <#break> 
227                                    <#default> 
228                                </#switch> 
229                                 
230                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
231                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
232                                 
233 
234                                <#assign APR=""> 
235                                <#assign AMF=""> 
236                                <#assign BAL=""> 
237                                <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
238                                <#if (scrapedData?size > 0)> 
239                                    <#list scrapedData as sItem> 
240                                        <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
241                                            <#assign APR = sItem.scrapedValue> 
242                                        <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
243                                            <#assign AMF = sItem.scrapedValue> 
244                                        <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
245                                            <#assign BAL = sItem.scrapedValue> 
246                                        </#if> 
247                                        <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
248                                            <#break> 
249                                        </#if> 
250                                    </#list> 
251                                </#if> 
252                            </#if> 
253                            <#if ameriprise> 
254                                <#assign rollover_text =  partnerName + " " + product + " " + " Card"> 
255                            <#else> 
256                                <#assign rollover_text =  partnerName + " " + product + " " + " Credit Card"> 
257                            </#if>                             
258                            <div class="jn-consumer-item item-${fib.offerType}" title="${rollover_text!''}"> 
259                                    <img src="${cardArtImage!''}" alt="${rollover_text!''}"  
260                                        class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
261                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
262                                    <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
263                                    <ul class="actions"> 
264                                        <li> 
265                                            <form action="${oadURL}?locationCode=${mappedLC}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}&amp;referral=empstore&amp;applicationType=saa" method="post" class="BAAForm"> 
266                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
267                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
268                                                <input type="submit" onclick="submit();" style="color:#173989;text-decoration: underline;cursor: pointer;background-color:white;" class="jn-button jn-consumer-content banner-cta-apply-button text-bold button-bg-color-white" href="${oadURL}?locationCode=${mappedLC}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}&amp;referral=empstore&amp;applicationType=saa"  
269                                                    data-button-name="apply-now-link" data-product-name="${productName}" 
270                                                    title="Apply Now for ${rollover_text!''}" value="${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}"/> 
271                                            </form> 
272                                        </li> 
273                                        <li> 
274                                        <#if ameriprise> 
275                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${mappedLC}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
276                                        <#else> 
277                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
278                                        </#if> 
279                                        </li> 
280                                    </ul> 
281                                    <div class="jn-additional"> 
282                                        <ul class="${fib.offerType}"> 
283                                            <#if !ameriprise> 
284                                                <#if (fib.offerType == "104")> 
285                                                    <li class="${fib.offerType}"> 
286                                                        <p> 
287                                                            <strong>APR<sup>*</sup> for Purchases: </strong> 
288                                                            ${APR!''} 
289                                                        </p> 
290                                                         
291                                                    </li> 
292                                                    <li class="${fib.offerType}"> 
293                                                        <p> 
294                                                            <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
295                                                            ${BAL!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
296                                                        </p> 
297                                                    </li> 
298                                                <#elseif (fib.offerType== "115")> 
299                                                    <li class="${fib.offerType}"> 
300                                                        <p> 
301                                                            <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
302                                                            ${APR!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
303                                                        </p> 
304                                                    </li> 
305                                                <#else> 
306                                                    <li class="${fib.offerType}"> 
307                                                        <p> 
308                                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
309                                                            ${APR!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
310                                                        </p> 
311                                                    </li> 
312                                                </#if> 
313                                            </#if> 
314                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
315                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
316													<#assign newData = marketingInfo.getData() > 
317													<#if (newData?contains("https://apply.elancreditcard.com/oad/terms.controller?"))> 
318														<#assign tcLink = prcaURL_TC?replace("XXXXXXXXXX", fib.offerId)?replace("XXXXX", mappedLC) > 
319														<#assign startPhrase = "href=" > 
320														<#assign posHrefStart = newData?index_of(startPhrase) + startPhrase?length> 
321														<#assign endPhrase = "target=" > 
322														<#assign posHrefEnd = newData?index_of(endPhrase) + startPhrase?length - endPhrase?length> 
323														<#assign posHrefLen = newData?length - 1> 
324														<#assign currentHrefVal = newData[posHrefStart..posHrefEnd]> 
325														<#assign newData = newData?replace(currentHrefVal, tcLink)> 
326													</#if> 
327													<li>${newData}</li>  
328                                                </#list> 
329                                            </#if> 
330                                            <#if !ameriprise> 
331                                                <li> 
332                                                    <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}"  target="_blank">Terms & Conditions</a></p> 
333                                                </li> 
334                                            </#if> 
335                                        </ul> 
336                                    </div> 
337                            </div> 
338 
339                               
340                        </#list> 
341                    </div> 
342                     
343                </div> 
344                 
345                </#if> 
346                <#if (businessCards?size > 0)>  
347                    <div class="tab-more-wrapper">    
348                        <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
349                             
350                            <#list businessCards as fib> 
351                                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
352                                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
353                                    <#switch fib.offerType> 
354                                        <#case "144"> 
355                                            <#assign productName = "smart-business-rewards"> 
356                                            <#assign product="Smart Business Rewards"> 
357                                            <#assign cardIndex = 4> 
358                                            <#break> 
359                                        <#case "128"> 
360                                            <#assign productName = "business-cashback"> 
361                                            <#assign product="Business Cash"> 
362                                            <#assign cardIndex = 5> 
363                                            <#break> 
364                                        <#case "143"> 
365                                            <#assign productName = "business-real-rewards"> 
366                                            <#assign product="Business Real Rewards"> 
367                                            <#assign cardIndex = 6> 
368                                            <#break> 
369                                        <#case "121"> 
370                                            <#assign productName = "visa-business"> 
371                                            <#assign product="Business Card"> 
372                                            <#assign cardIndex = 7> 
373                                            <#break> 
374                                        <#default> 
375                                    </#switch> 
376                                    <#assign APR=""> 
377                                    <#assign AMF=""> 
378                                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
379                                    <#if (scrapedData?size > 0)> 
380                                        <#list scrapedData as sItem> 
381                                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
382                                                <#assign APR = sItem.scrapedValue> 
383                                            <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
384                                                <#assign AMF = sItem.scrapedValue> 
385                                            </#if> 
386                                            <#if (APR?has_content && AMF?has_content)> 
387                                                <#break> 
388                                            </#if> 
389                                        </#list> 
390                                    </#if> 
391                                     
392                                <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
393                                    <img src="${cardArtImage!''}"  alt="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
394                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
395                                    <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
396                                    <ul class="actions">                                     
397                                        <li> 
398                                            <form action="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}&amp;referral=empstore&amp;applicationType=saa" method="post" class="BAAForm"> 
399                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
400                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>                                         
401                                                <a class="applyNowLink apply-now-button"  
402                                                href="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}&amp;referral=empstore&amp;applicationType=saa"  
403                                                data-button-name="apply-now-link" data-product-name="${productName}" 
404                                                title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
405                                            </form> 
406                                        </li> 
407                                        <li><a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
408                                    </ul> 
409                                    <div class="jn-additional"> 
410                                        <ul> 
411                                            <#if (fib.offerType == "144")> 
412                                                <li> 
413                                                    <p> 
414                                                        <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
415                                                        ${APR!''} 
416                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
417                                                    </p> 
418                                                </li> 
419                                            <#else> 
420                                                <li> 
421                                                    <p> 
422                                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
423                                                        ${APR!''} 
424                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
425                                                    </p> 
426                                                </li> 
427                                            </#if> 
428                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
429                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
430                                                    <li>${marketingInfo.getData()}</li> 
431                                                </#list> 
432                                            </#if> 
433                                            <li><p>Annual Fee: ${AMF!''} <a 
434                                                href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p> 
435                                            </li> 
436                                        </ul> 
437                                    </div> 
438                                </div> 
439                                 
440                            </#list> 
441                             
442                        </div> 
443                    </div> 
444                </#if>  
445                    <div class="more-link" ><a href="#" role="button" aria-label="More Cards"><div class="more-text">MORE <br> CARDS </div><div class="more-caret"></div></a></div> 
446                    <div class="less-link"><a href="#" role="button" aria-label="Less Cards"><div class="less-caret"></div> <div class="less-text">BACK</div></a></div> 
447            </div> 
448            <script> 
449                var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
450                var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
451                $(document).ready(function () { 
452                    var banker_code = "${bCode!''}"; 
453                    var tabs=$('.tab-nav'); 
454                    var slideDiv = $('.jn-tab-content.active');                    
455                    var screenWidthMobile = 768; 
456                    var screenWidth = window.innerWidth; 
457 
458                    if (tabs.length == 1) { 
459                        if ($(consumerSelector).length > 0) { 
460                            if(banker_code && (banker_code.indexOf("amp") == 0) && (banker_code.length > 6)) { 
461                                $("nav.jn-primary-nav").hide(); 
462                                changeCardLayout(consumerSelector); 
463                                createMetaTag("consumer"); 
464                            } else { 
465                                hideHeroAndDisclaimer('business'); 
466                                showHeroAndDisclaimer('consumer'); 
467                                changeCardLayout(consumerSelector); 
468                                renumberFootnote("consumer"); 
469                                createMetaTag("consumer");  
470
471                        }  
472                        if ($(businessSelector).length > 0) { 
473                            $(businessSelector).addClass('active'); 
474                            hideHeroAndDisclaimer('consumer'); 
475                            showHeroAndDisclaimer('business'); 
476                            changeCardLayout(businessSelector); 
477                            renumberFootnote("business"); 
478                            createMetaTag("business");  
479
480                        if(screenWidth > screenWidthMobile) { 
481                            if ($("#consumerTab").length > 0) { 
482                                if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
483                                    $('.more-link').show(); 
484                                } else { 
485                                    $('.more-link').hide(); 
486                                    $('.less-link').hide(); 
487
488                            } else if ($("#businessTab").length > 0) { 
489                                if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
490                                    $('.more-link').show(); 
491                                } else { 
492                                    $('.more-link').hide(); 
493                                    $('.less-link').hide(); 
494
495
496 
497                        }  
498
499                    if (tabs.length == 2) { 
500                        renumberFootnote("consumer"); 
501                        renumberFootnote("business"); 
502                        createMetaTag("consumer"); 
503                        if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
504                            changeCardLayout(consumerSelector); 
505
506                        if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
507                            changeCardLayout(businessSelector); 
508
509                        if(screenWidth > screenWidthMobile) { 
510                            if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
511                                $('.more-link').show(); 
512                            } else { 
513                                $('.more-link').hide(); 
514                                $('.less-link').hide(); 
515
516                            /* 
517                            if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
518                                $('.more-link').show(); 
519                            } else { 
520                                $('.more-link').hide(); 
521                                $('.less-link').hide(); 
522
523                            */ 
524                          
525                            $(tabs).click(function(){ 
526                                if ($(this).attr('id') === "consumerTab") { 
527                                    if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
528                                        slideDiv = $('.jn-tab-content.active'); 
529                                        $(slideDiv).removeClass('transition-left'); 
530                                        $('.less-link').hide(); 
531                                        $('.more-link').show(); 
532                                    } else { 
533                                        $('.less-link').hide(); 
534                                        $('.more-link').hide(); 
535
536
537 
538                                if ($(this).attr('id') === "businessTab") { 
539                                    if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
540                                        slideDiv = $('.jn-tab-content.active'); 
541                                        $(slideDiv).removeClass('transition-left'); 
542                                        $('.less-link').hide(); 
543                                        $('.more-link').show(); 
544                                    } else { 
545                                        $('.less-link').hide(); 
546                                        $('.more-link').hide(); 
547
548
549                            }); 
550                                
551
552                        var tabsNav = document.querySelectorAll('.tab-nav'); 
553                        togglePrimaryNav(tabsNav); 
554 
555
556                    $('.more-link, .less-link').click(function(e){ 
557                        e.preventDefault(); 
558                    }); 
559                    $('.more-link').click(function(){ 
560                        slideDiv = $('.jn-tab-content.active'); 
561                        $(slideDiv).addClass('transition-left'); 
562                        $('.less-link').show(); 
563                        $(this).hide(); 
564                    }); 
565                    $('.less-link').click(function(){ 
566                        slideDiv = $('.jn-tab-content.active'); 
567                        $(slideDiv).removeClass('transition-left'); 
568                        $(this).hide(); 
569                        $('.more-link').show(); 
570                    }); 
571 
572                }); 
573 
574                // Primary Nav function 
575                 
576                function togglePrimaryNav(elem) { 
577                    for (var i = 0; i < elem.length; i++) { 
578                        elem[i].addEventListener("click", function(e) { 
579 
580                            var current = this, 
581                                allSections = document.querySelectorAll('[data-id]'), 
582                                section = document.querySelector("[data-id='"+ current.id +"']"); 
583 
584                            for (var a = 0; a < allSections.length; a++) { 
585                                allSections[a].classList.remove('active'); 
586
587                            for (var c = 0; c < elem.length; c++) { 
588                                if (current != elem[c]) { 
589                                    elem[c].classList.remove('active'); 
590                                } else { 
591                                    current.classList.add('active'); 
592                                    section.classList.add('active'); 
593                                    hideHeroAndDisclaimer('consumer'); 
594                                    hideHeroAndDisclaimer('business'); 
595                                    if(current.getAttribute('id') === "consumerTab"){ 
596                                        showHeroAndDisclaimer('consumer'); 
597                                    } else if(current.getAttribute('id') === "businessTab"){ 
598                                        showHeroAndDisclaimer('business'); 
599
600
601
602                            e.preventDefault(); 
603                        }); 
604
605
606 
607                function renumberFootnote(type) { 
608                    var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
609                    var disclaimerSelector = '.tier1-disclaimer-landing-' + type; 
610                    var heroSelector = '.tier1-hero-landing-' + type; 
611                    var numOfFootnote = $(disclaimerSelector + ' sup').length; 
612                    var showList = []; 
613                    var hideList=[]; 
614                    for (var i = 1; i <= numOfFootnote; i++) { 
615                    var cssClass="tag-" + i; 
616                    if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
617                        showList.push(i);      
618                    } else { 
619                        hideList.push(i); 
620
621                    }  
622                    for (var i = 1; i < showList.length + 1; i++) { 
623                        if(showList[i-1] != i) { 
624                            var className="tag-" + showList[i-1]; 
625                            $(heroSelector).find("." +  className).html(i); 
626                            $(discriptionSelector).find("." +  className).html(i); 
627                            $(disclaimerSelector).find("." +  className).html(i); 
628
629
630                    for (var i = 0; i <hideList.length; i++) { 
631                        var cname="tag-" + hideList[i]; 
632                        $(disclaimerSelector).find("." + cname).parent().hide(); 
633                    }    
634
635 
636                function changeCardLayout(cssSelector) { 
637                    var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
638                    if(numOfCards == 1) { 
639                        $(cssSelector).addClass('one-card'); 
640                    } else if (numOfCards == 2) { 
641                        $(cssSelector).addClass('two-card'); 
642                    }   
643
644                function hideHeroAndDisclaimer(type) { 
645                    try { 
646                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('show'); 
647                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('hide'); 
648                    } catch (e) { 
649                        console.log(e); 
650
651 
652                    try { 
653                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('show'); 
654                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('hide');  
655                    } catch (e) { 
656                        console.log(e); 
657
658 
659
660                function showHeroAndDisclaimer(type) { 
661                    try { 
662                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('show'); 
663                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('hide'); 
664                    } catch (e) { 
665                        console.log(e); 
666
667                     
668                    try { 
669                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('show'); 
670                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('hide');  
671                    } catch (e) { 
672                        console.log(e); 
673
674 
675
676                function createMetaTag(type) { 
677                    var partnerName = "${partnerName!0}"; 
678                    var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
679                    var metaDesc = ""; 
680                    if (type == "consumer") {     
681                        if(location.pathname.indexOf("11t1m") != -1) { 
682                            metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening." 
683                        } else {                                    
684                            if(product_name ==  "consumer-platinum2103") { 
685                                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."; 
686                            } else if(product_name ==  "real-rewards") { 
687                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
688                            } else if(product_name ==  "secured") { 
689                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
690                            } else if(product_name ==  "max-cash") { 
691                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select."; 
692
693
694 
695                    } else if (type == "business") { 
696                        if(product_name ==  "business-cashback") {               
697                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
698                        } else if(product_name ==  "business-real-rewards") { 
699                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
700                        } else if(product_name ==  "business-visa") { 
701                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
702                        } else if(product_name ==  "smart-business-rewards") { 
703                            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."; 
704
705
706                    var m = document.createElement('meta');  
707                    m.name = 'description';  
708                    m.content = metaDesc;  
709                    document.head.appendChild(m); 
710
711                function goToByScroll(id) { 
712                    var element = document.getElementById(id); 
713                    element.scrollIntoView(true); 
714
715                function slideAmount(length) { 
716 
717
718                 
719            </script> 
720            <script> 
721                    var reportingData = window.reportingData || {}; 
722                document.addEventListener('DOMContentLoaded', function() { 
723                    console.log('inside ready'); 
724                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
725                    var hostName = location.hostname;                                     
726                    function getDomainFromHostname(hostname) { 
727                        var parts = hostname.split('.'); 
728                        return parts.length === 3 ? parts[1] : parts[0]; 
729
730                    var domain = getDomainFromHostname(hostName); 
731                    var partnerName = "${partnerName!0}"; 
732                    var ameriprise = '${ameriprise?string("yes", "no")}'; 
733                    var locationCode = "${rLC!lc}"; 
734                    var eidAmp = ""; 
735                    if (ameriprise == "yes") { 
736                        var bankercode_amp = '${bCode}'; 
737                        eidAmp = bankercode_amp.substring(3); 
738                        locationCode =""; 
739                        document.title = "Ameriprise Financial Credit Card Overview Page"; 
740                    } else { 
741                        document.title = partnerName + " Credit Card Index Page"; 
742
743                     
744                    var lc = '${lc!0}'; 
745 
746                    var regex = /\d+/g; 
747                    var bdNumber = "${bPhone!''}"; 
748                    var phoneNum = bdNumber.match(regex); 
749                    var areaCode = ""; 
750                    var exchangeCode = ""; 
751                    var num = ""; 
752                    if(phoneNum != null) { 
753                        phoneNum = phoneNum.join(""); 
754                        areaCode = phoneNum.substring(0,3); 
755                        exchangeCode = phoneNum.substring(3,6); 
756                        num = phoneNum.substring(6,10); 
757
758 
759                        /* update SiteCatalyst data object */ 
760                    reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
761                    reportingData.page_type = 'product';  
762                    reportingData.site_section = 'credit cards'; 
763                    reportingData.platform = 'microsite'; 
764                    reportingData.campaign_id = '${campaignId}'; 
765                    reportingData.location_code = '${rLC!0}'; 
766                    reportingData.partner_name = "${partnerName}"; 
767                    reportingData.product = 'All Cards'; 
768                    reportingData.text_to_apply_source = '${text_to_apply_source}'; 
769                    reportingData.visitor_type = 'prospect';         
770                    reportingData.Banker_id = '${boeid}'; 
771                    reportingData.Banker_code = '${bCode}'; 
772 
773                                                     
774                    /* SiteCatalyst  pageView tracking */ 
775                    AUI().ready(function() { 
776                        if (window.publisherFW) { 
777                            //console.log('reportingData', reportingData); 
778                            window.publisherFW.publishEvent("pageView", reportingData); 
779
780                    });  
781 
782                                     
783                    $('.jn-button').removeAttr('disabled'); 
784                    $('.jn-button').removeClass('jn-disabled'); 
785 
786                    jQuery('.applyNowLink').on('click', function(e){ 
787                        $(this).closest('.BAAForm').submit(); 
788                        ga("send", { 
789                            hitType: "event", 
790                            eventAction: "ApplyNow", 
791                            eventCategory: "click", 
792                            eventLabel: "BottomButton" 
793                        }); 
794                        return false; 
795                    }); 
796                    jQuery(".BAAForm").on("submit", function(e){ 
797                        e.preventDefault(); 
798                        console.log("in custom submit"); 
799                        var xmlData; 
800                        if(ameriprise == "yes")  
801
802							var applicationJsonData = { 
803								  "prefillData": { 
804									"versionNumber": "1.0", 
805									"applicationData": { 
806									  "referral": { 
807										"employeeId": eidAmp, 
808										"partnerLocationId": "${mappedLC!'0'}" 
809									  }, 
810									  "partnerParams": { 
811										"pudf1": "${bName!'0'}",    
812										"pudf3": "${boeid!0}",        
813										"pudf2": "${bFName!'0'} ${bLName!'0'}",    
814										"pudf4": areaCode + exchangeCode + num  
815
816
817
818
819							xmlData = JSON.stringify(applicationJsonData); 
820                        }  
821						else { 
822                            xmlData = '<?xml version="1.0"?>'+ 
823                                "<prefillData>"+  
824                                "<versionNumber>1.0</versionNumber>"+  
825                                "<applicationData>"+  
826                                "<bankerInformation>"+  
827                                "<locationCode>" + locationCode + "</locationCode>"+ 
828                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
829                                "<employeeID>${boeid!0}</employeeID>"+ 
830                                "<name>" + 
831                                "<first>${bFName!'0'}</first>" + 
832                                "<last>${bLName!'0'}</last>" + 
833                                "</name>"+ 
834                                "<phone>"+ 
835                                "<areaCode>"+areaCode+"</areaCode>"+  
836                                "<exchange>"+exchangeCode+"</exchange>"+ 
837                                "<number>"+num+"</number>"+  
838                                "</phone>"+  
839                                "</bankerInformation>"+  
840                                "</applicationData>"+  
841                                "</prefillData>" 
842
843                        $(this).children(".appDataBAA").val(xmlData); 
844                        var buttonName = $(this).find(".apply-now-button").data("button-name"); 
845                        var productName = $(this).find(".apply-now-button").data("product-name"); 
846                        /* SiteCatalyst  onClick tracking */ 
847                        reportingData.apply_button = buttonName; 
848                        reportingData.product = productName; 
849 
850                        if (window.publisherFW) { 
851                            console.log('clicked', reportingData); 
852                            window.publisherFW.publishEvent("onClick", reportingData); 
853
854 
855                        this.submit(); 
856                    });                                                                
857                     
858 
859                }); 
860            </script>                    
861                 
862        </#if>  
863    </#if> 
864</#if> 
Hiba jelentkezett a sablon feldolgozása során.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#157469119" at line 5, column 17]

----
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 bCode = qstringmap["bankercod...  [in template "10154#10192#157469119" at line 5, column 1]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
4 
5<#assign bCode= qstringmap["bankercode"]?first> 
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if mappedLC?has_content && !(url?contains("11t1m"))> 
13    <#assign lc = mappedLC > 
14</#if> 
15<#if lc?has_content> 
16    <#assign prefix = "00000" > 
17    <#assign lcWithPrefix = prefix + lc > 
18    <#assign withPrefixLength = lcWithPrefix?length > 
19    <#assign startHere = withPrefixLength - 5> 
20    <#assign lc = lcWithPrefix?substring(startHere)> 
21    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
22    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
23 
24    <#assign clientProfile = clientProfileList?first>  
25    <#assign partnerName=clientProfile.getMarketingNameLong()> 
26</#if> 
27<div class="content-container" title="${partnerName} - Disclaimer"> 
28    <div class="jn-disclaimer tier1-disclaimer-${class.getData()}"> 
29        ${content.getData()} 
30    </div> 
31</div> 
Hiba jelentkezett a sablon feldolgozása során.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#18386837" at line 14, column 17]

----
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 bCode = qstringmap["bankercod...  [in template "10154#10192#18386837" at line 14, column 1]
----
1<#-- 
2Web content templates are used to lay out the fields defined in a web 
3content structure. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--><#assign aDateTime = .now> 
8<#assign currentYear = aDateTime?string.yyyy> 
9<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
10<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
11<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
12<#assign url404 = '/error/404.html'> 
13 
14<#assign bCode= qstringmap["bankercode"]?first> 
15<#assign bCode = htmlUtil.escape(bCode)> 
16<#assign bCode = htmlUtil.escapeJS(bCode)> 
17 
18<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
19<#list bData as b>      
20    <#assign lc = b.locationcode > 
21    <#assign rLC = b.reallocationcode > 
22    <#assign mappedLC = b.mappedLocationCode > 
23</#list>  
24 
25<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
26    <#assign ameriprise = true> 
27<#else> 
28    <#assign ameriprise = false> 
29</#if> 
30<#if mappedLC?has_content && !ameriprise> 
31    <#assign lc = mappedLC > 
32</#if> 
33 
34<#if lc?has_content> 
35 
36    <#assign prefix = "00000" > 
37    <#assign lcWithPrefix = prefix + lc > 
38    <#assign withPrefixLength = lcWithPrefix?length > 
39    <#assign startHere = withPrefixLength - 5> 
40    <#assign lc = lcWithPrefix?substring(startHere)> 
41<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
42    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
43 
44    <#assign clientProfile = clientProfileList?first> 
45    <#assign pbu = clientProfile.getPbu()> 
46    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>   
47    <#assign partnerName=clientProfile.getMarketingNameLong()> 
48    <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
49    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
50    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
51    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")> 
52        <#-- add protocal if missing  --> 
53        <#assign partnerUrl = 'https://' + partnerUrl> 
54    </#if> 
55    <footer class="page-footer"> 
56        <div class="page-footer__content"> 
57            ${footerContent.getData()} 
58        </div> 
59    </footer> 
60 
61    <!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
62        <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
63        <style> 
64            #opt-out-button, 
65            .modal__btn.learn-more { 
66                background: #0C2074; 
67                border: 1px solid #0C2074; 
68                color: white; 
69                text-transform: uppercase; 
70                text-decoration: none; 
71                font-size: 16px; 
72                padding: 0.5rem 2rem; 
73                display: inline-block; 
74                border-radius: 0; 
75
76            #opt-out-button:hover, 
77            .modal__btn.learn-more:hover { 
78                color: white; 
79                border-color: #2C76AF !important; 
80                background-color: #2C76AF !important; 
81
82            .modal__btn.learn-more { 
83                background: white; 
84                border: 1px solid #0C2074; 
85                color: #0C2074; 
86
87            #opt-out-button[disabled="true"] { 
88                background-color: rgba(0,0,0,.15); 
89                color: rgba(0,0,0,.45); 
90                border-color: rgba(0,0,0,.25); 
91
92            #opt-out-button:hover[disabled="true"] { 
93                background-color: rgba(0,0,0,.15) !important; 
94                color: rgba(0,0,0,.45) !important; 
95                border-color: rgba(0,0,0,.25) !important; 
96
97            #opt-out-button:focus { 
98                outline-style: solid; 
99                outline-color: white; 
100                outline-offset: -3px; 
101                outline-width: 1px; 
102
103            .opt-out-link svg { 
104                width: 30px; 
105                height: 14px; 
106                width: auto; 
107                vertical-align: middle; 
108
109            .modal__overlay { 
110                position: fixed; 
111                top: 0; 
112                left: 0; 
113                right: 0; 
114                bottom: 0; 
115                background: rgba(0,0,0,0.6); 
116                display: flex; 
117                justify-content: center; 
118                align-items: center; 
119
120 
121            .modal__container { 
122                background-color: #fff; 
123                padding: 30px; 
124                max-width: 500px; 
125                max-height: 100vh; 
126                border-radius: 4px; 
127                overflow-y: auto; 
128                box-sizing: border-box; 
129
130 
131            .modal__header { 
132                display: flex; 
133                justify-content: space-between; 
134                align-items: center; 
135
136 
137            .modal__title { 
138                margin-top: 0; 
139                margin-bottom: 0; 
140                font-weight: 600; 
141                font-size: 20px; 
142                line-height: 1.25; 
143                color: #00449e; 
144                box-sizing: border-box; 
145
146 
147            .modal__close { 
148                background: transparent; 
149                border: 1px solid white; 
150                padding: 4px 8px; 
151
152            .modal__close:hover { 
153                border: 1px solid black; 
154
155 
156            .modal__header .modal__close:before { content: "\2715"; } 
157 
158            .modal__content { 
159                margin-top: 2rem; 
160                margin-bottom: 2rem; 
161                line-height: 1.5; 
162
163 
164            @keyframes mmfadeIn { 
165                from { opacity: 0; } 
166                to { opacity: 1; } 
167
168 
169            @keyframes mmfadeOut { 
170                from { opacity: 1; } 
171                to { opacity: 0; } 
172
173 
174            @keyframes mmslideIn { 
175                from { transform: translateY(15%); } 
176                to { transform: translateY(0); } 
177
178 
179            @keyframes mmslideOut { 
180                from { transform: translateY(0); } 
181                to { transform: translateY(-10%); } 
182
183 
184            .micromodal-slide { 
185                display: none; 
186
187 
188            .micromodal-slide.is-open { 
189                display: block; 
190
191 
192            .micromodal-slide[aria-hidden="false"] .modal__overlay { 
193                animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
194
195 
196            .micromodal-slide[aria-hidden="false"] .modal__container { 
197                animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
198
199 
200            .micromodal-slide[aria-hidden="true"] .modal__overlay { 
201                animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
202
203 
204            .micromodal-slide[aria-hidden="true"] .modal__container { 
205                animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
206
207 
208            .micromodal-slide .modal__container, 
209            .micromodal-slide .modal__overlay { 
210                will-change: transform; 
211
212        </style> 
213 
214        <div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
215        <div class="modal__overlay" tabindex="-1" data-micromodal-close> 
216            <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
217            <header class="modal__header"> 
218                <h2 class="modal__title" id="modal-1-title"> 
219                Your California privacy choices 
220                </h2> 
221                <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
222            </header> 
223            <div class="modal__content" id="modal-1-content"> 
224                <div id="message-no-cookie"> 
225                    <p> 
226                    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> 
227                     
228        <p>&nbsp;</p> 
229 
230        <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> 
231            </div> 
232            <div id="message-with-cookie"> 
233                <p>You have successfully opted-out.</p> 
234            </div> 
235            </div> 
236            <div class="modal__footer"> 
237                <a href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a> 
238                <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
239            </div> 
240            </div> 
241        </div> 
242        </div> 
243    <!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
244    <script> 
245        const fdicNode = document.querySelector('.page-footer .fdic');                          
246    </script> 
247    <script> 
248        const copyrightNode = document.querySelector('.page-footer .copyright'); 
249        if (copyrightNode) { 
250            copyrightNode.innerHTML = '© Elan Financial Services ' + ${currentYear}; 
251
252 
253    </script> 
254    <#if url?contains("11t1m")> 
255        <script>        
256            copyrightNode.classList.add("ecdma-footer-client-name-copyright"); 
257            fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>'; 
258        </script> 
259    <#else> 
260        <script> 
261            copyrightNode.classList.add("ecdma-footer-client-name-copyright"); 
262            fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank">Privacy and Security</a>'; 
263            var newNode = document.createElement("div");  
264            newNode.classList.add("member-agreement"); 
265            newNode.innerHTML='<a class="text-color-white" href="https://onboarding.elancreditcard.com/usl/generic/credit-card/application/card-member-agreements?locationCode=${lc!0}" target="_blank">Cardmember Agreements</a>'; 
266            var parent = fdicNode.parentNode; 
267            parent.insertBefore(newNode, fdicNode); 
268        </script> 
269    </#if> 
270 
271    <#if partnerUrl?has_content> 
272        <script> 
273            const homeLink = document.querySelector('.copyright .homelink'); 
274            if(homeLink) { 
275                homeLink.innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>"; 
276
277        </script> 
278    </#if> 
279 
280    <script> 
281        /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */ 
282        fdicNode.insertAdjacentHTML('afterend', '<div class="opt-out-container"><a href="javascript:void(0);" class="opt-out-link text-color-white" 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>'); 
283        /* END CALIFORNIA OPT-OUT MODAL TRIGGER */ 
284    </script> 
285    <!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
286 
287    <script> 
288        window.getCookieDomain = function() { 
289            var hostname = window.location.hostname.split("."); 
290            return hostname && hostname.slice(hostname.length - 2).join("."); 
291
292        window.setToOptOut = function() { 
293            if (window.getCookie('privacy_optout')) { 
294                    document.getElementById('message-no-cookie').style.display = 'none'; 
295                    document.getElementById('message-with-cookie').style.display = 'block'; 
296                    document.getElementById('opt-out-button').setAttribute('disabled', true) 
297                } else { 
298                    document.getElementById('message-no-cookie').style.display = 'block'; 
299                    document.getElementById('message-with-cookie').style.display = 'none'; 
300
301
302        window.getCookie = function(name) { 
303            var value = '; ' + document.cookie; 
304            var parts = value.split('; ' + name + '='); 
305            if (parts.length === 2) return parts.pop().split(';').shift(); 
306
307        window.californiaOptOut = function() { 
308            if (!window.getCookie('privacy_optout')) { 
309                document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
310                try { 
311                if (window.CustomEvent) { 
312                    window.dispatchEvent(new CustomEvent('privacy_optout')); 
313                } else { 
314                    var privacyOptoutEvent = document.createEvent('Event'); 
315                    privacyOptoutEvent.initEvent('privacy_optout', true, true); 
316                    window.dispatchEvent(privacyOptoutEvent); 
317
318                window.setToOptOut(); 
319                } catch (err) { 
320                console.error(err); 
321
322
323
324        MicroModal.init({ 
325            onShow: window.setToOptOut 
326        }); 
327        AUI().ready(function() { 
328            // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
329            const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
330            if(isBrowserGpcOptOut === true) { 
331            window.californiaOptOut(); 
332
333        }); 
334    </script> 
335    <!-- END CALIFORNIA OPT-OUT MODAL LOGIC --> 
336 
337</#if>