1var path_position=1;var pathname=window.location.pathname;while(path_position<=pathname.length){path_position=pathname.indexOf('/',path_position);if(path_position<=0)break;$.cookie('dnt_amount',null,{path:pathname.substring(0,path_position),expiry:-1});$.cookie('dnt_amount',null,{path:pathname.substring(0,path_position+1),expiry:-1});path_position++;} 2$.cookie('dnt_amount',null,{path:'/',domain:'.'+window.location.hostname,expiry:-1});var Common={number_format:function(number,decimals,dec_point,thousands_sep){number=(number+'').replace(/[^0-9+\-Ee.]/g,'');var n=!isFinite(+number)?0:+number,prec=!isFinite(+decimals)?0:Math.abs(decimals),dec=(typeof dec_point==='undefined')?'.':dec_point,sep=(typeof thousands_sep!=='undefined')?thousands_sep:(dec=='.')?',':' ',s='',toFixedFix=function(n,prec){var k=Math.pow(10,prec);return''+Math.round(n*k)/k;};s=(prec?toFixedFix(n,prec):''+Math.round(n)).split('.');if(s[0].length>3){s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,sep);} 3if((s[1]||'').length<prec){s[1]=s[1]||'';s[1]+=new Array(prec-s[1].length+1).join('0');} 4return s.join(dec);},fillField:function(name,value){var cn=Common.select(name);if(cn)cn.val(value).trigger('change');},select:function(selector){if(typeof Step1!='undefined'){return $(selector).add(selector,Step1['payment_modes_regular']).add(selector,Step1['payment_modes_once']);}else{return $(selector);}},getDonation:function(){var dnt_amount=$.parseJSON($.cookie('dnt_amount'))||{};Common.checkDonation(dnt_amount);$.cookie('dnt_amount',JSON.stringify(dnt_amount),{'path':'/','secure':window.location.protocol==='https:'});return dnt_amount;},checkDonation:function(dnt_amount,with_tip=false){if(!dnt_amount)return;dnt_amount.amount=parseInt(dnt_amount.amount||0);dnt_amount.amount_donation=parseInt(dnt_amount.amount_donation||0);dnt_amount.amount_tip_set=dnt_amount.amount_tip!==undefined;dnt_amount.amount_tip=parseInt(dnt_amount.amount_tip||0);if(dnt_amount.amount&&!dnt_amount.amount_donation){dnt_amount.log+='Call to checkDonation(), initialize amount_donation to amount, set to '+dnt_amount.amount;dnt_amount.amount_donation=dnt_amount.amount;} 5if(with_tip){dnt_amount.amount_tip=Common.tip_value(dnt_amount.amount_donation);dnt_amount.amount=dnt_amount.amount_tip+dnt_amount.amount_donation;}},allowCurrencyChange:function(){return!!Common.select('input[name=currency],select[name=currency]').length;},setCurrency:function(currency){if(!Common.allowCurrencyChange())return;Common.fillField('input[name=currency],select[name=currency]',currency);},getCurrency:function(){if(!Common.allowCurrencyChange())return Common.price_campaign_currency;return Common.get_value('currency')||Common.price_default_currency;},displayed_currency:'',applyCurrency:function(currency){if(!Common.allowCurrencyChange())return;var currency=currency||Common.getCurrency();if(Common.displayed_currency!=currency){if(typeof Step1!="undefined"){Step1.applyCurrencyRateToGrid(currency);} 6$('.price_currency').html(Common.price_currencies[currency]);Common.displayed_currency=currency;if(typeof Step1!="undefined"){donation=Step1.getDonation();Step1.showReductionInfo(donation.amount_donation,donation.amount_tip,donation.frequency);Step1.showEquivalence(donation.amount_donation,donation.frequency);}}},detectShortcode:function(){Common.select('input[type=submit]').each(function(){if($(this).val().search(/\{(.*)\}/g)>=0){$(this).attr('data-tag-val',$(this).val());}});Common.select('h1,h2,h3,h4,#step-nav li a').each(function(){if($(this).html().search(/\{(.*)\}/g)>=0){$(this).attr('data-tag-html',$(this).html());}});},containsTag:(str)=>str.search(/\{(.*)}/g)>=0,updateValueWithPotentialTag:function(element,value){if(!Common.containsTag(value)){element.value=value;Common.removeTaggedValue(element);}else{Common.setTaggedValue(element,value);}},setTaggedValue:function(element,taggedValue=undefined){if(undefined===taggedValue&&element.matches('input')){taggedValue=element.value;} 7if(!taggedValue){return;} 8element.dataset.tagVal=taggedValue;},removeTaggedValue:function(element){delete element.dataset.tagVal;},kebabToCamelCase:function(str){return str.replace(/-(.)/g,(match,char)=>char.toUpperCase())},get_price:function(amount,currency){if(typeof amount=="string"){amount=parseInt(amount);} 9var currency=currency||Common.getCurrency();if(typeof Common.price_pattern=='undefined')return'';var currency_symbol=Common.price_currencies[currency];var amount_floor=Math.floor(amount/100);var amount_decimal=(amount-amount_floor*100)||'';var amount_total=amount_floor.toString();if(amount_decimal){amount_total+="$1"+("0"+amount_decimal.toString()).slice(-2);} 10return Common.price_pattern.replace(/1(.*)22/,amount_total).replace('â¬',currency_symbol);},get_value:function(name){return Common.formValue(name)},add_css:function(id,url){if(!document.getElementById(id)){var head=document.getElementsByTagName('head')[0];var link=document.createElement('link');link.id=id;link.rel='stylesheet';link.type='text/css';link.href=url;link.media='all';head.appendChild(link);}},add_js:function(id,url,callback){script=document.getElementById(id);if(!script){var script=document.createElement("script") 11script.id=id;script.type="text/javascript";if(script.readyState){script.onreadystatechange=function(){if(script.readyState==="loaded"||script.readyState==="complete"){script.onreadystatechange=null;if(callback)callback();}};}else{script.onload=function(){if(callback)callback();};} 12script.src=url;document.getElementsByTagName("head")[0].appendChild(script);}else{if(script.readyState){script.onreadystatechange=function(){if(script.readyState==="loaded"||script.readyState==="complete"){script.onreadystatechange=null;if(callback)callback();}};}else{script.onload=function(){if(callback)callback();};}}},addValidationEventsOnFields:function($inputsToValidate){$inputsToValidate.each(function(){const $element=$(this);let eventTriggeringValidation='blur';if($element.is('select')){eventTriggeringValidation='select2:close blur change';}else if($element.is(':radio')||$element.is(':checkbox')||$element.parents('.sigPad').length>0){eventTriggeringValidation='change';} 13$element.on(eventTriggeringValidation,function(){Common.check_input($element);});});},check_input:function($elements){let hasErrorInElements=false;$elements.each(function(){$element=$(this);const inputHasError=!Common.isInputValid($element);hasErrorInElements|=inputHasError;Common.toggleDisplayErrorInput($element,inputHasError);});DntErrors.displayErrors();return!hasErrorInElements;},check_qualification:function(scope){let hasErrorInScope=false;$('[data-scope="'+scope+'"][data-required="1"]:not(:disabled), [data-ira-check] > input[data-scope='+scope+'], input[data-ira-check][data-scope='+scope+']').each(function(){const inputHasError=!Common.isInputValid($(this));hasErrorInScope|=inputHasError;Common.toggleDisplayErrorInput($(this),inputHasError);});return!hasErrorInScope;},isInputValid:function($input){let ok=true;const name=$input.attr('name');let value;if($input.is(':checkbox')){value=$input.is(':checked');}else if($input.is(':radio')){value=$(`input[name="${name}"]:checked`).val();}else{value=$input.val()?.trim();} 14if(!value&&($input.attr('required')||$input.attr('data-required'))){ok=false;} 15if($input.attr('data-ira-check')){ok=Common.customValidation($input);}else if($input.parent('[name='+name+']').attr('data-ira-check')){ok=Common.customValidation($input.parent('[name='+name+']'));} 16return ok;},customValidation:function($input){let ok=true;const processedValue=$input.val()?.trim().replace(/\s/g,'');if(processedValue&&!eval($input.attr('data-ira-check'))){DntErrors.updateCustomErrorMsg($input,$input.attr('data-ira-errormsg-invalid'));ok=false;}else if(!processedValue&&($input.attr('required')||$input.attr('data-required'))){const errorMessage=Common.getErrorMessage($input,'empty');DntErrors.updateCustomErrorMsg($input,errorMessage);ok=false;} 17return ok;},getErrorMessage:function($input,dataErrorAttribute){let errorMessage='';const inputAttribute=$input.attr(`data-ira-errormsg-${dataErrorAttribute}`);if(inputAttribute){errorMessage=inputAttribute.replace(/« %s »| '%s'|'%s' |'%s'/g,'');}else{errorMessage=$input.attr('data-ira-errormsg-invalid');} 18return errorMessage},getFieldsToValidateSelector:function(container=""){const requiredCustomFieldsSelector=container+" :input[data-required=1], "+container+" [id^
18=reserved_] + [id^=sigPad] :input[data-required=1]";const fieldsWithSpecificValidation=container+" [data-ira-check] > :input, "+container+" :input[data-ira-check]";return requiredCustomFieldsSelector+", "+fieldsWithSpecificValidation;},toggleDisplayErrorInput:function($input,hasError){let inputIdentifier;if($input.attr('id')&&$input.attr('id').startsWith('reserved_')){inputIdentifier=$input.attr('name');}else{inputIdentifier=$input.attr('id')||$input.parent('[name='+$input.attr('name')+']').attr('id');} 19let $signatureParent=$input.parents('[id^=sigPad]');const toRemove=hasError?'valid':'error';const toAdd=hasError?'error':'valid';$input.removeClass(toRemove).addClass(toAdd);if($signatureParent.length){$signatureParent.addClass('ira-item-'+toAdd).removeClass('ira-item-'+toRemove);}else{$input.parents('p').addClass('ira-item-'+toAdd).removeClass('ira-item-'+toRemove);} 20if(hasError){DntErrors.addError(inputIdentifier);}else{DntErrors.removeError(inputIdentifier);}},tip_initialized:0,initTip:function(){var tip_field=Common.tip_field();var amount=Common.getDonation();tip_field.change(function(){donation=Common.getDonation();donation.amount_tip=Common.tip_value(donation.amount_donation);donation.amount=donation.amount_donation+donation.amount_tip;var dnt_amount_json=JSON.stringify({'amount':donation.amount,'frequency':donation.frequency,'currency':donation.currency,'amount_donation':donation.amount_donation,'amount_tip':donation.amount_tip,'log':donation.log});$.cookie('dnt_amount',dnt_amount_json,{'path':'/','secure':window.location.protocol==='https:'});$('input[type=hidden][name='+Common.tip_field_name()+']').val(donation.amount_tip);$('#form-steps').change();if(typeof Step1!='undefined'){Step1.showReductionInfo(donation.amount_donation,donation.amount_tip,donation.frequency);Step1.showEquivalence(donation.amount_donation,donation.frequency);} 21$('body').trigger($.Event("tip_changed"));});Common.tip_value(amount.amount_donation);if(amount.amount_tip_set){Common.set_tip(amount.amount_tip);} 22$('form[action]').each(function(){if(!$(this).find('input[name='+Common.tip_field_name()+']').length){$(this).prepend('<input name="'+Common.tip_field_name()+'" type="hidden"/>');}});},tip_field_name:function(){return'amount_tip';},tip_field:function(){var tip_field=Common.tip_field_name();return $('input[name='+tip_field+'][type="checkbox"], select[name='+tip_field+']');},tip_active:function(){var value=Common.get_value(Common.tip_field_name());return parseFloat(value)>0;},tip_default_hidden:false,tip_value:function(amount){amount=amount||0;var tip_field=Common.tip_field();var tip_value=0;var oldval=0;var oldoption=null;var set_val=function(){try{var dataval=$(this).attr('data-val');if(!!dataval){var newval=Math.min(amount,eval($(this).attr('data-val')));$(this).val(newval);if($(this).attr('data-visible')){try{var visible=!!eval($(this).attr('data-visible'));if(!visible){$(this).addClass('hidden').attr('disabled','disabled');if(!$(this).parent().is('template')){$(this).wrap('<template />');}}}catch(e){console.error(e);}} 23if(oldoption){if(parseInt(newval)<=parseInt(oldval)){oldoption.addClass('hidden').attr('disabled','disabled');if(!oldoption.parent().is('template')){oldoption.wrap('<template />');}}} 24oldval=newval;oldoption=$(this);}}catch(e){console.error(e);}};var init_attr=function(){try{if($(this).attr('disabled')||$(this).hasClass('hidden')){$(this).removeClass('hidden').removeAttr('disabled');} 25if($(this).parent().is('template')){$(this).unwrap();}}catch(e){console.error(e);}} 26tip_field.find('option.hidden:selected').prop('selected',false);tip_field.find('[data-val]').each(init_attr).each(set_val);tip_field.each(set_val);tip_field.find('option.hidden:selected').prop('selected',false);tip_field.find('option[value=""]').remove();var default_value=tip_field.find('option[data-default]').val();if(Common.tip_initialized!=amount&&(tip_field.find('option:selected').val()<=default_value||tip_field.find('option:selected').hasClass('hidden')||Common.tip_default_hidden)){tip_field.val(default_value);} 27Common.tip_initialized=amount;Common.tip_default_hidden=tip_field.find('option[data-default]').hasClass('hidden');tip_field.find('[data-html]').each(function(){try{var self=$(this);$(this).html(eval($(this).attr('data-html')));}catch(e){console.error(e);}});
27if(Common.tip_active()){var value=Common.get_value(Common.tip_field_name());tip_value=Math.floor(parseFloat(value));}else{tip_value=0;} 28return tip_value;},set_tip:function(amount){var tip_field=Common.tip_field();if(tip_field.is('input')){if(!!amount){tip_field.prop('checked','checked');}else{tip_field.prop('checked',false);}}else if(tip_field.is('select')){amount=parseInt(amount);tip_field.val(amount).change();if(amount){if(!tip_field.val()||tip_field.val()<amount){tip_field.find('option').each(function(){if(!tip_field.val()||(tip_field.val()<amount&&tip_field.val()<$(this).val())){tip_field.val($(this).val());}});}} 29$(document).ready(function(){var select2=tip_field.data('select2');if(select2){if('select2'in select2){select2.select2('destroy');}else if('destroy'in select2){select2.destroy();}}});return tip_field.val();}},get_select:function(element){if(element.is('option')){return element.closest('select');} 30if(!element.is('select'))return null;return element;},refresh_select:function(element){var select=Common.get_select(element);if(select){select.attr('data-refresh',1);}},refresh_renderTempo:0,refresh_render:function(element){var rand=Math.floor(Math.random()*1000000);var self=this;self.refresh_renderTempo=rand;setTimeout(function(){if(self.refresh_renderTempo==rand){return self.do_refresh_render(element);}},100);},do_refresh_render:function(element){if(element.attr('data-refresh')==1){element.attr('data-refresh','');}else{return;} 31if(!element.is('select'))return;var select2=element.data('select2');if(!!select2){var options=select2.options&&select2.options.options;if(options){try{element.select2('destroy').select2(options);}catch(error){console.warn(error);}}}},applyFormValuesTempo:0,applyFormValues:function(values,self){var rand=Math.floor(Math.random()*1000000);Common.applyFormValuesTempo=rand;setTimeout(function(){if(Common.applyFormValuesTempo==rand){return Common.doapplyFormValues(values);}},50);},doapplyFormValues:function(values){try{var values=values||Common.formValues();var donation=Common.getDonation();values['donation_amount']=donation.amount;values['donation_frequency']=Common.price_frequency_texts[donation.frequency]||'';values['donation_amount_donation']=donation.amount_donation;values['donation_amount_original']=donation.amount_donation;values['donation_amount_tip']=donation.amount_tip;var replacevalue=function(match,string,offset,html,self){var vals=Object.assign({},values);var data_value=self.attr("data-value");if(data_value){if(data_value=='self') 32vals['value']=self.val();else 33vals['value']=$(data_value).val();} 34var self_idx=string.indexOf('self.');if(string.indexOf('#')==0){self_idx=0;string=string.substring(1);} 35var with_currency=string.indexOf('_with_currency');if(self_idx==0){var exp=string;if(with_currency>0){exp=string.substring(0,with_currency);} 36try{vals[exp]=eval(exp);}catch(e){vals[exp]='';}} 37if(with_currency>0){vals[string]=Common.get_price(vals[string.substring(0,with_currency)]||0,donation.currency);if(!!html){vals[string]='<a class="price">'+vals[string]+'</a>';}} 38return vals[string]||"";};var replacetags=function(pattern,html,self){return pattern.replace(/\{([^\}]*)\}/g,function(match,string,offset){return replacevalue(match,string,offset,html,self);});};var evalvalues=function(pattern){var val=false;try{var form=values;var donation=Common.getDonation();val=eval(pattern);}catch(e){val=false;} 39return val;};Common.select('[data-tag-val]').each(function(){var pattern=$(this).attr('data-tag-val');var val=replacetags(pattern,false,$(this));var old_val=$(this).val();$(this).val(val);if(old_val!=val){Common.refresh_select($(this));}});Common.select('[data-eval-val]').each(function(){var pattern=$(this).attr('data-eval-val');var old_val=$(this).val();var val=evalvalues(pattern);$(this).val(val);if(old_val!=val){Common.refresh_select($(this));}});Common.select('[data-tag-html]').each(function(){var pattern=$(this).attr('data-tag-html');var old_val=$(this).html();var val=replacetags(pattern,true,$(this));$(this).html(val);if(old_val!=val){Common.refresh_select($(this));}});Common.select('[data-eval-visible]').each(function(){var pattern=$(this).attr('data-eval-visible');$(this).toggle(evalvalues(pattern));$(this).trigger('toggle-visibility');});Common.select('[data-refresh=1]').each(function(){Common.refresh_render($(this));});}catch(e){}},formValue:function(name){var values=Common.formValues();if(!!name){return values[name];} 40return null;},formValues:function(){var context_form_id=$('input[name=context_form_id]').val();var storage={};try{var storage=$.parseJSON(sessionStorage.getItem('form-steps'))||{};}catch(e){storage={};} 41var result=storage[context_form_id]||{};$.each($('#form-steps').serializeArray(),function(index,value){result[value.name]=value.value;});storage[context_form_id]=result;sessionStorage.setItem('form-steps',JSON.stringify(storage));return result;},initForm:function(){Common.initFieldsReact();Common.initTip();},initFieldsReact:function(){$('#form-steps').change(function(e){Common.applyFormValues();});Common.applyFormValues();},};var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
41+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}} 42try{$(document).ready(function(){var ira_stats_capture=[];var ira_stats_last_dt=Date.now();var ira_stats_last='';$('form[id!="form_lang"]').each(function(){$(this).append('<input type="hidden" name="private_stats_capture"/>');$(this).append('<input type="hidden" name="private_stats_version"/>');});function private_stats_capture(val){try{var tmp_dt=Date.now()-ira_stats_last_dt;ira_stats_last_dt=Date.now();if(ira_stats_last==val){ira_stats_capture+=(','+tmp_dt);}else{ira_stats_capture+=(' ['+val+'] '+tmp_dt);} 43ira_stats_last=val;$('input[name=private_stats_capture]').val(Base64.encode(ira_stats_capture.toString()));$('input[name=private_stats_version]').val(Base64.encode(Date.now().toString(16)));}catch(exc){}} 44$('input,select').keydown(function(){private_stats_capture(($(this).attr('id')||$(this).attr('name'))+'/k');}).click(function(){private_stats_capture(($(this).attr('id')||$(this).attr('name'))+'/c');});$(document).keydown(function(e){if((e.which||e.keyCode)==116){var params={};var inputs=['context_form_id','currency','civility','firstname','lastname','company','company_siren','company_status','address1','address2','postcode','city','country','email','nl_streetnumber','nl_streetnumberaddition','nl_inputaddress'];$.each(inputs,function(index,value){var nval=$("#"+value).val()||$("input[name="+value+"]").val();if(nval)params[value]=nval;});if(typeof Step1!='undefined'){var amount=Step1.getDonation();if(amount){params.amount=amount.amount_donation;params.frequency=amount.frequency;}} 45e.preventDefault();var version='';if(typeof ira_form_version!='undefined')version=ira_form_version;window.location.href='/'+version+'?'+$.param(params);}});$('[data-scope]').click(function(){$('[data-scope][data-required=1].error').removeClass('error');$('[data-scope][data-required=1].valid').removeClass('valid');$('[data-scope][data-required=1].error').parent().removeClass('ira-item-error');$('[data-scope][data-required=1].valid').parent().removeClass('ira-item-valid');});window.onbeforeunload=function(e){if(Common.isDownloading){Common.isDownloading=false;}else{$('body').addClass('ira-processing');}};Common.detectShortcode();Common.initForm();});}catch(exc_){console.warn(exc_);}
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.