1(function( $ ) { 2 'use strict'; 3 var CCPA = { 4 ccpaOptedOut: false, 5 ccpaOptOutConfirmationOpen: false, 6 set: function() { 7 this.setCheckboxState(); 8 jQuery(document).on('click','.wt-cli-ccpa-opt-out-checkbox',function() { 9 CCPA.ccpaOptedOut = false; 10 if(this.checked === true ) { 11 CCPA.ccpaOptedOut = true; 12 } 13 CCPA.optOutCcpa(); 14 }); 15 jQuery(document).on('click','.wt-cli-ccpa-opt-out:not(.wt-cli-ccpa-opt-out-checkbox)',function(){ 16 CCPA.showCcpaOptOutConfirmBox(); 17 }) 18 }, 19 setCheckboxState : function() { 20 var cliConsent = {}; 21 var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); 22 if( preferenceCookie !== null ) { 23 cliConsent = CCPA.parseCookie(preferenceCookie); 24 if( typeof( cliConsent.ccpaOptout ) !== 'undefined') { 25 26 if( cliConsent.ccpaOptout === true ) { 27 jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',true); 28 } 29 else { 30 jQuery('.wt-cli-ccpa-opt-out-checkbox').prop('checked',false); 31 } 32 } 33 34 } 35 }, 36 optOutCcpa: function() { 37 var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE); 38 var cliConsent = {}; 39 if( preferenceCookie !== null ) { 40 cliConsent = CCPA.parseCookie(preferenceCookie); 41 } 42 cliConsent.ccpaOptout = this.ccpaOptedOut; 43 cliConsent = JSON.stringify(cliConsent); 44 cliConsent = window.btoa(cliConsent); 45 CLI_Cookie.set(CLI_PREFERNCE_COOKIE,cliConsent,CLI_ACCEPT_COOKIE_EXPIRE); 46 this.setCheckboxState(); 47 }, 48 parseCookie: function( preferenceCookie ) { 49 var cliConsent = {}; 50 if(CLI.isBase64(preferenceCookie)) 51 { 52 cliConsent = window.atob(preferenceCookie); 53 } 54 else 55 { 56 cliConsent = decodeURIComponent(preferenceCookie); 57 } 58 cliConsent = JSON.parse(cliConsent); 59 return cliConsent; 60 }, 61 toggleCCPA: function() { 62 63 }, 64 checkAuthentication: function() { 65 66 }, 67 showCcpaOptOutConfirmBox: function() { 68 69 var css = '.cli-alert-dialog-buttons button {\ 70 -webkit-box-flex: 1!important;\ 71 -ms-flex: 1!important;\ 72 flex: 1!important;\ 73 -webkit-appearance: none!important;\ 74 -moz-appearance: none!important;\ 75 appearance: none!important;\ 76 margin: 4px!important;\ 77 padding: 8px 16px!important;\ 78 border-radius: 64px!important;\ 79 cursor: pointer!important;\ 80 font-weight: 700!important;\ 81 font-size: 12px !important;\ 82 color: #fff;\ 83 text-align: center!important;\ 84 text-transform: capitalize;\ 85 border: 2px solid #61a229;\ 86 } #cLiCcpaOptoutPrompt .cli-modal-dialog{\ 87 max-width: 320px;\ 88 }\ 89 #cLiCcpaOptoutPrompt .cli-modal-content {\ 90 box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 91 -webkit-box-shadow:0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 92 -moz-box-shadow0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\ 93 }\ 94 .cli-alert-dialog-content {\ 95 font-size: 14px;\ 96 }\ 97 .cli-alert-dialog-buttons {\ 98 padding-top:5px;\ 99 }\ 100 button.cli-ccpa-button-cancel {\ 101 background: transparent !important;\ 102 color: #61a229;\ 103 }\ 104 button.cli-ccpa-button-confirm {\ 105 background-color:#61a229;\ 106 color:#ffffff;\ 107 }'; 108 var head = document.head || document.getElementsByTagName('head')[0]; 109 var style = document.createElement('style'); 110 var primaryColor = CLI.settings.button_1_button_colour; 111 var primaryLinkColor = CLI.settings.button_1_link_colour; 112 var backgroundColor = CLI.settings.background; 113 var textColor = CLI.settings.text; 114 CCPA.ccpaOptOutConfirmationOpen = false;
115 var ccpaPrompt, 116 $this = this; 117 (ccpaPrompt = document.createElement("div")).classList.add("cli-modal", "cli-show", "cli-blowup"); 118 ccpaPrompt.id = "cLiCcpaOptoutPrompt"; 119 var t = document.createElement("div"); 120 t.className = "cli-modal-dialog"; 121 var n=document.createElement("div"); 122 n.classList.add("cli-modal-content","cli-bar-popup"); 123 var o = document.createElement("div"); 124 o.className="cli-modal-body"; 125 var p = document.createElement("div"); 126 p.classList.add("wt-cli-element", "cli-container-fluid", "cli-tab-container"); 127 var q = document.createElement("div"); 128 q.className="cli-row"; 129 var r = document.createElement("div"); 130 r.classList.add("cli-col-12"); 131 var x = document.createElement("div"); 132 x.classList.add("cli-modal-backdrop", "cli-fade", "cli-settings-overlay", "cli-show"); 133 var a = document.createElement("button"); 134 var b = document.createElement("button"); 135 var c = document.createElement("div"); 136 var d = document.createElement("div"); 137 d.className = "cli-alert-dialog-content", 138 d.innerText = ccpa_data.opt_out_prompt, 139 c.className = "cli-alert-dialog-buttons"; 140 a.className = "cli-ccpa-button-confirm", 141 a.innerText = ccpa_data.opt_out_confirm, 142 a.addEventListener("click", 143 function() { 144 CCPA.ccpaOptedOut = true, 145 CCPA.optOutCcpa(), 146 document.body.removeChild(ccpaPrompt), 147 document.body.removeChild(x), 148 document.body.classList.remove("cli-modal-open"); 149 head.removeChild(style); 150 if( Cli_Data.ccpaType === 'ccpa' ){ 151 CLI.enableAllCookies(); 152 CCPA.disableOptoutCategories(); 153 CLI.accept_close(); 154 } 155 } 156 ), 157 b.className="cli-ccpa-button-cancel", 158 b.innerText = ccpa_data.opt_out_cancel, 159 b.addEventListener("click", 160 function() { 161 CCPA.ccpaOptedOut = false, 162 CCPA.optOutCcpa(), 163 document.body.removeChild(ccpaPrompt), 164 document.body.removeChild(x), 165 document.body.classList.remove("cli-modal-open"); 166 head.removeChild(style); 167 if( Cli_Data.ccpaType === 'ccpa' ){ 168 CLI.enableAllCookies(); 169 CLI.accept_close(); 170 } 171 } 172 ), 173 ccpaPrompt.addEventListener("click", 174 function( event ) { 175 event.stopPropagation(); 176 if ( ccpaPrompt !== event.target) return; 177 document.body.removeChild(ccpaPrompt), 178 document.body.removeChild(x), 179 document.body.classList.remove("cli-modal-open"); 180 head.removeChild(style); 181 182 }), 183 ccpaPrompt.appendChild(t), 184 t.appendChild(n), 185 n.appendChild(o), 186 o.appendChild(p), 187 p.appendChild(q), 188 q.appendChild(r), 189 r.appendChild(d), 190 r.appendChild(c), 191 c.appendChild(b), 192 c.appendChild(a), 193 194 head.appendChild(style); 195 style.type = 'text/css'; 196 if (style.styleSheet){ 197 // This is required for IE8 and below. 198 style.styleSheet.cssText = css; 199 } else { 200 style.appendChild(document.createTextNode(css)); 201 } 202 document.body.appendChild(ccpaPrompt); 203 document.body.appendChild(x); 204 document.body.classList.add("cli-modal-open"); 205 206 }, 207 disableOptoutCategories: function() { 208 var optoutCats = document.querySelectorAll("[data-cli-ccpa-optout]"); 209 optoutCats.forEach(function(optoutCheckbox) { 210 var checkbox_data_id = optoutCheckbox.getAttribute("data-id"); 211 optoutCheckbox.checked = false;
212 if(checkbox_data_id) { 213 CLI_Cookie.set('cookielawinfo-'+checkbox_data_id,'no',CLI_ACCEPT_COOKIE_EXPIRE); 214 } 215 }); 216 }, 217 } 218 jQuery(document).ready(function() { 219 CCPA.set(); 220 }); 221 222})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.