1var Step3={is_submitted:'0',cards_no_regular:"",init:function(){window.fnUsage?.('Step3.init');$('input[name="cardtype"], select[name="cardtype"]').change(function(e){if($(this).is('input')){var card_type=$('input[name="cardtype"]:checked').val();}else{var card_type=$('select[name="cardtype"] option:selected').val();} 2Step3.card_type=card_type;if(card_type!=''){if(card_type=='amex'){$('#card-scode .help').hide();$('#card-scode .help.amex').show();}else{$('#card-scode .help').show();$('#card-scode .help.amex').hide();} 3var card_length=Step3.card_length(card_type);var card_cvv_length=Step3.card_cvv_length(card_type);$('#cardnumber').attr('maxlength',card_length);$('#scode').attr('maxlength',card_cvv_length);help=$('#card-scode .help').html().replace(/(\d{1})/,card_cvv_length);$('#card-scode .help').html(help) 4if(card_cvv_length==0){$('#card-scode, .step-content #or, .step-content #regular').hide();}else{$('#card-scode, .step-content #or, .step-content #regular').show();}} 5if(Step3.alert_msg!=''){alert(Step3.alert_msg);}else if(Step3.modal_qualif=='1'){e.preventDefault();$.nmManual(Step3.modal_qualif_url);}});$('select[name=cardyear]').blur(function(e){if(Step3.card_hasalias(Step3.card_type)==1&&Step3.modal_save_card=='1'){$.get(Step3.can_save_card_url,function(data){if(data.status=='ok'){e.preventDefault();$.nmManual(Step3.modal_save_card_url);}});}});$('.gateway').click(function(){$('input[name=type]').val('gateway');});},submit:function(){$('form').submit(function(){window.fnUsage?.('Step3.submit');DntErrors.resetErrors();if(!Step3.check($(this).data('scope'))){console.log('Step 3 checking failed');return false;}});$('form#form-card').submit(function(){DntErrors.resetErrors();if(!Step3.cardCheck()){console.log('Card checking failed');return false;} 6if(Step3.is_submitted=='0'){Step3.is_submitted='1';}else{console.log('Already submitted');return false;}});$('form#form-gban').submit(function(){DntErrors.resetErrors();if(!Step3.gbanCheck()){console.log('GBAN checking failed');return false;}});$('form#form-stripe').submit(function(){if(!window.stripe_creditcard){DntErrors.resetErrors();if(!Step3.cardCheck()){return false;} 7if(Step3.is_submitted=='0'){Step3.is_submitted='1';}else{return false;}}});$('form#form-gestpay').submit(function(){DntErrors.resetErrors();if(!Step3.cardCheck()){return false;} 8if(Step3.is_submitted=='0'){Step3.is_submitted='1';}else{return false;}});$('form#form-paypal').submit(function(){DntErrors.resetErrors();if(!Step3.check('paypal')){console.log('PayPal checking failed');return false;} 9if(Step3.is_submitted=='0'){Step3.is_submitted='1';}else{console.log('PayPal already submitted');return false;}});},cardCheck:function(scope){if(!scope){scope='card';} 10var card_type_radio=$('input[name="cardtype"]').length;var card_type_select=$('select[name="cardtype"]').length;var skip_card_type=false;if(!card_type_radio&&!card_type_select){skip_card_type=true;} 11if(card_type_radio==0&&card_type_select==1){var card_type=$('select[name="cardtype"] option:selected').val();}else if(card_type_radio>=1&&card_type_select==0){var card_type=$('input[name="cardtype"]:checked').val();} 12var card_number=$('#cardnumber').val();var scode=$('#scode').val();var card_month=$('#cardmonth').val();var card_year=$('#cardyear').val();if(!skip_card_type){var card_length=Step3.card_length(card_type);var card_cvv_length=Step3.card_cvv_length(card_type);} 13var ok=true;if(!skip_card_type&&(card_type==undefined||card_type=='')){DntErrors.addError('cardtype');ok=false;}else{DntErrors.removeError('cardtype');} 14if(!card_number.length){DntErrors.addError('cardnumber');ok=false;}else if(!skip_card_type&&card_type&&card_number.length!=card_length){DntErrors.addError('cardnumber');ok=false;}else{DntErrors.removeError('cardnumber');} 15if(card_month==undefined||card_month==''){DntErrors.addError('cardmonth');ok=false;}else{DntErrors.removeError('cardmonth');} 16if(card_year==undefined||card_year==''){DntErrors.addError('cardyear');ok=false;}else{DntErrors.removeError('cardyear');} 17card_date=new Date(card_year,parseInt(card_month));now=new Date();if(card_date instanceof Date&&isFinite(card_date)){if(card_date<now){DntErrors.addError('cardyear');DntErrors.addError('cardmonth');ok=false;}else{DntErrors.removeError('cardyear');DntErrors.removeError('cardmonth');}} 18if(!scode.length){DntErrors.addError('cardscode');ok=false;}else if(!skip_card_type&&card_type&&scode.length!=card_cvv_length){DntErrors.addError('cardscode');ok=false;}else{DntErrors.removeError('cardscode');} 19if(scope=='card'&&!Common.check_qualification('card'))ok=false;
19if(scope=='stripe'&&!Common.check_qualification('stripe'))ok=false;if(scope=='gestpay'&&!Common.check_qualification('gestpay'))ok=false;DntErrors.displayErrors();return ok;},gbanCheck:function(){var ok=true;if(typeof Step1!='undefined'){var donation=Step1.getDonation();var amount=donation.amount;}else{var amount=$('input[name="amount"]').val();} 20DntErrors.removeError('iban-number');ok=Common.check_qualification('gban');if(ok&&amount>500000){DntErrors.addError('iban-number');DntErrors.updateCustomErrorMsg($('#iban-number'),DntErrors.errorMsg.gocardless);Common.toggleDisplayErrorInput($('#iban-number'),true);ok=false;} 21DntErrors.displayErrors();return ok;},check:function(scope){var ok=true;if(!Common.check_qualification(scope))ok=false;DntErrors.displayErrors();return ok;},card_length:function(card_type){return parseInt(eval('Step3.cards_'+card_type+'_length'));},card_cvv_length:function(card_type){return parseInt(eval('Step3.cards_'+card_type+'_cvvlength'));},card_hasalias:function(card_type){return parseInt(eval('Step3.cards_'+card_type+'_hasalias'));},regularFrequenciesHide:function(){$('#regular-frequencies').hide();},regularFrequenciesShow:function(){$('#regular-frequencies').show();},hidePaymentModes:function hidePaymentModes(frequency){if(frequency!='once'&&frequency!='regular')return;var str='payment_modes_'+frequency;var elt=$('#'+str).detach();DntErrors.resetErrors();if(Step1[str].length==0){Step1[str]=elt;}},showPaymentModes:function showPaymentModes(frequency){if(frequency!='once'&&frequency!='regular')return;var str='payment_modes_'+frequency;$('.payment').append(Step1[str]);$('#'+str).show();},select:function(selector){if(typeof Step1!='undefined'){if(typeof selector=="undefined"||selector=="")return Step1['payment_modes_regular'].add(Step1['payment_modes_once']);return $(selector,Step1['payment_modes_regular']).add(selector,Step1['payment_modes_once']);}else{return $('.payment '+selector);}},regularBlocksHide:function(){$('.regularblock').hide();},regularBlocksShow:function(){$('.regularblock').show();},onceBlocksHide:function(){$('.onceblock').hide();},onceBlocksShow:function(){$('.onceblock').show();}};
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.