varc,d,e=jsep(b.expressionString);if("field"===e.left.name?(c=a.fieldValue,d=b.valueB):(c=b.valueB,d=a.fieldValue),"number"===a.fieldType||"scale"===a.fieldType||"rating"===a.fieldType)switch(e.operator){case"==":returnparseInt(c)===parseInt(d);case"!==":returnparseInt(c)!==parseInt(d);case">":returnparseInt(c)>parseInt(d);case">=":returnparseInt(c)>parseInt(d);case"<":returnparseInt(c)<parseInt(d);case"<=":returnparseInt(c)<=parseInt(d);default:return!1}elseswitch(e.operator){case"==":returnc===d;case"!==":returnc!==d;case"contains":returnc.indexOf(d)>-1;case"!contains":return!(c.indexOf(d)>-1);case"begins":returnc.startsWith(d);case"!begins":return!c.startsWith(d);case"ends":returnc.endsWith(d);case"!ends":returnc.endsWith(d);default:return!1}}},l=function(){if(null===h.selected)throwconsole.error("current active field is null"),newError("current active field is null");return"submit_field"===h.selected._id?h.myform.form_fields.length-1:h.selected.index};h.setActiveField=d.setActiveField=function(a,d,g){if(null!==h.selected&&h.selected._id!==a){if(h.selected._id=a,h.selected.index=d,!d)for(varj=0;j<h.myform.visible_form_fields.length;j++){vark=h.myform.visible_form_fields[j];if(a===k._id){h.selected.index=j;break}}varm=c("formValidity")(h.myform);h.translateAdvancementData={done:m,total:i,answers_not_completed:i-m},g?(h.noscroll=!0,setTimeout(function(){f.scrollToElement(angular.element(".activeField"),-10,200).then(function(){h.noscroll=!1,setTimeout(function(){document.querySelectorAll(".activeField .focusOn").length?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input").length?document.querySelectorAll(".activeField input")[0].focus():document.querySelectorAll(".activeField .selectize-input")[0].focus()})})})):setTimeout(function(){document.querySelectorAll(".activeField .focusOn")[0]?document.querySelectorAll(".activeField .focusOn")[0].focus():document.querySelectorAll(".activeField input")[0]&&document.querySelectorAll(".activeField input")[0].focus()}),e.send(h.myform,l(),b.getTimeElapsed())}},d.nextField=h.nextField=function(){vara=h.myform.visible_form_fields[h.selected.index];if(h.selected&&h.selected.index>-1)if(a.logicJump&&k(a))d.setActiveField(a.logicJump.jumpTo,null,!0);else{varb,c;h.selected.index<h.myform.visible_form_fields.length-1?(b=h.selected.index+1,c=h.myform.visible_form_fields[b]._id,d.setActiveField(c,b,!0)):h.selected.index===h.myform.visible_form_fields.length-1&&(b=h.selected.index+1,c="submit_field",d.setActiveField(c,b,!0))}},d.prevField=h.prevField=function(){if(h.selected.index>0){vara=h.selected.index-1,b=h.myform.visible_form_fields[a]._id;h.setActiveField(b,a,!0)}},h.exitStartPage=function(){h.myform.startPage.showStart=!1,h.myform.visible_form_fields.length>0&&(h.selected._id=h.myform.visible_form_fields[0]._id)},d.goToInvalid=h.goToInvalid=function(){document.querySelectorAll(".ng-invalid.focusOn")[0].focus()};varm=function(){vara=newMobileDetect(window.navigator.userAgent),b="other";returna.tablet()?b="tablet":a.mobile()?b="mobile":a.is("bot")||(b="desktop"),{type:b,name:window.navigator.platform}},n=function(){$.ajaxSetup({async:!1});vara=$.getJSON("https://freegeoip.net/json/").responseJSON;return$.ajaxSetup({async:!0}),a&&a.ip||(a={ip:"Adblocker"}),{ipAddr:a.ip,geoLocation:{City:a.city,Country:a.country_name}}};d.submitForm=h.submitForm=function(){vard=b.stopClock();h.loading=!0;varf=_.cloneDeep(h.myform),g=m();f.device=g;vari=n();f.ipAddr=i.ipAddr,f.geoLocation=i.geoLocation,f.timeElapsed=d,f.percentageComplete=c("formValidity")(h.myform)/h.myform.visible_form_fields.length*100,deletef.visible_form_fields;for(varj=0;j<h.myform.form_fields.length;j++)"dropdown"!==h.myform.form_fields[j].fieldType||h.myform.form_fields[j].deletePreserved||(h.myform.form_fields[j].fieldValue=h.myform.form_fields[j].fieldValue.option_value);setTimeout(function(){h.submitPromise=a.post("/forms/"+h.myform._id,f).success(function(a,b){h.myform.submitted=!0,h.loading=!1,e.send(h.myform,l(),d)}).error(function(a){h