Web Content Display
Web Content Display
An error occurred while processing the template.
Expression bankercode is undefined on line 42, column 6 in 10153#10191#6590055.
1<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService") >
2<#assign url404 = '/error/404.html' >
3<#assign oadURL = propsUtil.get('elan.oad.url') >
4<#assign url = request.attributes.CURRENT_URL >
5<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
6
7<#if qstringmap["ecid"]?has_content>
8 <#assign ecidExt="&ecid="+qstringmap["ecid"]?first>
9<#else>
10 <#assign ecidExt="">
11</#if>
12
13<#if qstringmap["bankercode"]?has_content>
14 <#assign bankercode= qstringmap["bankercode"]?first>
15
16 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)>
17 <#if fiData?first?has_content>
18 <#assign fi = fiData?first>
19 <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))>
20 <#assign subbu_special = fi.offerId>
21 </#if>
22 </#if>
23
24 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)>
25 <#list bData as b>
26 <#assign rLC = b.reallocationcode >
27 <#assign lc = b.locationcode >
28 <#assign mappedLC = b.mappedLocationCode >
29 </#list>
30<#else>
31 <script>
32 console.log("MainProductBcode missing");
33 //location.href = '${url404}';
34 </script>
35</#if>
36
37<#if url?contains('11t1')>
38 <#assign tier = '11t1'>
39<#elseif url?contains('11t2')>
40 <#assign tier = '11t2'>
41</#if>
42<#if bankercode?starts_with("amp") && (url?contains("11t1m"))>
43 <#assign ameriprise = true>
44<#else>
45 <#assign ameriprise = false>
46</#if>
47<#if ameriprise>
48 <#assign tier = '11t1m'>
49</#if>
50<#assign environment = url?replace('/${tier}.*','','r')>
51
52
53<#if mappedLC?has_content && !ameriprise>
54 <#assign lc = mappedLC >
55</#if>
56
57<#if lc?has_content>
58 <#assign prefix = "00000" >
59 <#assign lcWithPrefix = prefix + lc >
60 <#assign withPrefixLength = lcWithPrefix?length >
61 <#assign startHere = withPrefixLength - 5>
62 <#assign lc = lcWithPrefix?substring(startHere)>
63 <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") >
64 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
65
66 <#assign clientProfile = clientProfileList?first>
67 <#assign partnerName = clientProfile.getMarketingNameLong()>
68 <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
69 <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')>
70 <#-- <#assign cdnLogoUrl = "https://828cf7dcac86961192f7-10b53e8cad49907c7863edad15b39700.ssl.cf2.rackcdn.com"> -->
71 <#assign pbu = clientProfile.getPbu()>
72 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
73 <script>
74 console.log('pbu', '${pbu!''}');
75 console.log('subbu', '${subbu!''}');
76 console.log('url', '${url!''}');
77 console.log('environ', '${environment!''}');
78 console.log('tier', '${tier!''}');
79console.log('logo from client profile:', "${clientProfile.getLogoBFormat1()!''}","logo after change:", "${logoFileName!''}");
80 </script>
81 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
82 <#if (optoutData?size == 0)>
83 <#if (subbu_special?has_content)>
84 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
85 <script>
86 console.log('new subbu', '${subbu_special!''}');
87 </script>
88 <#else>
89 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
90 </#if>
91 <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") >
92 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
93 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
94 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
95 <#assign partnerUrl = 'https://' + partnerUrl>
96 </#if>
97 <#if (fiCardsData?size > 0)>
98 <#assign temp = []>
99 <#assign offerTypeList = []>
100 <#assign index = 0>
101 <#list fiCardsData as fib>
102 <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>
103 <#assign offerTypeList = offerTypeList + [fib.offerType]>
104 <#assign temp = temp + fiCardsData[index..index]>
105 </#if>
106 <#assign index = index + 1>
107 </#list>
108 <#assign fiCardsData = temp>
109 <#if !(fiCardsData?size > 0)>
110 <script>
111 console.log("empty card/offerType List");
112 //location.href = '${url404}';
113 </script>
114 </#if>
115 <#if ameriprise>
116 <#assign lc_used = mappedLC>
117 <#else>
118 <#assign lc_used = lc>
119 </#if>
120 <div class="content-container content-container-main" title="${partnerName!''}">
121 <header class="jn-header">
122 <div class="back-overview hide-desktop">
123 <a href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a>
124 </div>
125 <div class="header-main-logo" title="${partnerName!''}">
126 <#if partnerUrl?has_content>
127 <a href="${partnerUrl!''}" title="${partnerName!''}">
128 <img src="${cdnLogoUrl!''}/${logoFileName!''}" title="${partnerName!''} Logo" alt="${partnerName!''} Logo">
129 </a>
130 <#else>
131 <a title="${partnerName!''}">
132 <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''} Logo" title="${partnerName!''} Logo">
133 </a>
134 </#if>
135 </div>
136
137 <div class="styled-select slate">
138 <select>
139 <#list fiCardsData as fib>
140 <#if ameriprise>
141 <#if (fib.offerType=="101")>
142 <#assign productURL="premier-visa-signature">
143 <#assign productName="Ameriprise Premier Visa Signature">
144 <#elseif (fib.offerType=="103")>
145 <#assign productURL = "visa-signature">
146 <#assign productName = "Ameriprise Visa Signature">
147 </#if>
148 <#else>
149 <#if (fib.offerType=="108" || fib.offerType=="109")>
150 <#assign productURL="consumer-platinum2103">
151 <#assign productName="Platinum Card">
152 <#elseif fib.offerType=="147">
153 <#assign productURL = "max-cash-secured">
154 <#assign productName = "Max Cash Secured Card" >
155 <#elseif (fib.offerType=="104")>
156 <#assign productURL = "max-cash">
157 <#assign productName = "Max Cash Preferred Card">
158 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
159 <#assign productURL = "consumer-edr2112">
160 <#assign productName = "Everyday Rewards+">
161 <#elseif fib.offerType == "115">
162 <#assign productURL = "secured">
163 <#assign productName = "Secured Card" >
164 <#elseif fib.offerType == "141">
165 <#assign productURL = "college-real-rewards">
166 <#assign productName = "College Real Rewards" >
167 <#elseif fib.offerType == "144">
168 <#assign productURL = "smart-business-rewards">
169 <#assign productName = "Smart Business Rewards Card" >
170 <#elseif fib.offerType == "128">
171 <#assign productURL = "business-cash-preferred">
172 <#assign productName = "Business Cash Preferred" >
173 <#elseif fib.offerType == "143">
174 <#assign productURL = "business-real-rewards">
175 <#assign productName = "Business Real Rewards Card" >
176 <#elseif fib.offerType == "121">
177 <#assign productURL = "business-platinum2103">
178 <#assign productName = "Business Card" >
179 <#elseif fib.offerType == "138">
180 <#assign productURL = "travel-rewards-plus">
181 <#assign productName = "Travel Rewards+" >
182 <#elseif fib.offerType == "154">
183 <#assign productURL = "reserve-rewards-plus">
184 <#assign productName = "Reserve Rewards+" >
185 </#if>
186 </#if>
187 <#if url?matches(".*/${productURL}.*")>
188 <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option>
189 <#else>
190 <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option>
191 </#if>
192 </#list>
193 </select>
194 <nav class="styled-select__dropdown">
195 <div class="back-overview hide-mobile">
196 <a href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">Home</a>
197 </div>
198 <a href="javascript:void(0)" class="dropdown-select" aria-expanded="false" >
199 <span class="selected-option"></span>
200 <div class="jn-arrow arrow arrow-right"></div>
201 </a>
202 <button href="javascript:void(0)" class="jn-hamburger hamburger" aria-expanded="false" aria-label="open navigation menu">
203 <div class="first-line transform transformed1"></div>
204 <div></div>
205 <div class="transform transformed2"></div>
206 <div></div>
207 </button>
208 <ul>
209 <#list fiCardsData as fib>
210 <#if ameriprise>
211 <#if (fib.offerType=="101")>
212 <#assign productURL="premier-visa-signature">
213 <#assign productName="Ameriprise Premier Visa Signature">
214 <#elseif (fib.offerType=="103")>
215 <#assign productURL = "visa-signature">
216 <#assign productName = "Ameriprise Visa Signature">
217 </#if>
218 <#else>
219 <#if (fib.offerType=="108" || fib.offerType=="109")>
220 <#assign productURL="consumer-platinum2103">
221 <#assign productName="Platinum Card">
222 <#elseif fib.offerType=="147">
223 <#assign productURL = "max-cash-secured">
224 <#assign productName = "Max Cash Secured Card" >
225 <#elseif (fib.offerType=="104")>
226 <#assign productURL = "max-cash">
227 <#assign productName = "Max Cash Preferred Card">
228 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
229 <#assign productURL = "consumer-edr2112">
230 <#assign productName = "Everyday Rewards+">
231 <#elseif fib.offerType == "115">
232 <#assign productURL = "secured">
233 <#assign productName = "Secured Card" >
234 <#elseif fib.offerType == "141">
235 <#assign productURL = "college-real-rewards">
236 <#assign productName = "College Real Rewards" >
237 <#elseif fib.offerType == "144">
238 <#assign productURL = "smart-business-rewards">
239 <#assign productName = "Smart Business Rewards Card" >
240 <#elseif fib.offerType == "128">
241 <#assign productURL = "business-cash-preferred">
242 <#assign productName = "Business Cash Preferred" >
243 <#elseif fib.offerType == "143">
244 <#assign productURL = "business-real-rewards">
245 <#assign productName = "Business Real Rewards Card" >
246 <#elseif fib.offerType == "121">
247 <#assign productURL = "business-platinum2103">
248 <#assign productName = "Business Card" >
249 <#elseif fib.offerType == "138">
250 <#assign productURL = "travel-rewards-plus">
251 <#assign productName = "Travel Rewards+" >
252 <#elseif fib.offerType == "154">
253 <#assign productURL = "reserve-rewards-plus">
254 <#assign productName = "Reserve Rewards+" >
255 </#if>
256 </#if>
257 <#if url?matches(".*/${productURL}.*")>
258 <#if (fib.offerType=="104" && url?contains("max-cash-secured"))>
259 <#-- prevent from max cash overiding max cash secured. -->
260 <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li>
261 <#else>
262 <li class="selected" data-value="${productName}"><a href="javascript:void(0)">${productName}</a></li>
263 </#if>
264 <#else>
265 <li class="dropdown-item" data-value="${productName}"><a href="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" title="${productName}">${productName}</a></li>
266 </#if>
267 </#list>
268 </ul>
269 </nav>
270
271 </div>
272 </header>
273 </div>
274 <script>
275 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
276 var partnerName = "${partnerName!0}";
277 var metaDesc = "";
278 switch (page) {
279 case "consumer-platinum2103":
280 document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card";
281 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.";
282 break;
283 case "max-cash-secured":
284 document.title = "Earn more on the categories you pick | "+partnerName+" Max Cash Secured Card";
285 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
286 break;
287 case "max-cash":
288 document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card";
289 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select";
290 break;
291 case "real-rewards":
292 document.title = "Sign up and earn bonus points | "+partnerName+" Everyday Rewards+";
293 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase.";
294 break;
295 case "secured":
296 document.title = "Strengthen your finances | "+partnerName+" Secured Card";
297 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
298 break;
299 case "college-real-rewards":
300 document.title = "Sign up and earn bonus points. | "+partnerName+" College Real Rewards";
301 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit.";
302 break;
303 case "smart-business-rewards":
304 document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card";
305 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.";
306 break;
307 case "business-cashback":
308 document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Preferred";
309 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses.";
310 break;
311 case "business-real-rewards":
312 document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card";
313 metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ;
314 break;
315 case "business-platinum2103":
316 document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card";
317 metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles";
318 break;
319 case "premier-visa-signature":
320 document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card";
321 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.";
322 break;
323 case "visa-signature":
324 document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card";
325 metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $250 cash value when deposited into an eligible Ameriprise account after spending $2,000 in eligible net purchases within the first 90 days of account opening.";
326 break;
327 case "travel-rewards-plus":
328 document.title = partnerName + " | Travel Rewards+ Card";
329 metaDesc = "Make travel more rewarding with unlimited 4x points on travel and frequent popular categories.";
330 break;
331 case "reserve-rewards-plus":
332 document.title = partnerName + " | Reserve Rewards+ Card";
333 metaDesc = "Get exceptional rewards on travel and frequent purchases with this exclusive metal card.";
334 break;
335 }
336 if (metaDesc.length > 0) {
337 var m = document.createElement('meta');
338 m.name = 'description';
339 m.content = metaDesc;
340 document.head.appendChild(m);
341 }
342 function toggleFlyOutMenu() {
343 $('.styled-select').toggleClass('show-select');
344 var ariaExpanded = $('.styled-select__dropdown .dropdown-select').attr('aria-expanded');
345 if(ariaExpanded !== null) {
346 var isAriaExpanded;
347 if(ariaExpanded === "true") {
348 isAriaExpanded = true;
349 $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'open navigation menu');
350 } else {
351 isAriaExpanded = false
352 $('.styled-select__dropdown .jn-hamburger').attr('aria-label', 'close navigation menu');
353
354 }
355 $('.styled-select__dropdown .dropdown-select').attr('aria-expanded', !isAriaExpanded);
356 $('.styled-select__dropdown .jn-hamburger').attr('aria-expanded', !isAriaExpanded);
357
358 }
359 }
360 document.addEventListener('DOMContentLoaded', function() {
361 var pageSelected = $('.selected').attr('data-value');
362 $('.jn-hamburger, .dropdown-select').click(function () {
363 toggleFlyOutMenu();
364 });
365 $('.styled-select__dropdown').keydown(function(event) {
366 var firstNavigationLink = $('.styled-select__dropdown ul li:visible a').first();
367 var lastNavigationLink = $('.styled-select__dropdown ul li:visible a').last();
368
369 if(event.keyCode === 9 ) {
370 // if they tab outside of the nav close the navigation
371 //shift + tab pressed
372 if(event.shiftKey && firstNavigationLink.is(document.activeElement)) {
373 toggleFlyOutMenu();
374 } else if(!event.shiftKey && lastNavigationLink.is(document.activeElement)) {
375 toggleFlyOutMenu();
376 }
377 }
378 });
379 $('.selected-option').text(pageSelected);
380 });
381 </script>
382
383 <#else>
384 <script>
385 console.log("FI Cards Data empty");
386 //location.href = '${url404}';
387 </script>
388 </#if>
389 <#else>
390 <script>
391 console.log("FI opt out");
392 //location.href = '${url404}';
393 </script>
394 </#if>
395<#else>
396 <script>
397 console.log("location code empty");
398 //location.href = '${url404}';
399 </script>
400</#if>
Web Content Display
An error occurred while processing the template.
Expression bCode is undefined on line 60, column 6 in 10153#10191#6991552.
1<#assign url = request.attributes.CURRENT_URL >
2<#assign oadURL = propsUtil.get('elan.oad.url') >
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
4<#assign url404 = '/error/404.html' >
5<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")>
6<#assign environment = url?replace('/12t1.*','','r')>
7<#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
8
9<#if oadURL?contains("uat-")>
10 <#assign oadURL_TC = 'https://uat-online1.elancard.com/oad/terms.controller' >
11<#else>
12 <#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' >
13</#if>
14<#-- check bankercode validity -->
15
16<#if qstringmap["bankercode"]?has_content>
17 <#assign bCode= qstringmap["bankercode"]?first>
18 <#assign bCode= htmlUtil.escapeJS(bCode)>
19 <#assign bCode= htmlUtil.escape(bCode)>
20
21 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bCode)>
22 <#if fiData?first?has_content>
23 <#assign fi = fiData?first>
24 <#if (fi.projectId == "12" || fi.projectId == "13" || fi.projectId == "14")>
25 <#assign subbu_special = fi.offerId>
26 </#if>
27 </#if>
28 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)>
29 <#list bData as b>
30 <#assign lc = b.locationcode >
31 <#assign bName = b.branch >
32 <#assign bPhone = b.businessphone >
33 <#assign boeid = b.oeid >
34 <#assign fName = b.firstname?trim>
35 <#assign lName = b.lastname?trim>
36 <#assign rlc = b.reallocationcode >
37 <#assign mappedLC = b.mappedLocationCode >
38 </#list>
39<#else>
40 <script>
41 console.log("MainProductBcode missing");
42 //location.href = '${url404}';
43 </script>
44</#if>
45
46<#assign text_to_apply_source = "vanity url" >
47<#if qstringmap["sms"]?has_content>
48 <#assign sms = 1 >
49 <#assign text_to_apply_source = "sms" >
50</#if>
51<#if qstringmap["qrCode"]?has_content>
52 <#assign text_to_apply_source = "qr code" >
53</#if>
54<#assign campaignId = "" >
55<#assign ecidExt="">
56<#if qstringmap["ecid"]?has_content>
57 <#assign campaignId = qstringmap["ecid"]?first >
58 <#assign ecidExt="&ecid="+qstringmap["ecid"]?first>
59</#if>
60<#if bCode?starts_with("amp") && (url?contains("11t1m"))>
61 <#assign ameriprise = true>
62<#else>
63 <#assign ameriprise = false>
64</#if>
65
66<#if mappedLC?has_content && !ameriprise>
67 <#assign lc = mappedLC >
68</#if>
69
70
71
72<#if lc?has_content>
73
74 <#assign firstNameLength = fName?length >
75 <#assign lastNameLength = lName?length >
76 <#if firstNameLength + lastNameLength > 19 >
77 <#if lastNameLength > 18 >
78 <#assign bLName = lName?substring(0,18)>
79 <#else>
80 <#assign bLName = lName>
81 </#if>
82 <#assign maxFirstName = 19 - bLName?length >
83 <#if firstNameLength > maxFirstName >
84 <#assign bFName = fName?substring(0,maxFirstName)>
85 <#else>
86 <#assign bFName = fName>
87 </#if>
88 <#else>
89 <#assign bFName = fName >
90 <#assign bLName = lName >
91 </#if>
92
93
94 <#assign prefix = "00000" >
95 <#assign lcWithPrefix = prefix + lc >
96 <#assign withPrefixLength = lcWithPrefix?length >
97 <#assign startHere = withPrefixLength - 5>
98 <#assign lc = lcWithPrefix?substring(startHere)>
99
100 <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") >
101 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
102
103 <#if clientProfileList?first?has_content>
104 <#assign clientProfile = clientProfileList?first>
105 <#assign partnerName = clientProfile.getMarketingNameLong()>
106 <#assign pbu = clientProfile.getPbu()>
107 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
108 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
109 <#if (optoutData?size == 0)>
110 <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") >
111 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
112 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
113 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
114 <#assign partnerUrl = 'https://' + partnerUrl>
115 </#if>
116 <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case>
117 <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')>
118
119 <#if pbu == "0864054">
120 <#assign override = "berkshire">
121 <#else>
122 <#assign override = " ">
123 </#if>
124
125 <#-- this one should be delete for prod -->
126
127 <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>
128 <#assign pageClass = secondaryBackgroundImage.cardType.getData()>
129
130 <#if (subbu_special?has_content)>
131 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
132 <#else>
133 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
134 </#if>
135
136
137 <#assign temp = []>
138 <#assign offerTypeList = []>
139 <#assign index = 0>
140 <#list fiCardsData as fib>
141 <#if !(offerTypeList?seq_contains(fib.offerType))>
142 <#assign offerTypeList = offerTypeList + [fib.offerType]>
143 <#assign temp = temp + fiCardsData[index..index]>
144 </#if>
145 <#assign index = index + 1>
146 </#list>
147 <#assign fiCardsData = temp>
148 <#if (fiCardsData?size > 0)>
149 <#if (subbu_special?has_content)>
150 <#assign lc_used = fiCardsData?first.WebLocationCode>
151 <#else>
152 <#if ameriprise>
153 <#assign lc_used = mappedLC>
154 <#else>
155 <#assign lc_used = lc>
156 </#if>
157 </#if>
158 <#assign productURL = "">
159 <#list fiCardsData as fib>
160 <#if ameriprise>
161 <#if (fib.offerType=="101")>
162 <#assign productURL="premier-visa-signature">
163 <#assign productName="Premier Visa Signature">
164 <#assign productClass="ameriprise-premier-visa-signature">
165 <#elseif (fib.offerType=="103")>
166 <#assign productURL = "visa-signature">
167 <#assign productName = "Visa Signature">
168 <#assign productClass="ameriprise-visa-signature">
169 </#if>
170 <#else>
171 <#if (fib.offerType=="108" || fib.offerType=="109")>
172 <#assign productURL="consumer-platinum2103">
173 <#assign productName="Platinum">
174 <#elseif (fib.offerType=="104")>
175 <#assign productURL = "max-cash">
176 <#assign productName="Max Cash Preferred">
177 <#elseif (fib.offerType=="101" || fib.offerType=="103")>
178 <#assign productURL = "consumer-edr2112">
179 <#assign productName="Everyday Rewards+">
180 <#elseif fib.offerType == "115">
181 <#assign productURL = "secured">
182 <#assign productName="Secured">
183 <#elseif fib.offerType == "141">
184 <#assign productURL = "college-real-rewards">
185 <#assign productName="College Real Rewards">
186 <#elseif fib.offerType == "144">
187 <#assign productURL = "smart-business-rewards">
188 <#assign productName="Smart Business Rewards">
189 <#elseif fib.offerType == "147">
190 <#assign productURL = "max-cash-secured">
191 <#assign productName="Max Cash Secured">
192 <#elseif fib.offerType == "128">
193 <#assign productURL = "business-cash-preferred">
194 <#assign productName="Business Cash Preferred">
195 <#elseif fib.offerType == "143">
196 <#assign productURL = "business-real-rewards">
197 <#assign productName="Business Real Rewards">
198 <#elseif fib.offerType == "121">
199 <#assign productURL = "business-platinum2103">
200 <#assign productName="Business">
201 <#elseif fib.offerType == "138">
202 <#assign productURL = "travel-rewards-plus">
203 <#assign productName = "Travel Rewards+" >
204 <#elseif fib.offerType == "154">
205 <#assign productURL = "reserve-rewards-plus">
206 <#assign productName = "Reserve Rewards+" >
207 </#if>
208 </#if>
209
210 <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png">
211 <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">
212 <#assign newSourceCode = fib.sourceCode>
213 <#assign newOfferId = fib.offerId>
214
215 <#if url?matches(".*/${productURL}\\?.*")>
216 <#assign APR="">
217 <#assign AMF="">
218 <#assign BAL="">
219 <#assign sdata = utilServ.makeCall('crcDDCGetSchumerBox', newOfferId + '&' + newSourceCode)>
220 <#if (sdata?size > 0)>
221 <#list sdata as sItem>
222
223 <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) >
224 <#assign APR = sItem.scrapedValue>
225 <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) >
226 <#assign AMF = sItem.scrapedValue>
227 <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) >
228 <#assign BAL = sItem.scrapedValue>
229 </#if>
230 <#if (APR?has_content && AMF?has_content && BAL?has_content)>
231 <#break>
232 </#if>
233 </#list>
234 <#else>
235 <script>
236 console.log('no scraped data');
237 </script>
238 </#if>
239 <#if ((fib.offerType == "108" || fib.offerType == "109" || fib.offerType == "121" ) && !ameriprise)>
240 <#if (sdata?size > 0)>
241 <#assign apr_string = "">
242 <#list sdata as d>
243 <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))>
244 <#assign apr_string = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")>
245 <#break>
246 </#if>
247 </#list>
248 <script>
249 $(document).ready(function () {
250 var aprText = "${apr_string}";
251 if (aprText) {
252 var matches= aprText.match(/\d+(\.\d+)?%?/g);
253 var billing_cycle = "";
254 var apr_min = "";
255 var apr_max = "";
256 if (aprText.indexOf("Platinum:") != -1 || aprText.indexOf("Business:") != -1) {
257 billing_cycle = matches[1];
258 apr_min = matches[2];
259 apr_max = matches[3];
260 }
261 console.log('billing_cycle', billing_cycle, 'apr_min', apr_min, 'apr_max', apr_max);
262 if (billing_cycle) {
263 $(".scraped-billing-cycle").html(billing_cycle);
264 }
265 if (apr_min) {
266 $(".scraped-apr-min").html(apr_min);
267 }
268 if (apr_max) {
269 $('.scraped-apr-max').html(apr_max);
270 }
271 }
272 });
273 </script>
274 </#if>
275 </#if>
276 <#if ameriprise>
277 <#assign card_art_alt = partnerName + " " + productName + " " + " Card">
278 <#assign rollover_text = partnerName + " " + productName + " " + " Card">
279 <#else>
280 <#assign card_art_alt = partnerName + " " + productName + " " + " Card">
281 <#assign rollover_text = partnerName + " " + productName + " " + " Credit Card">
282 <#assign card_text = productName + " Card">
283 </#if>
284
285 <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}">
286 <div class="hero-main">
287
288 <div class="hero-main-container">
289 <div class="hero-main-offer">
290 <div class="offer-detail">
291 <div class="offer-detail-cardArt cardArtImg">
292 <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
293 <p>${card_text!''}</p>
294 </div>
295 <div class="offer-detail-text text-color-default hide-desktop">
296 ${primaryHeadlineFeatureTop.getData()}
297 ${primaryHeadlineFeatureBottom.getData()}
298 </div>
299
300 <form class="form1 hide-desktop" action='${oadURL}?locationCode=${lc_used}&offerId=${newOfferId}&preparerType=customer&sourceCode=${newSourceCode}' method="post" id="BAAForm">
301 <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label>
302 <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea>
303 <button
304 type="submit"
305 data-button-name="cta-button-top"
306 class="jn-button apply-button button-bg-color-custom"
307 disabled
308 >
309 ${ctaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span>
310 </button>
311 </form>
312 </div>
313 <div class="offer-header">
314 <div class="offer-text-top">
315 <div class="offer-title">
316 ${primaryHeadlineText.getData()}
317 </div>
318 <h1 class="offer-subtitle">
319 ${primaryHeadlineFeature.getData()}
320 </h1>
321 </div>
322 <div class="offer-text-bottom hide-mobile">
323 <div class="offer-detail-text text-color-default ">
324 ${primaryHeadlineFeatureTop.getData()}
325 ${primaryHeadlineFeatureBottom.getData()}
326 <#-- allow for all except these url -->
327 <#if (fib.offerType == "108" ||
328 fib.offerType == "109" ||
329 fib.offerType == "121" ||
330 fib.offerType == "144"
331 )>
332 <br>
333 <a class="whiteLink" href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}" class="text-color-default" target="_blank">
334 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>See terms & conditions</a>
335 </#if>
336 </div>
337 <a tabindex="0" id="oadSecButton-top" data-button-name="cta-button-bottom" class="jn-button banner-cta-apply-button">${optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card </span></a>
338
339 </div>
340 </div>
341
342 </div>
343 </div>
344 </div>
345 <div class="hero-primary-benefits">
346 <#if secondaryFeatureText.getData() != "">
347 <#assign featureCounter = 0>
348 <#list secondaryFeatureText.getSiblings() as item>
349 <div class="primary-benefit">
350 <div class="primary-benefit-wrapper text-color-white">
351 ${item.getData()}
352 <#if (fib.offerType=="108" || fib.offerType=="109") && (featureCounter == secondaryFeatureText.getSiblings()?size - 1)>
353 <a
354 href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
355 class="text-color-default"
356 target="_blank"
357 >
358 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>
359 Terms & Conditions
360 </a>
361 </#if>
362 </div>
363 </div>
364 <#assign featureCounter = featureCounter + 1>
365 </#list>
366 </#if>
367 </div>
368 </div>
369 <div class="standard-content-container" title="${rollover_text!''}">
370 <div class="product-details-container">
371 <div class="detail-background">
372 <h2>${secondaryHeadlineText.getData()}</h2>
373 <div class="secondary-benefits">
374 <div class="option">
375 ${additionalInfoGroupA.getData()}
376 <#if pbu != "0892445">
377 <div>
378 <#assign col1AmfOfferTypes = ["101", "141", "138", "154", "128"] >
379 <#assign col1AprOfferTypes = ["104", "121", "143", "144"] >
380 <#if col1AmfOfferTypes?seq_contains(fib.offerType)>
381 <#if (fib.offerType == "101")>
382 <h3>Annual Fee<sup>*</sup></h3><br/>
383 <#else>
384 <h3>Annual Fee</h3><br/>
385 </#if>
386 <p>${AMF!''}
387 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
388 class="text-color-default" target="_blank">
389 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
390 </a>
391 </p>
392 <#elseif col1AprOfferTypes?seq_contains(fib.offerType)>
393 <#if (fib.offerType == "104") >
394 <h3 >APR for Purchases:</h3>
395 <#elseif (fib.offerType == "144")>
396 <h3>APR for Purchases and Balance Transfers:</h3>
397 <#else>
398 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
399 </#if>
400 <p>${APR!''}
401 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
402 class="text-color-default" target="_blank">
403 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
404 </a>
405 </p>
406
407 </#if>
408 </div>
409 </#if>
410 </div>
411 <div class="option">
412 ${additionalInfoGroupB.getData()}
413 <#if pbu != "0892445">
414 <div>
415 <#assign col2AmfOfferTypes = ["108", "109", "115", "144"] >
416 <#assign col2AprOfferTypes = ["138", "154", "128"] >
417 <#assign col2BalOfferTypes = ["101", "104", "141", "121", "143"] >
418 <#if col2AmfOfferTypes?seq_contains(fib.offerType)>
419 <h3>Annual Fee</h3>
420 <p>${AMF!''}
421 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
422 class="text-color-default" target="_blank">
423 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
424 </a>
425 </p>
426 <#elseif col2AprOfferTypes?seq_contains(fib.offerType)>
427 <#if (fib.offerType == "128")>
428 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
429 <#else>
430 <h3>APR for Purchases:</h3>
431 </#if>
432 <p>${APR!''}
433 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
434 class="text-color-default" target="_blank">
435 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
436 </a>
437 </p>
438 <#elseif col2BalOfferTypes?seq_contains(fib.offerType)>
439 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
440 <p>${BAL!''}
441 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
442 class="text-color-default" target="_blank">
443 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
444 </a>
445 </p>
446
447 </#if>
448 </div>
449 </#if>
450 </div>
451 <#if (additionalInfoGroupC?has_content)>
452 <div class="option">
453 ${additionalInfoGroupC.getData()}
454 <div>
455 <#assign col3AmfOfferTypes = ["104", "121", "143"] >
456 <#assign col3AprOfferTypes = ["101", "108", "109", "141", "147", "115"] >
457 <#assign col3BalOfferTypes = ["138", "154", "128"] >
458 <#if col3AmfOfferTypes?seq_contains(fib.offerType)>
459 <#if (fib.offerType == "104")>
460 <h3>Annual Fee<sup>*</sup></h3>
461 <#else>
462 <h3>Annual Fee</h3>
463 </#if>
464 <p>${AMF!''}
465 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
466 class="text-color-default" target="_blank">
467 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
468 </a>
469 </p>
470 <#elseif col3AprOfferTypes?seq_contains(fib.offerType)>
471 <#if (fib.offerType == "115" || fib.offerType == "147")>
472 <h3>APR for Purchases and Balance Transfers:</h3>
473 <#else>
474 <h3>Intro APR<sup>*</sup> for Purchases:</h3>
475 </#if>
476 <p>${APR!''}
477 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
478 class="text-color-default" target="_blank">
479 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
480 </a>
481 </p>
482 <#elseif col3BalOfferTypes?seq_contains(fib.offerType)>
483 <#if (fib.offerType == "128")>
484 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
485 <#else>
486 <h3>APR for Balance Transfers:</h3>
487 </#if>
488 <p>${BAL!''}
489 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
490 class="text-color-default" target="_blank">
491 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
492 </a>
493 </p>
494
495 </#if>
496 <#if (fib.offerType == "147")>
497 <h3>Annual Fee<sup>*</sup></h3>
498 <p>${AMF!''}
499 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
500 class="text-color-default" target="_blank">
501 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
502 </a>
503 </p>
504 </#if>
505 <#if (fib.offerType == "108" || fib.offerType == "109")>
506 <h3>Intro APR<sup>*</sup> for Balance Transfers:</h3>
507 <p>${BAL!''}
508 <a href="${oadURL_TC}?step=display&offerId=${newOfferId}&locationCode=${lc_used}"
509 class="text-color-default" target="_blank">
510 <span class="screen-reader-only">${partnerName!''} ${productName!''} Card </span>Terms & Conditions
511 </a>
512 </p>
513 </#if>
514 </div>
515 </div>
516 </#if>
517 </div>
518 </div>
519 </div>
520 </div>
521 <div class="banner-wrapper" title="${rollover_text!''}">
522 <div class="banner ${override}">
523 <div class="banner-cardArt cardArtImg">
524 <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'">
525 </div>
526 <div class="banner-cta">
527 <div class="banner-cta-text text-color-white text-bold">
528 ${optionalCtaFeatureText.getData()}
529 </div>
530 <a
531 tabindex="0"
532 id="oadSecButton"
533 data-button-name="cta-button-bottom"
534 class="jn-button banner-cta-apply-button button-bg-color-custom text-color-white"
535 >
536 ${optionalCtaText.getData()}<span class="screen-reader-only"> for ${partnerName!''} ${productName!''} Card</span></a>
537 </div>
538 </div>
539 </div>
540 <#break />
541 </#if>
542 </#list>
543
544 <script>
545 var reportingData = window.reportingData || {};
546 document.addEventListener('DOMContentLoaded', function() {
547 //console.log('inside ready');
548 var page = location.pathname.split('/')[location.pathname.split('/').length-1];
549 var hostName = location.hostname;
550
551 function getDomainFromHostname(hostname) {
552 var parts = hostname.split('.');
553 return parts.length === 3 ? parts[1] : parts[0];
554 }
555 var domain = getDomainFromHostname(hostName);
556 var partnerName = "${partnerName!''}";
557
558 var ameriprise = '${ameriprise?string("yes", "no")}';
559 var locationCode = "${rlc!lc}";
560 var eidAmp = "";
561 if (ameriprise == "yes") {
562 var bankercode_amp = '${bCode}';
563 eidAmp = bankercode_amp.substring(3);
564 locationCode ="";
565 }
566
567 var heroCardImgs = document.querySelectorAll('.cardArtImg img');
568 for (var index = 0; index < heroCardImgs.length; index++) {
569 var heroCardImg = heroCardImgs[index];
570 var heroCardSrc = heroCardImg.getAttribute("src");
571 if(heroCardSrc != "") {
572 resizeImg(heroCardImg);
573 }
574 }
575 function resizeImg(img) {
576 img.addEventListener("load", function() {
577 var cardImgWidth = img.width;
578 var cardImgHeight = img.height;
579 //console.log('width', cardImgWidth);
580 //console.log('height', cardImgHeight);
581 if(cardImgWidth > cardImgHeight) {
582 img.style.width = "285px";
583 } else {
584 img.style.width = "150px";
585 }
586 });
587 }
588
589
590 $('.jn-button').removeAttr('disabled');
591 $('.jn-button').removeClass('jn-disabled');
592 jQuery('#oadSecButton, #oadSecButton-top').on('click', function(e) {
593 jQuery('#BAAForm').submit();
594 });
595
596 jQuery('#BAAForm').on('submit', function(e){
597 e.preventDefault();
598 //console.log('in custom submit');
599 var xmlData;
600 if(ameriprise == "yes") {
601 xmlData = '<?xml version="1.0"?>'+
602 "<prefillData>"+
603 "<versionNumber>1.0</versionNumber>"+
604 "<applicationData>"+
605 "<referral>" +
606 "<employeeId>" + eidAmp + "</employeeId>" +
607 "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+
608 "<divisionNumber></divisionNumber>"+
609 "</referral>" +
610 "<bankerInformation>"+
611 "<locationCode>" + locationCode + "</locationCode>"+
612 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
613 "<employeeID>${boeid!0}</employeeID>"+
614 "<name>" +
615 "<first>${bFName!'0'}</first>" +
616 "<last>${bLName!'0'}</last>" +
617 "</name>"+
618 "<phone>"+
619 "<areaCode>"+areaCode+"</areaCode>"+
620 "<exchange>"+exchangeCode+"</exchange>"+
621 "<number>"+num+"</number>"+
622 "</phone>"+
623 "</bankerInformation>"+
624 "</applicationData>"+
625 "</prefillData>"
626 } else {
627 xmlData = '<?xml version="1.0"?>'+
628 "<prefillData>"+
629 "<versionNumber>1.0</versionNumber>"+
630 "<applicationData>"+
631 "<bankerInformation>"+
632 "<locationCode>" + locationCode + "</locationCode>"+
633 "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+
634 "<employeeID>${boeid!0}</employeeID>"+
635 "<name>" +
636 "<first>${bFName!'0'}</first>" +
637 "<last>${bLName!'0'}</last>" +
638 "</name>"+
639 "<phone>"+
640 "<areaCode>"+areaCode+"</areaCode>"+
641 "<exchange>"+exchangeCode+"</exchange>"+
642 "<number>"+num+"</number>"+
643 "</phone>"+
644 "</bankerInformation>"+
645 "</applicationData>"+
646 "</prefillData>"
647 }
648 jQuery('#appDataBAA').val(xmlData);
649 var buttonName = jQuery('.jn-button').data('button-name');
650 /* SiteCatalyst onClick tracking */
651 reportingData.apply_button = buttonName;
652 AUI().ready(function() {
653 if (window.publisherFW) {
654 window.publisherFW.publishEvent("onClick", reportingData);
655 }
656 });
657
658 var paramString = '${bCode}' + "&" + xmlData + "&" + '${htmlUtil.escapeURL(htmlUtil.escapeJS(url))}';
659 /* CRC service call */
660 Liferay.Service(
661 '/crc-utilities-portlet#crcremote/make-call',
662 {
663 storedProcedure: 'crcDDCTextApplyLog',
664 parameters: paramString
665 },
666 function(obj)
667 {
668 //console.log("T2A logging call");
669 }
670 );
671
672 this.submit();
673 });
674 var regex = /\d+/g;
675 var bdNumber = "${bPhone!''}";
676 var phoneNum = bdNumber.match(regex);
677 var areaCode = "";
678 var exchangeCode = "";
679 var num = "";
680 if(phoneNum != null) {
681 phoneNum = phoneNum.join("");
682 areaCode = phoneNum.substring(0,3);
683 exchangeCode = phoneNum.substring(3,6);
684 num = phoneNum.substring(6,10);
685 }
686 var product = "";
687 switch(page) {
688 case "consumer-platinum2103":
689 product="Platinum Card"
690 break;
691 case "consumer-edr2112":
692 product="Everyday Rewards+ Card"
693 break;
694 case "secured":
695 product="Secured Card"
696 break;
697 case "business-cash-preferred":
698 product="Business Cash Preferred"
699 break;
700 case "business-real-rewards":
701 product="Business Real Rewards Card"
702 break;
703 case "business-rewards-plus":
704 product="Business Rewards PLUS Card"
705 break;
706 case "premier-visa-signature":
707 product="Premier Visa Signature Card"
708 break;
709 case "business-platinum2103":
710 product="Business Card"
711 break;
712 case "visa-signature":
713 product="Visa Signature Card"
714 break;
715 case "travel-rewards-plus":
716 product="Travel Rewards+ Card"
717 break;
718 case "reserve-rewards-plus":
719 product="Reserve Rewards+ Card"
720 break;
721 case "max-cash":
722 product="Max Cash Preferred Card"
723 break;
724 case "max-cash-secured":
725 product="Max Cash Secured Card"
726 break;
727 case "college-real-rewards":
728 product="College Real Rewards Card"
729 break;
730 case "smart-business-rewards":
731 product="Smart Business Rewards Card"
732 break;
733 default:
734 product = "All Cards";
735 }
736
737 /* update SiteCatalyst data object */
738 reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' ');
739 reportingData.location_code = '${rlc!0}';
740 reportingData.product = product;
741 reportingData.site_section = 'credit cards';
742 reportingData.platform = 'microsite';
743 reportingData.partner_name = "${partnerName}";
744 reportingData.Banker_id = '${boeid}';
745 reportingData.Banker_code = '${bCode}';
746 reportingData.visitor_type = 'prospect';
747 reportingData.text_to_apply_source = '${text_to_apply_source}';
748 reportingData.page_type = 'product';
749 reportingData.campaign_id = '${campaignId}';
750
751
752 });
753 </script>
754
755 <#else>
756 <script>
757 console.log("FI Cards Data empty");
758 //location.href = '${url404}';
759 </script>
760 </#if>
761 <#else>
762 <script>
763 console.log("Fi opt-out");
764 //location.href = '${url404}';
765 </script>
766 </#if>
767 <#else>
768 <script>
769 console.log("client profile empty");
770 //location.href = '${url404}';
771 </script>
772 </#if>
773
774</#if>
775<#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')>
776<#if (clientdata?size > 0)>
777 <#assign backgroundColor = clientdata[0].backgroundHexColor>
778</#if>
779<script>
780 // Makes the Header subtitle work if there is two lines of text
781 var consumerHeader = document.getElementsByClassName("consumer-card")[0];
782 if(consumerHeader){
783 var consumerHeroContainer = consumerHeader.getElementsByClassName("hero-main-container")[0];
784 const offerTextTop = consumerHeader.querySelector(".offer-text-top");
785 const gradientHeight = Math.max(offerTextTop.offsetHeight + 50, 200) + "px";
786 var consumerOfferHeader = consumerHeader.getElementsByClassName("offer-subtitle")[0];
787 const consumerSubtitle = consumerOfferHeader.getElementsByTagName("p")[0];
788 console.log('consumerSubtitle.innerText.length', consumerSubtitle.innerText.length, offerTextTop.offsetHeight);
789 if (consumerSubtitle.innerText.length >= 76){
790 //two lines
791 consumerHeroContainer.style.background = "linear-gradient(180deg, ${backgroundColor!'#173989'} " + gradientHeight + ", #f8f8f8 " + gradientHeight + ")";
792 }
793 }
794
795 var buisnessHeader = document.getElementsByClassName("business-card")[0];
796 if(buisnessHeader) {
797 var buisnessHeroContainer = buisnessHeader.getElementsByClassName("hero-main-container")[0];
798 var buisnessOfferHeader = buisnessHeader.getElementsByClassName("offer-subtitle")[0];
799
800 if(buisnessOfferHeader.innerText.length >= 31 && buisnessOfferHeader.innerText.length < 48){
801 //not two lines but the header on tablet gose outside of allocated space.
802 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 40%, ${backgroundColor!'#173989'} 40%)";
803 } else if (buisnessOfferHeader.innerText.length >= 48){
804 //two lines
805 buisnessHeroContainer.style.background = "linear-gradient(180deg, rgba(255,255,255,1) 45%, ${backgroundColor!'#173989'} 45%)";
806 }
807 }
808
809</script>
Web Content Display
An error occurred while processing the template.
Expression url404 is undefined on line 25, column 30 in 10153#10191#7958267.
1<#assign url = request.attributes.CURRENT_URL >
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")>
4
5<#if qstringmap["bankercode"]?has_content>
6 <#assign bankercode= qstringmap["bankercode"]?first>
7
8 <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedAppSql','0&'+bankercode)>
9 <#if fiData?first?has_content>
10 <#assign fi = fiData?first>
11 <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))>
12 <#assign subbu_special = fi.offerId>
13 </#if>
14 </#if>
15
16 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bankercode)>
17 <#list bData as b>
18 <#assign rLC = b.reallocationcode >
19 <#assign lc = b.locationcode >
20 <#assign mappedLC = b.mappedLocationCode >
21 </#list>
22<#else>
23 <script>
24 console.log("MainProductBcode missing");
25 //location.href = '${url404}';
26 </script>
27</#if>
28
29<#if bankercode?starts_with("amp") && (url?contains("11t1m"))>
30 <#assign ameriprise = true>
31<#else>
32 <#assign ameriprise = false>
33</#if>
34
35<#if mappedLC?has_content && !ameriprise>
36 <#assign lc = mappedLC >
37</#if>
38
39
40<#if lc?has_content>
41 <#assign prefix = "00000" >
42 <#assign lcWithPrefix = prefix + lc >
43 <#assign withPrefixLength = lcWithPrefix?length >
44 <#assign startHere = withPrefixLength - 5>
45 <#assign lc = lcWithPrefix?substring(startHere)>
46 <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") >
47 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
48
49 <#assign clientProfile = clientProfileList?first>
50 <#assign partnerName=clientProfile.getMarketingNameLong()>
51 <#assign pbu = clientProfile.getPbu()>
52 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
53 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
54
55 <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)>
56 <#if (optoutData?size == 0)>
57 <#if (subbu_special?has_content)>
58 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>
59 <script>
60 console.log('new subbu', '${subbu_special!''}');
61 </script>
62 <#else>
63 <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>
64 </#if>
65 <#if (fiCardsData?size > 0)>
66 <#assign cardProvider = utilServ.makeCall('crcDDCGetMcOrVisa', fiCardsData[0].offerType + '&' + lc)>
67 <#assign cardProviderAbbreviated = ''>
68 <#if (cardProvider?size > 0)>
69 <#-- This will be V for visa or M for mastercard. -->
70 <#assign cardProviderAbbreviated = cardProvider[0].cardType>
71 <#else>
72 <script>
73 console.log('No V or M data')
74 </script>
75 </#if>
76 <#list fiCardsData as fib>
77 <#switch fib.offerType>
78 <#case "101">
79 <#assign productURL = "consumer-edr2112">
80 <#assign productName = "Everyday Rewards+">
81 <#break>
82 <#case "104">
83 <#assign productURL = "max-cash">
84 <#assign productName = "Max Cash Preferred Card">
85 <#break>
86 <#case "108">
87 <#assign productURL="consumer-platinum2103">
88 <#assign productName="Platinum Card">
89 <#break>
90 <#case "109">
91 <#assign productURL="consumer-platinum2103">
92 <#assign productName="Platinum Card">
93 <#break>
94 <#case "115">
95 <#assign productURL = "secured">
96 <#assign productName = "Secured Card" >
97 <#break>
98 <#case "138">
99 <#assign productURL = "travel-rewards-plus">
100 <#assign productName = "Travel Rewards+" >
101 <#break>
102 <#case "141">
103 <#assign productURL = "college-real-rewards">
104 <#assign productName = "College Real Rewards" >
105 <#break>
106 <#case "147">
107 <#assign productURL = "max-cash-secured">
108 <#assign productName = "Max Cash Secured Card" >
109 <#break>
110 <#case "154">
111 <#assign productURL = "reserve-rewards-plus">
112 <#assign productName = "Reserve Rewards+" >
113 <#break>
114 <#case "121">
115 <#assign productURL = "business-platinum2103">
116 <#assign productName = "Business Card" >
117 <#break>
118 <#case "128">
119 <#assign productURL = "business-cash-preferred">
120 <#assign productName = "Business Cash Preferred" >
121 <#break>
122 <#case "144">
123 <#assign productURL = "business-real-rewards">
124 <#assign productName = "Business Real Rewards Card" >
125 <#break>
126 <#case "143">
127 <#assign productURL = "smart-business-rewards">
128 <#assign productName = "Smart Business Rewards Card" >
129 <#break>
130 <#default>
131 </#switch>
132 <#if productURL?has_content && url?matches(".*/${productURL}\\?.*")>
133 <#list product.getSiblings() as card>
134 <#if (card.offerType.getData() == fib.offerType)>
135 <div class="content-container" title="${partnerName!''} - Disclaimer">
136 <div class="jn-disclaimer">
137
138 <#if pbuList.getData()?has_content && pbuList.getData()?contains(pbu) && card.disclaimerAssociatedBank.getData()?has_content>
139 ${card.disclaimerAssociatedBank.getData()}
140 <#else>
141 <#if (card.disclaimerVisa?has_content && cardProviderAbbreviated?contains('V'))>
142 ${card.disclaimerVisa.getData()}
143 </#if>
144 <#if (card.disclaimerMasterCard?has_content && cardProviderAbbreviated?contains('M')) >
145 ${card.disclaimerMasterCard.getData()}
146 </#if>
147 </#if>
148
149 </div>
150 </div>
151 <#break>
152 </#if>
153 </#list>
154 <#break>
155 </#if>
156 </#list>
157 <#else>
158 <script>
159 console.log("Empty card data");
160 </script>
161 </#if>
162 <#else>
163 <script>
164 console.log("FI opt out");
165 </script>
166 </#if>
167
168<#else>
169 <script>
170 console.log("No lc for disclaimer");
171 </script>
172</#if>
Web Content Display
An error occurred while processing the template.
Expression url404 is undefined on line 17, column 30 in 10153#10191#5433717.
1<#assign url = request.attributes.CURRENT_URL >
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))>
3<#assign utilServ = serviceLocator.findService("crc-utilities-portlet", "com.elan.crc.utilities.service.CRCRemoteServiceService")>
4<#assign aDateTime = .now>
5<#assign currentYear = aDateTime?string.yyyy>
6
7<#if qstringmap["bankercode"]?has_content>
8 <#assign bCode= qstringmap["bankercode"]?first>
9 <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)>
10 <#list bData as b>
11 <#assign lc = b.reallocationcode >
12 </#list>
13
14<#else>
15 <script>
16 console.log("MainProductBcode missing");
17 //location.href = '${url404}';
18 </script>
19</#if>
20
21<#assign prefix = "00000" >
22<#assign lcWithPrefix = prefix + lc >
23<#assign withPrefixLength = lcWithPrefix?length >
24<#assign startHere = withPrefixLength - 5>
25<#assign lc = lcWithPrefix?substring(startHere)>
26<#if lc?has_content>
27 <#assign clientProfileService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcClientProfileLocalService") >
28 <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>
29 <#assign clientProfile = clientProfileList?first>
30 <#assign pbu = clientProfile.getPbu()>
31 <#assign subbu = clientProfile.getSUBBRANDBUNBR()>
32 <#assign partnerName=clientProfile.getMarketingNameLong()>
33 <#assign clientDataService = serviceLocator.findService("crc-clientprofile-portlet", "com.elan.crc.servicebuilder.crcclientprofile.service.CrcPbuLocalService") >
34 <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)>
35 <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()>
36 <script>console.log('partnerUrl: ${partnerUrl}')</script>
37 <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>
38 <#assign partnerUrl = 'https://' + partnerUrl>
39 <script>console.log('Come to here by accident')</script>
40 </#if>
41</#if>
42<script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script>
43
44<footer class="footer bg-color-black text-color-white">
45 ${footerContent.getData()}
46</footer>
47<!-- BEGIN CALIFORNIA OPT-OUT MODAL -->
48
49<style>
50 #opt-out-button,
51 .modal__btn.learn-more {
52 background: #0C2074;
53 border: 1px solid #0C2074;
54 color: white;
55 text-transform: uppercase;
56 text-decoration: none;
57 font-size: 16px;
58 padding: 0.5rem 2rem;
59 display: inline-block;
60 border-radius: 0;
61 }
62 #opt-out-button:hover,
63 .modal__btn.learn-more:hover {
64 color: white;
65 border-color: #2C76AF !important;
66 background-color: #2C76AF !important;
67 }
68 .modal__btn.learn-more {
69 background: white;
70 border: 1px solid #0C2074;
71 color: #0C2074;
72 }
73 #opt-out-button[disabled="true"] {
74 background-color: rgba(0,0,0,.15);
75 color: rgba(0,0,0,.45);
76 border-color: rgba(0,0,0,.25);
77 }
78 #opt-out-button:hover[disabled="true"] {
79 background-color: rgba(0,0,0,.15) !important;
80 color: rgba(0,0,0,.45) !important;
81 border-color: rgba(0,0,0,.25) !important;
82 }
83 #opt-out-button:focus {
84 outline-style: solid;
85 outline-color: white;
86 outline-offset: -3px;
87 outline-width: 1px;
88 }
89 .opt-out-link svg {
90 width: 30px;
91 height: 14px;
92 width: auto;
93 vertical-align: middle;
94 }
95 .modal__overlay {
96 position: fixed;
97 top: 0;
98 left: 0;
99 right: 0;
100 bottom: 0;
101 background: rgba(0,0,0,0.6);
102 display: flex;
103 justify-content: center;
104 align-items: center;
105 }
106
107 .modal__container {
108 background-color: #fff;
109 padding: 30px;
110 max-width: 500px;
111 max-height: 100vh;
112 border-radius: 4px;
113 overflow-y: auto;
114 box-sizing: border-box;
115 }
116
117 .modal__header {
118 display: flex;
119 justify-content: space-between;
120 align-items: center;
121 }
122
123 .modal__title {
124 margin-top: 0;
125 margin-bottom: 0;
126 font-weight: 600;
127 font-size: 20px;
128 line-height: 1.25;
129 color: #00449e;
130 box-sizing: border-box;
131 }
132
133 .modal__close {
134 background: transparent;
135 border: 1px solid white;
136 padding: 4px 8px;
137 }
138 .modal__close:hover {
139 border: 1px solid black;
140 }
141
142 .modal__header .modal__close:before { content: "\2715"; }
143
144 .modal__content {
145 margin-top: 2rem;
146 margin-bottom: 2rem;
147 line-height: 1.5;
148 }
149
150 @keyframes mmfadeIn {
151 from { opacity: 0; }
152 to { opacity: 1; }
153 }
154
155 @keyframes mmfadeOut {
156 from { opacity: 1; }
157 to { opacity: 0; }
158 }
159
160 @keyframes mmslideIn {
161 from { transform: translateY(15%); }
162 to { transform: translateY(0); }
163 }
164
165 @keyframes mmslideOut {
166 from { transform: translateY(0); }
167 to { transform: translateY(-10%); }
168 }
169
170 .micromodal-slide {
171 display: none;
172 }
173
174 .micromodal-slide.is-open {
175 display: block;
176 }
177
178 .micromodal-slide[aria-hidden="false"] .modal__overlay {
179 animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
180 }
181
182 .micromodal-slide[aria-hidden="false"] .modal__container {
183 animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
184 }
185
186 .micromodal-slide[aria-hidden="true"] .modal__overlay {
187 animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
188 }
189
190 .micromodal-slide[aria-hidden="true"] .modal__container {
191 animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
192 }
193
194 .micromodal-slide .modal__container,
195 .micromodal-slide .modal__overlay {
196 will-change: transform;
197 }
198</style>
199
200<div class="modal micromodal-slide" id="modal-1" aria-hidden="true">
201 <div class="modal__overlay" tabindex="-1" data-micromodal-close>
202 <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title">
203 <header class="modal__header">
204 <h2 class="modal__title" id="modal-1-title">
205 Your California privacy choices
206 </h2>
207 <button class="modal__close" aria-label="Close modal" data-micromodal-close></button>
208 </header>
209 <div class="modal__content" id="modal-1-content">
210 <div id="message-no-cookie">
211 <p>
212 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>
213
214 <p> </p>
215
216 <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>
217 </div>
218 <div id="message-with-cookie">
219 <p>You have successfully opted-out.</p>
220 </div>
221 </div>
222 <div class="modal__footer">
223 <a href="https://www.usbank.com/about-us-bank/privacy/state-personal-information-program.html#learn" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a>
224 <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button>
225 </div>
226 </div>
227 </div>
228</div>
229<!-- END CALIFORNIA OPT-OUT MODAL -->
230
231<script>
232 const copyrightNode = document.querySelector('.footer .copyright');
233 const fdicNode = document.querySelector('.footer .fdic');
234 const agreementNode = document.querySelector('.footer .member-agreement');
235 if(agreementNode) {
236 agreementNode.innerHTML='<p><a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a></p>';
237 }
238 if (copyrightNode) {
239 copyrightNode.innerHTML = '<sup>©</sup> Elan Financial Services ' + ${currentYear};
240 copyrightNode.classList.add('ecdma-footer-client-name-copyright');
241 }
242 if (fdicNode) {
243 fdicNode.innerHTML = '<p><a class="text-color-white" href="https://www.myaccountaccess.com/onlineCard/publicPrivacyPolicy.do?loc='+${lc!0}+'" target="_blank">Privacy and Security</a></p>';
244 fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a class="text-color-white opt-out-link" href="javascript:void(0);" 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>');
245 }
246
247</script>
248<#if partnerUrl?has_content>
249 <script>
250 const homelinkNode = document.querySelector('.footer .copyright .homelink');
251 if (homelinkNode) {
252 homelinkNode.href="${partnerUrl!''}";
253 homelinkNode.title="${partnerName!''}";
254 homelinkNode.innerText="Home";
255 }
256 </script>
257</#if>
258<!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC -->
259
260<script>
261 window.getCookieDomain = function() {
262 var hostname = window.location.hostname.split(".");
263 return hostname && hostname.slice(hostname.length - 2).join(".");
264 }
265 window.setToOptOut = function() {
266 if (window.getCookie('privacy_optout')) {
267 document.getElementById('message-no-cookie').style.display = 'none';
268 document.getElementById('message-with-cookie').style.display = 'block';
269 document.getElementById('opt-out-button').setAttribute('disabled', true)
270 } else {
271 document.getElementById('message-no-cookie').style.display = 'block';
272 document.getElementById('message-with-cookie').style.display = 'none';
273 }
274 }
275 window.getCookie = function(name) {
276 var value = '; ' + document.cookie;
277 var parts = value.split('; ' + name + '=');
278 if (parts.length === 2) return parts.pop().split(';').shift();
279 }
280 window.californiaOptOut = function() {
281 if (!window.getCookie('privacy_output')) {
282 document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;';
283 try {
284 if (window.CustomEvent) {
285 window.dispatchEvent(new CustomEvent('privacy_optout'));
286 } else {
287 var privacyOptoutEvent = document.createEvent('Event');
288 privacyOptoutEvent.initEvent('privacy_optout', true, true);
289 window.dispatchEvent(privacyOptoutEvent);
290 }
291 window.setToOptOut();
292 } catch (err) {
293 console.error(err);
294 }
295 }
296 }
297 MicroModal.init({
298 onShow: window.setToOptOut
299 });
300 AUI().ready(function() {
301 // user browser setting for Global Privacy Control to opt out of sharing information with third parties
302 const isBrowserGpcOptOut = navigator.globalPrivacyControl;
303 if(isBrowserGpcOptOut === 1) {
304 window.californiaOptOut();
305 }
306 });
307</script>
308<!-- END CALIFORNIA OPT-OUT MODAL LOGIC -->