PageSourceSearch

https://vitrine.reditec.org/wp-content/plugins/fluentform/assets/js/fluentform-advanced.js?ver=6.2.14

js reditec.org collected 2026-09-25 08:26:11 UTC 92,212 bytes, 2 lines download raw bytes

1/*! For license information please see fluentform-advanced.js.LICENSE.txt */
2(()=>{"use strict";const e=function(e,t){var n=t.find(".jss-ff-el-net-promoter");n.length&&e.each(n,function(t,n){e(n).on("click","label",function(t){var n=e(this);n.addClass("active"),n.prevAll().removeClass("active"),n.nextAll().removeClass("active")})})};var t=function(e){!function(e){e.on("click",".js-repeat .repeat-plus",function(e){var t=jQuery(this),n=t.closest(".ff-el-repeat"),r=parseInt(n.data("max_repeat")),i=n.find(".ff-t-cell:first-child .ff-el-input--content > input").length;if(!(r&&r<=i)){r&&r-i==1&&n.find(".repeat-plus").hide();var a=t.closest("div"),o=a.index(),l=t.closest(".ff-el-input--content").find(".ff-t-cell").length;t.closest(".ff-el-input--content").find(".ff-t-cell").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),r=n.attr("tabindex"),i=n.clone(),a={value:"",id:"ffrpt-"+(new Date).getTime()+e};r&&(a.tabIndex=parseInt(r)+l),i.prop(a),i.insertAfter(n)}),a.clone().insertAfter(a),t.closest(".ff-el-input--content").find(".ff-t-cell").eq(0).find("input:eq(".concat(o+1,")")).focus()}}),e.on("click",".js-repeat .repeat-minus",function(e){var t=!1,n=jQuery(this),r=n.closest("div");n.closest(".ff-el-repeat").find(".repeat-plus").show(),n.closest(".ff-el-input--content").find(".ff-t-cell").each(function(){var e=r.index(),n=jQuery(this).find(".ff-el-form-control:eq("+e+")");r.siblings().length&&(t=n.remove().length)}),t&&r.remove()})}(e),function(e){var t=window.localStorage.getItem("ff_window_type");jQuery(".ff_form_preview").length&&jQuery(".ff_flexible_table").addClass(t),e.on("screen-change",function(e,t){jQuery(".ff_form_preview").length&&("375px"===t?jQuery(".ff_flexible_table").addClass("mobile"):jQuery(".ff_flexible_table").removeClass("mobile"))}),e.on("repeater-container-names-update",function(e,t){var n=t.attr("data-root_name"),r=0;t.find(".ff_repeater_cont_row").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,i){var a=jQuery(i);0==e&&(r=a.attr("tabindex")),a.prop({name:n+"["+e+"][]"}),a.attr("data-name",n+"_"+t+"_"+e),r&&a.attr("tabindex",r)})})}),e.on("click",".js-repeater .repeat-plus",function(e){var t=jQuery(this),n=t.closest("table"),r=t.closest("tr"),i=parseInt(n.attr("data-max_repeat")),a=n.find("tbody tr").length;if(i&&a==i)n.addClass("repeat-maxed");else{var o=r.clone();o.find("td").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),r="ffrpt-"+(new Date).getTime()+e,i={value:n.attr("data-default")||"",id:r};n.prop(i);var a=n.attr("data-mask");a&&n.mask(a)}),o.insertAfter(r);var l=n.attr("data-root_name"),s=0;n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){var r=jQuery(n);0==e&&(s=r.attr("tabindex")),r.prop({name:l+"["+e+"][]"}),r.attr("data-name",l+"_"+t+"_"+e),s&&r.attr("tabindex",s)})}),o.find(".ff-el-form-control")[0].focus(),n.trigger("repeat_change"),i&&a+1==i&&n.addClass("repeat-maxed")}}),e.on("click",".js-repeater .repeat-minus",function(e){var t=jQuery(this),n=t.closest("table");if(1!=n.find("tbody tr").length){t.closest("tr").remove(),n.removeClass("repeat-maxed");var r=n.attr("data-root_name");n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){jQuery(n).prop({name:r+"["+e+"][]"})})}),n.trigger("repeat_change")}}),e.on("click",".js-container-repeat-buttons .repeat-plus",function(t){var n=jQuery(this),r=n.closest(".ff-repeater-container"),i=n.closest(".ff_repeater_cont_row"),a=parseInt(r.attr("data-max_repeat")),o=r.find(".ff_repeater_cont_row").length;if(a&&o==a)r.addClass("repeat-maxed");else{var l=i.clone();l.find(".ff_repeater_cell").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),r="ffrpt-"+(new Date).getTime()+e,i={value:n.attr("data-default")||"",id:r};n.prop(i);var a=n.attr("data-mask");a&&n.mask(a),jQuery(this).find("label").attr("for",r)}),l.insertAfter(i),e.trigger("repeater-container-names-update",[r]),l.find(".ff-el-form-control")[0].focus(),r.trigger("repeat_change"),a&&o+1==a&&r.addClass("repeat-maxed")}}),e.on("click",".js-container-repeat-buttons .repeat-minus",function(t){var n=jQuery(this),r=n.closest(".ff-repeater-container"),i=n.closest(".ff_repeater_cont_row");r.find(".ff_repeater_cont_row").length>1&&(i.remove(),r.removeClass("repeat-maxed"),e.trigger("repeater-container-names-update",[r]),r.trigger("repeat_change"))})}
2(e),function(e){e.on("keydown",".repeat-plus",function(e){"Enter"===e.key&&(e.preventDefault(),jQuery(this).click())}),e.on("keydown",".repeat-minus",function(e){"Enter"===e.key&&(e.preventDefault(),jQuery(this).click())})}(e)};function n(e,t){var n=t.find(".jss-ff-el-ratings");n.length&&e.each(n,function(t,n){var r=e(n),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=r.find("label"),n=r.attr("data-base-tabindex")||"0";t.attr("tabindex","-1"),e&&e.length||(e=r.find("input:checked").parent("label")),e.length||(e=t.eq(0)),e.length&&e.attr("tabindex",n)},a=function(e){var t=e?"[data-id="+e+"]":null;r.closest(".ff-el-input--content").find(".ff-el-rating-text").css("display","none"),t&&r.closest(".ff-el-input--content").find(t).css("display","inline-block")},o=function(e){e.addClass("active"),e.prevAll().addClass("active"),e.nextAll().removeClass("active"),a(e.find("input").attr("id"))},l=function(){var t=r.find("input:checked").parent("label");t.length?o(t):(r.find("label").removeClass("active"),a(null)),i(t),r.find("label").each(function(t,n){var r=e(n),i=r.find("input").is(":checked");r.attr("aria-checked",i?"true":"false")})},s=function(e,t){var n=r.find("label"),a=n.index(e),o=Math.max(0,Math.min(n.length-1,a+t)),s=n.eq(o);s.length&&(s.find("input").prop("checked",!0).trigger("change"),i(s),s.trigger("focus"),l())};l(),r.on("mouseenter","label",function(t){o(e(this))}).on("focusin","label",function(){var t=e(this);i(t),o(t)}).on("click","label",function(t){var n=e(this),r=n.find("input"),i=n.find(".jss-ff-svg");r.prop("checked",!0).trigger("change"),l(),i.addClass("scale"),i.addClass("scalling"),setTimeout(function(e){i.removeClass("scalling"),i.removeClass("scale")},150)}).on("keydown","label",function(t){var n=e(this);"ArrowRight"===t.key||"ArrowUp"===t.key?(t.preventDefault(),s(n,1)):"ArrowLeft"===t.key||"ArrowDown"===t.key?(t.preventDefault(),s(n,-1)):" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),n.trigger("click"))}).on("mouseleave",function(e){l()}).on("focusout","label",function(){setTimeout(function(){r.find("label:focus").length||l()},0)}).on("change","input",function(){l()})})}function r(){r=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,a){var o=RegExp(e,r);return t.set(o,a||t.get(e)),i(o,n.prototype)}function o(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var i=r[n];if("number"==typeof i)t[n]=e[i];else{for(var a=0;void 0===e[i[a]]&&a+1<i.length;)a++;t[n]=e[i[a]]}return t},Object.create(null))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=o(n,this);var r=n.indices;r&&(r.groups=o(r,this))}return n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var i=t.get(this);return e[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=i[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof r){var l=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=a(e[e.length-1])&&(e=[].slice.call(e)).push(o(e,l)),r.apply(this,e)})}return e[Symbol.replace].call(this,n,r)},r.apply(this,arguments)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}
2}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var f=function(){return e=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.fields=t,this.formData=n,this.counter=0,this.field_statues={},this.elementCache={}},t=[{key:"setFields",value:function(e){this.fields=e}},{key:"setFormData",value:function(e){this.elementCache={},this.formData=e}},{key:"getCalculatedStatuses",value:function(){this.elementCache={};for(var e=0,t=Object.keys(this.fields);e<t.length;e++){var n=t[e],r=this.fields[n];this.field_statues[n]=this.evaluate(r,n)}return this.field_statues}},{key:"evaluate",value:function(e,t){var n=this;if(e._visited)return console.warn("Circular dependency detected for field: ".concat(t)),!1;var r=!1;if(e.status){var i,a;this.counter++;var o=e.type,l=1;if(e._visited=!0,"group"===o&&null!=e&&e.condition_groups?r=this.evaluateGroups(e.condition_groups):("any"==o&&(l=0),e.conditions.forEach(function(e){var r=n.getItemEvaluateValue(e,n.formData[e.field]);r&&n.fields[e.field]&&e.field!=t&&(r=n.evaluate(n.fields[e.field],e.field)),"any"==o?r&&(l=1):!r&&l&&(l=!1)}),r=1==l),e._visited=!1,(null!==(i=e.conditions)&&void 0!==i&&i.length||null!==(a=e.condition_groups)&&void 0!==a&&a.length)&&!r)return r}return e.container_condition&&(r=this.evaluate(e.container_condition,t)),r}},{key:"evaluateGroups",value:function(e){var t,n=o(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r&&Array.isArray(r.rules)&&0!==r.rules.length)try{if(!0===this.evaluateRuleGroup(r.rules))return!0}catch(e){console.warn("Error evaluating group:",e);continue}}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"evaluateRuleGroup",value:function(e){var t=this;return e.map(function(e){try{var n=t.getItemEvaluateValue(e,t.formData[e.field]);return n&&t.fields[e.field]&&t.fields[e.field].status?t.evaluate(t.fields[e.field],e.field):n}catch(t){return console.warn("Error evaluating rule:",e,t),!1}}).every(function(e){return!0===e})}},{key:"getItemEvaluateValue",value:function(e,t){t=t||null;var n=this.elementCache[e.field];if(n&&n.length||(n=jQuery("[name='".concat(e.field,"']")),this.elementCache[e.field]=n),"list_match"==e.operator||"list_not_match"==e.operator){var r=this.parseRankingConditionValue(e.value),i=Array.isArray(t)?t.map(String):[],o=r.length>0&&i.length===r.length&&i.every(function(e,t){return e===r[t]});return"list_match"==e.operator?o:!o}return"="==e.operator?""===e.value?null===t:"object"==a(t)?null!==t&&-1!=t.indexOf(e.value):n.hasClass("ff_numeric")?this.parseFormattedNumericValue(n,t)==this.parseFormattedNumericValue(n,e.value):t==e.value:"!="==e.operator?"object"==a(t)?null!==t&&-1==t.indexOf(e.value):n.hasClass("ff_numeric")?this.parseFormattedNumericValue(n,t)!=this.parseFormattedNumericValue(n,e.value):t!=e.value:">"==e.operator?t&&this.parseFormattedNumericValue(n,t)>this.parseFormattedNumericValue(n,e.value):"<"==e.operator?t&&this.parseFormattedNumericValue(n,t)<this.parseFormattedNumericValue(n,e.value):">="==e.operator?t&&this.parseFormattedNumericValue(n,t)>=this.parseFormattedNumericValue(n,e.value):"<="==e.operator?t&&this.parseFormattedNumericValue(n,t)<=this.parseFormattedNumericValue(n,e.value):"startsWith"==e.operator?t&&t.startsWith(e.value):"endsWith"==e.operator?t&&t.endsWith(e.value):"contains"==e.operator?null!==t&&-1!=t.indexOf(e.value):"doNotContains"==e.operator?null!==t&&-1==t.indexOf(e.value):"test_regex"==e.operator&&(t=t||"",this.stringToRegex(e.value).test(t))}},{key:"parseRankingConditionValue",value:function(e){if(!e)return[];try{var t=JSON.parse(e);
2return Array.isArray(t)?t.map(String).filter(Boolean):[]}catch(e){return[]}}},{key:"stringToRegex",value:function(e){var t,n=(null===(t=String(e).match(r(/^\/(.*)\/([gimsuy]*)$/,{body:1,flags:2})))||void 0===t?void 0:t.groups)||{},i=n.body,a=n.flags;return i?(a=a||"g",RegExp(i,a)):new RegExp(e,"g")}},{key:"parseFormattedNumericValue",value:function(e,t){if(e.hasClass("ff_numeric")){var n=JSON.parse(e.attr("data-formatter"));return currency(t,n).value}return Number(t)||0}}],t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();const u=f;const d=function(e,t,n){var r="."+n.form_instance;(function(){var i=this,a={},o={},l=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];clearTimeout(t),t=setTimeout(function(){return e.apply(i,a)},n)}}(function(e){s(e)},n.debounce_time||300),s=function(n){var r;e.each(n,function(e,n){var i=f(e).closest(".has-conditions");n?("0px"==i.css("height")&&i.attr("style",""),i.removeClass("ff_excluded").addClass("ff_cond_v").slideDown(200,function(){i.find('input[type="range"]').length>0&&(r&&clearTimeout(r),r=setTimeout(function(){t.trigger("reInitRangeSliders")},50))})):i.removeClass("ff_cond_v").addClass("ff_excluded").slideUp(200)}),t.trigger("do_calculation"),t.trigger("ff_render_dynamic_smartcodes",t)},c=function(){var n={};return e.each(a,function(r,i){var a=i.prop("type")||i.attr("data-type");if("radio"==a)n[r]="",i.each(function(t,i){e(i).is(":checked")&&(n[r]=e(i).val())});else if("checkbox"==a)r=r.replace("[]",""),n[r]=[],i.each(function(t,i){e(i).is(":checked")&&n[r].push(e(i).val())});else if("select-multiple"==a){r=r.replace("[]","");var o=i.val();n[r]=o||[]}else if("file"==a){var l="";t.find("input[name="+r+"]").closest(".ff-el-input--content").find(".ff-uploaded-list").find(".ff-upload-preview[data-src]").each(function(t,n){l+=e(this).data("src")}),n[r]=l}else"ranking"==a||i.hasClass("ff-ranking-field")?n[r]=i.find('input[data-ranking-input="1"]:enabled').map(function(t,n){return e(n).val()}).get().filter(Boolean):n[r]=i.val()}),n},f=function(t){var n=e(r),i=e("[data-name='"+t+"']",n);return(i=(i=i.length?i:e("[name='"+t+"']",n)).length?i:e("[data-condition_field_name='"+t+"']",n)).length?i:e("[name='"+t+"[]']",n)};return{init:function(){if(n.conditionals){e.each(n.conditionals,function(t,n){t&&("group"==n.type&&n.condition_groups?e.each(n.condition_groups,function(t,n){e.each(n.rules,function(e,t){var n=f(t.field),r=n.prop("name")||n.attr("data-name");r&&(a[r]=n)})}):e.each(n.conditions,function(e,t){var n=f(t.field),r=n.prop("name")||n.attr("data-name");r&&(a[r]=n)}))}),o=c();var r=new u(n.conditionals,o);
vendor: 6,982 bytes, line 2
2e.each(a,function(e,n){n.on("keyup change",function(){t.hasClass("ff_force_hide")||t.hasClass("ff_submitting")||(o=c(),r.setFormData(o),setTimeout(function(){l(r.getCalculatedStatuses())},0))})}),jQuery(document.body).on("fluentform_reset",function(e,n){n&&n.length&&n[0]===t[0]&&!t.hasClass("ff_force_hide")&&setTimeout(function(){o=c(),r.setFormData(o),s(r.getCalculatedStatuses())},0)}),setTimeout(function(){s(r.getCalculatedStatuses())},0)}}}})().init()};function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const h=Object.entries,v=Object.setPrototypeOf,g=Object.isFrozen,y=Object.getPrototypeOf,_=Object.getOwnPropertyDescriptor;let b=Object.freeze,w=Object.seal,S=Object.create,x="undefined"!=typeof Reflect&&Reflect,T=x.apply,k=x.construct;b||(b=function(e){return e}),w||(w=function(e){return e}),T||(T=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),k||(k=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const A=G(Array.prototype.forEach),C=G(Array.prototype.lastIndexOf),E=G(Array.prototype.pop),N=G(Array.prototype.push),F=G(Array.prototype.splice),O=Array.isArray,D=G(String.prototype.toLowerCase),j=G(String.prototype.toString),I=G(String.prototype.match),R=G(String.prototype.replace),$=G(String.prototype.indexOf),P=G(String.prototype.trim),z=G(Number.prototype.toString),L=G(Boolean.prototype.toString),M="undefined"==typeof BigInt?null:G(BigInt.prototype.toString),U="undefined"==typeof Symbol?null:G(Symbol.prototype.toString),H=G(Object.prototype.hasOwnProperty),V=G(Object.prototype.toString),B=G(RegExp.prototype.test),W=(Q=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return k(Q,t)});var Q;function G(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return T(e,t,r)}}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;if(v&&v(e,null),!O(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(g(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Y(e){for(let t=0;t<e.length;t++){H(e,t)||(e[t]=null)}return e}function X(e){const t=S(null);for(const r of h(e)){var n=m(r,2);const i=n[0],a=n[1];H(e,i)&&(O(a)?t[i]=Y(a):a&&"object"==typeof a&&a.constructor===Object?t[i]=X(a):t[i]=a)}return t}function J(e,t){for(;null!==e;){const n=_(e,t);if(n){if(n.get)return G(n.get);if("function"==typeof n.value)return G(n.value)}e=y(e)}return function(){return null}}const K=b(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Z=b(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ee=b(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),te=b(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ne=b(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),re=b(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ie=b(["#text"]),ae=b(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
2spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),oe=b(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),le=b(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=b(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ce=w(/{{[\w\W]*|^[\w\W]*}}/g),fe=w(/<%[\w\W]*|^[\w\W]*%>/g),ue=w(/\${[\w\W]*/g),de=w(/^data-[\-\w.\u00B7-\uFFFF]+$/),pe=w(/^aria-[\-\w]+$/),me=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),he=w(/^(?:\w+script|data):/i),ve=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ge=w(/^html$/i),ye=w(/^[a-z][.\w]*(-[.\w]+)+$/i),_e=w(/<[/\w!]/g),be=w(/<[/\w]/g),we=w(/<\/no(script|embed|frames)/i),Se=w(/\/>/i),xe=1,Te=3,ke=7,Ae=8,Ce=9,Ee=11,Ne=function(){return"undefined"==typeof window?null:window},Fe=function(e,t,n,r){return H(e,t)&&O(e[t])?q(r.base?X(r.base):{},e[t],r.transform):n};var Oe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne();const n=t=>e(t);if(n.version="3.4.13",n.removed=[],!t||!t.document||t.document.nodeType!==Ce||!t.Element)return n.isSupported=!1,n;let r=t.document;const i=r,a=i.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,l=t.Node,s=t.Element,c=t.NodeFilter,f=t.NamedNodeMap;void 0===f&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const u=t.DOMParser,d=t.trustedTypes,p=s.prototype,m=J(p,"cloneNode"),v=J(p,"remove"),g=J(p,"nextSibling"),y=J(p,"childNodes"),_=J(p,"parentNode"),x=J(p,"shadowRoot"),T=J(p,"attributes"),k=l&&l.prototype?J(l.prototype,"nodeType"):null,Q=l&&l.prototype?J(l.prototype,"nodeName"):null,G=l&&l.prototype?J(l.prototype,"ownerDocument"):null;if("function"==typeof o){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Y,Oe,De="",je=!1,Ie=0;const Re=function(){if(Ie>0)throw W('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},$e=function(e){Re(),Ie++;try{return Y.createHTML(e)}finally{Ie--}},Pe=function(){return je||(Oe=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;
vendor: 4,687 bytes, line 2
2const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(d,a),je=!0),Oe},ze=r,Le=ze.implementation,Me=ze.createNodeIterator,Ue=ze.createDocumentFragment,He=ze.getElementsByTagName,Ve=i.importNode;let Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof h&&"function"==typeof _&&Le&&void 0!==Le.createHTMLDocument;const We=ce,Qe=fe,Ge=ue,qe=de,Ye=pe,Xe=he,Je=ve,Ke=ye;let Ze=me,et=null;const tt=q({},[...K,...Z,...ee,...ne,...ie]);let nt=null;const rt=q({},[...ae,...oe,...le,...se]);let it=Object.seal(S(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),at=null,ot=null;const lt=Object.seal(S(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let st=!0,ct=!0,ft=!1,ut=!0,dt=!1,pt=!0,mt=!1,ht=!1,vt=null,gt=null,yt=!1,_t=!1,bt=!1,wt=!1,St=!0,xt=!1;const Tt="user-content-";let kt=!0,At=!1,Ct={},Et=null;const Nt=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ft=null;const Ot=q({},["audio","video","img","source","image","track"]);let Dt=null;const jt=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),It="http://www.w3.org/1998/Math/MathML",Rt="http://www.w3.org/2000/svg",$t="http://www.w3.org/1999/xhtml";let Pt=$t,zt=!1,Lt=null;const Mt=q({},[It,Rt,$t],j),Ut=b(["mi","mo","mn","ms","mtext"]);let Ht=q({},Ut);const Vt=b(["annotation-xml"]);let Bt=q({},Vt);const Wt=q({},["title","style","font","a","script"]);let Qt=null;const Gt=["application/xhtml+xml","text/html"];let qt=null,Yt=null;const Xt=r.createElement("form"),Jt=function(e){return e instanceof RegExp||e instanceof Function},Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Yt&&Yt===e)return;e&&"object"==typeof e||(e={}),e=X(e),Qt=-1===Gt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,qt="application/xhtml+xml"===Qt?j:D,et=Fe(e,"ALLOWED_TAGS",tt,{transform:qt}),nt=Fe(e,"ALLOWED_ATTR",rt,{transform:qt}),Lt=Fe(e,"ALLOWED_NAMESPACES",Mt,{transform:j}),Dt=Fe(e,"ADD_URI_SAFE_ATTR",jt,{transform:qt,base:jt}),Ft=Fe(e,"ADD_DATA_URI_TAGS",Ot,{transform:qt,base:Ot}),Et=Fe(e,"FORBID_CONTENTS",Nt,{transform:qt}),at=Fe(e,"FORBID_TAGS",X({}),{transform:qt}),ot=Fe(e,"FORBID_ATTR",X({}),{transform:qt}),Ct=!!H(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?X(e.USE_PROFILES):e.USE_PROFILES),st=!1!==e.ALLOW_ARIA_ATTR,ct=!1!==e.ALLOW_DATA_ATTR,ft=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,dt=e.SAFE_FOR_TEMPLATES||!1,pt=!1!==e.SAFE_FOR_XML,mt=e.WHOLE_DOCUMENT||!1,_t=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,wt=e.RETURN_TRUSTED_TYPE||!1,yt=e.FORCE_BODY||!1,St=!1!==e.SANITIZE_DOM,xt=e.SANITIZE_NAMED_PROPS||!1,kt=!1!==e.KEEP_CONTENT,At=e.IN_PLACE||!1,Ze=function(e){try{return B(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:me,Pt="string"==typeof e.NAMESPACE?e.NAMESPACE:$t,Ht=H(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?X(e.MATHML_TEXT_INTEGRATION_POINTS):q({},Ut),Bt=H(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?X(e.HTML_INTEGRATION_POINTS):q({},Vt);const t=H(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?X(e.CUSTOM_ELEMENT_HANDLING):S(null);if(it=S(null),H(t,"tagNameCheck")&&Jt(t.tagNameCheck)&&(it.tagNameCheck=t.tagNameCheck),H(t,"attributeNameCheck")&&Jt(t.attributeNameCheck)&&(it.attributeNameCheck=t.attributeNameCheck),H(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(it.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),w(it),dt&&(ct=!1),bt&&(_t=!0),Ct&&(et=q({},ie),nt=S(null),!0===Ct.html&&(q(et,K),q(nt,ae)),!0===Ct.svg&&(q(et,Z),q(nt,oe),q(nt,se)),!0===Ct.svgFilters&&
vendor: 6,537 bytes, line 2
2(q(et,ee),q(nt,oe),q(nt,se)),!0===Ct.mathMl&&(q(et,ne),q(nt,le),q(nt,se))),lt.tagCheck=null,lt.attributeCheck=null,H(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?lt.tagCheck=e.ADD_TAGS:O(e.ADD_TAGS)&&(et===tt&&(et=X(et)),q(et,e.ADD_TAGS,qt))),H(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?lt.attributeCheck=e.ADD_ATTR:O(e.ADD_ATTR)&&(nt===rt&&(nt=X(nt)),q(nt,e.ADD_ATTR,qt))),H(e,"ADD_URI_SAFE_ATTR")&&O(e.ADD_URI_SAFE_ATTR)&&q(Dt,e.ADD_URI_SAFE_ATTR,qt),H(e,"FORBID_CONTENTS")&&O(e.FORBID_CONTENTS)&&(Et===Nt&&(Et=X(Et)),q(Et,e.FORBID_CONTENTS,qt)),H(e,"ADD_FORBID_CONTENTS")&&O(e.ADD_FORBID_CONTENTS)&&(Et===Nt&&(Et=X(Et)),q(Et,e.ADD_FORBID_CONTENTS,qt)),kt&&(et["#text"]=!0),mt&&q(et,["html","head","body"]),et.table&&(q(et,["tbody"]),delete at.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Y;Y=e.TRUSTED_TYPES_POLICY;try{De=$e("")}catch(e){throw Y=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Y=void 0,De=""):(void 0===Y&&(Y=Pe()),Y&&"string"==typeof De&&(De=$e("")));b&&b(e),Yt=e},Zt=q({},[...Z,...ee,...te]),en=q({},[...ne,...re]),tn=function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:Pt,tagName:"template"});const n=D(e.tagName),r=D(t.tagName);return!!Lt[e.namespaceURI]&&(e.namespaceURI===Rt?function(e,t,n){return t.namespaceURI===$t?"svg"===e:t.namespaceURI===It?"svg"===e&&("annotation-xml"===n||Ht[n]):Boolean(Zt[e])}(n,t,r):e.namespaceURI===It?function(e,t,n){return t.namespaceURI===$t?"math"===e:t.namespaceURI===Rt?"math"===e&&Bt[n]:Boolean(en[e])}(n,t,r):e.namespaceURI===$t?function(e,t,n){return!(t.namespaceURI===Rt&&!Bt[n])&&!(t.namespaceURI===It&&!Ht[n])&&!en[e]&&(Wt[e]||!Zt[e])}(n,t,r):!("application/xhtml+xml"!==Qt||!Lt[e.namespaceURI]))},nn=function(e){N(n.removed,{element:e});try{_(e).removeChild(e)}catch(t){if(v(e),!_(e))throw W("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},rn=function(e){ln(e);const t=y(e);if(t){const e=[];A(t,t=>{N(e,t)}),A(e,e=>{try{v(e)}catch(e){}})}const n=T(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],i=r&&r.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(e){}}},an=function(e,t){try{N(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){N(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(_t||bt)try{nn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},on=function(e){const t=T(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],i=r&&r.name;if("string"==typeof i&&!nt[qt(i)])try{e.removeAttribute(i)}catch(e){}}},ln=function(e){const t=[e];for(;t.length>0;){const e=t.pop();(k?k(e):e.nodeType)===xe&&on(e);const n=y(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},sn=function(e){let t=null,n=null;if(yt)e="<remove></remove>"+e;else{const t=I(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qt&&Pt===$t&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=Y?$e(e):e;if(Pt===$t)try{t=(new u).parseFromString(i,Qt)}catch(e){}if(!t||!t.documentElement){t=Le.createDocument(Pt,"template",null);try{t.documentElement.innerHTML=zt?De:i}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Pt===$t?He.call(t,mt?"html":"body")[0]:mt?t.documentElement:a},cn=function(e){const t=G?G(e):e.ownerDocument;return Me.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},fn=function(e){return e=R(e,We," "),e=R(e,Qe," "),e=R(e,Ge," ")},un=function(e){var t;e.normalize();const n=G?G(e):e.ownerDocument,r=Me.call(n||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=fn(i.data),i=r.nextNode();const a=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");a&&A(a,e=>{pn(e.content)&&un(e.content)})},dn=function(e){const t=Q?Q(e):null;return"string"==typeof t&&("form"===qt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==T(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==k(e)||e.childNodes!==y(e)))},pn=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return k(e)===Ee}catch(e){return!1}},mn=function(e){if(!k||"object"!=typeof e||null===e)return!1;try{return"number"==typeof k(e)}catch(e){return!1}};function hn(e,t,r){0!==e.length&&A(e,e=>{e.call(n,t,r,Yt)})}const vn=function(e,t,n,r){return 0===e.length?t:t===n||t===r?X(t):t},gn=function(e,t){if(hn(Be.beforeSanitizeElements,e,null),e!==t&&null===_(e))return At&&ln(e),!0;if(dn(e))return nn(e),!0;const r=qt(Q?Q(e):e.nodeName);if(et=vn(Be.uponSanitizeElement,et,tt,vt),hn(Be.uponSanitizeElement,e,{tagName:r,allowedTags:et}),e!==t&&null===_(e))return At&&ln(e),!0;if(function(e,t){return!!(pt&&e.hasChildNodes()&&!mn(e.firstElementChild)&&B(_e,e.textContent)&&B(_e,e.innerHTML))||!(!pt||e.namespaceURI!==$t||"style"!==t||!mn(e.firstElementChild))||e.nodeType===ke||!(!pt||e.nodeType!==Ae||!B(be,e.data))}(e,r))return nn(e),!0;if(at[r]||!(lt.tagCheck instanceof Function&&lt.tagCheck(r))&&!et[r]){const n=function(e,t,n){if(!at[t]&&bn(t)){if(it.tagNameCheck instanceof RegExp&&B(it.tagNameCheck,t))return!1;if(it.tagNameCheck instanceof Function&&it.tagNameCheck(t))return!1}if(kt&&!Et[t]){const t=_(e),r=y(e);if(r&&t)for(let i=r.length-1;i>=0;--i){const a=e===n?m(r[i],!0):r[i];t.insertBefore(a,g(e))}}return nn(e),!0}(e,r,t);return!1===n&&hn(Be.afterSanitizeElements,e,null),n}if((k?k(e):e.nodeType)===xe&&!tn(e))return nn(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&B(we,e.innerHTML))return nn(e),!0;if(dt&&e.nodeType===Te){const t=fn(e.textContent);e.textContent!==t&&(N(n.removed,{element:e.cloneNode()}),e.textContent=t)}return hn(Be.afterSanitizeElements,e,null),!1},yn=function(e,t,n){if(ot[t])return!1;if(pt&&"patchsrc"===t)return!1;if(pt&&"for"===t&&"label"!==e&&"output"!==e)return!1;if(St&&("id"===t||"name"===t)&&(n in r||n in Xt))return!1;const i=nt[t]||lt.attributeCheck instanceof Function&&lt.attributeCheck(t,e);if(ct&&B(qe,t));else if(st&&B(Ye,t));else if(i)if(Dt[t]);else if(B(Ze,R(n,Je,"")));
vendor: 4,566 bytes, line 2
2else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==$(n,"data:")||!Ft[e]){if(ft&&!B(Xe,R(n,Je,"")));else if(n)return!1}else;else if(!(bn(e)&&(it.tagNameCheck instanceof RegExp&&B(it.tagNameCheck,e)||it.tagNameCheck instanceof Function&&it.tagNameCheck(e))&&(it.attributeNameCheck instanceof RegExp&&B(it.attributeNameCheck,t)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(t,e))||"is"===t&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&B(it.tagNameCheck,n)||it.tagNameCheck instanceof Function&&it.tagNameCheck(n))))return!1;return!0},_n=q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),bn=function(e){return!_n[D(e)]&&B(Ke,e)},wn=function(e,t,n,r){if(Y&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!n)switch(d.getAttributeType(e,t)){case"TrustedHTML":return $e(r);case"TrustedScriptURL":return function(e){Re(),Ie++;try{return Y.createScriptURL(e)}finally{Ie--}}(r)}return r},Sn=function(e,t,r,i){try{r?e.setAttributeNS(r,t,i):e.setAttribute(t,i),dn(e)?nn(e):E(n.removed)}catch(n){an(t,e)}},xn=function(e){hn(Be.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||dn(e))return;nt=vn(Be.uponSanitizeAttribute,nt,rt,gt);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let r=t.length;const i=qt(e.nodeName);for(;r--;){const a=t[r],o=a.name,l=a.namespaceURI,s=a.value,c=qt(o),f=s;let u="value"===o?f:P(f);n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,hn(Be.uponSanitizeAttribute,e,n),u=n.attrValue,!xt||"id"!==c&&"name"!==c||0===$(u,Tt)||(an(o,e),u=Tt+u),pt&&B(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)?an(o,e):"attributename"===c&&I(u,"href")?an(o,e):n.forceKeepAttr||(n.keepAttr&&(ut||!B(Se,u))?(dt&&(u=fn(u)),yn(i,c,u)?(u=wn(i,c,l,u),u!==f&&Sn(e,o,l,u)):an(o,e)):an(o,e))}hn(Be.afterSanitizeAttributes,e,null)},Tn=function(e){let t=null;const n=cn(e);for(hn(Be.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){hn(Be.uponSanitizeShadowNode,t,null),gn(t,e),xn(t),pn(t.content)&&Tn(t.content);if((k?k(t):t.nodeType)===xe){const e=x(t);pn(e)&&(kn(e),Tn(e))}}hn(Be.afterSanitizeShadowDOM,e,null)},kn=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){Tn(e.shadow);continue}const n=e.node,r=(k?k(n):n.nodeType)===xe,i=y(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){const e=Q?Q(n):null;if("string"==typeof e&&"template"===qt(e)){const e=n.content;pn(e)&&t.push({node:e,shadow:null})}}if(r){const e=x(n);pn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,o=null,l=null;if(zt=!e,zt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!mn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return z(e);case"boolean":return L(e);case"bigint":return M?M(e):"0";case"symbol":return U?U(e):"Symbol()";case"undefined":default:return V(e);case"function":case"object":{if(null===e)return V(e);const t=e,n=J(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:V(e)}return V(e)}}}(e)))throw W("dirty is not a string, aborting");if(!n.isSupported)return e;ht?(et=vt,nt=gt):Kt(t),(Be.uponSanitizeElement.length>0||Be.uponSanitizeAttribute.length>0)&&(et=X(et)),Be.uponSanitizeAttribute.length>0&&(nt=X(nt)),n.removed=[];const s=At&&"string"!=typeof e&&mn(e);if(s){!function(e){if(!pt)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=k?k(e):e.nodeType;if(n===ke||n===Ae&&B(be,e.data)){try{v(e)}catch(e){}continue}if(n===xe){const t=e,n=qt(Q?Q(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&"label"!==n&&"output"!==n&&t.removeAttribute("for")}catch(e){}}const r=y(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}}(e);const t=Q?Q(e):e.nodeName;if("string"==typeof t){const n=qt(t);if(!et[n]||at[n])throw rn(e),W("root node is forbidden and cannot be sanitized in-place")}if(dn(e))throw rn(e),W("root node is clobbered and cannot be sanitized in-place");try{kn(e)}catch(t){throw rn(e),t}}else if(mn(e))r=sn("\x3c!----\x3e"),a=r.ownerDocument.importNode(e,!0),a.nodeType===xe&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a),kn(a);else{if(!_t&&!dt&&!mt&&-1===e.indexOf("<"))return Y&&wt?$e(e):e;if(r=sn(e),!r)return _t?null:wt?De:""}r&&yt&&nn(r.firstChild);const c=s?e:r;
2try{const e=cn(c);for(;o=e.nextNode();)gn(o,c),xn(o),pn(o.content)&&Tn(o.content)}catch(t){throw s&&(rn(e),A(n.removed,e=>{e.element&&ln(e.element)})),t}if(s)return A(n.removed,e=>{e.element&&ln(e.element)}),dt&&un(e),e;if(_t){if(dt&&un(r),bt)for(l=Ue.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(nt.shadowroot||nt.shadowrootmode)&&(l=Ve.call(i,l,!0)),l}let f=mt?r.outerHTML:r.innerHTML;return mt&&et["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&B(ge,r.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+f),dt&&(f=fn(f)),Y&&wt?$e(f):f},n.setConfig=function(){Kt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ht=!0,vt=et,gt=nt},n.clearConfig=function(){Yt=null,ht=!1,vt=null,gt=null,Y=Oe,De=""},n.isValidAttribute=function(e,t,n){Yt||Kt({});const r=qt(e),i=qt(t);return yn(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&H(Be,e)&&N(Be[e],t)},n.removeHook=function(e,t){if(H(Be,e)){if(void 0!==t){const n=C(Be[e],t);return-1===n?void 0:F(Be[e],n,1)[0]}return E(Be[e])}},n.removeHooks=function(e){H(Be,e)&&(Be[e]=[])},n.removeAllHooks=function(){Be={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),De=["_blank","_self","_parent","_top"],je=["_self","_top","_parent"],Ie=/^[A-Za-z][A-Za-z0-9_.-]*$/,Re=/^[A-Za-z][A-Za-z-]*$/,$e=["noopener"];function Pe(e){var t=e&&"string"==typeof e.tagName?e.tagName.toUpperCase():"";return"A"===t||"AREA"===t}var ze=Oe(window);function Le(e){return null==e?"":ze.sanitize(String(e))}function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Ue(e,t,n,r,i){var a=function(e,t){var r="fluentform_upload_messages_"+n.id;return window[r]&&window[r][e]?window[r][e]:t},o=function(){jQuery.fn.fileupload&&(t.find('input[type="file"]').each(function(o,f){var u,d,p=e(this),m=p.closest(".ff-el-group");m.closest(".ff-column-container").is(".ff_columns_total_6, .ff_columns_total_5, .ff_columns_total_4")&&m.width()<162&&(d=m.width()),u=e("<div/>",{class:"ff-uploaded-list",style:"font-size:12px; margin-top: 15px;"+(d?"max-width:".concat(d,"px;"):"")}),p.closest("div").append(u);var h=u.width(),v=n.rules[p.prop("name")],g=v.max_file_count.value,y=p.data("name")||p.prop("name");"max_file_count"in v&&(v.max_file_count.remaining=Number(g));var _="";function b(e){var n=p.prop("name");t.trigger("show_element_error",{element:n,message:e})}function w(r,a){if(a&&a.files&&a.files.length){if(t.find(".ff-upload-preview-elem").remove(),"max_file_count"in v){e(i+"_errors").empty(),e(this).closest("div").find(".error").html("");var o=v.max_file_count.remaining;if(!o||a.files.length>o){var l="Maximum 1 file is allowed!";return l=g>1?"Maximum "+g+" files are allowed!":l,v.max_file_count&&v.max_file_count.message&&(l=v.max_file_count.message),b(l),!1}}var s=c(a.files[0],n.rules[p.prop("name")]);return s.length?(b(s.join(", ")),!1):(p.closest("div").find(".error").html(""),!0)}}function S(){return n.file_upload_settings&&n.file_upload_settings[y]?function(e){if(!e)return null;var t=e.mode||e.crop_mode||("yes"===e.enforce_image_dimensions?"dimensions":"ratio"),n=Number(void 0!==e.width?e.width:e.crop_width)||0,r=Number(void 0!==e.height?e.height:e.crop_height)||0;return{enabled:void 0!==e.enabled?e.enabled:"yes"===e.enable_crop,mode:t,crop_ratio:e.crop_ratio||"free",enforce_size:void 0!==e.enforce_size?e.enforce_size:"dimensions"===t,width:n,height:r,button_ui:e.button_ui||e.upload_bttn_ui||""}}(n.file_upload_settings[y]):null}function x(e){if(!e)return NaN;if(e.enforce_size&&Number(e.width)>0&&Number(e.height)>0)return Number(e.width)/Number(e.height);if(!e.crop_ratio||"free"===e.crop_ratio)return NaN;var t=e.crop_ratio.split(":");if(2!==t.length)return NaN;var n=Number(t[0]),r=Number(t[1]);return n&&r?n/r:NaN}function T(e,t){return t&&t.enabled&&e.type.match("image")?new Promise(function(i,a){var o=window.Cropper,l=window.lity;if(o&&l){var s="ff-cropper-modal-".concat(n.id,"-").concat(Date.now()),c=document.createElement("div");c.id=s,c.className="lity-hide ff-cropper-lightbox",c.innerHTML=Le('\n                        <div class="ff-cropper-lightbox__dialog" role="dialog" aria-modal="true">\n                            <div class="ff-cropper-lightbox__header">\n                                <h3 class="ff-cropper-lightbox__title">'.concat(r.crop_image_title||"Crop Image",'</h3>\n                                <button type="button" class="lity-close ff-cropper-lightbox__close" data-lity-close aria-label="').concat(r.crop_close_txt||"Close",'">×</button>\n                            </div>\n                            <div class="ff-cropper-lightbox__body">\n                                <div class="ff-cropper-lightbox__canvas">\n                                    <img alt="">\n                                </div>\n                                <div class="ff-cropper-lightbox__hint"></div>\n                                <div class="ff-cropper-lightbox__error" aria-live="polite"></div>\n                            </div>\n                            <div class="ff-cropper-lightbox__footer">\n                                <button type="button" class="ff-cropper-lightbox__btn" data-action="reset">').concat(r.crop_reset_txt||"Reset",'</button>\n                                <button type="button" class="ff-cropper-lightbox__btn" data-action="cancel">').concat(r.crop_cancel_txt||"Cancel",'</button>\n                                <button type="button" class="ff-cropper-lightbox__btn ff-cropper-lightbox__btn--primary" data-action="confirm">').concat(r.crop_confirm_txt||"Crop & Upload","</button>\n                            </div>\n                        </div>\n                    ")),document.body.appendChild(c);var f=c.querySelector("img");f.alt=e.name;var u,d=c.querySelector(".ff-cropper-lightbox__error"),p=c.querySelector(".ff-cropper-lightbox__hint"),m=Number(t.width)||0,h=Number(t.height)||0,v=!(u=t)||u.enforce_size||u.crop_ratio&&"free"!==u.crop_ratio?[]:[{value:"free",label:r.crop_ratio_free_txt||"Free"},{value:"1:1",label:"1:1"},{value:"4:3",label:"4:3"},{value:"16:9",label:"16:9"},{value:"3:4",label:"3:4"}],g=x(t),y=URL.createObjectURL(e),_=l("#".concat(s),{esc:!0,template:'<div class="lity ff-cropper-lity" role="dialog" aria-label="Dialog Window" tabindex="-1"><div class="lity-wrap" role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div></div></div></div>'}),b=null,w=t.crop_ratio||"free",S=null,T=!1,k=function(e,t,n){return Boolean(e&&e.enforce_size&&Number(t)>0&&Number(n)>0)}(t,m,h);if(m&&h&&t.enforce_size){var A=r.crop_dimension_instruction_txt||"Crop the image to exactly %1$s px x %2$s px.";p.textContent=A.replace("%1$s",m).replace("%2$s",h)}if(v.length){var C=document.createElement("div");C.className="ff-cropper-lightbox__toolbar",C.innerHTML=Le('\n                            <sp
2an class="ff-cropper-lightbox__toolbar-label">'.concat(r.crop_ratio_txt||"Crop ratio",'</span>\n                            <div class="ff-cropper-lightbox__ratio-list">\n                                ').concat(v.map(function(e){return'\n                                    <button\n                                        type="button"\n                                        class="ff-cropper-lightbox__ratio-btn'.concat(e.value===w?" is-active":"",'"\n                                        data-ratio-value="').concat(e.value,'"\n                                    >').concat(e.label,"</button>\n                                ")}).join(""),"\n                            </div>\n                        ")),c.querySelector(".ff-cropper-lightbox__body").insertBefore(C,c.querySelector(".ff-cropper-lightbox__canvas"))}_.element().one("lity:remove",function(){T||(T=!0,b&&(b.destroy(),b=null),URL.revokeObjectURL(y),c.remove()),S&&"reject"===S.type?a(S.error):i(S?S.value:null)}),c.querySelectorAll(".ff-cropper-lightbox__ratio-btn").forEach(function(e){e.addEventListener("click",function(){if(w=e.getAttribute("data-ratio-value")||"free",c.querySelectorAll(".ff-cropper-lightbox__ratio-btn").forEach(function(e){e.classList.toggle("is-active",e.getAttribute("data-ratio-value")===w)}),b){var t="free"===w?NaN:x({crop_ratio:w,enforce_size:!1,width:0,height:0});b.setAspectRatio(t)}})}),c.querySelector('[data-action="cancel"]').addEventListener("click",function(){E({type:"resolve",value:null})}),c.querySelector('[data-action="reset"]').addEventListener("click",function(){d.textContent="",b&&(b.reset(),k&&window.setTimeout(function(){N()},0))}),c.querySelector('[data-action="confirm"]').addEventListener("click",function(){if(d.textContent="",b){var n=b.getImageData(),i=b.getData(!0);if(t.enforce_size&&m&&h&&(n.naturalWidth<m||n.naturalHeight<h||i.width<m||i.height<h))d.textContent=r.crop_invalid_dimensions_txt||"The selected image is smaller than the required crop size.";else{var a={fillColor:"#fff",imageSmoothingEnabled:!0,imageSmoothingQuality:"high"};t.enforce_size&&m&&h&&(a.width=m,a.height=h);var o=b.getCroppedCanvas(a);if(o)if(t.enforce_size&&m&&h&&(o.width!==m||o.height!==h))d.textContent=r.crop_exact_dimensions_txt||"The cropped image must match the required width and height.";else{var l=["image/jpeg","image/png","image/webp"].includes(e.type)?e.type:"image/png";o.toBlob(function(t){t?E({type:"resolve",value:new File([t],e.name,{type:l,lastModified:Date.now()})}):E({type:"reject",error:new Error(r.crop_invalid_image_txt||"Could not crop image")})},l,.92)}else E({type:"reject",error:new Error(r.crop_invalid_image_txt||"Could not crop image")})}}else d.textContent=r.crop_loading_txt||"Preparing image..."}),f.onload=function(){b=new o(f,{aspectRatio:g,autoCropArea:1,viewMode:1,dragMode:"move",responsive:!0,restore:!1,background:!1,movable:!0,zoomable:!k,zoomOnTouch:!k,zoomOnWheel:!k,scalable:!1,rotatable:!1,cropBoxResizable:!k,cropBoxMovable:!k,ready:function(){N()}})},f.src=y}else a(new Error(r.crop_invalid_image_txt||"Unable to process the selected image."));function E(e){S||(S=e,_.close())}function N(){if(b&&k){var e=b.getImageData();if(!(!e||e.naturalWidth<m||e.naturalHeight<h)){var t=(e.naturalWidth-m)/2,n=(e.naturalHeight-h)/2;b.setData({x:t,y:n,width:m,height:h})}}}}):Promise.resolve(e)}"allowed_file_types"in v?(_=v.allowed_file_types.value.join("|"),p.prop("accept","."+_.replace(/\|/g,",."))):(_=v.allowed_image_types.value.join("|"))?p.prop("accept","."+_.replace(/\|/g,",.")):p.prop("accept","image/*");var k=e(f);p.fileupload({dataType:"json",dropZone:p.closest(".ff-el-group"),url:r.ajaxUrl,formData:function(e){var t=e.serializeArray();return t.push({name:"action",value:"fluentform_file_upload"}),t.push({name:"formId",value:n.id}),t},change:w,add:function(t,i){w(0,i)&&T(i.files[0],S()).then(function(t){if(t){var a=c(t,n.rules[p.prop("name")]);if(a.length)b(a.join(", "));else{i.files[0]=t;var o=e("<div/>",{class:"ff-upload-preview"+(d?" ff-upload-container-small-column-image":"")});i.context=o;var f=e("<div/>",{class:"ff-upload-thumb"}
2),m=e("<div/>",{class:"ff-upload-details"}),v=e("<div/>",{class:"ff-upload-preview-img",style:"background-image: url('".concat(l(i.files[0]),"');")}),g=e("<div>",{class:"ff-upload-error",style:"color:red;"}),y=e("<span/>",{html:r.upload_start_txt,class:"ff-upload-progress-inline-text ff-inline-block"}),_=e('\n\t\t\t\t\t\t\t\t\t<div class="ff-upload-progress-inline ff-el-progress">\n\t\t\t\t\t\t\t\t\t\t<div class="ff-el-progress-bar"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t'),w=e("<div/>",{class:"ff-upload-filename",text:i.files[0].name}),S=e("<span/>",{"data-href":"#","data-attachment-id":"",html:"&times;",class:"ff-upload-remove"}),x=e("<div>",{class:"ff-upload-filesize ff-inline-block",html:s(i.files[0].size)});f.append(v),m.append(w,_,y,x,g,S),o.append(f,m),u.append(o),d||(h-=91),w.css({maxWidth:h+"px"}),i.submit(),i.context.addClass("ff_uploading")}}}).catch(function(e){b(e.message||r.crop_invalid_image_txt||"Unable to crop image")})},progress:function(e,t){var n=parseInt(t.loaded/t.total*100,10);t.context.find(".ff-el-progress-bar").css("width",n+"%"),t.context.find(".ff-upload-progress-inline-text").text(r.uploading_txt)},done:function(e,n){if(n.context.removeClass("ff_uploading"),n.result&&"data"in n.result&&"files"in n.result.data)"error"in n.result.data.files[0]?(b("Upload Error: "+n.result.data.files[0].error),n.context.remove()):(n.context.find(".ff-upload-progress-inline-text").text(r.upload_completed_txt),v.max_file_count.remaining-=1,n.context.attr("data-src",n.result.data.files[0].url),n.context.find(".ff-upload-remove").attr({"data-href":n.result.data.files[0].file,"data-attachment-id":n.result.data.files[0].attachment_id}),n.context.addClass("ff_uploading_complete"),t.find("input[name="+k.data("name")+"]").trigger("change"));else{var i=a("upload_failed_text","Sorry! The upload failed for some unknown reason.");if(n.messages){var o=Object.keys(n.messages);o.length&&(i=n.messages[o[0]])}b(i),n.context.remove()}},fail:function(t,n){var r,i,o,l,s=[];null===(r=n.context)||void 0===r||r.remove(),null!==(i=n.jqXHR)&&void 0!==i&&i.responseJSON&&null!==(o=n.jqXHR)&&void 0!==o&&o.responseJSON.errors?e.each(n.jqXHR.responseJSON.errors,function(t,n){"object"==Me(n)?e.each(n,function(e,t){s.push(t)}):s.push(n)}):null!==(l=n.jqXHR)&&void 0!==l&&l.responseText?s.push(n.jqXHR.responseText):s.push(a("upload_error_text","Something is wrong when uploading the file! Please try again")),b(s.join(", "))}}),k.on("change_remaining",function(e,t){v.max_file_count.remaining+=t})}),t.find(".ff_upload_btn").on("keyup click",function(t){t.preventDefault(),t.stopPropagation(),("click"===t.type||"keyup"===t.type&&32===t.keyCode)&&e(this).siblings("input[type=file]").trigger("click")}))},l=function(e){if(e.type.match("image"))return URL.createObjectURL(e);var t=document.createElement("canvas");t.width=60,t.height=60,t.style.zIndex=8,t.style.position="absolute",t.style.border="1px solid";var n=t.getContext("2d");return n.fillStyle="rgba(0, 0, 0, 0.2)",n.fillRect(0,0,60,60),n.font="13px Arial",n.fillStyle="white",n.textAlign="center",n.fillText(e.name.substr(e.name.lastIndexOf(".")+1),30,30,60),t.toDataURL()},s=function(e){return e<1024?e+"bytes":e>=1024&&e<=1048576?(e/1024).toFixed(1)+"KB":e>1048576?(e/1048576).toFixed(1)+"MB":void 0},c=function(e,t){var n=[],r="",i="";if("allowed_file_types"in t?(r=t.allowed_file_types.value,i=t.allowed_file_types.message):"allowed_image_types"in t&&(r=t.allowed_image_types.value,i=t.allowed_image_types.message),r){var a=new RegExp("("+r.join("|")+")","i"),o=e.name.split(".").pop();o=o.toLowerCase(),a.test(o)||n.push(i)}return"max_file_size"in t&&t.max_file_size.value>0&&e.size>t.max_file_size.value&&n.push(t.max_file_size.message),n};o(),t.find(".ff-uploaded-list").on("click",".ff-upload-remove",function(t){t.preventDefault();var n=e(this),i=n.closest(".ff-uploaded-list"),a=i.closest(".ff-el-input--content").find("input[type=file]"),o=n.attr("data-href"),l=n.attr("data-attachment-id");"#"==o?(n.closest(".ff-el-input--content").find(".error").remove(),n.closest(".ff-upload-preview").remove(),i.find(".ff-upload-preview").length||i.siblings(".ff-upload-progress").addClass("ff-hidden"),a.trigger("change_remaining",1)):e.post(r.ajaxUrl,{path:o,attachment_id:l,action:"fluentform_delete_uploaded_file",_fluentform_file_delete_nonce:r.file_delete_nonce}).then(function(e){n.closest(".ff-el-input--content").find("input"),a.trigger("change_remaining",1),n.closest(".ff-el-input--content").find(".error").remove(),n.closest(".ff-upload-preview").remove(),i.find(".ff-upload-preview").length||i.siblings(".ff-upload-progress").addClass("ff-hidden"),a.trigger("change")})}),e(document.body).on("fluentform_reset",function(){o()})}function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==He(t)?t:t+""}ze.addHook("uponSanitizeAttribute",function(e,t){var n,r;"target"===t.attrName&&Pe(e)&&(n=t.attrValue,r=String(n||"").trim(),(De.includes(r.toLowerCase())||Ie.test(r))&&(t.forceKeepAttr=!0))}),ze.addHook("afterSanitizeAttributes",function(e){if(Pe(e)&&"function"==typeof e.getAttribute&&"function"==typeof e.setAttribute){var t=e.getAttribute("target");if(t&&!je.includes(t.trim().toLowerCase())){var n=(e.getAttribute("rel")||"").split(/\s+/).filter(function(e){return Re.test(e)});$e.forEach(function(e){n.includes(e)||n.push(e)}),e.setAttribute("rel",n.join(" "))}}});var We=function(){return e=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$=t,this.$theForm=n,this.fluentFormVars=r,this.formSelector=i,this.activeStep=0,this.isRtl=!!window.fluentFormVars.is_rtl,this.isPopulatingStepData=!1,this.isInitialLoad=!0,this.fluentFormVars.stepAnimationDuration=parseInt(this.fluentFormVars.stepAnimationDuration),this.stepPersistency="yes"===this.$theForm.find(".ff-step-container").attr("data-enable_step_data_persistency"),this.stepResume=!1,this.stepPersistency&&(this.stepResume="yes"===this.$theForm.find(".ff-step-container").attr("data-enable_step_page_resume"))},t=[{key:"getPublicAPI",value:function(){return{init:this.init.bind(this),updateSlider:this.updateSlider.bind(this),populateFormDataAndSetActiveStep:this.populateFormDataAndSetActiveStep.bind(this)}}},{key:"init",value:function(){this.initFormWithSavedState(),this.removePrevFromFirstStep(),this.initStepSlider(),this.maybeAutoSlider()}},{key:"removePrevFromFirstStep",value:function(){this.$theForm.find(".fluentform-step:first").find('.step-nav [data-action="prev"]').remove()}},{key:"getFormInstance",value:function(){return window.fluentFormApp(this.$theForm)}},{key:"syncStepTitleState",value:function(e,t){var n=this.$;e&&e.length&&(e.removeClass("ff_active ff_completed").removeAttr("aria-current"),n.each(e,function(e,r){var i=n(r);e<t?i.addClass("ff_completed"):e===t&&i.addClass("ff_active").attr("aria-current","step")}))}},{key:"enhanceClickableStepTitles",value:function(e){var t=this.$;t.each(e,function(e,n){t(n).attr("data-step-number",e),t(n).attr({role:"button",tabindex:"0","aria-label":"Go to step "+(e+1)})})}},{key:"syncTopTabOverflowState",value:function(){var e=this.$;this.$theForm.find(".ff-step-header--tabs-top .ff-step-titles").each(function(){var t=e(this),n=this.scrollWidth>this.clientWidth+1;t.toggleClass("ff-step-titles--overflowing",n)})}},{key:"isTabsIndicator",value:function(e){return"tabs"===e||"steps_with_nav"===e}},{key:"isClickableIndicator",value:function(e){return this.isTabsIndicator(e)||"steps"===e}},{key:"initFormWithSavedState",value:function(){var e=this;if(this.stepPersistency){var t=this.$,n=this;t(document).ready(function(r){var i,a;t.getJSON(e.fluentFormVars.ajaxUrl,{form_id:e.$theForm.data("form_id"),action:"fluentform_step_form_get_data",nonce:null===(i=e.fluentFormVars)||void 0===i?void 0:i.nonce,hash:null===(a=e.fluentFormVars)||void 0===a?void 0:a.hash}).then(function(e){e&&n.populateFormDataAndSetActiveStep(e)})})}}},{key:"populateFormDataAndSetActiveStep",value:function(e){var t=this,n=e.response,r=e.step_completed,i=this.$,a=[];if(this.$theForm.data("ff_restoring_draft_state",!0),this.$theForm.data("ff_restored_draft_state",!0),i.each(n,function(e,n){if(n){var r=Object.prototype.toString.call(n);if("[object Object]"===r){var o=t.$theForm.find("[data-name=".concat(e,"]"));if(o.length&&"tabular-element"===o.attr("data-type"))jQuery.each(n,function(n,r){var a=t.$theForm.find('[name="'.concat(e,"[").concat(n,']\\[\\]"]'));a.length||(a=t.$theForm.find('[name="'.concat(e,"[").concat(n,']"]'))),i.each(a,function(e,t){var n=i(t).val();-1===i.inArray(n,r)&&n!==r||i(t).prop("checked",!0).change()})});else if("chained-select"===o.attr("data-type")){var l={meta_key:o.find("select:first").attr("data-meta_key"),form_id:o.closest("form").attr("data-form_id"),action:"fluentform_get_chained_select_options",filter_options:"all",keys:n};i.getJSON(t.fluentFormVars.ajaxUrl,l).then(function(e){i.each(e,function(e,t){var r=o.find("select[data-key='".concat(e,"']"));0!=r.attr("data-index")&&i.each(t,function(e,t){r.append(i("<option />",{value:t,text:t}))}),r.attr("disabled",!1).val(n[e])})})}else i.each(n,function(n,r){t.$theForm.find('[name="'.concat(e,"[").concat(n,']"]')).val(r).change()})}else if("[object Array]"===r){var s=t.$theForm.find("[name=".concat(e,"]"));if("file"===(s=(s=s.length?s:t.$theForm.find("[data-name=".concat(e,"]"))).length?s:t.$theForm.find("[name=".concat(e,"\\[\\]]"))).attr("type"))t.addFilesToElement(s,n);else if(s.prop("multiple"))if(i.isFunction(window.Choices)){var c=s.data("choicesjs");c&&a.push({handler:c,values:n})}else s.val(n).change();else if("repeater_field"===s.attr("data-type")){var f=s.find("tbody"),u=s.attr("data-name");i.each(n,function(e,t){0!=e?f.find("tr:last").clone().appendTo(f).find(".ff-el-form-control").each(function(n,r){var a="ffrpt-"+(new Date).getTime()+n;i(r).val(t[n]),i(r).attr({id:a,name:"".concat(u,"[").concat(e,"][]"),value:t[n]}).change()}):f.find("tr:first .ff-el-form-control").each(function(e,n){i(n).val(t[e]).change()})})}else"repeater_container"===s.attr("data-type")?(i.each(n,function(e,t){if(0!==e){var n=s.find(".ff_repeater_cont_row:first").clone();n.find(".ff_repeater_cell").each(function(n,r){var a=i(this).find(".ff-el-form-control:last-child"),o="ffrpt-"+(new Date).getTime()+"_"+e+"_"+n,l={value:t[n]||"",id:o};a.prop(l),i(this).find("label").attr("for",o)}),n.insertAfter(s.find(".ff_repeater_cont_row:last"))}else s.find(".ff_repeater_cont_row:first .ff-el-form-control").each(function(e,n){i(n).val(t[e]).change()})}),t.$theForm.trigger("repeater-container-names-update",[s]),s.trigger("repeat_change")):s.each(function(e,t){-1!==i.inArray(i(t).val(),n)&&i(t).prop("checked",!0).change()})}else{var d=t.$theForm.find("[name=".concat(e,"]"));if(d.hasClass("fluentform-post-content")&&window.wp&&window.wp.editor){var p=d.attr("id");window.tinymce.get(p).setContent(n)}if("undefined"!=typeof flatpickr&&d.prop("_flatpickr")){var m=d.prop("_flatpickr");m&&(m.config.altInput?m.setDate(n,!0):d.val(n).trigger("change"))}if("radio"===d.prop("type")||"checkbox"===d.prop("type"))t.$theForm.find("[name=".concat(e,'][value="').concat(n,'"]')).prop("checked",!0).change(),d.closest(".ff-el-group").find(".ff-el-ratings").length&&t.$theForm.find("[name=".concat(e,'][value="').concat(n,'"]')).closest("label").trigger("mouseenter");
2else{d.hasClass("ff_has_multi_select")&&d.data("choicesjs")&&(d.data("choicesjs").removeActiveItems(n),d.data("choicesjs").setChoiceByValue(n));var h=d.closest(".ff-el-group").find(".fluentform-signature-pad");if(h.length){var v=h[0].getContext("2d"),g=new Image;g.src=n,g.onload=function(){v.drawImage(g,0,0)}}d.val(n).change()}}}}),a.length>0)for(var o=0;o<a.length;o++){var l,s=a[o].handler,c=a[o].values;s.removeActiveItems(c),s.setChoiceByValue(c);var f=null===(l=s.passedElement)||void 0===l?void 0:l.element;f&&i(f).trigger("change")}this.$theForm.data("ff_restoring_draft_state",!1),this.isPopulatingStepData=!0;var u=this.fluentFormVars.stepAnimationDuration;this.stepResume&&this.updateSlider(r,u,!0).then(function(){t.handleFocus(u)}).catch(function(e){console.error("An error occurred during the slider update:",e)}),this.isPopulatingStepData=!1}},{key:"initStepSlider",value:function(){var e=this.$,t=this.$theForm.find(".fluentform-step"),n=t.length,r=this.$theForm.find(".ff-step-titles li"),i=this.$theForm.find(".ff-step-container").first().data("progress_indicator"),a=this.isClickableIndicator(i)&&this.$theForm.find(".ff-step-titles").first().hasClass("ff-step-titles--clickable");if(!window.ff_disable_auto_step){for(var o=this.activeStep,l=0;o<n&&this.isStepAllFieldsHidden(e(t[o]))&&l<n;)o++,l++;o!==this.activeStep&&o<n&&(this.activeStep=o)}t.css("display","none"),e(t[this.activeStep]).css("display","block"),t.attr("role","group"),t.attr("aria-hidden","true"),e(t[this.activeStep]).attr("aria-hidden","false"),e(t[this.activeStep]).addClass("active"),this.syncStepTitleState(r,this.activeStep);var s=t.first();s.hasClass("active")&&s.find('button[data-action="next"]').css("visibility","visible"),t.length&&!t.last().hasClass("active")&&this.$theForm.find('button[type="submit"]').css("visibility","hidden"),this.stepProgressBarHandle({activeStep:this.activeStep,totalSteps:n}),this.registerStepNavigators(this.fluentFormVars.stepAnimationDuration),a&&this.registerClickableStepNav(r,t),this.isTabsIndicator(i)?(this.syncTopTabOverflowState(),e(window).off("resize.ff_step_tabs_"+this.$theForm.data("form_id")).on("resize.ff_step_tabs_"+this.$theForm.data("form_id"),this.syncTopTabOverflowState.bind(this))):e(window).off("resize.ff_step_tabs_"+this.$theForm.data("form_id"))}},{key:"registerClickableStepNav",value:function(e,t){var n=this.$,r=this;0!==e.length&&(this.enhanceClickableStepTitles(e),e.on("click keydown",function(e){if("keydown"!==e.type||"Enter"===e.key||" "===e.key||13===e.keyCode||32===e.keyCode){"keydown"===e.type&&e.preventDefault();var i=r.getFormInstance(),a=n(this),o=r.fluentFormVars.stepAnimationDuration,l=t.index(r.$theForm.find(".fluentform-step.active"));try{var s=parseInt(a.data("step-number"),10);if(isNaN(s))return;if(s===l)return;s>l&&n.each(t,function(e,t){if(e<s){var r=n(t).find(":input").not(":button").filter(function(e,t){return!n(t).closest(".has-conditions").hasClass("ff_excluded")});r.length&&i.validate(r)}}),r.updateSlider(s,o,!0).then(function(){r.handleFocus(o)}).catch(function(e){console.error("An error occurred during the slider update:",e)})}catch(e){if(!(e instanceof window.ffValidationError))throw e;r.updateSlider(l,o,!0).then(function(){r.handleFocus(o)}).catch(function(e){console.error("An error occurred during the slider update:",e)}),i.showErrorMessages(e.messages),i.scrollToFirstError(350)}}}))}},{key:"stepProgressBarHandle",value:function(e){var t=this.$;if(this.$theForm.find(".ff-el-progress").length){var n=e.totalSteps,r=e.activeStep,i=100/n*(r+1),a=this.$theForm.find(".ff-el-progress-title li"),o=this.$theForm.find(".ff-step-header .ff-el-progress-bar"),l=o.find("span"),s=this.$theForm.find(".ff-step-container").first(),c=this.isTabsIndicator(s.data("progress_indicator"));o.css({transition:"width 0.3s ease-in-out",width:i+"%"}),i?o.append(l.text(parseInt(i)+"%")):l.empty();var f=this.fluentFormVars.step_text,u=t(a[r]).text();f=c?parseInt(i)+"% "+this.fluentFormVars.step_completed_text:f.replace("%activeStep%",r+1).replace("%totalStep%",n).replace("%stepTitle%",u),this.$theForm.find(".ff-el-progress-status").text(f).attr("aria-live","polite"),a.css("display","none"),t(a[r]).css("display","inline")}}},{key:"isStepAllFieldsHidden",value:function(e){return this.$,e.find(".ff-el-group").not(".ff-custom_html").length,!1}},{key:"animateProgressToStep",value:function(e,t,n){this.$;var r=this.$theForm.find(".ff-step-header .ff-el-progress-bar");if(!r.length||!t)return Promise.resolve();var i=100/t*(e+1);return n&&n>0?r.css({transition:"width ".concat(n,"ms ease-in-out")}):r.css({transition:"none"}),r[0]&&r[0].offsetHeight,r.css("width",i+"%"),new Promise(function(e){var t=!1,i=setTimeout(function(){t||(t=!0,e())},(n||0)+120);r.one("transitionend webkitTransitionEnd oTransitionEnd",function(){t||(t=!0,clearTimeout(i),e())})})}},{key:"registerStepNavigators",value:function(e){var t=this.$,n=this;this.handleFocus(e),t(this.formSelector).on("click",".fluentform-step .step-nav button, .fluentform-step .step-nav img",function(r){var i=t(this).data("action"),a="next",o=t(this).closest(".fluentform-step"),l=n.getFormInstance();if("next"===i){try{var s=o.find(":input").not(":button").filter(function(e,n){return!t(n).closest(".has-conditions").hasClass("ff_excluded")});s.length&&l.validate(s),n.activeStep++}catch(r){if(!(r instanceof window.ffValidationError))throw r;return l.showErrorMessages(r.messages),void l.scrollToFirstError(350)}n.$theForm.trigger("ff_to_next_page",n.activeStep),t(document).trigger("ff_to_next_page",{step:n.activeStep,form:n.$theForm});var c=n.$theForm.find(".fluentform-step");
2n.$theForm.trigger("ff_render_dynamic_smartcodes",t(c[n.activeStep]))}else n.activeStep--,a="prev",n.$theForm.trigger("ff_to_prev_page",n.activeStep),t(document).trigger("ff_to_prev_page",{step:n.activeStep,form:n.$theForm});var f="yes"!=n.$theForm.find(".ff-step-container").attr("data-disable_auto_focus");n.updateSlider(n.activeStep,e,f,a).then(function(){n.handleFocus(e)}).catch(function(e){console.error("An error occurred during the slider update:",e)})})}},{key:"updateSlider",value:function(e,t){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next",a=this.$,o=this;return new Promise(function(l){a("div"+n.formSelector+"_errors").empty(),n.activeStep=e;var s=n.$theForm.find(".ff-step-titles li"),c=n.$theForm.find(".fluentform-step"),f=c.length;if(!window.ff_disable_auto_step&&f){var u=o.$theForm.find(".fluentform-step").index(o.$theForm.find(".fluentform-step.active"));if("prev"===i||u>-1&&n.activeStep<u)for(;n.activeStep>0&&n.isStepAllFieldsHidden(a(c[n.activeStep]));)n.activeStep--;else for(;n.activeStep<f-1&&n.isStepAllFieldsHidden(a(c[n.activeStep]));)n.activeStep++}c.css("display","none").removeClass("active").attr("aria-hidden","true"),a(c[n.activeStep]).css("display","block").addClass("active").attr("aria-hidden","false"),n.syncStepTitleState(s,n.activeStep);var d=a(c[n.activeStep]).closest(".ff-step-container").data("animation_type"),p=a(c[n.activeStep]).closest(".ff-step-container"),m=a(c[n.activeStep]).closest(".ff-step-body"),h=n.isTabsIndicator(p.data("progress_indicator"));h&&m.css("overflow","hidden");var v=a(c[n.activeStep]);v.find(".step-nav button, .step-nav img").css("visibility","hidden");var g,y=f;g="none"===d?0===t?0:t<50?50:t<200?t:window.ffTransitionTimeOut||500:t;var _,b=n.animateProgressToStep(n.activeStep,y,g);switch(d){case"slide":v.css({display:"block",position:"relative",left:n.isRtl?"-100%":"100%",opacity:0,transition:"all ".concat(t,"ms cubic-bezier(0.25, 0.1, 0.25, 1.0)")}),v[0].offsetHeight,v.css({left:"0%",opacity:1}),_=new Promise(function(e){return setTimeout(function(){v.css({position:"",left:"",transition:""}),e()},t+50)});break;case"fade":v.css({display:"block",opacity:0,transition:"opacity ".concat(t,"ms ease-in-out")}),v[0].offsetHeight,v.css("opacity",1),_=new Promise(function(e){return setTimeout(function(){v.css("transition",""),e()},t+50)});break;case"slide_down":v.css({display:"block",opacity:0,maxHeight:"0",overflow:"hidden",transition:"all ".concat(t,"ms cubic-bezier(0.25, 0.1, 0.25, 1.0)")}),v[0].offsetHeight;var w=v[0].scrollHeight;v.css({maxHeight:w+"px",opacity:1}),_=new Promise(function(e){return setTimeout(function(){v.css({maxHeight:"",overflow:"",transition:""}),e()},t+50)});break;default:var S,x=window.ffTransitionTimeOut||500;S=t<50&&t>0?50:t<x?t:x,_=new Promise(function(e){return setTimeout(e,S)})}Promise.all([_,b]).then(function(){r&&function(){if(!window.ff_disable_step_scroll){var e,t,n,r,i,l,s=o.$theForm.find(".ff_step_start");e=window.ff_scroll_top_offset?window.ff_scroll_top_offset:s.offset().top-100,r=(n=(t=s).offset().top)+t.outerHeight(),l=(i=a(window).scrollTop())+a(window).height(),r>i&&n<l&&!window.ff_force_scroll||a("html, body").animate({scrollTop:e},500,"swing")}}(),function(){h&&m.css("overflow","");var t=0===e&&!r,n=o.$theForm.hasClass("ff_submitting");!o.stepPersistency||o.isPopulatingStepData||t||n||o.saveStepData(o.$theForm,o.activeStep).then(function(e){}),o.stepProgressBarHandle({activeStep:o.activeStep,totalSteps:f});var s=o.$theForm.find('button[type="submit"]').not(".ff-btn-save-progress"),u=-1;if(s.length){var d=s[0];c.each(function(e){if(this.contains(d))return u=e,!1})}var p=c.index(o.$theForm.find(".fluentform-step.active")),v=u>=0&&p>=u;if(!v&&h){var g=o.$theForm.find(".ff-step-titles--clickable li").length;g>0&&p>=g-1&&(v=!0)}if(s.css("visibility",v?"visible":"hidden"),!window.ff_disable_auto_step){o.$theForm.find(".fluentform-step.active");var y=o.$theForm.find(".fluentform-step.active > .step-nav").length,_=o.$theForm.find(".fluentform-step.active > div").length-y,b=o.$theForm.find(".fluentform-step.active > .ff_excluded").length;if(o.$theForm.find(".fluentform-step.active > .ff-t-container").length&&(_-=o.$theForm.find(".fluentform-step.active > .ff-t-container").length,_+=o.$theForm.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > div").length,b+=o.$theForm.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > .ff_excluded").length,o.$theForm.find(".fluentform-step.active > .ff-t-container.ff_excluded").length&&(b-=o.$theForm.find(".fluentform-step.active > .ff-t-container.ff_excluded").length,b-=o.$theForm.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > .ff_excluded").length,b+=o.$theForm.find(".fluentform-step.active > .ff-t-container.ff_excluded > .ff-t-cell > div").length)),_===b){var w="prev"===i?o.activeStep-1:o.activeStep+1;if(w>=0&&w<f){var S="none"===a(c[w]).closest(".ff-step-container").data("animation_type")?50:100;return void o.updateSlider(w,S,r,i).then(function(){l()}).catch(function(e){console.error("An error occurred during step skip:",e),l()})}}}o.$theForm.find(".fluentform-step.active").find('.step-nav button[data-action="next"]').css("visibility","visible"),o.$theForm.find(".fluentform-step.active").find('.step-nav button[data-action="prev"]').css("visibility","visible"),o.$theForm.find(".fluentform-step.active").find('.step-nav img[data-action="next"]').css("visibility","visible"),o.$theForm.find(".fluentform-step.active").find('.step-nav img[data-action="prev"]').css("visibility","visible"),l()}()})})}},{key:"handleFocus",value:function(e){var t=this.$,n=this,r=!1,i=function(r){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a="yes"!=n.$theForm.find(".ff-step-container").attr("data-disable_auto_focus");if(!n.isInitialLoad){var o;if(a){if(!window.ff_disable_step_scroll){var l=r.find("input, .ff-custom_html, select, textarea, button, a").filter(":visible");l.length&&i&&setTimeout(function(){l.first().focus()},e+50)}}else null!==(o=window.fluentFormVars)&&void 0!==o&&o.step_change_focus&&!window.ff_disable_step_scroll&&setTimeout(function(){t("".concat(n.formSelector," .fluentform-step.active")).attr("tabindex","-1").focus().removeAttr("tabindex")},e);n.isInitialLoad=!1}};n.$theForm.off("keydown.stepNavigation").on("keydown.stepNavigation",function(e){if(!r&&(" "===e.key||32===e.keyCode)){var i=t("".concat(n.formSelector," .fluentform-step.active .ff-btn-next")),a=t("".concat(n.formSelector," .fluentform-step.active .ff-btn-prev"));return document.activeElement===i[0]?(e.preventDefault(),void i.click()):document.activeElement===a[0]?(e.preventDefault(),void a.click()):void 0}}),this.$theForm.on("ff_to_next_page ff_to_prev_page",function(){r=!0,setTimeout(function(){r=!1,i(n.$theForm.find(".fluentform-step.active"),!0)},e+50)}),"yes"!==this.$theForm.find(".ff-step-container").attr("data-disable_auto_focus")&&0!==n.$theForm.find(".fluentform-step").index(n.$theForm.find(".fluentform-step.active"))&&!this.isInitialLoad&&i(t("".concat(this.formSelector," .fluentform-step.active")),!0),this.isInitialLoad=!1}}
2,{key:"saveStepData",value:function(e,t){var n,r=this.$,i=e.find(":input").filter(function(e,t){return!r(t).closest(".has-conditions").hasClass("ff_excluded")});i.filter(function(e,t){var n=r(t);return n.parents().hasClass("ff_repeater_table")&&"select"==n.attr("type")&&!n.val()}).prepend("<option selected disabled />");var a=i.serialize();r.each(e.find("[type=file]"),function(e,t){var n={},i=t.name+"[]";n[i]=[],r(t).closest("div").find(".ff-uploaded-list").find(".ff-upload-preview[data-src]").each(function(e,t){n[i][e]=r(this).data("src")}),r.each(n,function(e,t){if(t.length){var n={};n[e]=t,a+="&"+r.param(n)}})});var o={active_step:t,data:a,form_id:e.data("form_id"),action:"fluentform_step_form_save_data",nonce:null===(n=this.fluentFormVars)||void 0===n?void 0:n.nonce};return r.post(this.fluentFormVars.ajaxUrl,o)}},{key:"maybeAutoSlider",value:function(){var e=this.$;if("yes"==this.$theForm.find(".ff-step-container").attr("data-enable_auto_slider")){var t=function(e){if(1==e.closest(".fluentform-step.active").find(".ff-el-group:not(.ff_excluded):not(.ff-custom_html)").length)if(e.closest(".fluentform-step.active").find(".ff_excluded").length){var t=window.ffTransitionTimeOut||500;setTimeout(function(){e.closest(".fluentform-step.active").find(".ff-btn-next").trigger("click")},t)}else e.closest(".fluentform-step.active").find(".ff-btn-next").trigger("click")};this.$theForm.find(".ff-el-form-check-radio,.ff-el-net-label, .ff-el-ratings label").on("click",function(){t(e(this))}),this.$theForm.find("select").on("change",function(){t(e(this))})}}},{key:"addFilesToElement",value:function(e,t){var n=this.$,r=this,i=e.closest(".ff-el-input--content").find(".ff-uploaded-list");n.each(t,function(e,t){t="object"===He(t)?t:{url:t,data_src:t};var a=n("<div/>",{class:"ff-upload-preview","data-src":t.data_src,style:"border: 1px solid rgb(111, 117, 125)"}),o=n("<div/>",{class:"ff-upload-thumb"});o.append(n("<div/>",{class:"ff-upload-preview-img",style:"background-image: url('".concat(r.getThumbnail(t.url),"');")}));var l=n("<div/>",{class:"ff-upload-details"}),s=n("<span/>",{html:r.fluentFormVars.upload_completed_txt,class:"ff-upload-progress-inline-text ff-inline-block"}),c=t.url.substring(t.url.lastIndexOf("/")+1);c.includes("-ff-")&&(c=c.substring(c.lastIndexOf("-ff-")+4));var f=n("<div/>",{class:"ff-upload-filename",html:c}),u=n('\n            <div class="ff-upload-progress-inline ff-el-progress">\n                <div style="width: 100%;" class="ff-el-progress-bar"></div>\n            </div>\n        '),d=n("<span/>",{"data-href":"#",html:"&times;",class:"ff-upload-remove"}),p=n("<div>",{class:"ff-upload-filesize ff-inline-block",html:""}),m=n("<div>",{class:"ff-upload-error",style:"color:red;"});l.append(f,u,s,p,m,d),a.append(o,l),i.append(a)}),e.trigger("change_remaining",-t.length),e.trigger("change")}},{key:"getThumbnail",value:function(e){if(!e)return"";var t=e.split(/[#?]/)[0].split(".").pop().trim().toLowerCase();if(-1!=["jpg","jpeg","gif","png"].indexOf(t))return e;var n=document.createElement("canvas");n.width=60,n.height=60,n.style.zIndex=8,n.style.position="absolute",n.style.border="1px solid";var r=n.getContext("2d");return r.fillStyle="rgba(0, 0, 0, 0.2)",r.fillRect(0,0,60,60),r.font="13px Arial",r.fillStyle="white",r.textAlign="center",r.fillText(t,30,30,60),n.toDataURL()}}],t&&Ve(e.prototype,t),n&&Ve(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
2var Ye,Xe,Je=[{type:8,token:"round",show:"round",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t||0===t||(t=2),e=parseFloat(e).toFixed(t),parseFloat(e)}},{type:0,token:"ceil",show:"ceil",value:function(e){return Math.ceil(e)}},{type:0,token:"floor",show:"floor",value:function(e){return Math.floor(e)}},{type:0,token:"abs",show:"abs",value:function(e){return Math.abs(e)}},{type:8,token:"max",show:"max",value:function(e,t){return e>t?e:t}},{type:8,token:"min",show:"min",value:function(e,t){return e<t?e:t}}];function Ke(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach(function(t){qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({calculation_error:"Calculation error occurred",invalid_formula:"Invalid formula provided",division_by_zero:"Division by zero error"},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r=t.find(".ff_has_formula");if(r.length){var i={},a={};mexp.addToken(Je);var o=function(){jQuery.each(r,function(r,i){var a=jQuery(i),o=a.data("calculation_formula"),s=function(e,t){for(var n,r=[],i=RegExp(e,"g");n=i.exec(t);)delete n.input,r.push(n);return r}(/{(.*?)}/g,o),p={};jQuery.each(s,function(e,n){var r=n[0];jQuery.each(["{input.","{select.","{checkbox.","{radio.","{repeat.","{payment."],function(e,n){if(function(e,t){return-1!==e.indexOf(t)}(r,n)){var i=(s=r,m=new RegExp(n+"|}","g"),s.replace(m,"")),a=0;if("{select."===n)a=u(i);else if("{checkbox."===n)a=d(i);else if("{radio."===n)a=f(i);else if("{repeat."===n)a=c(i);else if("{payment."===n)a=function(e){var n=0,r=t.find(":input[data-name="+e+"]");if(r.length&&l(r)){var i=r[0].type;"radio"===i?n=f(e,!0):"hidden"===i?n=r.attr("data-payment_value"):"number"===i||"text"===i?n=window.ff_helper.numericVal(r):"checkbox"===i?n=d(e,!0):"select-one"===i&&(n=u(e,!0))}return n}(i);else{var o=t.find("input[name="+i+"]");l(o)&&(a=window.ff_helper.numericVal(o))}return p[r]=a,!1}var s,m})}),jQuery.each(p,function(e,t){t||(t=0),o=o.split(e).join(t)});var m="";try{o=o.replace(/\n/g,""),(m=mexp.eval(o))===1/0||m===-1/0?(console.log(n.division_by_zero,i),m=""):isNaN(m)&&(console.log(n.invalid_formula,i),m="")}catch(e){console.log(n.calculation_error+":",e,i),m=""}if("text"==a[0].type){var h=e(a),v=h.val(),g=window.ff_helper.formatCurrency(h,m);if(h.val(g).prop("defaultValue",g),""==v)return;v!=g&&h.trigger("change")}else a.text(m)})};t.find("input[type=number],input[data-calc_value],select[data-calc_value],.ff_numeric,.ff_payment_item").on("change keyup",o),o(),t.on("do_calculation",function(){o()}),jQuery(document).on("fluentform_reset",function(){r.val("").prop("defaultValue",""),setTimeout(function(){o()},100)})}function l(e){return!e.closest(".ff_excluded.has-conditions").length}function s(n){var r=0,i=t.find(n);return i.closest(".ff_excluded.has-conditions").length||e.each(i,function(t,n){var i=e(n).attr("data-calc_value");i&&!isNaN(i)&&(r+=Number(i))}),r}function c(n){var r=0,s=n.split("."),c=!1;s.length>1&&(n=s[0],c=s[1]);var f=t.find("table[data-root_name="+n+"]");if(i[n]||(i[n]=!0,f.on("repeat_change",function(){o()})),l(f))if(c){var u=f.find("tbody tr td:nth-child("+c+")");e.each(u,function(t,i){var l=e(i).find(":input"),s=n+"_"+c+"_"+l.attr("id");a[s]||(a[s]=!0,l.on("change",function(){o()}));var f=0;f="select"===l.attr("type")?parseFloat(l.find("option:selected").attr("data-calc_value")):parseFloat(l.val()),isNaN(f)||(r+=f)}),r&&(r=r.toFixed(2))}else r=f.find("tbody tr").length;return r}function f(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0,i=t.find("input[name="+e+"]:checked");return n?i.attr("data-payment_value"):(l(i)&&(r=i.attr("data-calc_value")||0),r)}function u(e){var n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?t.find("select[name="+e+"] option:selected").data("payment_value"):(n=s("select[data-name="+e+"] option:selected"),t.find("select[data-name="+e+"]").attr("data-calc_value",n),n)}function d(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return s("input[data-name="+e+"]:checked");var n=t.find(":input[data-name="+e+"]").data("group_id"),r=t.find('input[data-group_id="'+n+'"]:checked'),i=0;return r.each(function(e,t){var n=jQuery(t).data("payment_value");n&&(i+=parseFloat(n))}),i}}(Ye=jQuery)(document.body).on("fluentform_init",function(r,i,a){if(i.attr("data-form_instance"),a){a.form_id_selector;var o="."+a.form_instance;Ue(Ye,i,a,window.fluentFormVars,o),t(i),function(e,t){var n=t.find(".fluentform .js-repeat");e.each(n,function(t,n){var r=e(n);if(r.find(".ff-t-cell").length>1){var i=r.find(".ff-el-group").height()-r.find(".ff-el-group").find(".ff-el-input--content").height();r.find(".js-repeat-buttons").css("margin-top",i+"px")}var a=r.find(".ff-el-group").find(".ff-el-input--content .ff-el-form-control").outerHeight();r.find(".ff-el-repeat-buttons").height(a)})}(Ye,i),d(Ye,i,a,window.fluentFormVars);var l=function(e){var t="fluentform_calculation_messages_"+e;return window[t]?window[t]:{calculation_error:"Calculation error occurred",invali
2d_formula:"Invalid formula provided",division_by_zero:"Division by zero error"}}(a.id);if(Ke(Ye,i,l),n(Ye,i),e(Ye,i),i.hasClass("ff-form-has-steps")){var s=function(e,t,n,r){return new We(e,t,n,r).getPublicAPI()}(Ye,i,window.fluentFormVars,o);s.init(),i.on("update_slider",function(e,t){s.updateSlider(t.goBackToStep,t.animDuration,t.isScrollTop,t.actionType)})}i.hasClass("ff_has_dynamic_smartcode")&&(i.on("ff_render_dynamic_smartcodes",function(e,t){c(Ye(t))}),i.on("keyup change",":input",function(){c(i)}),c(i))}else console.log("No Fluent form JS vars found!");function c(e){jQuery.each(e.find(".ff_dynamic_value"),function(e,t){var n=Ye(t).data("ref");if("payment_summary"!=n){var r=i.find('.ff-el-form-control[name="'+n+'"]'),a=" ";r.length||(r=i.find('.ff-field_container[data-name="'+n+'"]').find("input")),r.length||((r=i.find('*[name="'+n+'"]:checked')).length||(r=i.find('*[name="'+n+'[]"]:checked'),a=", "),r.length||(r=i.find('*[name="'+n+'[]"]').find("option:selected"),a=", "));var o=[];if(!r.length){var l=i.find('.ff-el-repeater[data-name="'+n+'"] tbody tr');l.each(function(e){var t=Ye(this).find("input, select"),n=[];t.each(function(e){var t=Ye(this).val();if(t){var r=Ye(this).closest("td").data("label")||"Column-"+(e+1);n.push(r+": "+t)}}),n.length&&o.push("#"+(e+1)+"- "+n.join(" | "))}),l.length&&(a="<br/>")}Ye.each(r,function(){var e=Ye(this).val(),t=Ye(this).closest(".ff-el-group.has-conditions").hasClass("ff_excluded");e&&!t&&o.push(e)});var s,c="";c=o.length?o.join(a):Ye(t).data("fallback"),Ye(this).html(null==(s=c)?"":("string"!=typeof s&&(s=String(s)),(s=(s=s.replace(/<script[^]*?>[^]*?<\/script>/gi,"").replace(/<iframe[^]*?>[^]*?<\/iframe>/gi,"").replace(/<.*?\bon\w+=["'][^"']*["']/gi,"").replace(/javascript:/gi,"")).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/&lt;br\s*\/?&gt;/gi,"<br/>").replace(/\n/g,"<br/>")))}else i.trigger("calculate_payment_summary",{element:Ye(t)})})}}),(Xe=String.prototype).startsWith||(Xe.startsWith=function(e,t){return t=!t||t<0?0:+t,this.substring(t,t+e.length)===e}),Xe.endsWith||(Xe.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),Xe.includes||(Xe.includes=function(e,t){if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)})})();

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.