← Back
Editing: form-submission.js
/*! For license information please see form-submission.js.LICENSE.txt */ (()=>{"use strict";function e(e,t){this.v=e,this.k=t}function t(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 n(e,n){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,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e,n)||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.")}()}function r(t){var n,r;function o(n,r){try{var a=t[n](r),l=a.value,c=l instanceof e;Promise.resolve(c?l.v:l).then(function(e){if(c){var r="return"===n&&l.k?n:"next";if(!l.k||e.done)return o(r,e);e=t[r](e).value}i(!!a.done,e)},function(e){o("throw",e)})}catch(e){i(2,e)}}function i(e,t){2===e?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,a){var l={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=l:(n=r=l,o(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}r.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},r.prototype.next=function(e){return this._invoke("next",e)},r.prototype.throw=function(e){return this._invoke("throw",e)},r.prototype.return=function(e){return this._invoke("return",e)};const o=Object.entries,i=Object.setPrototypeOf,a=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor;let s=Object.freeze,f=Object.seal,u=Object.create,d="undefined"!=typeof Reflect&&Reflect,p=d.apply,m=d.construct;s||(s=function(e){return e}),f||(f=function(e){return e}),p||(p=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),m||(m=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 h=F(Array.prototype.forEach);Array.prototype.indexOf;const g=F(Array.prototype.lastIndexOf),v=F(Array.prototype.pop),y=F(Array.prototype.push),_=F(Array.prototype.slice),b=F(Array.prototype.splice),w=Array.isArray,S=U(Set),k=F(Set.prototype.add),A=F(Set.prototype.has),T=F(String.prototype.toLowerCase),x=F(String.prototype.toString),E=F(String.prototype.match),C=F(String.prototype.replace),O=F(String.prototype.indexOf),N=F(String.prototype.trim),D=F(Number.prototype.toString),I=F(Boolean.prototype.toString),R="undefined"==typeof BigInt?null:F(BigInt.prototype.toString),j="undefined"==typeof Symbol?null:F(Symbol.prototype.toString),z=F(Object.prototype.hasOwnProperty),P=F(Object.prototype.toString),L=F(RegExp.prototype.test),M=U(TypeError);function F(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return p(e,t,r)}}function U(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(e,n)}}function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;if(i&&i(e,null),!w(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(a(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Q(e){for(let t=0;t<e.length;t++)z(e,t)||(e[t]=null);return e}function B(e){const t=u(null);for(const i of o(e)){var r=n(i,2);const o=r[0],a=r[1];z(e,o)&&(w(a)?t[o]=Q(a):a&&"object"==typeof a&&a.constructor===Object?t[o]=B(a):t[o]=a)}return t}function W(e,t){for(;null!==e;){const n=c(e,t);if(n){if(n.get)return F(n.get);if("function"==typeof n.value)return F(n.value)}e=l(e)}return function(){return null}}const V=s(["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"]),Y=s(["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"]),q=s(["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"]),G=s(["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"]),Z=s(["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"]),J=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=s(["#text"]),X=s(["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","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),K=s(["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","pointer-events","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","vector-effect","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"]),ee=s(["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"]),te=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ne=f(/{{[\w\W]*|^[\w\W]*}}/g),re=f(/<%[\w\W]*|^[\w\W]*%>/g),oe=f(/\${[\w\W]*/g),ie=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),ae=f(/^aria-[\-\w]+$/),le=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ce=f(/^(?:\w+script|data):/i),se=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fe=f(/^html$/i),ue=f(/^[a-z][.\w]*(-[.\w]+)+$/i),de=f(/<[/\w!]/g),pe=f(/<[/\w]/g),me=f(/<\/no(script|embed|frames)/i),he=f(/\/>/i),ge=1,ve=3,ye=7,_e=8,be=9,we=11,Se=s(H({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),ke=function(){return"undefined"==typeof window?null:window},Ae=function(e,t,n,r){return z(e,t)&&w(e[t])?H(r.base?B(r.base):{},e[t],r.transform):n},Te=function(e,t,n){const r=z(e,t)?e[t]:void 0;return r&&"object"==typeof r?B(r):n()};var xe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ke();const n=t=>e(t);if(n.version="3.4.17",n.removed=[],!t||!t.document||t.document.nodeType!==be||!t.Element)return n.isSupported=!1,n;let r=t.document;const i=r,a=i.currentScript;t.DocumentFragment;const d=t.HTMLTemplateElement,p=t.Node,m=t.Element,U=t.NodeFilter;void 0===t.NamedNodeMap&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const Q=t.DOMParser,xe=t.trustedTypes,Ee=m.prototype,Ce=W(Ee,"cloneNode"),Oe=W(Ee,"remove"),Ne=W(Ee,"removeAttributeNode"),De=W(Ee,"nextSibling"),Ie=W(Ee,"childNodes"),Re=W(Ee,"parentNode"),je=W(Ee,"shadowRoot"),ze=W(Ee,"attributes"),Pe=p&&p.prototype?W(p.prototype,"nodeType"):null,Le=p&&p.prototype?W(p.prototype,"nodeName"):null,Me=p&&p.prototype?W(p.prototype,"ownerDocument"):null,Fe=function(e){return Pe?Pe(e):e.nodeType},Ue=function(e){return Le?Le(e):e.nodeName},He=function(e,t){for(;null!==e;){const n=c(e,t);if(n)return n.get?F(n.get):null;e=l(e)}return null}(Ee,"namespaceURI"),Qe=function(e){return He?He(e):e.namespaceURI};if("function"==typeof d){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Be,We,Ve="",Ye=!1,qe=0;const Ge=function(){if(qe>0)throw M('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.')},Ze=function(e){Ge(),qe++;try{return Be.createHTML(e)}finally{qe--}},Je=function(){return Ye||(We=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(xe,a),Ye=!0),We},$e=r,Xe=$e.implementation,Ke=$e.createNodeIterator,et=$e.createDocumentFragment,tt=$e.getElementsByTagName,nt=i.importNode;let rt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof o&&"function"==typeof Re&&Xe&&void 0!==Xe.createHTMLDocument;const ot=ne,it=re,at=oe,lt=ie,ct=ae,st=ce,ft=se,ut=ue;let dt=le,pt=null;const mt=H({},[...V,...Y,...q,...Z,...$]);let ht=null;const gt=H({},[...X,...K,...ee,...te]);let vt=Object.seal(u(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}})),yt=null,_t=null;const bt=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let wt=!0,St=!0,kt=!1,At=!0,Tt=!1,xt=!0,Et=!1,Ct=!1,Ot=null,Nt=null,Dt=!1,It=!1,Rt=!1,jt=!1,zt=!0,Pt=!1;const Lt="user-content-";let Mt=!0,Ft=!1,Ut=null,Ht={},Qt=null;const Bt=H({},["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 Wt=null;const Vt=H({},["audio","video","img","source","image","track"]);let Yt=null;const qt=H({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Zt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let $t=Jt,Xt=!1,Kt=null;const en=H({},[Gt,Zt,Jt],x),tn=s(["mi","mo","mn","ms","mtext"]);let nn=H({},tn);const rn=s(["annotation-xml"]);let on=H({},rn);const an=H({},["title","style","font","a","script"]);let ln=null;const cn=["application/xhtml+xml","text/html"];let sn=null,fn=null;const un=r.createElement("form"),dn=function(e){return e instanceof RegExp||e instanceof Function},pn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(fn&&fn===e)return;e&&"object"==typeof e||(e={}),e=B(e),ln=-1===cn.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,sn="application/xhtml+xml"===ln?x:T,pt=Ae(e,"ALLOWED_TAGS",mt,{transform:sn}),ht=Ae(e,"ALLOWED_ATTR",gt,{transform:sn}),Kt=Ae(e,"ALLOWED_NAMESPACES",en,{transform:x}),Yt=Ae(e,"ADD_URI_SAFE_ATTR",qt,{transform:sn,base:qt}),Wt=Ae(e,"ADD_DATA_URI_TAGS",Vt,{transform:sn,base:Vt}),Qt=Ae(e,"FORBID_CONTENTS",Bt,{transform:sn}),yt=Ae(e,"FORBID_TAGS",B({}),{transform:sn}),_t=Ae(e,"FORBID_ATTR",B({}),{transform:sn}),Ht=!!z(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?B(e.USE_PROFILES):e.USE_PROFILES),wt=!1!==e.ALLOW_ARIA_ATTR,St=!1!==e.ALLOW_DATA_ATTR,kt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,At=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Tt=e.SAFE_FOR_TEMPLATES||!1,xt=!1!==e.SAFE_FOR_XML,Et=e.WHOLE_DOCUMENT||!1,It=e.RETURN_DOM||!1,Rt=e.RETURN_DOM_FRAGMENT||!1,jt=e.RETURN_TRUSTED_TYPE||!1,Dt=e.FORCE_BODY||!1,zt=!1!==e.SANITIZE_DOM,Pt=e.SANITIZE_NAMED_PROPS||!1,Mt=!1!==e.KEEP_CONTENT,Ft=e.IN_PLACE||!1,dt=function(e){try{return L(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:le,$t="string"==typeof e.NAMESPACE?e.NAMESPACE:Jt,nn=Te(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>H({},tn)),on=Te(e,"HTML_INTEGRATION_POINTS",()=>H({},rn));const t=Te(e,"CUSTOM_ELEMENT_HANDLING",()=>u(null));if(vt=u(null),z(t,"tagNameCheck")&&dn(t.tagNameCheck)&&(vt.tagNameCheck=t.tagNameCheck),z(t,"attributeNameCheck")&&dn(t.attributeNameCheck)&&(vt.attributeNameCheck=t.attributeNameCheck),z(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),f(vt),Tt&&(St=!1),Rt&&(It=!0),Ht&&(pt=H({},$),ht=u(null),!0===Ht.html&&(H(pt,V),H(ht,X)),!0===Ht.svg&&(H(pt,Y),H(ht,K),H(ht,te)),!0===Ht.svgFilters&&(H(pt,q),H(ht,K),H(ht,te)),!0===Ht.mathMl&&(H(pt,Z),H(ht,ee),H(ht,te))),bt.tagCheck=null,bt.attributeCheck=null,z(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?bt.tagCheck=e.ADD_TAGS:w(e.ADD_TAGS)&&(pt===mt&&(pt=B(pt)),H(pt,e.ADD_TAGS,sn))),z(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?bt.attributeCheck=e.ADD_ATTR:w(e.ADD_ATTR)&&(ht===gt&&(ht=B(ht)),H(ht,e.ADD_ATTR,sn))),z(e,"ADD_FORBID_CONTENTS")&&w(e.ADD_FORBID_CONTENTS)&&(Qt===Bt&&(Qt=B(Qt)),H(Qt,e.ADD_FORBID_CONTENTS,sn)),Mt&&(pt["#text"]=!0),Et&&H(pt,["html","head","body"]),pt.table&&(H(pt,["tbody"]),delete yt.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Be;Be=e.TRUSTED_TYPES_POLICY;try{Ve=Ze("")}catch(e){throw Be=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Be=void 0,Ve=""):(void 0===Be&&(Be=Je()),Be&&"string"==typeof Ve&&(Ve=Ze("")));s&&s(e),fn=e},mn=H({},[...Y,...q,...G]),hn=H({},[...Z,...J]),gn=function(e){const t=Qe(e),n=T(Ue(e)),r=Re(e);let o,i;return r&&Fe(r)===ge?(o={namespaceURI:Qe(r)},i=T(Ue(r))):(o={namespaceURI:$t},i="template"),!!Kt[t]&&(t===Zt?function(e,t,n){return t.namespaceURI===Jt?"svg"===e:t.namespaceURI===Gt?"svg"===e&&("annotation-xml"===n||nn[n]):Boolean(mn[e])}(n,o,i):t===Gt?function(e,t,n){return t.namespaceURI===Jt?"math"===e:t.namespaceURI===Zt?"math"===e&&on[n]:Boolean(hn[e])}(n,o,i):t===Jt?function(e,t,n){return!(t.namespaceURI===Zt&&!on[n])&&!(t.namespaceURI===Gt&&!nn[n])&&!hn[e]&&(an[e]||!mn[e])}(n,o,i):!("application/xhtml+xml"!==ln||!Kt[t]))},vn=function(e){y(n.removed,{element:e});try{Re(e).removeChild(e)}catch(t){if(Oe(e),!Re(e))throw M("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},yn=function(e,t,n){try{Ne(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},_n=function(e){kn(e);const t=Ie(e);t&&h(_(t),e=>{try{Oe(e)}catch(e){}});const n=Fe(e)===ge?ze(e):null;if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;"string"==typeof o&&yn(e,r,o)}},bn=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}y(n.removed,{attribute:r||null,from:t});try{r?Ne(t,r):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(It||Rt)try{vn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},wn=function(e){const t=ze(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;"string"!=typeof o||ht[sn(o)]||yn(e,r,o)}},Sn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[e];for(;r.length>0;){const e=r.pop();if(!1===t(e))continue;if(n&&Fe(e)===ge){const t=je(e);jn(t)&&r.push(t)}const o=Ie(e);if(o)for(let e=o.length-1;e>=0;--e)r.push(o[e])}},kn=function(e){Sn(e,e=>{Fe(e)===ge&&wn(e)})},An=function(e){const t=[];return Sn(e,e=>{t.push(e)},!0),t},Tn=function(e,t){let r=!1;return h(n.removed,t=>{t.element&&(r=r||t.element===e,kn(t.element))}),function(e,t){const n=S();h(An(e),e=>{Fe(e)===ge&&k(n,e)}),h(t,e=>{Fe(e)!==ge||A(n,e)||wn(e)})}(e,t),r},xn=function(e,t,n,r){const o=On(e);let i;for(;i=o.nextNode();)A(r,i)&&!A(Ut,i)&&(t&&Pn(rt.uponSanitizeShadowNode,i,null),Un(i,n),qn(i,n),jn(i.content)&&Gn(i.content))},En=function(e,t){return!!xt&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},Cn=function(e){let t=null,n=null;if(Dt)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ln&&$t===Jt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Be?Ze(e):e;if($t===Jt)try{t=(new Q).parseFromString(o,ln)}catch(e){}if(!t||!t.documentElement){t=Xe.createDocument($t,"template",null);try{t.documentElement.innerHTML=Xt?Ve:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$t===Jt?tt.call(t,Et?"html":"body")[0]:Et?t.documentElement:i},On=function(e){const t=Me?Me(e):e.ownerDocument;return Ke.call(t||e,e,U.SHOW_ELEMENT|U.SHOW_COMMENT|U.SHOW_TEXT|U.SHOW_PROCESSING_INSTRUCTION|U.SHOW_CDATA_SECTION,null)},Nn=function(e){return e=C(e,ot," "),e=C(e,it," "),e=C(e,at," ")},Dn=function(e){var t;In(e);const n=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");n&&h(n,e=>{jn(e.content)&&Dn(e.content)})},In=function(e){e.normalize();const t=Me?Me(e):e.ownerDocument,n=Ke.call(t||e,e,U.SHOW_TEXT|U.SHOW_COMMENT|U.SHOW_CDATA_SECTION|U.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=Nn(r.data),r=n.nextNode()},Rn=function(e){const t=Le?Le(e):null;return"string"==typeof t&&("form"===sn(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==ze(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==Pe(e)||e.childNodes!==Ie(e)))},jn=function(e){if(!Pe||"object"!=typeof e||null===e)return!1;try{return Pe(e)===we}catch(e){return!1}},zn=function(e){if(!Pe||"object"!=typeof e||null===e)return!1;try{return"number"==typeof Pe(e)}catch(e){return!1}};function Pn(e,t,r){0!==e.length&&h(e,e=>{e.call(n,t,r,fn)})}const Ln=function(e,t){if(e instanceof RegExp)return L(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Boolean(e(t,...r))}return!1},Mn=function(e,t,n,r){return 0===e.length?t:t===n||t===r?B(t):t},Fn=function(e,t){return e!==t&&null===Re(e)&&(Ft&&kn(e),!0)},Un=function(e,t){var r;if(r=e,Ut&&k(Ut,r),Pn(rt.beforeSanitizeElements,e,null),Fn(e,t))return!0;if(Rn(e))return vn(e),!0;const o=sn(Ue(e));if(pt=Mn(rt.uponSanitizeElement,pt,mt,Ot),Pn(rt.uponSanitizeElement,e,{tagName:o,allowedTags:pt}),Fn(e,t))return!0;if(function(e,t){return!!(xt&&e.hasChildNodes()&&!zn(e.firstElementChild)&&L(de,e.textContent)&&L(de,e.innerHTML))||!!(xt&&Se[t]&&Fe(e)===ge&&Qe(e)===Jt&&(zn(e.firstElementChild)||"string"==typeof e.textContent&&L(de,e.textContent)))||e.nodeType===ye||!(!xt||e.nodeType!==_e||!L(pe,e.data))}(e,o))return vn(e),!0;if(yt[o]||!(bt.tagCheck instanceof Function&&bt.tagCheck(o))&&!pt[o]){const n=function(e,t,n){if(!yt[t]&&Bn(t)&&Ln(vt.tagNameCheck,t))return!1;if(Mt&&!Qt[t]&&!Qt[T(t)]){const t=Re(e),r=Ie(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?Ce(r[o],!0):r[o];t.insertBefore(i,De(e))}}return vn(e),!0}(e,o,t);return!(!1!==n||(Pn(rt.afterSanitizeElements,e,null),!Fn(e,t)))||n}if(Fe(e)===ge&&!gn(e))return vn(e),!0;if(("noscript"===o||"noembed"===o||"noframes"===o)&&L(me,e.innerHTML))return vn(e),!0;if(Tt&&e.nodeType===ve){const t=Nn(e.textContent);e.textContent!==t&&(y(n.removed,{element:e.cloneNode()}),e.textContent=t)}return Pn(rt.afterSanitizeElements,e,null),Fn(e,t)},Hn=function(e,t,n){if(_t[t])return!1;if(En(t,e))return!1;if(zt&&("id"===t||"name"===t)&&(n in r||n in un))return!1;const o=ht[t]||bt.attributeCheck instanceof Function&&bt.attributeCheck(t,e);return!(!St||!L(lt,t))||(!(!wt||!L(ct,t))||(o?!!Yt[t]||(!!L(dt,C(n,ft,""))||(!("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!Wt[e])||(!(!kt||L(st,C(n,ft,"")))||!n))):Bn(e)&&Ln(vt.tagNameCheck,e)&&Ln(vt.attributeNameCheck,t,e)||"is"===t&&vt.allowCustomizedBuiltInElements&&Ln(vt.tagNameCheck,n)))},Qn=H({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bn=function(e){return!Qn[T(e)]&&L(ut,e)},Wn=function(e,t,n,r){if(Be&&"object"==typeof xe&&"function"==typeof xe.getAttributeType&&!n)switch(xe.getAttributeType(e,t)){case"TrustedHTML":return Ze(r);case"TrustedScriptURL":return function(e){Ge(),qe++;try{return Be.createScriptURL(e)}finally{qe--}}(r)}return r},Vn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Rn(e)||(vn(e),!1)}catch(n){return bn(t,e),!1}},Yn=function(e,t){return!(!xt||!L(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t))||"attributename"===T(e)&&null!==E(t,"href")},qn=function(e,t){if(Pn(rt.beforeSanitizeAttributes,e,null),Fn(e,t))return;const r=e.attributes;if(!r||Rn(e))return;ht=Mn(rt.uponSanitizeAttribute,ht,gt,Nt);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ht,forceKeepAttr:void 0};let i=r.length;const a=sn(e.nodeName);for(;i--;){const t=r[i],l=t.name,c=t.namespaceURI,s=t.value,f=sn(l),u=s;let d="value"===l?u:N(u),p=!1;o.attrName=f,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,Pn(rt.uponSanitizeAttribute,e,o),d=o.attrValue,!Pt||"id"!==f&&"name"!==f||0===O(d,Lt)||(bn(l,e,t),d=Lt+d,p=!0),Yn(l,d)?bn(l,e,t):o.forceKeepAttr||(o.keepAttr&&(At||!L(he,d))?(Tt&&(d=Nn(d)),Hn(a,f,d)?(d=Wn(a,f,c,d),d!==u&&Vn(e,l,c,d)&&p&&v(n.removed)):bn(l,e,t)):bn(l,e,t))}Pn(rt.afterSanitizeAttributes,e,null),Fn(e,t)},Gn=function(e){let t=null;const n=On(e);for(Pn(rt.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Pn(rt.uponSanitizeShadowNode,t,null),Un(t,e),qn(t,e),jn(t.content)&&Gn(t.content),Fe(t)===ge){const e=je(t);jn(e)&&(Zn(e),Gn(e))}Tt&&In(e),Pn(rt.afterSanitizeShadowDOM,e,null)},Zn=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){Gn(e.shadow);continue}const n=e.node,r=Fe(n)===ge,o=Ie(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=Le?Le(n):null;if("string"==typeof e&&"template"===sn(e)){const e=n.content;jn(e)&&t.push({node:e,shadow:null})}}if(r){const e=je(n);jn(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,o=null,a=null,l=null;if(Xt=!e,Xt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!zn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return D(e);case"boolean":return I(e);case"bigint":return R?R(e):"0";case"symbol":return j?j(e):"Symbol()";case"undefined":default:return P(e);case"function":case"object":{if(null===e)return P(e);const t=e,n=W(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:P(e)}return P(e)}}}(e)))throw M("dirty is not a string, aborting");if(!n.isSupported)return e;Ct?(pt=Ot,ht=Nt):pn(t),(rt.uponSanitizeElement.length>0||rt.uponSanitizeAttribute.length>0)&&(pt=B(pt)),rt.uponSanitizeAttribute.length>0&&(ht=B(ht)),n.removed=[];const c=Ft&&"string"!=typeof e&&zn(e);let s=[];const f=Ut;if(c){u=e,xt&&Sn(u,e=>{const t=Fe(e);if(t===ye||t===_e&&L(pe,e.data)){try{Oe(e)}catch(e){}return!1}if(t===ge){const t=e,n=sn(Ue(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&En("for",n)&&t.removeAttribute("for")}catch(e){}}return!0});const t=Ue(e);if("string"==typeof t){const n=sn(t);if(!pt[n]||yt[n])throw _n(e),M("root node is forbidden and cannot be sanitized in-place")}if(Rn(e))throw _n(e),M("root node is clobbered and cannot be sanitized in-place");s=An(e),Ut=S()}else if(zn(e))r=Cn("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),o.nodeType===ge&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),Zn(r);else{if(!It&&!Tt&&!Et&&-1===e.indexOf("<"))return Be&&jt?Ze(e):e;if(r=Cn(e),!r)return It?null:jt?Ve:""}var u;r&&Dt&&vn(r.firstChild);const d=c?e:r;try{c&&Zn(e);const t=On(d);for(;a=t.nextNode();)Un(a,d),qn(a,d),jn(a.content)&&Gn(a.content);c&&function(e,t){const n=Ut;let r=null;const o=()=>(r||(r=S(),h(t,e=>{k(r,e)})),r);for(let t=0;;t++){const r=An(e),i=[e];let a=!1;if(h(r,e=>{Fe(e)===we?y(i,e):a||A(n,e)||(a=A(o(),e))}),!a)return;if(t>=8)throw M("the tree kept changing during in-place sanitization; refusing to return it");h(i,(t,n)=>{xn(t,n>0,e,o())})}}(e,s)}catch(t){throw c&&(_n(e),Tn(e,s)),t}finally{Ut=f}if(c){if(Tn(e,s))throw M("a node selected for removal could not be safely returned; refusing to sanitize in place");return Tt&&Dn(e),e}if(It){if(Tt&&Dn(r),Rt)for(l=et.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(ht.shadowroot||ht.shadowrootmode)&&(l=nt.call(i,l,!0)),l}let p=Et?r.outerHTML:r.innerHTML;return Et&&pt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&L(fe,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Tt&&(p=Nn(p)),Be&&jt?Ze(p):p},n.setConfig=function(){pn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ct=!0,Ot=pt,Nt=ht},n.clearConfig=function(){fn=null,Ct=!1,Ot=null,Nt=null,Be=We,Ve=""},n.isValidAttribute=function(e,t,n){fn||pn({});const r=sn(e),o=sn(t);return("string"!=typeof n||!(Yn(t,n)||!At&&L(he,n)))&&Hn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&z(rt,e)&&y(rt[e],t)},n.removeHook=function(e,t){if(z(rt,e)){if(void 0!==t){const n=g(rt[e],t);return-1===n?void 0:b(rt[e],n,1)[0]}return v(rt[e])}},n.removeHooks=function(e){z(rt,e)&&(rt[e]=[])},n.removeAllHooks=function(){rt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Ee=["_blank","_self","_parent","_top"],Ce=["_self","_top","_parent"],Oe=/^[A-Za-z][A-Za-z0-9_.-]*$/,Ne=/^[A-Za-z][A-Za-z-]*$/,De=["noopener"];function Ie(e){var t=e&&"string"==typeof e.tagName?e.tagName.toUpperCase():"";return"A"===t||"AREA"===t}var Re=xe(window);function je(e){return null==e?"":Re.sanitize(String(e))}function ze(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 Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach(function(t){Le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Le(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Me(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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)}Re.addHook("uponSanitizeAttribute",function(e,t){var n,r;"target"===t.attrName&&Ie(e)&&(n=t.attrValue,r=String(n||"").trim(),(Ee.includes(r.toLowerCase())||Oe.test(r))&&(t.forceKeepAttr=!0))}),Re.addHook("afterSanitizeAttributes",function(e){if(Ie(e)&&"function"==typeof e.getAttribute&&"function"==typeof e.setAttribute){var t=e.getAttribute("target");if(t&&!Ce.includes(t.trim().toLowerCase())){var n=(e.getAttribute("rel")||"").split(/\s+/).filter(function(e){return Ne.test(e)});De.forEach(function(e){n.includes(e)||n.push(e)}),e.setAttribute("rel",n.join(" "))}}}),jQuery(document).ready(function(){window.fluentFormrecaptchaSuccessCallback=function(e){if(window.innerWidth<768&&/iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var t=jQuery(".g-recaptcha").filter(function(t,n){return grecaptcha.getResponse(t)==e});t.length&&jQuery("html, body").animate({scrollTop:t.first().offset().top-jQuery(window).height()/2},0)}},window.ffValidationError=function(){var e=function(){};return(e.prototype=Object.create(Error.prototype)).constructor=e,e}(),window.ff_helper={numericVal:function(e){if(e.hasClass("ff_numeric")){var t=JSON.parse(e.attr("data-formatter"));return currency(e.val(),t).value}return e.val()||0},formatCurrency:function(e,t){if(e.hasClass("ff_numeric")){var n=JSON.parse(e.attr("data-formatter"));return currency(t,n).format()}return t}},function(e,t){e||(e={}),e.stepAnimationDuration=parseInt(e.stepAnimationDuration);var n={},r={INPUT_SUFFIX:"__ff_other_input__",markerFor:function(e){return"__ff_other_"+e+"__"},isIncomplete:function(e,t,n,r){return!(!r||!Array.isArray(e))&&(-1!==e.indexOf(this.markerFor(t))&&""===String(null==n?"":n).trim())},check:function(e){var t=String(e.prop("type")||"").toLowerCase();if("checkbox"!==t&&"radio"!==t)return!1;var n=String(e.prop("name")||""),r=n.replace("[]",""),o=e.closest("form"),i=o.find('[name="'+r+this.INPUT_SUFFIX+'"]'),a=o.find('[name="'+n+'"]:checked').map(function(){return this.value}).get();return this.isIncomplete(a,r,i.val(),i.length>0)},inputFor:function(e){var t=String(e.prop("name")||"").replace("[]","");return e.closest("form").find('[name="'+t+this.INPUT_SUFFIX+'"]')},setAriaRequired:function(e,t){e&&e.length&&(t?e.attr("aria-required","true"):(e.removeAttr("aria-required"),this.clearAriaInvalid(e)))},clearAriaInvalid:function(e){e&&e.length&&e.removeAttr("aria-invalid").removeAttr("aria-describedby")},markAriaInvalid:function(e,t,n,r){if(t&&t.length){if(t.attr("aria-invalid","true"),n&&n.length){var o=n.attr("id");o||(o="ff_other_error_"+String(t.attr("name")||"field").replace(/[^A-Za-z0-9_-]/g,"_"),n.attr("id",o)),t.attr("aria-describedby",o)}r&&t.trigger("focus")}},message:function(e){var t=String(e.prop("type")||"").toLowerCase();if("checkbox"!==t&&"radio"!==t)return"";var n=String(e.prop("name")||"").replace("[]",""),r=e.closest("form").find('.ff-other-input-wrapper[data-field="'+n+'"]');return String(r.attr("data-required-message")||"").trim()}};window.fluentFormApp=function(o){var a=o.attr("data-form_instance");a=a?a.replace(/[^a-zA-Z0-9_-]/g,""):"";var l=window["fluent_form_"+a],c=l&&"object"===Me(l)?l:null;if(!c)return console.log("No Fluent form JS vars found!"),!1;if(n[a])return n[a];e.ajaxUrl||(e.ajaxUrl=c.ajaxUrl||window.ajaxurl);var s,f,u,d,p,m,h,g,v,y,_,b,w,S,k,A,T,x,E,C,O,N,D,I,R,j,z,P,L,M,F,U=c.form_id_selector,H="."+a;return s=i,f={},u=!1,d=function(){return t("body").find("form"+H)},m=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next";o.trigger("update_slider",{goBackToStep:e,animDuration:t,isScrollTop:n,actionType:r})},h=function(e){try{var n=e.find(":input").filter(function(e,n){return"repeater_container"===t(n).attr("data-type")?!t(n).closest(".ff-repeater-container").hasClass("ff_excluded")&&(t(this).closest(".has-conditions").hasClass("ff_excluded")&&t(this).val(""),!0):!t(n).closest(".has-conditions").hasClass("ff_excluded")});T(n);var r=n.serializeArray(),o=r.map(function(e){return e.name});n=n.filter(function(){return!t(this).closest(".ff-el-input--content").find("table").length});var i={};n.each(function(){var n=t(this).attr("name");o.includes(n)||(t(this).is(":checkbox")||t(this).is(":radio"))&&(i[n]||e.find('input[name="'+n+'"]:checked').length||(r.push({name:n,value:""}),i[n]=!0))});var a={data:t.param(t.map(r,function(e){return{name:e.name,value:e.value}})),action:"fluentform_submit",form_id:e.data("form_id")};if(t.each(e.find("[type=file]"),function(e,n){var r={},o=n.name+"[]";r[o]=[],t(n).closest("div").find(".ff-uploaded-list").find(".ff-upload-preview[data-src]").each(function(e,n){r[o][e]=t(this).data("src")}),t.each(r,function(e,n){if(n.length){var r={};r[e]=n,a.data+="&"+t.param(r)}})}),e.find(".ff_uploading").length){var l=t("<div/>",{class:"error text-danger"}),s=t("<span/>",{class:"error-clear",html:"×",click:function(e){return t(H+"_errors").html("")}}),u=t("<span/>",{class:"error-text",text:(h="file_upload_in_progress",g="File upload in progress. Please wait...",v="fluentform_submission_messages_"+c.id,window[v]&&window[v][h]?window[v][h]:g)});return t(H+"_errors").html(l.append(u,s)).show()}if(e.find(".ff-el-recaptcha.g-recaptcha").length){var d=e.find(".ff-el-recaptcha.g-recaptcha").data("g-recaptcha_widget_id");void 0!==d&&(a.data+="&"+t.param({"g-recaptcha-response":grecaptcha.getResponse(d)}))}if(e.find(".ff-el-hcaptcha.h-captcha").length){var p=e.find(".ff-el-hcaptcha.h-captcha").data("h-captcha_widget_id");void 0!==p&&(a.data+="&"+t.param({"h-captcha-response":hcaptcha.getResponse(p)}))}if(e.find(".ff-el-turnstile.cf-turnstile").length){var m=e.find(".ff-el-turnstile.cf-turnstile").data("cf-turnstile_widget_id");void 0!==m&&(a.data+="&"+t.param({"cf-turnstile-response":turnstile.getResponse(m)}))}t(H+"_success").remove(),t(H+"_errors").html(""),e.find(".error").html(""),e.parent().find(".ff-errors-in-stack").hide(),function(e,t){var n=[],r=f;return e.hasClass("ff_has_v3_recptcha")&&(r.ff_v3_recptcha=function(e,t){var n=jQuery.Deferred(),r=e.data("recptcha_key");return grecaptcha.execute(r,{action:"submit"}).then(function(e){t.data+="&"+jQuery.param({"g-recaptcha-response":e}),n.resolve()}),n.promise()}),jQuery.each(r,function(r,o){n.push(o(e,t))}),jQuery.when.apply(jQuery,n)}(e,a).then(function(){_(e),y(e,a)})}catch(t){if(!(t instanceof ffValidationError))throw t;e.trigger("fluentform_validation_failed",{form:e,response:t.messages}),E(t.messages),x(),k(350)}var h,g,v},g=["stripeRedirectToCheckout","normalRedirect"],v=function(e,t){var n=e[0],r=t&&t.data||{};if(n&&!r.skip_success_event){var o=r.insert_id;!o&&r.result&&"object"===Me(r.result)&&(o=r.result.insert_id),n.dispatchEvent(new CustomEvent("fluentform_form_submitted",{bubbles:!0,detail:{formId:parseInt(c.id,10),instanceId:e.attr("data-form_instance")||"",entryId:o?parseInt(o,10):null,response:t}}))}},y=function(n,r){var o,i,a,l=(o="t="+Date.now(),i=e.ajaxUrl,i+=(i.split("?")[1]?"&":"?")+o);u||(u=!0,t.post(l,r).then(function(r){if(!r||!r.data||!r.data.result)return n.trigger("fluentform_submission_failed",{form:n,response:r}),void E(r);if(a=r,r.data.append_data&&M(r.data.append_data),r.data.nextAction)return-1!==g.indexOf(r.data.actionName)&&v(n,r),void n.trigger("fluentform_next_action_"+r.data.nextAction,{form:n,response:r});v(n,r),n.triggerHandler("fluentform_submission_success",{form:n,config:c,response:r}),jQuery(document.body).trigger("fluentform_submission_success",{form:n,config:c,response:r});var o=new CustomEvent("fluentform_submission_success",{detail:{form:n[0],config:c,response:r}});if(document.dispatchEvent(o),"redirectUrl"in r.data.result)return r.data.result.message&&(t("<div/>",{id:U+"_success",class:"ff-message-success",role:"status","aria-live":"polite"}).html(je(r.data.result.message)).insertAfter(n).focus(),n.find(".ff-el-is-error").removeClass("ff-el-is-error")),setTimeout(function(){b(n)},500),void(location.href=r.data.result.redirectUrl);var i=U+"_success",l="#"+i;t(l).length&&t(l).slideUp("fast"),t("<div/>",{id:i,class:"ff-message-success",role:"status","aria-live":"polite"}).html(je(r.data.result.message)).insertAfter(n).focus(),n.find(".ff-el-is-error").removeClass("ff-el-is-error"),"hide_form"==r.data.result.action?(n.hide().addClass("ff_force_hide"),n[0].reset()):(jQuery(document.body).trigger("fluentform_reset",[n,c]),n[0].reset());var s=t(l);s.length&&!A(s[0])&&t("html, body").animate({scrollTop:s.offset().top-(t("#wpadminbar")?32:0)-20},e.stepAnimationDuration)}).fail(function(t){n.trigger("fluentform_submission_failed",{form:n,response:t});var r=new CustomEvent("fluentform_submission_failed",{detail:{form:n[0],response:t,config:c}});if(document.dispatchEvent(r),t&&t.responseJSON&&(t.responseJSON.data||t.responseJSON.errors)){if(a=t,t.responseJSON.append_data&&M(t.responseJSON.append_data),E(t.responseJSON.errors||t.responseJSON.data),k(350),n.find(".fluentform-step").length){var o=n.find(".error").not(":empty:first").closest(".fluentform-step");if(o.length){var i=o.index();m(i,e.stepAnimationDuration,!1)}}b(n)}else E(t.responseText)}).always(function(e){var t;if(u=!1,null===(t=a)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.result)||void 0===t||!t.hasOwnProperty("redirectUrl")){if(b(n),window.grecaptcha){var r=n.find(".ff-el-recaptcha.g-recaptcha").data("g-recaptcha_widget_id");void 0!==r&&grecaptcha.reset(r)}if(window.hcaptcha){var o=n.find(".ff-el-hcaptcha.h-captcha").data("h-captcha_widget_id");void 0!==o&&hcaptcha.reset(o)}if(window.turnstile){var i=n.find(".ff-el-turnstile.cf-turnstile").data("cf-turnstile_widget_id");void 0!==i&&turnstile.reset(i)}}}))},w=function(){"yes"!=o.attr("data-ff_reinit")&&(t(document).on("submit",H,function(e){e.preventDefault(),window.ff_sumitting_form||(window.ff_sumitting_form=!0,setTimeout(function(){window.ff_sumitting_form=!1},1500),h(t(this)))}),t(document).on("reset",H,function(n){!function(n){t(".ff-step-body",o).length&&m(0,e.stepAnimationDuration,!1),n.find(".ff-el-repeat .ff-t-cell").each(function(){t(this).find("input").not(":first").remove()}),n.find(".ff-el-repeat .ff-el-repeat-buttons-list").find(".ff-el-repeat-buttons").not(":first").remove();var r=n.find("input[type=checkbox],input[type=radio]");r.length&&r.each(function(e,n){(n=t(n)).prop("defaultChecked")?n.closest(".ff-el-form-check").addClass("ff_item_selected"):n.closest(".ff-el-form-check.ff_item_selected").removeClass("ff_item_selected")}),n.find("input[type=file]").closest("div").find(".ff-uploaded-list").html("").end().closest("div").find(".ff-upload-progress").addClass("ff-hidden").find(".ff-el-progress-bar").css("width","0%");var i=n.find('input[type="range"]');i.length&&i.each(function(e,n){(n=t(n)).val(n.data("calc_value")).change()}),t.each(c.conditionals,function(e,n){t.each(n.conditions,function(e,t){S(I(t.field))})})}(t(this))}),t(document).on("keydown",H+' input[type="radio"], '+H+' input[type="checkbox"]',function(e){if("Enter"===e.key)return e.preventDefault(),"radio"===t(this).attr("type")?t(this).prop("checked",!0):"checkbox"===t(this).attr("type")&&t(this).prop("checked",!t(this).prop("checked")),t(this).trigger("change"),e.stopPropagation(),!1}))},S=function(e){var n=e.prop("type");null!=n&&("checkbox"==n||"radio"==n?e.each(function(e,n){var r=t(this);r.prop("checked",r.prop("defaultChecked"))}):n.startsWith("select")?e.find("option").each(function(e,n){var r=t(this);r.prop("selected",r.prop("defaultSelected"))}):e.val(e.prop("defaultValue")),e.trigger("change"))},k=function(e){var n=c.settings.layout.errorMessagePlacement;if(n&&"stackToBottom"!=n){var r=o.find(".ff-el-is-error").first();r.length&&!A(r[0])&&t("html, body").delay(e).animate({scrollTop:r.offset().top-(t("#wpadminbar")?32:0)-20},e)}},A=function(e){if(!e)return!0;var n=e.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=t(window).height()&&n.right<=t(window).width()},x=function(){var e=!1;o.find('.ff-other-option input[type="checkbox"], .ff-other-option input[type="radio"]').each(function(){var n=t(this),i=r.inputFor(n);if(r.check(n)){String(n.prop("name")||"").replace("[]","");var a=o.find('.error-text[data-name="'+n.prop("name")+'"]').closest(".error");a.length||(a=n.closest(".ff-el-group").find(".error").first()),a.length||(a=o.parent().find(".ff-errors-in-stack .error").first()),r.markAriaInvalid(t,i,a,!e),e=!0}else r.clearAriaInvalid(i)})},E=function(e){if(o.parent().find(".ff-errors-in-stack").empty(),e)if("string"!=typeof e){var n=c.settings.layout.errorMessagePlacement;if(!n||"stackToBottom"==n)return C(e),!1;o.find(".error").empty(),o.find(".ff-el-group").removeClass("ff-el-is-error"),t.each(e,function(e,n){"string"==typeof n&&(n=[n]),t.each(n,function(t,n){O(e,n)})})}else C({error:[e]})},C=function(e,n){var r=d(),o=r.parent().find(".ff-errors-in-stack");e&&(t.isEmptyObject(e)||(t.each(e,function(e,n){"string"==typeof n&&(n=[n]),t.each(n,function(n,i){var a=t("<div/>",{class:"error text-danger"}),l=t("<span/>",{class:"error-clear",html:"×"}),c=t("<span/>",{class:"error-text","data-name":I(e).attr("name"),html:i});a.attr("role","alert"),a.append(c,l),t(document.body).trigger("fluentform_error_in_stack",{form:r,element:I(e),message:c}),o.append(a).show()});var i=I(e);if(i){var a=i.attr("name");i.attr("aria-invalid","true");var l=t("[name='"+a+"']",r).first();l&&l.closest(".ff-el-group").addClass("ff-el-is-error")}}),(!n||!1!==n.scroll)&&!A(o[0])&&t("html, body").animate({scrollTop:o.offset().top-100},350),o.on("click",".error-clear",function(){t(this).closest("div").remove(),o.hide()}).on("click",".error-text",function(){var e=t("[name='".concat(t(this).data("name"),"']"),r).first();t("html, body").animate({scrollTop:e.offset()&&e.offset().top-100},350,function(t){return e.focus()})})))},O=function(e,n){var r,i;(r=I(e)).length?(r.attr("aria-invalid","true"),(i=t("<div/>",{class:"error text-danger"})).attr("role","alert"),r.closest(".ff-el-group").addClass("ff-el-is-error"),r.closest(".ff-el-input--content").length?(r.closest(".ff-el-input--content").find("div.error").remove(),t(document.body).trigger("fluentform_error_below_element",{form:o,element:r,message:n}),r.closest(".ff-el-input--content").append(i.html(je(n)))):(r.find("div.error").remove(),r.append(i.text(n)))):C([n])},N=function(){o.find(".ff-el-group,.ff_repeater_table, .ff_repeater_container").on("change","input,select,textarea",function(){if(!window.ff_disable_error_clear){t(this).attr("aria-invalid","false");var e=c.settings.layout.errorMessagePlacement;if(e||"stackToBottom"!=e){var n=t(this).closest(".ff-el-group");n.hasClass("ff-el-is-error")&&n.removeClass("ff-el-is-error").find(".error.text-danger").remove()}}})},D=function(){var e=["min_selection","max_selection"];o.on("change","input, select",function(){var n=t(this),r=String(n.prop("name")||"");if(r){var i=r.replace("[]","").replace(/__ff_other_input__$/,""),a=(c.rules||{})[i];if(a&&e.some(function(e){return a[e]&&a[e].value})){var l=n;if(r!==i&&r!==i+"[]"){var f=o.find('[name="'+i+'[]"]');l=f.length?f.first():n}var u=l.closest(".ff-el-group"),d=o.parent().find(".ff-errors-in-stack");window.ff_disable_error_clear||(u.removeClass("ff-el-is-error").find(".error.text-danger").remove(),u.find('[aria-invalid="true"]').attr("aria-invalid","false"),d.find('.error-text[data-name="'+l.prop("name")+'"]').closest(".error.text-danger").remove(),d.children().length||d.hide());var p=null,m=s();if(t.each(e,function(e,t){var n=a[t];!p&&n&&n.value&&!m[t](l,n)&&(p=n)}),p){var h=((c.settings||{}).layout||{}).errorMessagePlacement;if(h&&"stackToBottom"!=h)O(i,p.message);else{var g={};g[i]=[p.message],C(g,{scroll:!1})}}}}})},I=function(e){var n=d(),r=t("[data-name='"+e+"']",n);return(r=r.length?r:t("[name='"+e+"']",n)).length?r:t("[name='"+e+"[]']",n)},R=null,j=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(R)return!n&&R.reset||(R.callback=e),R.reset=R.reset||n,void R.check();if("function"!=typeof(null===(t=window.turnstile)||void 0===t?void 0:t.render)){var r=o[0],i=R={callback:e,reset:n,delay:100,timer:null},a=function(e){"SCRIPT"===e.target.tagName&&i.check()};i.check=function(){var e;window.clearTimeout(i.timer);var t=r&&r.isConnected,n="function"==typeof(null===(e=window.turnstile)||void 0===e?void 0:e.render);if(!t||n)return document.removeEventListener("load",a,!0),R=null,void(t&&i.callback());i.timer=window.setTimeout(i.check,i.delay),i.delay=Math.min(2*i.delay,1e3)},document.addEventListener("load",a,!0),i.check()}else e()},z=function(){o.find(".ff-el-recaptcha.g-recaptcha").length&&window.grecaptcha&&"function"==typeof window.grecaptcha.ready&&window.grecaptcha.ready(function(){o.find(".ff-el-recaptcha.g-recaptcha").each(function(){P("g-recaptcha",t(this),grecaptcha.render)})}),o.find(".ff-el-turnstile.cf-turnstile").length&&j(function(){o.find(".ff-el-turnstile.cf-turnstile").each(function(){P("cf-turnstile",t(this),turnstile.render)})}),o.find(".ff-el-hcaptcha.h-captcha").length&&window.hcaptcha&&o.find(".ff-el-hcaptcha.h-captcha").each(function(){P("h-captcha",t(this),hcaptcha.render)})},P=function(e,t,n){var r=t.data("sitekey"),o=t.attr("id"),i="data-".concat(e,"_widget_id");try{var a=t.attr(i);if("g-recaptcha"===e||"h-captcha"===e){if(a&&t.find("iframe").length>0)return}else if("cf-turnstile"===e){var l=t.find('input[name="cf-turnstile-response"]');if(a&&(l.length||t.find("iframe").length))return;a&&window.turnstile&&turnstile.remove(a)}var c=o;"cf-turnstile"===e&&(c="#"+o),a=n(c,{sitekey:r}),t.attr(i,a)}catch(t){console.error("Error rendering ".concat(e,":"),t)}},L=function(e,t,n){var r="data-".concat(e,"_widget_id"),o=t.attr(r);if(o)try{return n(o),!0}catch(n){console.error("Error resetting ".concat(e,":"),n),t.removeAttr(r).removeData("".concat(e,"-rendered"))}return!1},M=function(e){jQuery.each(e,function(e,n){if(n){var r=o.find("input[name="+e+"]");r.length?r.attr("value",n):t("<input>").attr({type:"hidden",name:e,value:n}).appendTo(o)}})},F={initFormHandlers:function(){w(),p(),N(),D(),o.removeClass("ff-form-loading").addClass("ff-form-loaded"),o.on("show_element_error",function(e,t){O(t.element,t.message)})},registerFormSubmissionHandler:w,maybeInlineForm:p=function(){o.hasClass("ff-form-inline")&&o.find("button.ff-btn-submit").css("height","50px")},reinitExtras:function(){o.find(".ff-el-recaptcha.g-recaptcha").length&&window.grecaptcha&&"function"==typeof window.grecaptcha.ready&&window.grecaptcha.ready(function(){o.find(".ff-el-recaptcha.g-recaptcha").each(function(){var e=t(this);L("g-recaptcha",e,grecaptcha.reset)||P("g-recaptcha",e,grecaptcha.render)})}),o.find(".ff-el-turnstile.cf-turnstile").length&&j(function(){o.find(".ff-el-turnstile.cf-turnstile").each(function(){var e=t(this);L("cf-turnstile",e,turnstile.reset)||P("cf-turnstile",e,turnstile.render)})},!0),o.find(".ff-el-hcaptcha.h-captcha").length&&window.hcaptcha&&o.find(".ff-el-hcaptcha.h-captcha").each(function(){var e=t(this);L("h-captcha",e,hcaptcha.reset)||P("h-captcha",e,hcaptcha.render)})},initTriggers:function(){o=d(),jQuery(document.body).trigger("fluentform_init",[o,c]),jQuery(document.body).trigger("fluentform_init_"+c.id,[o,c]),o.trigger("fluentform_init_single",[this,c]),o.find("input.ff-el-form-control").on("keypress",function(e){return 13!==e.which}),o.data("is_initialized","yes"),o.find("input.ff-read-only").each(function(){t(this).attr({tabindex:"-1",readonly:"readonly"})}),o.find(".ff-el-tooltip").on("mouseenter",function(e){var n=t(this).data("content"),r=t(".ff-el-pop-content");r.length||(t("<div/>",{class:"ff-el-pop-content"}).appendTo(document.body),r=t(".ff-el-pop-content")),r.html(je(n));var i=o.innerWidth()-20;r.css("max-width",i);var a=t(this).offset().left,l=r.outerWidth(),c=r.outerHeight(),s=a-l/2+10;s<15&&(s=15),r.css("top",t(this).offset().top-c-5),r.css("left",s)}),o.find(".ff-el-tooltip").on("mouseleave",function(){t(".ff-el-pop-content").remove()}),t(document).on("lity:open",function(){var e,t;null===(e=window.turnstile)||void 0===e||null===(t=e.remove)||void 0===t||t.call(e),z()}),o.one("focus",'input, select, textarea, input[type="checkbox"], input[type="radio"]',function(){o.trigger("fluentform_first_interaction")}),o.on("fluentform_first_interaction",function(){z()}),o.on("ff_to_next_page ff_to_prev_page",function(e){z()}),z()},validate:T=function(e){e.length||(e=t("form.frm-fluent-form").find(":input").not(":button").filter(function(e,n){return!t(n).closest(".has-conditions").hasClass("ff_excluded")})),e.each(function(e,n){t(n).closest(".ff-el-group").removeClass("ff-el-is-error").find(".error").remove()}),s().validate(e,c.rules)},showErrorMessages:E,scrollToFirstError:k,settings:c,formSelector:H,sendData:y,addGlobalValidator:function(e,t){f[e]=t},config:c,showFormSubmissionProgress:_=function(e){e.addClass("ff_submitting"),e.find(".ff-btn-submit").addClass("disabled").addClass("ff-working").prop("disabled",!0)},addFieldValidationRule:function(e,t,n){c.rules[e]||(c.rules[e]={}),c.rules[e][t]=n},removeFieldValidationRule:function(e,t){e in c.rules&&t in c.rules[e]&&delete c.rules[e][t]},hideFormSubmissionProgress:b=function(e){e.removeClass("ff_submitting"),e.find(".ff-btn-submit").removeClass("disabled").removeClass("ff-working").attr("disabled",!1),o.parent().find(".ff_msg_temp").remove()}},n[a]=F,F};var o={init:function(){var e=this;setTimeout(function(){e.initMultiSelect()},100),this.initMask(),this.initNumericFormat(),this.initCheckableActive(),this.maybeInitSpamTokenProtection(),this.maybeHandleCleanTalkSubmitTime(),this.initOtherOptionHandlers()},maybeInitSpamTokenProtection:function(){var e=this;jQuery("form.frm-fluent-form").each(function(t,n){var r=jQuery(n),o=r.find(".fluent-form-token-field");if(0!==o.length&&!r.hasClass("ff_tokenizing")&&!r.hasClass("ff_tokenized")){var i=function(){r.hasClass("ff_tokenized")||r.hasClass("ff_tokenizing")||(r.addClass("ff_tokenizing"),e.generateAndSetToken(r,o))};r.one("ff_to_next_page ff_to_prev_page",function(e){i()}),r.on("fluentform_first_interaction",function(){i()})}})},generateAndSetToken:function(t,n){var r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.data("form_id"),a=e.ajaxUrl+"?t="+Date.now(),l=this;jQuery.post(a,{action:"fluentform_generate_protection_token",form_id:i,nonce:null===(r=e)||void 0===r?void 0:r.token_nonce}).done(function(e){e.success&&e.data.token?(n.val(e.data.token),t.addClass("ff_tokenized")):(n.val(null),console.error("Token generation failed for form ID:",i))}).fail(function(e,r,a){console.error("Error generating token for form ID:",i,a),o&&setTimeout(function(){l.generateAndSetToken(t,n,!1)},1e3)}).always(function(){t.removeClass("ff_tokenizing")})},maybeHandleCleanTalkSubmitTime:function(){var e;null!==(e=window.fluentFormVars)&&void 0!==e&&e.has_cleantalk&&jQuery("form.frm-fluent-form").each(function(e,t){var n=jQuery(t).find(".ff_ct_form_load_time");n.length&&n.val(Math.floor(Date.now()/1e3))})},initOtherOptionHandlers:function(){jQuery(".ff-other-option input:checked").each(function(){var e=jQuery(this),t=e.closest(".ff-el-input--content").find(".ff-other-input-wrapper");t.length||(t=e.closest("label").next(".ff-other-input-wrapper")),t.length&&(t.show(),r.setAriaRequired(t.find(".ff-el-form-control"),!0))}),jQuery(document).on("input",".ff-other-input-wrapper .ff-el-form-control",function(){""!==jQuery(this).val().trim()&&r.clearAriaInvalid(jQuery(this))}),jQuery(document).on("change",'.ff-other-option input[type="checkbox"]',function(){var e=jQuery(this),t=e.closest(".ff-el-input--content").find(".ff-other-input-wrapper");if(t.length){var n=t.find(".ff-el-form-control");if(r.setAriaRequired(n,e.is(":checked")),e.is(":checked")){t.show();var o=n;""===o.val().trim()&&setTimeout(function(){o.focus()},50)}else t.hide(),t.find(".ff-el-form-control").val("")}}),jQuery(document).on("change",'.ff-other-option input[type="radio"]',function(){var e=jQuery(this),t=e.closest(".ff-el-input--content"),n=t.find(".ff-other-input-wrapper");n.length||(n=e.closest("label").next(".ff-other-input-wrapper")),e.is(":checked")&&(t.find(".ff-other-input-wrapper").hide(),n.length&&(n.show(),r.setAriaRequired(n.find(".ff-el-form-control"),!0),n.find(".ff-el-form-control").focus()))}),jQuery(document).on("change",'.ff-el-input--content input[type="radio"]',function(){var e=jQuery(this);if(!e.closest(".ff-other-option").length){var t=e.closest(".ff-el-input--content");t.find(".ff-other-input-wrapper").hide(),r.setAriaRequired(t.find(".ff-other-input-wrapper .ff-el-form-control"),!1),t.find(".ff-other-input-wrapper .ff-el-form-control").val("")}})},initMultiSelect:function(){t.isFunction(window.Choices)&&t(".ff_has_multi_select").length&&t(".ff_has_multi_select").each(function(e,n){var r=Pe(Pe({},{removeItemButton:!0,silent:!0,shouldSort:!1,searchEnabled:!0,searchResultLimit:50,searchFloor:1,searchChoices:!0,fuseOptions:{threshold:.1,distance:200,ignoreLocation:!0,tokenize:!0,matchAllTokens:!1}}),window.fluentFormVars.choice_js_vars),o=t(n).attr("data-max_selected_options");if(parseInt(o)){r.maxItemCount=parseInt(o);var i=t(n).attr("data-max_selection_message");r.maxItemText=function(e){var t;return t=i||(1===e?window.fluentFormVars.choice_js_vars.maxItemTextSingular:window.fluentFormVars.choice_js_vars.maxItemTextPlural),String(t).replace("%%maxItemCount%%",e)}}r.callbackOnCreateTemplates=function(){t(this.passedElement.element);return{option:function(e){var t=Choices.defaults.templates.option.call(this,e);return e.customProperties&&(t.dataset.calc_value=e.customProperties),t}}},t(n).data("choicesjs",new Choices(n,r))})},initMask:function(){if(null!=jQuery.fn.mask){var e={clearIfNotMatch:window.fluentFormVars.input_mask_vars.clearIfNotMatch,translation:{"*":{pattern:/[0-9a-zA-Z]/},0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};jQuery("input[data-mask]").each(function(t,n){var r=(n=jQuery(n)).attr("data-mask"),o=e;n.attr("data-mask-reverse")&&(o.reverse=!0),n.attr("data-clear-if-not-match")&&(o.clearIfNotMatch=!0),r&&n.mask(r,o)})}},initCheckableActive:function(){t(document).on("change",".ff-el-form-check input[type=radio]",function(){t(this).is(":checked")&&(t(this).closest(".ff-el-input--content").find(".ff-el-form-check").removeClass("ff_item_selected"),t(this).closest(".ff-el-form-check").addClass("ff_item_selected"))}),t(document).on("change",".ff-el-form-check input[type=checkbox]",function(){t(this).is(":checked")?t(this).closest(".ff-el-form-check").addClass("ff_item_selected"):t(this).closest(".ff-el-form-check").removeClass("ff_item_selected")})},initNumericFormat:function(){var e=t("form.frm-fluent-form .ff_numeric");t.each(e,function(e,n){var r=t(n),o=JSON.parse(r.attr("data-formatter"));r.val()&&r.val(window.ff_helper.formatCurrency(r,r.val())),r.on("blur change",function(){var e=currency(t(this).val(),o).format();t(this).val(e)})})}},i=function(){return new function(){this.errors={};this.validate=function(e,n){var o,i,a=this,l=!0;e.each(function(e,c){o=t(c),i=o.prop("name").replace("[]",""),"repeater_item"!==o.data("type")&&"repeater_container"!==o.data("type")||(i=o.attr("data-name"),n[i]=n[o.data("error_index")]),n[i]&&t.each(n[i],function(e,t){e in a&&(a[e](o,t)||(l=!1,i in a.errors||(a.errors[i]={}),a.errors[i][e]=t.message))}),r.check(o)&&(l=!1,i in a.errors||(a.errors[i]={}),a.errors[i].required=function(e,t){var n=t&&t.required&&t.required.message;return r.message(e)||n||"This field is required"}(o,n[i]))}),!l&&this.throwValidationException()},this.throwValidationException=function(){var e=new ffValidationError("Validation Error!");throw e.messages=this.errors,e},this.required=function(e,n){if(!n.value)return!0;var r=e.prop("type");if("checkbox"==r||"radio"==r)return e.parents(".ff-el-group").attr("data-name")&&!n.per_row?e.parents(".ff-el-group").find("input:checked").length:e.closest("form").find('[name="'+e.prop("name")+'"]:checked').length;if(r.startsWith("select")){var o=e.find(":selected");return!(!o.length||!o.val().length)}return"file"==r?e.closest("div").find(".ff-uploaded-list").find(".ff-upload-preview[data-src]").length:"false"==e.attr("is-changed")?"":String(t.trim(e.val())).length},this.countSelections=function(e){var n=e.prop("type"),r=function(e){var n={};return e.each(function(){var e=String(t(this).val());e.length&&(n[e]=!0)}),Object.keys(n).length};return"checkbox"==n?r(e.closest("form").find('[name="'+e.prop("name")+'"]:checked')):n&&n.startsWith("select")?r(e.find(":selected")):String(t.trim(e.val())).length?1:0},this.min_selection=function(e,t){if(!t.value)return!0;var n=this.countSelections(e);return!n||n>=Number(t.value)},this.max_selection=function(e,t){return!t.value||this.countSelections(e)<=Number(t.value)},this.url=function(e,t){var n=e.val();if(!t.value||!n.length)return!0;return/^(ftp|http|https):\/\/[^ "]+$/.test(n)},this.email=function(e,t){var n=e.val();if(!t.value||!n.length)return!0;return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n.toLowerCase())},this.numeric=function(e,n){var r=window.ff_helper.numericVal(e);return r=r.toString(),!n.value||!r||t.isNumeric(r)},this.min=function(e,t){if(!e.val())return!0;var n=window.ff_helper.numericVal(e);return n=n.toString(),!t.value||!n.length||(this.numeric(e,t)?Number(n)>=Number(t.value):void 0)},this.max=function(e,t){if(!e.val())return!0;var n=window.ff_helper.numericVal(e);return n=n.toString(),!t.value||!n.length||(this.numeric(e,t)?Number(n)<=Number(t.value):void 0)},this.digits=function(e,t){if(!e.val())return!0;var n=window.ff_helper.numericVal(e);return n=n.toString(),!t.value||!n.length||this.numeric(e,t)&&n.length==t.value},this.max_file_size=function(){return!0},this.max_file_count=function(){return!0},this.allowed_file_types=function(){return!0},this.allowed_image_types=function(){return!0},this.force_failed=function(){return!1},this.valid_phone_number=function(e,t){if(!e.val())return!0;if(e&&e[0]){var n;if(!(n=void 0!==window.intlTelInputGlobals?window.intlTelInputGlobals.getInstance(e[0]):e.data("iti")))return!0;if(e.hasClass("ff_el_with_extended_validation"))return!!("yes"===e.data("strict_validation")&&"function"==typeof n.isValidNumberPrecise?n.isValidNumberPrecise():n.isValidNumber())&&(e.val(n.getNumber()),!0);var r=n.getSelectedCountryData(),o=e.val();return!e.attr("data-original_val")&&o&&r&&r.dialCode&&(e.val("+"+r.dialCode+o),e.attr("data-original_val",o)),!0}}}},a=t("form.frm-fluent-form");function l(e){var t=fluentFormApp(e);if(t)t.initFormHandlers(),t.initTriggers();else var n=0,r=setInterval(function(){(t=fluentFormApp(e))&&(clearInterval(r),t.initFormHandlers(),t.initTriggers()),++n>10&&(clearInterval(r),console.log("Form could not be loaded"))},1e3)}function c(){t(".ff_has_multi_select").each(function(){var e=t(this).data("choicesjs");if(e&&e.passedElement){e.passedElement.element.addEventListener("showDropdown",function(){var e=this.closest(".choices");if(e){var t=e.querySelector(".choices__list--dropdown");if(t){t.style.maxHeight="300px",t.style.overflowY="auto";var n=t.querySelector('.choices__list[role="listbox"]')||t.querySelector(".choices__list:not(.choices__list--dropdown)");n&&(n.style.maxHeight="280px",n.style.overflowY="auto",n.style.webkitOverflowScrolling="touch",n.style.touchAction="pan-y")}}},{passive:!0});var n=e.passedElement.element.closest(".choices");n&&(n.addEventListener("focus",function(t){n.classList.contains("is-open")||e.showDropdown()},!0),n.addEventListener("keydown",function(t){"Tab"===t.key&&n.classList.contains("is-open")&&e.hideDropdown()}))}})}t.each(a,function(e,n){l(t(n))}),t(document).on("ff_reinit",function(e,n){var r=t(n),i=fluentFormApp(r);if(!i)return!1;i.reinitExtras(),l(r),o.init(),r.attr("data-ff_reinit","yes")}),o.init(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){setTimeout(c,100)}):setTimeout(c,100)}(window.fluentFormVars,jQuery),jQuery(".fluentform").on("submit",".ff-form-loading",function(e){var t;e.preventDefault(),jQuery(this).parent().find(".ff_msg_temp").remove(),jQuery("<div/>",{class:"error text-danger ff_msg_temp"}).html(je((null===(t=window.fluentform_submission_messages_global)||void 0===t?void 0:t.javascript_handler_failed)||"Javascript handler could not be loaded. Form submission has been failed. Reload the page and try again")).insertAfter(jQuery(this))})})})();
Save File
Cancel